:root {
  --bg: #0a0f14;
  --bg-raised: #0e151c;
  --panel: #111a22;
  --panel-strong: #16222c;
  --panel-hover: #1a2a35;
  --line: rgba(178, 208, 224, 0.12);
  --line-strong: rgba(178, 208, 224, 0.22);
  --text: #edf5f7;
  --muted: #8ea5ae;
  --muted-2: #5c737d;
  --cyan: #59d7e9;
  --lime: #b7ef75;
  --amber: #f4bd66;
  --coral: #f17d73;
  --blue: #77a9ff;
  --purple: #a58bff;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
}

:root[data-theme="light"] {
  --bg: #eef4f5;
  --bg-raised: #f8fbfb;
  --panel: #ffffff;
  --panel-strong: #f4f9fa;
  --panel-hover: #eaf4f5;
  --line: rgba(28, 69, 81, 0.14);
  --line-strong: rgba(28, 69, 81, 0.25);
  --text: #122b34;
  --muted: #58717a;
  --muted-2: #7b9299;
  --cyan: #168ca4;
  --lime: #5c9b31;
  --amber: #b8781e;
  --coral: #c94c43;
  --blue: #4776c7;
  --purple: #7359bd;
  --shadow: 0 22px 60px rgba(38, 76, 88, 0.12);
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "DM Sans", "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  line-height: 1.45;
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 244px;
  flex-direction: column;
  min-height: 100vh;
  padding: 24px 16px 18px;
  border-right: 1px solid var(--line);
  background: #0b1218;
}

:root[data-theme="light"] .sidebar { background: #f8fbfb; }

.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 26px; }
.brand-mark { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(89, 215, 233, .45); border-radius: 10px; background: linear-gradient(145deg, rgba(89, 215, 233, .18), rgba(183, 239, 117, .05)); color: var(--cyan); box-shadow: inset 0 0 24px rgba(89, 215, 233, .08); }
.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.brand-sub { display: block; margin-top: 2px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

.workspace-switcher { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 26px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.025); text-align: left; cursor: pointer; transition: .2s ease; }
.workspace-switcher:hover { border-color: var(--line-strong); background: rgba(255,255,255,.05); }
.avatar { display: grid; flex: 0 0 auto; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #eff8ff; color: #091118; font-weight: 700; }
.avatar.small { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; }
.workspace-copy { min-width: 0; flex: 1; }
.workspace-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.workspace-copy span { display: block; margin-top: 2px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.workspace-switcher .chevron { color: var(--muted-2); }

.nav-label { padding: 0 10px 8px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; cursor: pointer; transition: .2s ease; }
.nav-item svg { width: 16px; height: 16px; stroke-width: 1.8; }
.nav-item:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav-item.active { border-color: rgba(89, 215, 233, .18); background: rgba(89, 215, 233, .09); color: var(--text); }
.nav-item.active svg { color: var(--cyan); }
.nav-count { margin-left: auto; padding: 2px 6px; border-radius: 5px; background: rgba(241, 125, 115, .15); color: var(--coral); font-family: "IBM Plex Mono", monospace; font-size: 10px; }

.sidebar-bottom { margin-top: auto; }
.sync-status { display: flex; align-items: center; gap: 9px; margin: 0 8px 16px; padding: 11px 10px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.live-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--lime); box-shadow: 0 0 0 4px rgba(183, 239, 117, .1), 0 0 16px rgba(183, 239, 117, .5); }
.sync-status strong { display: block; color: var(--text); font-size: 11px; font-weight: 600; }
.sync-status span:last-child { display: block; margin-top: 2px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; padding: 0 8px; color: var(--muted-2); }
.sidebar-footer button { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted-2); cursor: pointer; }
.sidebar-footer button:hover { border-color: var(--line); background: rgba(255,255,255,.04); color: var(--text); }
.sidebar-footer svg { width: 15px; height: 15px; }

.main { min-width: 0; flex: 1; background: radial-gradient(circle at 82% -8%, rgba(56, 116, 130, .12), transparent 30%), var(--bg); }
:root[data-theme="light"] .main { background: radial-gradient(circle at 82% -8%, rgba(56, 159, 177, .13), transparent 30%), var(--bg); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 74px; padding: 0 34px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--text); font-weight: 600; }
.breadcrumb svg { width: 13px; height: 13px; color: var(--muted-2); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sync-copy { display: flex; align-items: center; gap: 7px; padding-right: 12px; border-right: 1px solid var(--line); color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.sync-copy svg { width: 13px; height: 13px; color: var(--lime); }
.icon-button, .primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; border-radius: 8px; cursor: pointer; transition: .2s ease; }
.icon-button { width: 34px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: var(--muted); }
.icon-button:hover { border-color: var(--line-strong); color: var(--text); background: rgba(255,255,255,.06); }
.icon-button svg { width: 15px; height: 15px; }
.compact-button { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 10px; cursor: pointer; transition: .2s ease; }
.compact-button:hover { border-color: var(--line-strong); color: var(--text); background: rgba(255,255,255,.06); }
.lang-divider { margin: 0 4px; color: var(--muted-2); }
html[lang="zh-CN"] .lang-en, html[lang="en"] .lang-zh { color: var(--muted-2); opacity: .58; }
:root[data-theme="light"] .compact-button, :root[data-theme="light"] .icon-button { background: rgba(255,255,255,.66); }
.primary-button { padding: 0 13px; border: 1px solid rgba(183, 239, 117, .38); background: rgba(183, 239, 117, .13); color: var(--lime); font-size: 12px; font-weight: 600; }
.primary-button:hover { background: rgba(183, 239, 117, .2); }
.primary-button svg { width: 14px; height: 14px; }

.page { max-width: 1540px; margin: 0 auto; padding: 30px 34px 48px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.eyebrow { margin: 0 0 9px; color: var(--cyan); font-family: "IBM Plex Mono", monospace; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(28px, 3.2vw, 42px); font-weight: 600; letter-spacing: -.045em; line-height: 1.05; }
.page-intro { max-width: 590px; margin-top: 11px; color: var(--muted); font-size: 13px; }
.heading-tools { display: flex; align-items: center; gap: 8px; }
.date-pill { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.date-pill svg { width: 13px; height: 13px; color: var(--cyan); }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.metric-card { position: relative; min-height: 138px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(255,255,255,.04), rgba(255,255,255,.012)); box-shadow: 0 12px 32px rgba(0, 0, 0, .1); }
.metric-card::after { position: absolute; right: -22px; bottom: -38px; width: 100px; height: 100px; border: 1px solid rgba(89, 215, 233, .12); border-radius: 50%; content: ""; }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.metric-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; background: rgba(89, 215, 233, .12); color: var(--cyan); }
.metric-icon svg { width: 15px; height: 15px; }
.metric-value { margin-top: 18px; font-size: 32px; font-weight: 600; letter-spacing: -.05em; line-height: 1; }
.metric-meta { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.metric-meta.positive { color: var(--lime); }
.metric-meta.warning { color: var(--amber); }
.metric-meta svg { width: 12px; height: 12px; }
.metric-card.accent-lime .metric-icon { background: rgba(183, 239, 117, .12); color: var(--lime); }
.metric-card.accent-amber .metric-icon { background: rgba(244, 189, 102, .13); color: var(--amber); }
.metric-card.accent-coral .metric-icon { background: rgba(241, 125, 115, .13); color: var(--coral); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(310px, .85fr); gap: 14px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(17, 26, 34, .84); box-shadow: 0 14px 40px rgba(0, 0, 0, .12); }
:root[data-theme="light"] .panel { background: rgba(255, 255, 255, .84); box-shadow: 0 14px 40px rgba(38, 76, 88, .08); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 18px; border-bottom: 1px solid var(--line); }
.connection-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; padding: 18px; }
.connection-panel.warning { border-color: rgba(244, 189, 102, .34); }
.connection-copy { min-width: 0; }
.connection-copy h2 { font-size: 17px; font-weight: 600; }
.connection-copy p { max-width: 620px; margin-top: 6px; color: var(--muted); font-size: 12px; }
.loading-dot { width: 12px; height: 12px; flex: 0 0 auto; border: 2px solid var(--line-strong); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
.empty-state { padding: 28px 18px; color: var(--muted-2); text-align: center; font-size: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }
.panel-title { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; }
.panel-title svg { width: 15px; height: 15px; color: var(--cyan); }
.panel-caption { margin-top: 4px; color: var(--muted-2); font-size: 11px; }
.text-button { border: 0; background: transparent; color: var(--cyan); font-size: 11px; cursor: pointer; }
.text-button:hover { color: var(--text); }

.pulse-panel { min-height: 248px; }
.pulse-body { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(300px, 1.2fr); gap: 18px; padding: 18px; }
.pulse-actions { display: flex; align-items: center; gap: 11px; }
.pulse-toggle { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.025); }
.pulse-toggle-button { min-height: 26px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: var(--muted-2); font-size: 10px; cursor: pointer; transition: .2s ease; }
.pulse-toggle-button:hover { color: var(--text); }
.pulse-toggle-button.active { background: rgba(89, 215, 233, .12); color: var(--cyan); }
.pulse-summary { display: flex; flex-direction: column; justify-content: center; }
.pulse-score { display: flex; align-items: baseline; gap: 7px; }
.pulse-score strong { font-size: 45px; font-weight: 600; letter-spacing: -.07em; }
.pulse-score span { color: var(--lime); font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.pulse-summary p { max-width: 210px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.pulse-legend { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 20px; }
.legend-item { display: flex; align-items: center; gap: 6px; color: var(--muted-2); font-size: 10px; }
.legend-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--lime); }
.legend-dot.cyan { background: var(--cyan); }
.legend-dot.coral { background: var(--coral); }
.chart-wrap { position: relative; min-height: 180px; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: 11px; background: rgba(7, 13, 18, .34); }
.chart-labels { display: flex; justify-content: space-between; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.chart { position: relative; display: grid; grid-template-columns: repeat(12, 1fr); align-items: end; gap: 7px; height: 115px; margin-top: 8px; padding-top: 8px; border-bottom: 1px solid var(--line); background-image: linear-gradient(to bottom, transparent 32%, rgba(178, 208, 224, .05) 33%, transparent 34%, transparent 65%, rgba(178, 208, 224, .05) 66%, transparent 67%); }
.bar { position: relative; min-height: 8px; border-radius: 4px 4px 1px 1px; background: linear-gradient(180deg, var(--cyan), rgba(89, 215, 233, .25)); opacity: .72; transition: .25s ease; }
.bar:hover { opacity: 1; filter: brightness(1.15); }
.bar.lime { background: linear-gradient(180deg, var(--lime), rgba(183, 239, 117, .2)); }
.chart-foot { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.pulse-visual { min-width: 0; }
.heatmap-wrap { min-height: 180px; padding: 14px; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: rgba(7, 13, 18, .34); }
:root[data-theme="light"] .heatmap-wrap { background: rgba(239, 248, 249, .72); }
.heatmap-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.heatmap-head strong { display: block; color: var(--text); font-size: 11px; font-weight: 600; }
.heatmap-head span { display: block; margin-top: 3px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.heatmap-legend { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.heatmap-legend span { display: inline; margin: 0; font-size: 8px; }
.heat-cell { display: block; width: 10px; height: 10px; padding: 0; border: 1px solid transparent; border-radius: 3px; background: rgba(178, 208, 224, .08); }
button.heat-cell { cursor: pointer; transition: transform .16s ease, border-color .16s ease; }
button.heat-cell:hover { border-color: var(--text); transform: scale(1.2); }
.heat-cell.level-0 { background: rgba(178, 208, 224, .08); }
.heat-cell.level-1 { background: rgba(89, 215, 233, .22); }
.heat-cell.level-2 { background: rgba(89, 215, 233, .45); }
.heat-cell.level-3 { background: rgba(183, 239, 117, .62); }
.heat-cell.level-4 { background: var(--lime); box-shadow: 0 0 7px rgba(183, 239, 117, .24); }
.heat-cell.selected { border-color: var(--text); box-shadow: 0 0 0 2px rgba(89, 215, 233, .2); }
.heatmap-months { display: grid; grid-template-columns: repeat(6, 1fr); margin: 13px 0 5px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 8px; }
.heatmap-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 10px); grid-template-columns: repeat(26, 10px); gap: 4px; width: max-content; }
.heatmap-detail { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 13px; padding-top: 10px; border-top: 1px solid var(--line); }
.heatmap-detail .eyebrow { margin-bottom: 2px; font-size: 8px; }
.heatmap-detail strong { display: block; color: var(--text); font-size: 11px; font-weight: 500; }
.heatmap-stats { display: flex; align-items: center; gap: 9px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 8px; white-space: nowrap; }
.heatmap-stats b { color: var(--text); font-size: 11px; font-weight: 500; }
.heatmap-stats .failure-text b { color: var(--coral); }

.attention-panel { min-height: 248px; }
.attention-list { display: grid; gap: 1px; padding: 5px 0; }
.attention-item { display: grid; grid-template-columns: 29px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 18px; transition: .2s ease; }
.attention-item:hover { background: rgba(255,255,255,.025); }
.attention-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 8px; background: rgba(241, 125, 115, .12); color: var(--coral); }
.attention-icon.amber { background: rgba(244, 189, 102, .12); color: var(--amber); }
.attention-icon.cyan { background: rgba(89, 215, 233, .12); color: var(--cyan); }
.attention-icon svg { width: 14px; height: 14px; }
.attention-main { min-width: 0; }
.attention-main strong { display: block; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.attention-main span { display: block; margin-top: 2px; overflow: hidden; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.attention-time { color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 9px; white-space: nowrap; }

.repo-panel { grid-column: 1 / -1; }
.repo-toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.search-box { position: relative; min-width: 220px; flex: 1; }
.search-box svg { position: absolute; top: 50%; left: 11px; width: 14px; height: 14px; color: var(--muted-2); transform: translateY(-50%); }
.search-box input { width: 100%; height: 34px; padding: 0 11px 0 32px; border: 1px solid var(--line); border-radius: 8px; outline: 0; background: rgba(6, 11, 15, .35); color: var(--text); font-size: 11px; }
:root[data-theme="light"] .search-box input { background: rgba(255, 255, 255, .74); }
.search-box input::placeholder { color: var(--muted-2); }
.search-box input:focus { border-color: rgba(89, 215, 233, .5); }
.filter-button, .sort-select { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); color: var(--muted); font-size: 11px; }
.filter-button { cursor: pointer; }
.filter-button:hover { border-color: var(--line-strong); color: var(--text); }
.filter-button.active { border-color: rgba(89, 215, 233, .42); background: rgba(89, 215, 233, .1); color: var(--cyan); }
.filter-button svg, .sort-select svg { width: 13px; height: 13px; }
.sort-select { cursor: pointer; }
.sort-select select { max-width: 104px; border: 0; outline: 0; background: transparent; color: inherit; font-size: 11px; cursor: pointer; }
.sort-select option { background: var(--panel); color: var(--text); }
.repo-table { width: 100%; border-collapse: collapse; }
.repo-table th { padding: 10px 18px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 9px; font-weight: 400; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.repo-table td { padding: 13px 18px; border-top: 1px solid rgba(178, 208, 224, .08); color: var(--muted); font-size: 11px; vertical-align: middle; }
.repo-table tbody tr { cursor: pointer; transition: .2s ease; }
.repo-table tbody tr:hover { background: rgba(89, 215, 233, .045); }
.repo-name { display: flex; align-items: center; gap: 10px; min-width: 220px; }
.repo-symbol { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); color: var(--cyan); }
.repo-symbol svg { width: 14px; height: 14px; }
.repo-name strong { display: block; color: var(--text); font-size: 12px; font-weight: 600; }
.repo-name span { display: block; margin-top: 2px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.visibility { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px; font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.visibility.public { background: rgba(183, 239, 117, .1); color: var(--lime); }
.visibility.private { background: rgba(165, 139, 255, .12); color: var(--purple); }
.visibility svg { width: 11px; height: 11px; }
.health { display: inline-flex; align-items: center; gap: 6px; color: var(--lime); font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.health.warn { color: var(--amber); }
.health.error { color: var(--coral); }
.health-dot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; box-shadow: 0 0 9px currentColor; }
.capabilities { display: flex; align-items: center; gap: 6px; }
.capability { display: grid; width: 23px; height: 23px; place-items: center; border: 1px solid transparent; border-radius: 6px; color: var(--muted-2); }
.capability.on { border-color: rgba(183, 239, 117, .2); background: rgba(183, 239, 117, .08); color: var(--lime); }
.capability.warn { border-color: rgba(244, 189, 102, .2); background: rgba(244, 189, 102, .08); color: var(--amber); }
.capability.unknown { border-color: rgba(244, 189, 102, .2); background: rgba(244, 189, 102, .08); color: var(--amber); }
.capability.off { opacity: .32; }
.capability svg { width: 12px; height: 12px; }
.mono { color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 10px; white-space: nowrap; }
.table-empty { padding: 28px 18px !important; color: var(--muted-2) !important; text-align: center; }

.usage-panel { grid-column: 1 / -1; }
.usage-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); }
.usage-card { min-height: 134px; padding: 18px; background: var(--panel); }
.usage-card:first-child { border-radius: 0 0 0 var(--radius); }
.usage-card:last-child { border-radius: 0 0 var(--radius) 0; }
.usage-head { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.usage-head svg { width: 14px; height: 14px; color: var(--cyan); }
.usage-number { display: flex; align-items: baseline; gap: 5px; margin-top: 13px; }
.usage-number strong { font-size: 25px; letter-spacing: -.04em; }
.usage-number span { color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.progress { height: 6px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.07); }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--cyan); }
.progress.lime span { background: var(--lime); }
.progress.amber span { background: var(--amber); }
.usage-foot { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 9px; }

.view { display: none; }
.view.active { display: block; animation: reveal .28s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.subpage-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.subpage-header h2 { font-size: 22px; letter-spacing: -.035em; }
.subpage-header p { margin-top: 6px; color: var(--muted); font-size: 12px; }
.subpage-actions { display: flex; gap: 8px; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.mini-stat { padding: 14px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: rgba(255,255,255,.025); }
.mini-stat span { color: var(--muted-2); font-size: 10px; }
.mini-stat strong { display: block; margin-top: 7px; font-size: 20px; font-weight: 600; letter-spacing: -.04em; }
.automation-grid, .billing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.workflow-list, .billing-list { padding: 4px 0; }
.workflow-row, .billing-row { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 13px 17px; border-bottom: 1px solid rgba(178,208,224,.08); }
.workflow-row:last-child, .billing-row:last-child { border-bottom: 0; }
.workflow-icon, .billing-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: rgba(89,215,233,.1); color: var(--cyan); }
.workflow-icon.error, .billing-icon.error { background: rgba(241,125,115,.11); color: var(--coral); }
.workflow-icon svg, .billing-icon svg { width: 14px; height: 14px; }
.workflow-row strong, .billing-row strong { display: block; font-size: 11px; }
.workflow-row span, .billing-row span { display: block; margin-top: 3px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.row-state { color: var(--lime); font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.row-state.error { color: var(--coral); }

.drawer-backdrop { position: fixed; z-index: 20; inset: 0; display: none; background: rgba(3, 7, 10, .64); backdrop-filter: blur(4px); }
.drawer-backdrop.open { display: block; }
.drawer { position: absolute; top: 0; right: 0; display: flex; width: min(460px, 100%); height: 100%; flex-direction: column; border-left: 1px solid var(--line-strong); background: #0d161e; box-shadow: -30px 0 80px rgba(0,0,0,.28); animation: slide-in .24s ease both; }
:root[data-theme="light"] .drawer { background: #ffffff; box-shadow: -30px 0 80px rgba(38, 76, 88, .16); }
@keyframes slide-in { from { transform: translateX(30px); opacity: .4; } to { transform: translateX(0); opacity: 1; } }
.drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 24px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 22px; letter-spacing: -.04em; }
.drawer-head p { margin-top: 6px; color: var(--muted); font-family: "IBM Plex Mono", monospace; font-size: 10px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 28px; }
.drawer-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid rgba(183,239,117,.18); border-radius: 10px; background: rgba(183,239,117,.055); }
.drawer-status strong { display: block; font-size: 12px; }
.drawer-status span { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.drawer-section { margin-top: 22px; }
.drawer-section h3 { margin-bottom: 10px; color: var(--muted-2); font-family: "IBM Plex Mono", monospace; font-size: 10px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.detail-box { padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.detail-box span { display: block; color: var(--muted-2); font-size: 10px; }
.detail-box strong { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; }
.service-list { display: grid; gap: 8px; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); }
.service-name { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.service-name svg { width: 14px; height: 14px; color: var(--cyan); }
.service-state { font-family: "IBM Plex Mono", monospace; font-size: 9px; }
.service-state.on { color: var(--lime); }
.service-state.off { color: var(--muted-2); }
.service-state.warn { color: var(--amber); }

.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 9px; max-width: 320px; padding: 12px 14px; border: 1px solid rgba(183,239,117,.24); border-radius: 10px; background: #142118; color: var(--lime); box-shadow: var(--shadow); font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .25s ease; }
:root[data-theme="light"] .toast { border-color: rgba(92,155,49,.26); background: #eef8ee; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast svg { width: 15px; height: 15px; }

.mobile-menu { display: none; }

@media (max-width: 1160px) {
  .sidebar { flex-basis: 214px; }
  .topbar, .page { padding-left: 24px; padding-right: 24px; }
  .content-grid { grid-template-columns: 1fr; }
  .attention-panel { min-height: auto; }
  .repo-panel, .usage-panel { grid-column: auto; }
  .repo-table th:nth-child(4), .repo-table td:nth-child(4), .repo-table th:nth-child(6), .repo-table td:nth-child(6) { display: none; }
}

@media (max-width: 800px) {
  .sidebar { position: fixed; z-index: 15; width: 254px; transform: translateX(-100%); transition: transform .24s ease; }
  .sidebar.open { transform: translateX(0); }
  .mobile-menu { display: grid; width: 34px; height: 34px; place-items: center; margin-right: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.02); color: var(--muted); cursor: pointer; }
  .mobile-menu svg { width: 16px; height: 16px; }
  .topbar { gap: 8px; padding: 0 16px; }
  .breadcrumb { min-width: 0; }
  .breadcrumb span { display: none; }
  .sync-copy { display: none; }
  .page { padding: 24px 16px 36px; }
  .page-heading, .subpage-header { align-items: flex-start; flex-direction: column; }
  .connection-panel { align-items: flex-start; flex-direction: column; }
  .heading-tools { width: 100%; }
  .date-pill { flex: 1; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .metric-card { min-height: 125px; padding: 14px; }
  .metric-value { margin-top: 14px; font-size: 26px; }
  .pulse-body { grid-template-columns: 1fr; }
  .pulse-summary p { max-width: none; }
  .pulse-actions { width: 100%; justify-content: space-between; }
  .heatmap-wrap { overflow-x: auto; }
  .repo-toolbar { flex-wrap: wrap; }
  .search-box { min-width: 100%; order: -1; }
  .repo-table { min-width: 700px; }
  .repo-panel { overflow-x: auto; }
  .repo-panel .panel-header { min-width: 700px; }
  .usage-grid, .automation-grid, .billing-grid { grid-template-columns: 1fr; }
  .usage-card, .usage-card:first-child, .usage-card:last-child { border-radius: 0; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 430px) {
  h1 { font-size: 29px; }
  .metric-grid { gap: 8px; }
  .metric-card { min-height: 116px; }
  .metric-top { font-size: 10px; }
  .metric-icon { width: 25px; height: 25px; }
  .metric-value { font-size: 24px; }
  .metric-meta { font-size: 9px; }
  .heading-tools { flex-wrap: wrap; }
  .date-pill { flex: 1 1 100%; }
  .top-actions .primary-button span { display: none; }
}

.settings-panel { max-width: 860px; }
.settings-account { display: flex; align-items: center; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.settings-account > div:nth-child(2) { display: grid; gap: 4px; flex: 1; }
.settings-account > div:nth-child(2) span { color: var(--muted); font-size: 12px; }
.avatar.large { width: 44px; height: 44px; font-size: 18px; }
.settings-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.settings-actions { display: flex; gap: 10px; margin-top: 22px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text); background: transparent; cursor: pointer; font: inherit; }
.secondary-button:hover { background: var(--panel-strong); }

@media (max-width: 760px) {
  .settings-account { align-items: flex-start; flex-wrap: wrap; }
  .settings-account .service-state { margin-left: 58px; }
  .settings-facts { grid-template-columns: 1fr; }
}
