:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #e5eaf3;
  --muted: #a2aec2;
  --line: #303b4e;
  --bg: #111827;
  --blue2: #202d4d;
}

:root[data-theme="dark"] body,
:root[data-theme="dark"] .main-area { background: #111827; color: #e5eaf3; }
:root[data-theme="dark"] .sidebar { background: #0b1220; }
:root[data-theme="dark"] .topbar { background: #151f30; border-color: #303b4e; }
:root[data-theme="dark"] .breadcrumbs,
:root[data-theme="dark"] .breadcrumbs strong,
:root[data-theme="dark"] .page-heading h1,
:root[data-theme="dark"] .repo-title-line h1,
:root[data-theme="dark"] .repo-title-line .owner-link,
:root[data-theme="dark"] .panel-title,
:root[data-theme="dark"] .pr-subtitle,
:root[data-theme="dark"] .detail-title h1,
:root[data-theme="dark"] .modal-head h2,
:root[data-theme="dark"] .markdown-body h1,
:root[data-theme="dark"] .markdown-body h2,
:root[data-theme="dark"] .markdown-body h3,
:root[data-theme="dark"] .markdown-body h4 { color: #e5eaf3; }
:root[data-theme="dark"] .page-heading p,
:root[data-theme="dark"] .repo-description,
:root[data-theme="dark"] .about-content,
:root[data-theme="dark"] .about-stat,
:root[data-theme="dark"] .branch-summary,
:root[data-theme="dark"] .pr-summary,
:root[data-theme="dark"] .review-info,
:root[data-theme="dark"] .sync-status,
:root[data-theme="dark"] .markdown-body { color: #a2aec2; }
:root[data-theme="dark"] .panel,
:root[data-theme="dark"] .stat-card,
:root[data-theme="dark"] .repo-card,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .auth-card { background: #1a2536; border-color: #303b4e; color: #e5eaf3; }
:root[data-theme="dark"] .panel-header,
:root[data-theme="dark"] .pr-section-head,
:root[data-theme="dark"] .readme-title,
:root[data-theme="dark"] .latest-commit,
:root[data-theme="dark"] .modal-foot { background: #202c3f; border-color: #303b4e; color: #c8d1df; }
:root[data-theme="dark"] .repo-row,
:root[data-theme="dark"] .pr-row,
:root[data-theme="dark"] .comment,
:root[data-theme="dark"] .repo-file-row,
:root[data-theme="dark"] .about-source,
:root[data-theme="dark"] .repo-tabs { border-color: #303b4e; }
:root[data-theme="dark"] .repo-name,
:root[data-theme="dark"] .pr-title,
:root[data-theme="dark"] .repo-file-row,
:root[data-theme="dark"] .markdown-body a,
:root[data-theme="dark"] .about-source a { color: #91aaff; }
:root[data-theme="dark"] .repo-file-row:hover,
:root[data-theme="dark"] .button:hover { background: #26344a; }
:root[data-theme="dark"] .button,
:root[data-theme="dark"] .search input,
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .comment-form textarea,
:root[data-theme="dark"] .branch-controls select,
:root[data-theme="dark"] .file-view-head select { background: #111a29; border-color: #3a465a; color: #e5eaf3; }
:root[data-theme="dark"] .clone-box,
:root[data-theme="dark"] .branch-chip,
:root[data-theme="dark"] .branch-flow code,
:root[data-theme="dark"] .markdown-body code { background: #111a29; border-color: #303b4e; color: #c8d1df; }
:root[data-theme="dark"] .markdown-body pre,
:root[data-theme="dark"] .source-code,
:root[data-theme="dark"] .diff-line.file { background: #111a29; border-color: #303b4e; color: #c8d1df; }
:root[data-theme="dark"] .theme-toggle { color: #f0c674; border-color: #3a465a; background: #202c3f; }
:root[data-theme="dark"] .auth-screen { background: #111827; }
:root[data-theme="dark"] .auth-card h1,
:root[data-theme="dark"] .auth-card p { color: #e5eaf3; }
:root[data-theme="dark"] .auth-note { color: #a2aec2; }

.theme-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #e1e6ed;
  border-radius: 6px;
  background: #fff;
  color: #536078;
  font-size: 17px;
}
.theme-toggle:hover { background: #f3f5f8; }

.commit-history-link,
.commit-hash-link { color: #405bd0; text-decoration: none; }
.commit-history-link:hover,
.commit-hash-link:hover { text-decoration: underline; }
.commit-hash-link code { font: 10px 'DM Mono', monospace; }
.latest-commit-link { color: inherit; text-decoration: none; }
.latest-commit-link:hover { background: #f3f5f8; }
.commit-detail { margin-top: 14px; }
.commit-detail-meta { display: grid; gap: 9px; padding: 15px; color: #778198; font-size: 10px; border-bottom: 1px solid var(--line); }
.commit-detail-meta strong { color: #34415a; }
.commit-full-hash { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.commit-full-hash span { color: #778198; }
.commit-full-hash code { overflow-wrap: anywhere; font: 10px 'DM Mono', monospace; color: #536078; }
.commit-message { margin: 0; padding: 14px 15px; border-bottom: 1px solid var(--line); color: #526078; font: 11px/1.6 'DM Sans', sans-serif; white-space: pre-wrap; overflow-wrap: anywhere; }
.commit-changed-files { padding: 7px 14px; }
.commit-changed-file { display: flex; align-items: center; gap: 10px; min-height: 32px; border-bottom: 1px solid var(--line); font-size: 10px; }
.commit-changed-file:last-child { border-bottom: 0; }
.commit-changed-file code { color: #526078; overflow-wrap: anywhere; }
.commit-diff { border-top: 1px solid var(--line); }
:root[data-theme="dark"] .commit-history-link,
:root[data-theme="dark"] .commit-hash-link { color: #91aaff; }
:root[data-theme="dark"] .latest-commit-link:hover { background: #26344a; }
:root[data-theme="dark"] .commit-detail-meta,
:root[data-theme="dark"] .commit-detail-meta strong,
:root[data-theme="dark"] .commit-full-hash code,
:root[data-theme="dark"] .commit-message,
:root[data-theme="dark"] .commit-changed-file code { color: #c8d1df; }

.issue-list { margin-top: 16px; }
.issue-list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 53px; padding: 0 15px; border-bottom: 1px solid var(--line); color: #778198; font-size: 10px; }
.issue-filters { display: flex; gap: 5px; }
.issue-filter { color: #778198; text-decoration: none; padding: 7px 9px; border-radius: 5px; }
.issue-filter.active,.issue-filter:hover { color: #34415a; background: #f1f3f7; }
.issue-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #eef0f4; }
.issue-row:last-child { border-bottom: 0; }
.issue-state-icon { font-size: 14px; line-height: 1.2; color: #23825c; }
.issue-state-icon.closed { color: #7156ba; }
.issue-row-main { min-width: 0; flex: 1; }
.issue-title { color: #34425a; font-size: 11px; font-weight: 700; text-decoration: none; }
.issue-title:hover { color: #4568ed; }
.issue-meta,.issue-updated { color: #8a94a5; font-size: 9px; }
.issue-meta { margin-top: 5px; }
.issue-updated { white-space: nowrap; }
.issue-detail-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin: 4px 0 14px; }
.issue-detail-title { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.issue-detail-title h1 { margin: 0; color: #25314a; font-size: 22px; }
.issue-detail-heading p { margin: 8px 0 0; }
.issue-thread { display: grid; gap: 12px; max-width: 900px; margin: 18px auto; }
.issue-comment { padding: 15px 17px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.issue-comment header { display: flex; align-items: center; gap: 8px; padding-bottom: 10px; color: #8a94a5; font-size: 9px; }
.issue-comment header strong { color: #34415a; font-size: 10px; }
.issue-comment-body { color: #526078; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.issue-comment-body.markdown-body { padding: 0; overflow-wrap: anywhere; }
.issue-comment-body.markdown-body p:first-child { margin-top: 0; }
.issue-import-badge { margin-left: auto; padding: 3px 6px; border-radius: 10px; background: #f1f3f7; color: #6e7890; font-size: 8px; }
.issue-source-link { margin-left: auto; color: #526ebd; text-decoration: none; }
.issue-comment-form { padding: 15px; }
.issue-comment-form label { display: block; margin-bottom: 8px; color: #58657b; font-size: 10px; font-weight: 700; }
.issue-comment-form textarea { width: 100%; min-height: 105px; resize: vertical; padding: 10px; border: 1px solid #dfe4ec; border-radius: 5px; color: #26334b; font: inherit; font-size: 11px; }
.issue-form-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; color: #8a94a5; font-size: 9px; }
:root[data-theme="dark"] .issue-list-toolbar { color: #a2aec2; }
:root[data-theme="dark"] .issue-filter { color: #a2aec2; }
:root[data-theme="dark"] .issue-filter.active,
:root[data-theme="dark"] .issue-filter:hover { color: #e5eaf3; background: #26344a; }
:root[data-theme="dark"] .issue-row { border-color: #303b4e; }
:root[data-theme="dark"] .issue-comment { background: #1a2536; border-color: #303b4e; }
:root[data-theme="dark"] .code-owner-panel>div { border-color: #303b4e; background: #151f30; }
:root[data-theme="dark"] .code-owner-warning { color: #f0b36e !important; }
:root[data-theme="dark"] .issue-title,
:root[data-theme="dark"] .issue-detail-title h1,
:root[data-theme="dark"] .issue-comment header strong,
:root[data-theme="dark"] .issue-comment-body,
:root[data-theme="dark"] .issue-comment-form label { color: #e5eaf3; }
:root[data-theme="dark"] .issue-comment-form textarea { background: #111a29; border-color: #3a465a; color: #e5eaf3; }
:root[data-theme="dark"] .issue-import-badge { background: #26344a; color: #c8d1df; }
:root[data-theme="dark"] .issue-source-link { color: #91aaff; }

.commit-history-row { display:flex; align-items:center; gap:11px; padding:13px 16px; border-bottom:1px solid #edf0f4; }
.commit-history-main { min-width:0; flex:1; }
.commit-history-main strong { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#34415a; font-size:11px; }
.commit-history-meta { color:#8993a5; font-size:9px; margin-top:5px; }
.commit-history-row code { color:#6578b2; font:10px 'DM Mono',monospace; }
.commit-history-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 16px; color:#8993a5; font-size:10px; }
.commit-history-pagination>div { display:flex; gap:7px; }
.history-branch-select { border:1px solid #dce2eb; background:#fff; border-radius:6px; padding:8px 28px 8px 10px; color:#34415a; font-size:10px; font-weight:600; }
:root[data-theme="dark"] .commit-history-row { border-color:#303b4e; }
:root[data-theme="dark"] .commit-history-main strong { color:#e5eaf3; }
:root[data-theme="dark"] .history-branch-select { background:#111a29; border-color:#3a465a; color:#e5eaf3; }
@media(max-width:600px) { .commit-history-row { gap:8px; padding:11px; } .commit-history-meta { line-height:1.5; } .commit-history-pagination { padding:11px; } }
:root[data-theme="dark"] .issue-triage-filters input,
:root[data-theme="dark"] .issue-triage-filters select,
:root[data-theme="dark"] .issue-properties input,
:root[data-theme="dark"] .issue-properties select { background:#111a29; border-color:#3a465a; color:#e5eaf3; }
:root[data-theme="dark"] .issue-label { background:#26344a; color:#b9c8ff; }
:root[data-theme="dark"] .issue-triage-filters { border-color:#303b4e; }
:root[data-theme="dark"] .issue-properties label,
:root[data-theme="dark"] .issue-property-label,
:root[data-theme="dark"] .issue-properties h2 { color:#e5eaf3; }
:root[data-theme="dark"] .cutover-confirm { color:#e5eaf3; border-color:#303b4e; }
:root[data-theme="dark"] .cutover-differences { background:#111a29; color:#c8d1df; }
:root[data-theme="dark"] .notification-row { background:#1a2536; color:#e5eaf3; border-color:#303b4e; }
:root[data-theme="dark"] .notification-row:hover,
:root[data-theme="dark"] .notification-row.unread { background:#202d4d; }
:root[data-theme="dark"] .notification-mark { background:#26344a; color:#b9c8ff; }
:root[data-theme="dark"] .inline-review-comment,
:root[data-theme="dark"] .inline-comment-form { background:#1a2536; border-color:#303b4e; color:#e5eaf3; }
:root[data-theme="dark"] .inline-comment-form textarea,
:root[data-theme="dark"] .review-request-form select { background:#111a29; border-color:#3a465a; color:#e5eaf3; }
:root[data-theme="dark"] .review-request-form { border-color:#303b4e; }
:root[data-theme="dark"] .pr-checks { border-color:#303b4e; }
:root[data-theme="dark"] .inline-thread.resolved { background:#15251f; border-left-color:#3aa678; }
:root[data-theme="dark"] .inline-reply-form textarea { background:#111a29; border-color:#3a465a; color:#e5eaf3; }
:root[data-theme="dark"] .sync-check-row { background:#151f30; border-color:#303b4e; }
:root[data-theme="dark"] .sync-check-row.complete>span { color:#5ac59a; }
:root[data-theme="dark"] .sync-check-row>span { color:#e5b55f; }
:root[data-theme="dark"] .release-title-line h2 { color:#e5eaf3; }
:root[data-theme="dark"] .release-meta a,
:root[data-theme="dark"] .release-asset>a { color:#91aaff; }
:root[data-theme="dark"] .release-asset { background:#151f30; border-color:#303b4e; }
:root[data-theme="dark"] .release-upload-form { background:#111a29; }
:root[data-theme="dark"] .release-option { color:#c8d1df; }
:root[data-theme="dark"] .dependency-alert { border-color:#303b4e; }
:root[data-theme="dark"] .dependency-alert-top,
:root[data-theme="dark"] .dependency-alert-summary { color:#c8d1df; }
:root[data-theme="dark"] .dependency-alert .pr-meta a { color:#91aaff; }
:root[data-theme="dark"] .dependency-severity { background:#26344a; color:#c8d1df; }
:root[data-theme="dark"] .dependency-severity.critical,
:root[data-theme="dark"] .dependency-severity.high { background:#442b32; color:#ffaaaa; }
:root[data-theme="dark"] .dependency-severity.medium { background:#413626; color:#f0c27c; }
:root[data-theme="dark"] .dependency-severity.low { background:#1c3a31; color:#75d1a7; }
:root[data-theme="dark"] .audit-filters { border-color:#303b4e; }
:root[data-theme="dark"] .audit-filters input,
:root[data-theme="dark"] .audit-filters select { background:#111a29; border-color:#3a465a; color:#e5eaf3; }
:root[data-theme="dark"] .audit-result-meta,
:root[data-theme="dark"] .audit-event { border-color:#303b4e; }
:root[data-theme="dark"] .audit-event-main>strong { color:#e5eaf3; }
:root[data-theme="dark"] .audit-meta { color:#a8b3c5; }
:root[data-theme="dark"] .audit-meta a,
:root[data-theme="dark"] .audit-target { color:#91aaff; }
:root[data-theme="dark"] .audit-action { background:#26344a; color:#b9c8ff; }
:root[data-theme="dark"] .audit-details { color:#c8d1df; }
:root[data-theme="dark"] .audit-details pre { background:#111a29; color:#c8d1df; }
:root[data-theme="dark"] .source-code .code-line-match{background:#524820;outline-color:#8b7730}
:root[data-theme="dark"] .source-code .code-line-number{color:#7f8a9d}
:root[data-theme="dark"] .code-search-form input{background:#111a29;border-color:#334155;color:var(--ink)}
:root[data-theme="dark"] .github-pr-metadata .issue-label{background:#26344a;color:#c8d1df}
:root[data-theme="dark"] .repository-backup-body .sync-error{color:#ff9090}
:root[data-theme="dark"] .code-search-form input,:root[data-theme="dark"] .code-search-form select{background:#111a29;border-color:#334155;color:var(--ink)}
