:root {
  color-scheme: light;
  font-family: "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  color: #13213a;
  background: #edf3fb;
  --primary: #4169e1;
  --primary-dark: #294db8;
  --accent: #14b8d4;
  --border: #d8e2f0;
  --muted: #66738a;
  --danger: #b42318;
  --success: #087443;
  --panel: rgba(255, 255, 255, .9);
  --navy: #101c38;
}
* { box-sizing: border-box; }
body { position: relative; margin: 0; min-height: 100vh; background: radial-gradient(circle at 8% 8%, rgba(20, 184, 212, .13), transparent 28%), radial-gradient(circle at 92% 16%, rgba(65, 105, 225, .16), transparent 30%), linear-gradient(145deg, #edf4ff, #f8fafc 48%, #eef2f8); }
body::before { position: fixed; z-index: -1; inset: 0; content: ""; pointer-events: none; opacity: .34; background-image: linear-gradient(rgba(80, 107, 158, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(80, 107, 158, .08) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(to bottom, #000, transparent 88%); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
.shell { max-width: 1380px; margin: 0 auto; padding: 28px; }
.hidden { display: none !important; }
.login-card { position: relative; overflow: hidden; width: min(460px, calc(100vw - 36px)); margin: 8vh auto; padding: 38px; border: 1px solid rgba(191, 207, 231, .82); border-radius: 22px; background: rgba(255, 255, 255, .94); box-shadow: 0 26px 80px rgba(27, 49, 91, .18); backdrop-filter: blur(16px); }
.login-card::before { position: absolute; inset: 0 0 auto; height: 4px; content: ""; background: linear-gradient(90deg, var(--accent), #6d5dfc, var(--primary)); }
.brand-mark { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 17px; color: #fff; background: linear-gradient(145deg, #11bdd5, #5368e8 62%, #7758dc); box-shadow: 0 10px 28px rgba(65, 105, 225, .34), inset 0 1px rgba(255,255,255,.4); font-size: 25px; font-weight: 900; letter-spacing: 1px; }
.brand-mark-small { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 14px; font-size: 20px; box-shadow: 0 8px 24px rgba(20, 184, 212, .22); }
.brand-kicker { margin: 16px 0 0; color: #4169e1; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
h1 { margin: 14px 0 4px; font-size: 26px; }
h2 { margin: 0 0 18px; font-size: 19px; }
h3 { margin: 0; font-size: 16px; }
.muted { color: var(--muted); }
label { display: grid; gap: 6px; margin: 15px 0; color: #334058; font-size: 14px; }
input, select, textarea { width: 100%; min-height: 40px; border: 1px solid #cbd6e4; border-radius: 8px; padding: 8px 10px; color: #172033; background: #fff; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(18, 104, 232, .14); border-color: var(--primary); }
input[readonly] { background: #f5f7fa; color: #536074; }
.primary, .secondary { border-radius: 10px; padding: 9px 16px; border: 1px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background .15s ease; }
.primary { background: linear-gradient(135deg, #4169e1, #5b55d9); color: #fff; box-shadow: 0 8px 20px rgba(65, 105, 225, .2); font-weight: 700; }
.danger-action { border: 1px solid #b42318; border-radius: 8px; padding: 9px 16px; color: #fff; background: #b42318; font-weight: 700; }
.primary:hover { transform: translateY(-1px); background: linear-gradient(135deg, #365bd0, #4d45c8); box-shadow: 0 10px 24px rgba(65, 105, 225, .28); }
.secondary { background: #fff; border-color: #cbd6e4; color: #26344d; }
.secondary:hover { transform: translateY(-1px); border-color: #9eb8df; box-shadow: 0 6px 16px rgba(42, 65, 108, .1); }
.small { padding: 6px 10px; font-size: 13px; }
.wide { width: 100%; margin-top: 10px; }
.link-button { width: 100%; border: 0; color: var(--primary); background: transparent; padding: 8px; }
.register-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.error { min-height: 20px; color: var(--danger); }
.notification-toast { position: fixed; z-index: 1000; top: 18px; right: 18px; width: min(420px, calc(100vw - 36px)); padding: 14px 16px; border: 1px solid #f2ca72; border-radius: 11px; color: #714b00; background: #fff8df; box-shadow: 0 12px 35px rgba(50, 45, 28, .2); font-weight: 700; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 18px; padding: 20px 22px; border: 1px solid rgba(119, 153, 214, .35); border-radius: 20px; color: #fff; background: radial-gradient(circle at 12% 0, rgba(20, 184, 212, .22), transparent 35%), linear-gradient(135deg, #0f1d3a, #183365 62%, #23396e); box-shadow: 0 18px 45px rgba(18, 39, 76, .22); }
.topbar-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar h1 { margin-top: 0; }
.topbar p { margin: 5px 0 0; }
.topbar .brand-kicker { margin: 0 0 5px; color: #75e7f6; }
.topbar .muted { color: #c5d5ed; }
.topbar .secondary { color: #ecf5ff; border-color: rgba(207, 225, 255, .32); background: rgba(255, 255, 255, .1); }
.user-box { display: flex; align-items: center; gap: 12px; }
.topbar .support-shortcut { border-color: rgba(117, 231, 246, .72); color: #e8fdff; background: linear-gradient(135deg, rgba(20, 184, 212, .34), rgba(59, 130, 246, .28)); box-shadow: 0 0 0 1px rgba(117, 231, 246, .12), 0 8px 24px rgba(8, 145, 178, .18); font-weight: 800; }
.topbar .support-shortcut:hover { border-color: #75e7f6; background: linear-gradient(135deg, rgba(20, 184, 212, .48), rgba(59, 130, 246, .38)); }
.quota-badge { padding: 6px 10px; border: 1px solid rgba(117, 231, 246, .25); border-radius: 999px; color: #dffbff; background: rgba(20, 184, 212, .16); font-size: 13px; font-weight: 700; }
.quota-card { display: grid; grid-template-columns: minmax(210px, .45fr) minmax(0, 1.55fr); gap: 28px; align-items: start; }
.quota-label { margin: 0 0 5px; }
.quota-value { display: block; color: #0759bf; font-size: 30px; }
.quota-debt-notice { margin: 12px 0 0; padding: 10px 12px; border: 1px solid #e49486; border-radius: 9px; color: #9f251b; background: #fff0ed; font-weight: 700; line-height: 1.55; }
.quota-card h2 { margin-bottom: 0; }
body.quota-overdue { background: linear-gradient(145deg, #fff0ec, #fff7f5 46%, #f9eeeb); }
body.quota-overdue #appView .card { border-color: #e7a095; background: #fff8f6; }
body.quota-overdue #appView .notice { border-color: #e7a095; color: #912b21; background: #fff0ed; }
body.quota-overdue .quota-badge { color: #fff; background: #b42318; }
body.quota-overdue .quota-value { color: #b42318; }
.notice { margin-bottom: 16px; padding: 12px 15px; border: 1px solid #c4d8f7; border-radius: 12px; color: #214d87; background: linear-gradient(90deg, rgba(232, 243, 255, .96), rgba(242, 249, 255, .9)); box-shadow: 0 5px 18px rgba(38, 78, 133, .06); }
.layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, .8fr); gap: 18px; align-items: start; }
.card { padding: 22px; border: 1px solid rgba(210, 222, 239, .92); border-radius: 17px; background: var(--panel); box-shadow: 0 10px 32px rgba(35, 53, 84, .075); margin-bottom: 18px; backdrop-filter: blur(12px); }
.project-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 22px; align-items: start; }
.project-grid form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: end; }
.project-grid form label { margin-bottom: 0; }
.project-grid form button, .project-grid form .message, .project-grid form .muted { grid-column: 1 / -1; }
.project-create-fields { display: contents; }
.project-creation-selector { margin-top: 0; background: linear-gradient(135deg, rgba(79, 70, 229, .08), rgba(6, 182, 212, .08)); border-color: rgba(79, 70, 229, .22); }
.copy-source-field { grid-column: 1 / -1; padding: 14px; border: 1px solid rgba(79, 70, 229, .2); border-radius: 10px; background: linear-gradient(135deg, rgba(79, 70, 229, .06), rgba(6, 182, 212, .06)); }
.copy-source-field small { color: var(--muted); line-height: 1.55; }
.project-source-selector { grid-column: 1 / -1; display: flex; align-items: center; gap: 18px; margin: 15px 0; padding: 12px; border: 1px solid #e0e7f0; border-radius: 9px; background: #f8fafc; }
.project-source-selector > span { font-weight: 700; }
.project-source-selector label { display: flex; align-items: center; gap: 7px; margin: 0; cursor: pointer; }
.project-source-selector input, .repair-deliverables input { width: 18px; min-height: 18px; }
.project-sdk-upload { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr) auto; gap: 12px; align-items: end; margin-top: 6px; padding: 18px; border: 1px dashed #9fc2ef; border-radius: 11px; background: #f5f9ff; }
.project-sdk-upload h3 { margin-bottom: 5px; }
.project-sdk-upload p { margin: 0; }
.project-sdk-upload progress { grid-column: 1 / -1; width: 100%; height: 12px; }
.project-sdk-upload .message { grid-column: 1 / -1; }
.admin-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: start; }
.admin-tasks-section { grid-column: 1 / -1; grid-row: 2; }
.admin-task-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-task-filters label, .admin-task-filters select { min-width: 0; width: 100%; }
.admin-task-toolbar, .admin-task-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-task-list { display: grid; gap: 12px; }
.admin-task-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(130px, .7fr); gap: 10px 18px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; color: var(--ui-inner-text); background: var(--ui-inner-surface-a); }
.admin-task-item p { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.admin-task-item button { justify-self: start; }
.admin-task-identity, .admin-task-title, .admin-project-task-state { font-weight: 600; }
.admin-task-created, .admin-task-updated { font-size: 12px; font-variant-numeric: tabular-nums; }
.admin-task-status { font-weight: 700; }
.admin-task-status.task-group-active, .admin-task-status.task-group-attention { border-left: 3px solid currentColor; padding-left: 9px; }
.admin-task-pagination { margin-top: 16px; }
.admin-task-detail-body { max-height: min(60vh, 620px); overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; scrollbar-gutter: stable; overflow-wrap: anywhere; }
.admin-task-detail-body p { white-space: pre-wrap; }
html[data-theme] #appView .project-identity-warning { padding: 16px; border: 2px solid var(--ui-warning-text); border-radius: 12px; color: var(--ui-warning-text); background: var(--ui-warning-bg); }
html[data-theme] #appView .project-identity-warning p, html[data-theme] #appView .project-identity-warning strong, html[data-theme] #appView .project-identity-warning label { color: var(--ui-warning-text); }
.project-identity-warning { grid-column: 1 / -1; overflow-wrap: anywhere; }
.project-identity-warning strong { font-size: 16px; }
.project-identity-confirm { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; line-height: 1.55; }
.project-identity-confirm input { flex: 0 0 18px; width: 18px; min-width: 18px; height: 18px; min-height: 18px; margin: .18em 0 0; padding: 0; }
.project-identity-confirm span { display: block; min-width: 0; }
.project-metadata-comparison { white-space: pre-wrap; overflow-wrap: anywhere; padding: 12px; margin-top: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--ui-inner-surface-a); }
.project-metadata-dialog form { margin-top: 18px; }
@media (max-width: 760px) {
  .admin-task-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-task-item { grid-template-columns: 1fr; padding: 12px; }
  .admin-tasks-section { grid-row: auto; }
  .admin-task-dialog .card-heading { flex-wrap: wrap; }
}
@media (max-width: 420px) { .admin-task-filters { grid-template-columns: 1fr; } }
.admin-overview-grid h3 { margin-top: 4px; }
.admin-overview-section { min-width: 0; }
.admin-overview-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.admin-overview-section-heading h3 { margin-bottom: 0; }
.admin-overview-count { display: inline-flex; min-width: 24px; height: 24px; padding: 0 7px; align-items: center; justify-content: center; border-radius: 999px; background: rgba(45, 212, 191, .14); color: var(--accent-strong, #0f766e); font-size: 12px; }
.admin-overview-toggle { flex: 0 0 auto; }
.admin-overview-list.expanded { max-height: 380px; overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; scrollbar-gutter: stable; }
.pending-registration-alert { width: fit-content; margin: 10px 0 0; padding: 8px 11px; border: 1px solid #f2ca72; border-radius: 8px; color: #714b00; background: #fff8df; font-weight: 700; }
.public-knowledge-card { border-left: 5px solid #d17b08; }
.public-knowledge-card.service-running { border-left-color: #16845b; }
.public-knowledge-card.service-stopped { border-left-color: #b42318; }
.public-knowledge-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-top: 18px; padding: 16px; border: 1px solid #dfe7f1; border-radius: 11px; background: #f8fafc; }
.public-knowledge-control p { margin: 0; }
.public-knowledge-control .muted { margin-top: 7px; line-height: 1.55; }
.public-knowledge-status { color: #172033; font-weight: 800; }
.knowledge-repository-card { border-left: 5px solid #16845b; background: linear-gradient(135deg, #fff 0%, #f8fffb 100%); }
.knowledge-repository-heading { gap: 18px; align-items: flex-start; }
.knowledge-repository-heading h2 { margin-bottom: 6px; }
.knowledge-repository-heading p { max-width: 850px; margin: 0; line-height: 1.65; }
.knowledge-repository-heading code { padding: 2px 5px; border-radius: 5px; color: #185b42; background: #e8f7ef; font-size: .92em; }
.knowledge-repository-actions { display: flex; flex: 0 0 auto; gap: 9px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.knowledge-repository-download { display: inline-flex; align-items: center; min-height: 34px; text-decoration: none; }
.knowledge-repository-paths { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(180px, .8fr) minmax(180px, .8fr); gap: 10px; margin-top: 18px; }
.knowledge-repository-path { min-width: 0; padding: 12px 14px; border: 1px solid #cfe8d9; border-radius: 10px; background: #f5fcf7; }
.knowledge-repository-path span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.knowledge-repository-path strong { display: block; margin-top: 4px; color: #185b42; line-height: 1.5; overflow-wrap: anywhere; }
.knowledge-repository-truth { margin: 14px 0 0; padding: 11px 13px; border-left: 3px solid #16845b; color: #24513c; background: #edf9f1; line-height: 1.65; }
.knowledge-repository-metrics { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.knowledge-repository-metric { min-width: 0; padding: 13px 14px; border: 1px solid #dfe9e3; border-radius: 10px; background: #fff; }
.knowledge-repository-metric > span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.knowledge-repository-metric > strong { display: block; min-height: 32px; margin: 4px 0 2px; color: #126b48; font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
.knowledge-repository-metric > small { display: block; color: #788397; line-height: 1.45; }
.knowledge-overview-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 15px; border: 1px solid #cfe8df; border-radius: 12px; background: linear-gradient(110deg, #f3fcf8, #f7fbff); }
.knowledge-overview-file strong { color: #145f48; }
.knowledge-overview-file p { margin: 4px 0 0; line-height: 1.55; }
#downloadKnowledgeOverview { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
#downloadKnowledgeOverview:focus-visible { outline: 3px solid #14b8d4; outline-offset: 3px; }
.knowledge-overview-file time { color: #6d7b90; font-size: 12px; white-space: nowrap; }
.knowledge-overview-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #16a979, #14b8d4); box-shadow: 0 7px 18px rgba(20, 184, 212, .2); font-size: 20px; }
.knowledge-repository-content-map { margin: 0 0 22px; padding: 15px; border: 1px solid #cfe8d9; border-radius: 11px; background: #f7fcf9; }
.knowledge-repository-content-map-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.knowledge-repository-content-map-heading h3 { flex: 0 0 auto; }
.knowledge-repository-content-map-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: right; }
.knowledge-repository-content-map-heading code { padding: 2px 5px; border-radius: 5px; color: #185b42; background: #e8f7ef; }
.knowledge-repository-content-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 9px; margin-top: 13px; }
.knowledge-repository-content-types > div { min-width: 0; padding: 10px 11px; border: 1px solid #dfe9e3; border-radius: 9px; background: #fff; }
.knowledge-repository-content-types span, .knowledge-repository-content-types small { display: block; }
.knowledge-repository-content-types span { color: #3b4c43; font-size: 12px; font-weight: 700; }
.knowledge-repository-content-types strong { display: block; margin: 3px 0; color: #126b48; font-size: 20px; }
.knowledge-repository-content-types small { color: #788397; line-height: 1.45; }
.knowledge-repository-chain-heading { padding-top: 18px; border-top: 1px solid #e2eee6; }
.knowledge-repository-chain-heading h3 { margin-bottom: 5px; }
.knowledge-repository-chain-heading p { margin: 0; }
.knowledge-repository-chain-list { display: grid; gap: 10px; margin-top: 12px; }
.knowledge-repository-chain-item { padding: 14px 15px; border: 1px solid #dce9e1; border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(31, 91, 58, .05); }
.knowledge-repository-chain-item-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.knowledge-repository-chain-item-heading > strong { min-width: 0; line-height: 1.55; overflow-wrap: anywhere; }
.knowledge-repository-chain-status { flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; color: #087443; background: #e9f8f0; font-size: 11px; font-weight: 700; white-space: nowrap; }
.knowledge-repository-chain-meta, .knowledge-repository-chain-path { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.knowledge-repository-chain-path { color: #4a6c59; }
.knowledge-repository-chain-summary { margin: 8px 0 0; color: #354158; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.knowledge-candidate-card { border-left: 5px solid #6252c7; background: linear-gradient(135deg, #fff 0%, #fbfaff 100%); }
.knowledge-candidate-heading { gap: 18px; align-items: flex-start; }
.knowledge-candidate-heading h2 { margin-bottom: 6px; }
.knowledge-candidate-heading p { max-width: 800px; margin: 0; line-height: 1.6; }
.knowledge-candidate-actions { display: flex; flex: 0 0 auto; gap: 9px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.knowledge-safety-note { margin: 16px 0; padding: 12px 14px; border: 1px solid #d9d2ff; border-radius: 10px; color: #40337f; background: #f5f2ff; font-size: 13px; font-weight: 700; line-height: 1.65; }
.knowledge-lifecycle-note { margin: -5px 0 16px; padding: 10px 12px; border-left: 3px solid #9aa5b8; color: #59657a; background: #f7f9fc; font-size: 12px; line-height: 1.65; }
.knowledge-candidate-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 10px; margin: 16px 0 22px; }
.knowledge-candidate-metric { min-width: 0; padding: 13px 14px; border: 1px solid #e1e4ee; border-radius: 10px; background: #fff; }
.knowledge-candidate-metric > span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.knowledge-candidate-metric > strong { display: block; min-height: 32px; margin: 4px 0 2px; color: #4536a3; font-size: 24px; line-height: 1.3; overflow-wrap: anywhere; }
.knowledge-candidate-metric:nth-child(3) > strong { font-size: 15px; line-height: 1.55; }
.knowledge-candidate-metric > small { display: block; color: #788397; line-height: 1.45; }
.knowledge-candidate-list-heading { display: flex; justify-content: space-between; gap: 14px; align-items: end; padding-top: 18px; border-top: 1px solid #e8e6f1; }
.knowledge-candidate-list-heading h3 { margin-bottom: 5px; }
.knowledge-candidate-list-heading p { margin: 0; }
.knowledge-candidate-list { display: grid; gap: 10px; margin-top: 12px; }
.knowledge-task-audit-heading { display: flex; justify-content: space-between; gap: 14px; align-items: end; margin-top: 20px; padding-top: 18px; border-top: 1px solid #e8e6f1; }
.knowledge-task-audit-heading h3 { margin-bottom: 5px; }
.knowledge-task-audit-heading p { margin: 0; }
.knowledge-task-audit-list { display: grid; gap: 8px; margin-top: 12px; }
.knowledge-task-audit-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; padding: 12px 14px; border: 1px solid #e0e5ee; border-radius: 10px; background: #fff; }
.knowledge-task-audit-item > strong { min-width: 0; line-height: 1.55; overflow-wrap: anywhere; }
.knowledge-task-outcome { align-self: start; padding: 3px 8px; border-radius: 999px; color: #3f328c; background: #eeeaff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.knowledge-task-audit-meta { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.knowledge-candidate-item { padding: 14px 15px; border: 1px solid #e0e5ee; border-radius: 11px; background: #fff; box-shadow: 0 3px 12px rgba(42, 45, 80, .04); }
.knowledge-candidate-item-heading { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.knowledge-candidate-item-heading > strong { min-width: 0; line-height: 1.55; overflow-wrap: anywhere; }
.knowledge-candidate-badges { display: flex; flex: 0 1 auto; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.knowledge-candidate-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px; border-radius: 999px; color: #4e596c; background: #f0f3f7; font-size: 11px; font-weight: 700; white-space: nowrap; }
.knowledge-candidate-badge.status { color: #3f328c; background: #eeeaff; }
.knowledge-candidate-badge.source-github { color: #18529b; background: #eaf3ff; }
.knowledge-candidate-badge.source-web { color: #087443; background: #e9f8f0; }
.knowledge-candidate-badge.evidence { color: #6d4c00; background: #fff5d8; }
.knowledge-candidate-badge.warning { color: #9b2c21; background: #fff0ed; }
.knowledge-candidate-badge.kind-solution { color: #087443; background: #e9f8f0; }
.knowledge-candidate-badge.kind-gap { color: #805500; background: #fff7df; }
.knowledge-candidate-summary { margin: 9px 0 0; color: #354158; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.knowledge-candidate-meta { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
.knowledge-candidate-resolution { margin: 8px 0 0; color: #287047; font-size: 12px; font-weight: 700; line-height: 1.6; }
.knowledge-candidate-status-rejected, .knowledge-candidate-status-withdrawn { opacity: .68; }
.ai-settings-form { display: grid; grid-template-columns: repeat(3, minmax(150px, 1fr)) auto; gap: 12px; align-items: end; margin: 18px 0; padding: 16px; border: 1px solid #dfe7f1; border-radius: 11px; background: #f8fafc; }
.ai-settings-form label { margin: 0; }
.ai-settings-form .muted, .ai-settings-form .message { grid-column: 1 / -1; margin: 0; }
.user-account-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; padding: 12px 0; border-top: 1px solid #edf0f5; font-size: 13px; }
.user-account-summary { line-height: 1.7; overflow-wrap: anywhere; }
.user-account-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: start; }
.user-ai-editor { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)) auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid #cfe0f5; border-radius: 9px; background: #f5f9ff; }
.user-ai-editor label { margin: 0; }
.project-summary { min-height: 70px; margin: 12px 0; padding: 12px; white-space: pre-line; border-radius: 9px; background: #f6f8fb; color: #445169; line-height: 1.7; }
.button-row { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; }
.workspace-heading { display: flex; gap: 18px; align-items: center; }
.workspace-heading h2 { margin-bottom: 5px; }
.workspace-heading p { margin: 0; }
.configuration-mode-card .card-heading h2 { margin-bottom: 5px; }
.configuration-mode-card .card-heading p { margin: 0; }
.firmware-key-card .card-heading h2 { margin-bottom: 5px; }
.firmware-key-card .card-heading p { margin: 0; }
.firmware-key-actions { display: grid; grid-template-columns: minmax(260px, 1fr) auto auto; gap: 12px; align-items: end; margin-top: 14px; }
.firmware-key-actions label { margin: 0; }
.mode-badge { flex: 0 0 auto; padding: 7px 11px; border-radius: 999px; color: #164d95; background: #edf5ff; font-size: 13px; font-weight: 700; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.mode-choice { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 16px; border: 1px solid #d7e0eb; border-radius: 11px; background: #f8fafc; cursor: pointer; transition: border-color .15s, background .15s, opacity .15s; }
.mode-choice input { width: 19px; min-height: 19px; flex: 0 0 auto; margin-top: 2px; }
.mode-choice span { display: grid; gap: 5px; }
.mode-choice small { color: var(--muted); line-height: 1.55; }
.mode-choice.selected { border-color: var(--primary); background: #edf5ff; box-shadow: 0 0 0 2px rgba(18, 104, 232, .1); }
.mode-choice.inactive { opacity: .56; }
.mode-fieldset { min-width: 0; margin: 0; padding: 0; border: 0; transition: opacity .15s; }
.mode-fieldset:disabled { opacity: .44; }
.password-card { max-width: 640px; }
.password-card form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.password-card form label:first-child { grid-column: 1 / -1; }
.password-card form button, .password-card form p { grid-column: 1 / -1; }
.meta-grid { display: grid; grid-template-columns: 1.5fr 1fr .8fr; gap: 12px; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid #edf0f5; }
.config-section { margin-top: 20px; padding-top: 16px; border-top: 1px solid #edf0f5; }
.config-section summary { cursor: pointer; color: #172033; font-size: 16px; font-weight: 700; }
.config-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; align-items: end; }
.switch-line { display: flex; align-items: center; gap: 8px; margin: 0; }
.switch-line input { width: 18px; min-height: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: 10px; }
th, td { text-align: left; padding: 9px; border-bottom: 1px solid #edf0f5; }
th { color: #59677c; font-size: 13px; }
.led-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.submit-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 24px; }
.config-version-panel { margin-top: 24px; padding-top: 20px; border-top: 1px solid #edf0f5; }
.config-version-panel .card-heading h3 { margin-bottom: 4px; }
.config-version-panel .card-heading p { margin: 0; }
.config-diff { max-height: 260px; overflow-y: auto; padding: 10px 12px; border-radius: 9px; background: #f6f8fb; }
.diff-row { display: grid; grid-template-columns: minmax(170px, .8fr) minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid #e4e9f0; font-size: 13px; }
.diff-row:first-child { border-top: 0; }
.diff-row code { overflow-wrap: anywhere; }
.message { color: var(--success); min-height: 20px; margin: 0; }
.message.error-message { color: var(--danger); }
.message.warning-message { color: #805500; }
.loading-message, .status-loading { display: inline-flex; align-items: center; gap: 7px; }
.loading-message::before, .status-loading::before {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  content: "";
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: status-spin .75s linear infinite;
}
@keyframes status-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .loading-message::before, .status-loading::before { animation-duration: 1.5s; }
}
.card-heading { display: flex; justify-content: space-between; align-items: center; }
.job { padding: 13px 0; border-top: 1px solid #edf0f5; }
.job:first-child { border-top: 0; padding-top: 0; }
.job-title { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.job-meta { margin: 5px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.task-progress { margin: 10px 0 4px; padding: 11px 12px; border: 1px solid #cfe0f5; border-radius: 9px; background: #f5f9ff; color: #334b6d; }
.task-progress-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 10px; }
.task-progress-metric { min-width: 0; display: grid; gap: 3px; }
.task-progress-label { color: var(--muted); font-size: 11px; line-height: 1.35; }
.task-progress-value { color: #173f73; font-size: 13px; font-weight: 700; line-height: 1.45; overflow-wrap: anywhere; }
.task-progress-activity { margin: 9px 0 0; padding-top: 8px; border-top: 1px solid #dce8f7; color: #315a8b; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.task-progress-overdue { border-color: #e5c270; background: #fff9e9; }
.task-progress-overdue .task-progress-activity { border-top-color: #ead8a7; color: #775100; }
.task-progress-stale { border-color: #e0b3ad; background: #fff7f5; }
.task-progress-stale .task-progress-activity { border-top-color: #efd3cf; color: #8b3329; }
.task-progress-interrupted { border-color: #df8d82; background: #fff2ef; box-shadow: inset 3px 0 0 #c53b2c; }
.task-progress-interrupted .task-progress-activity { border-top-color: #edc8c2; color: #9c2f23; font-weight: 700; }
.task-progress-queue-timeout { border-color: #e6ae55; background: #fff6df; box-shadow: inset 3px 0 0 #d17b08; }
.task-progress-queue-timeout .task-progress-activity { border-top-color: #edd09e; color: #875000; font-weight: 700; }
.status-queued { color: #805500; }
.status-queued_codex, .status-reviewing, .status-waiting_isolated_jlstudio_export { color: #805500; }
.status-implementing, .status-queued_build { color: #0759bf; }
.status-needs_more { color: var(--danger); }
.status-approved { color: var(--success); }
.status-building { color: #0759bf; }
.status-succeeded { color: var(--success); }
.status-failed { color: var(--danger); }
.task-status-interrupted, .issue-status.task-status-interrupted { color: #b42318; }
.download { margin-top: 8px; }
.compact-list { display: grid; gap: 8px; margin-top: 12px; }
.compact-item { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid #edf0f5; font-size: 13px; }
.compact-item > span:last-child { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.quota-ledger-detail { display: grid; gap: 4px; min-width: 0; }
.quota-ledger-time { color: var(--muted); font-size: 12px; }
.quota-ledger-value { flex: 0 0 auto; align-content: start; color: #234d84; font-weight: 700; }
.quota-ledger-scroll { max-height: 430px; overflow-y: auto; padding-right: 8px; overscroll-behavior: contain; scrollbar-gutter: stable; }
.quota-ledger-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #e4eaf2; }
.material-review-card .card-heading h2 { margin-bottom: 5px; }
.material-review-card .card-heading p { margin: 0; }
.material-upload-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 20px 0 14px; }
.material-upload-card { display: grid; align-content: start; gap: 10px; padding: 16px; border: 1px solid #e0e7f0; border-radius: 11px; background: #f8fafc; }
.material-upload-card p { min-height: 42px; margin: 0; font-size: 13px; line-height: 1.55; }
.material-upload-card input { min-width: 0; }
.material-upload-card button { width: 100%; }
.material-workflow-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.4fr); gap: 24px; margin-top: 20px; }
.document-list { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; margin: 12px 0; }
.document-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; margin: 0; padding: 9px; border: 1px solid #e3e9f1; border-radius: 8px; background: #f8fafc; }
.document-row span { overflow-wrap: anywhere; }
.document-row a { flex: 0 0 auto; }
.material-review-conversation { min-height: 220px; max-height: 520px; }
.material-round-label { color: #0759bf; font-weight: 700; }
.firmware-submit-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 14px; }
.firmware-submit-row p { margin: 0; }
.firmware-request-heading { margin-top: 26px; padding-top: 20px; border-top: 1px solid #edf0f5; }
.issue-layout { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.5fr); gap: 24px; }
.issue-chat-card { border-top: 3px solid #4f67e8; background: linear-gradient(145deg, #fff 0%, #f8fbff 100%); }
.project-conversation-guide { margin: 12px 0 18px; padding: 16px 18px; border: 1px solid #cdd9ff; border-radius: 14px; background: linear-gradient(120deg, #f0f5ff 0%, #f5fbff 55%, #f5f1ff 100%); }
.project-conversation-guide h3 { margin: 0 0 10px; color: #253a8f; }
.project-conversation-guide ol { display: grid; gap: 8px; margin: 0; padding-left: 23px; color: #40516e; line-height: 1.65; }
.issue-chat-shell { max-width: 980px; margin: 0 auto; }
.issue-chat-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.issue-chat-toolbar label { margin: 0; }
.issue-stage-hint { margin: 12px 0; padding: 10px 12px; border-left: 3px solid #596fe7; border-radius: 8px; color: #36508e; background: #f2f6ff; }
.issue-chat-conversation { min-height: 360px; max-height: 620px; padding: 18px; background: radial-gradient(circle at top right, #edf4ff 0%, #f8fafc 42%, #f8fafc 100%); }
.issue-chat-conversation .message-customer { margin-left: 14%; background: #eef3ff; border-color: #cbd7ff; }
.issue-chat-conversation .message-codex { margin-right: 14%; }
.issue-chat-composer { margin-top: 14px; padding: 14px; border: 1px solid #d9e1f2; border-radius: 13px; background: #fff; box-shadow: 0 10px 28px rgba(63, 83, 146, .08); }
.issue-chat-composer > label { margin-top: 0; }
.issue-chat-composer textarea { min-height: 110px; resize: vertical; }
.issue-chat-actions { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin-top: 10px; }
.issue-attachment-button { display: inline-flex; align-items: center; justify-content: center; width: fit-content; margin: 0; padding: 9px 13px; border: 1px solid #bcc8e9; border-radius: 9px; color: #304c9a; background: #f6f8ff; cursor: pointer; font-weight: 700; }
.issue-attachment-button:hover { border-color: #6f83dc; background: #eef2ff; }
.issue-attachment-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.issue-chat-help { margin: 9px 0 0; font-size: 12px; }
.issue-chat-new { display: grid; place-items: center; min-height: 300px; padding: 32px; text-align: center; }
.issue-chat-new h3 { margin: 0 0 10px; color: #263d91; }
.issue-chat-new p { max-width: 660px; margin: 0; line-height: 1.7; }
.support-card { scroll-margin-top: 18px; border-left: 5px solid #14b8d4; background: linear-gradient(135deg, #fff 0%, #f6fdff 100%); }
.support-layout { display: grid; grid-template-columns: minmax(280px, .8fr) minmax(0, 1.5fr); gap: 24px; align-items: start; margin-top: 16px; }
.support-layout h3, .issue-layout h3 { margin-top: 0; }
.product-consult-card { scroll-margin-top: 18px; border-left: 5px solid #6d5ce8; background: linear-gradient(135deg, #fff 0%, #f8f7ff 55%, #f2fbff 100%); }
.product-consult-kicker { margin: 0 0 5px; color: #6254d9; font-size: 12px; font-weight: 850; letter-spacing: .09em; }
.product-consult-layout > div { min-width: 0; padding: 18px; border: 1px solid rgba(188, 198, 242, .72); border-radius: 15px; background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(237,239,255,.55)); box-shadow: 0 12px 30px rgba(53, 55, 129, .08), inset 0 1px rgba(255,255,255,.9); }
.product-consult-note { margin: 14px 0 0; line-height: 1.65; }
.product-consult-conversation { min-height: 300px; max-height: 600px; }
.product-consult-composer { padding-top: 4px; }
.message-lumins { margin-right: 7%; border-color: #b9c9ff; background: linear-gradient(145deg, #eef4ff, #f1efff); }
.message-system { border-style: dashed; color: #6a6478; background: #f7f5fa; }
.product-consult-charge { display: block; margin-top: 7px; color: #6556bd; font-weight: 700; }
.repair-layout { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(0, 1.35fr); gap: 24px; }
.repair-deliverables { display: flex; gap: 18px; flex-wrap: wrap; margin: 12px 0; }
.repair-deliverables label { display: flex; align-items: center; gap: 7px; margin: 0; }
.conversation { max-height: 560px; overflow-y: auto; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: #f8fafc; }
.issue-status { margin: 0 0 12px; color: #0759bf; font-weight: 700; }
.message-bubble { margin: 9px 0; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid #e2e8f0; }
.message-bubble p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 5px 0 0; }
.message-bubble small { color: var(--muted); }
.message-codex { border-color: #b9d5ff; background: #edf5ff; }
.message-customer { margin-left: 7%; }
.message-admin { border-color: #b7dfcb; background: #eefaf4; }
.log-item { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 9px 0; border-top: 1px solid #e2e8f0; font-size: 13px; }
.reply-form { margin-top: 12px; }
@media (max-width: 900px) {
  .shell { padding: 16px; }
  .layout { grid-template-columns: 1fr; }
  .meta-grid, .led-grid, .project-grid, .project-grid form, .admin-overview-grid, .issue-layout, .support-layout, .repair-layout, .quota-card, .config-grid, .mode-options, .material-upload-grid, .material-workflow-layout, .project-sdk-upload, .firmware-key-actions, .ai-settings-form, .user-account-item, .user-ai-editor, .public-knowledge-control, .issue-chat-toolbar, .issue-chat-actions { grid-template-columns: 1fr; }
  .knowledge-repository-heading, .knowledge-repository-chain-item-heading, .knowledge-repository-content-map-heading { align-items: stretch; flex-direction: column; }
  .knowledge-repository-content-map-heading p { text-align: left; }
  .knowledge-repository-actions { justify-content: flex-start; }
  .knowledge-candidate-heading, .knowledge-candidate-item-heading { align-items: stretch; flex-direction: column; }
  .knowledge-task-audit-item { grid-template-columns: 1fr; }
  .knowledge-candidate-actions, .knowledge-candidate-badges { justify-content: flex-start; }
  .knowledge-candidate-actions button { flex: 1 1 220px; }
  .user-account-actions { justify-content: flex-start; }
  .task-progress-metrics { grid-template-columns: 1fr; gap: 8px; }
  .password-card form { grid-template-columns: 1fr; }
  .password-card form label { grid-column: auto; }
  .topbar { align-items: flex-start; gap: 16px; }
  .knowledge-repository-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-overview-file { grid-template-columns: auto minmax(0, 1fr); }
  .knowledge-overview-file time { grid-column: 2; white-space: normal; }
  .quota-ledger-item { align-items: flex-start; }
}

@media (max-width: 620px) {
  .shell { padding: 10px; }
  .login-card { margin: 4vh auto; padding: 28px 22px; }
  .topbar { padding: 17px; flex-direction: column; }
  .topbar .user-box { width: 100%; justify-content: space-between; flex-wrap: wrap; }
  .card { padding: 17px; border-radius: 15px; }
  .knowledge-repository-metrics { grid-template-columns: 1fr 1fr; }
  .compact-item.quota-ledger-item { flex-direction: column; }
  .quota-ledger-value { justify-content: flex-start !important; }
}

/* Lumins 2026 visual system: dark AI stage, luminous workflow and high-clarity work surfaces. */
:root {
  color: #12203a;
  background: #050914;
  --primary: #635bff;
  --primary-dark: #4438ca;
  --accent: #16d8e3;
  --border: #dbe3f1;
  --muted: #68758d;
  --panel: rgba(255, 255, 255, .975);
  --navy: #071326;
  --lumins-blue: #2f6bff;
  --lumins-violet: #755cff;
  --lumins-cyan: #20e0e8;
  --surface-soft: #f5f7fc;
  --surface-line: rgba(129, 148, 182, .2);
}
html { background: #050914; scroll-behavior: smooth; }
body {
  isolation: isolate;
  overflow-x: hidden;
  color: #12203a;
  background:
    radial-gradient(circle at 11% -8%, rgba(47, 107, 255, .42), transparent 31%),
    radial-gradient(circle at 94% 12%, rgba(117, 92, 255, .34), transparent 30%),
    radial-gradient(circle at 52% 100%, rgba(14, 190, 199, .12), transparent 37%),
    linear-gradient(150deg, #050914 0%, #081426 38%, #0b1730 67%, #07101e 100%);
  background-attachment: fixed;
}
body::before {
  z-index: 0;
  opacity: .34;
  background-image:
    linear-gradient(rgba(113, 155, 230, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(113, 155, 230, .11) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 0%, transparent 78%);
}
body::after {
  position: fixed;
  z-index: 0;
  top: 11%;
  left: 50%;
  width: min(72vw, 1000px);
  height: min(55vw, 700px);
  content: "";
  pointer-events: none;
  border: 1px solid rgba(97, 137, 255, .1);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57, 111, 255, .11), transparent 66%);
  filter: blur(10px);
  transform: translateX(-50%);
  animation: lumins-ambient 12s ease-in-out infinite alternate;
}
.shell { position: relative; z-index: 1; max-width: 1500px; padding: 24px 30px 48px; }
.hidden { display: none !important; }

.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(390px, .85fr);
  width: min(1120px, calc(100vw - 48px));
  min-height: 680px;
  margin: 5vh auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(142, 172, 233, .24);
  border-radius: 30px;
  background: rgba(8, 18, 38, .84);
  box-shadow: 0 40px 110px rgba(0, 0, 0, .48), 0 0 0 1px rgba(92, 149, 255, .08) inset;
  backdrop-filter: blur(28px);
}
.login-card::before { display: none; }
.login-showcase {
  position: relative;
  display: flex;
  min-height: 680px;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 64px 62px 52px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(30, 75, 157, .56), rgba(25, 20, 77, .28) 54%, rgba(8, 18, 38, .24)),
    radial-gradient(circle at 75% 35%, rgba(35, 224, 232, .22), transparent 24%),
    radial-gradient(circle at 35% 4%, rgba(117, 92, 255, .28), transparent 38%);
}
.login-showcase::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: .34;
  background-image:
    linear-gradient(rgba(119, 167, 255, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(119, 167, 255, .18) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(140deg, #000, transparent 78%);
}
.login-showcase > * { position: relative; z-index: 2; }
.brand-mark {
  position: relative;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(196, 241, 255, .54);
  border-radius: 19px;
  background: linear-gradient(145deg, #19d8e2, #416aff 56%, #845eff);
  box-shadow: 0 0 0 6px rgba(70, 130, 255, .1), 0 16px 42px rgba(29, 111, 255, .44), inset 0 1px rgba(255, 255, 255, .6);
}
.brand-mark::after {
  position: absolute;
  inset: -7px;
  content: "";
  border: 1px solid rgba(74, 223, 237, .22);
  border-radius: 24px;
}
.brand-mark-small { width: 46px; height: 46px; border-radius: 15px; box-shadow: 0 0 0 5px rgba(32, 224, 232, .07), 0 10px 30px rgba(32, 146, 255, .25); }
.brand-mark-small::after { inset: -5px; border-radius: 19px; }
.login-showcase .brand-kicker { margin-top: 22px; color: #7bf4fb; letter-spacing: .18em; }
.login-showcase h1 { max-width: 590px; margin: 18px 0 18px; font-size: clamp(38px, 4.2vw, 62px); line-height: 1.08; letter-spacing: -.045em; }
.login-showcase h1 span { color: transparent; background: linear-gradient(90deg, #fff 0%, #81f8ff 44%, #b8aaff 100%); background-clip: text; -webkit-background-clip: text; }
.login-lead { max-width: 590px; margin: 0; color: #bdcce5; font-size: 16px; line-height: 1.8; }
.login-signal { position: absolute; z-index: 1; top: 46%; right: -28px; width: 250px; height: 250px; opacity: .72; transform: translateY(-50%); }
.signal-core { position: absolute; z-index: 3; top: 50%; left: 50%; display: grid; width: 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.68); border-radius: 16px; color: #fff; background: linear-gradient(145deg, #18dce5, #5366ff); box-shadow: 0 0 36px rgba(35, 224, 232, .6); font-weight: 900; transform: translate(-50%, -50%); }
.signal-orbit { position: absolute; top: 50%; left: 50%; border: 1px solid rgba(109, 230, 247, .35); border-radius: 50%; transform: translate(-50%, -50%); }
.signal-orbit-one { width: 138px; height: 138px; }
.signal-orbit-two { width: 218px; height: 218px; border-color: rgba(136, 116, 255, .28); }
.signal-node { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: #7df5fb; box-shadow: 0 0 18px #35dce8; }
.signal-node-one { top: 46px; left: 112px; }
.signal-node-two { right: 49px; bottom: 74px; background: #9c89ff; }
.signal-node-three { bottom: 42px; left: 69px; }
.login-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 58px; }
.login-feature-grid > div { display: grid; min-width: 0; gap: 5px; padding: 15px 14px; border: 1px solid rgba(144, 186, 255, .17); border-radius: 14px; background: rgba(8, 22, 48, .54); box-shadow: 0 12px 30px rgba(0, 0, 0, .12); backdrop-filter: blur(12px); }
.login-feature-grid span { color: #63eaf3; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.login-feature-grid strong { color: #f7f9ff; font-size: 14px; }
.login-feature-grid small { color: #91a5c4; line-height: 1.45; }
.login-panel { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 58px 52px; background: linear-gradient(160deg, rgba(255,255,255,.995), rgba(244,247,253,.98)); }
.login-panel-kicker { margin: 0 0 10px; color: #5362d8; font-size: 11px; font-weight: 900; letter-spacing: .18em; }
.login-panel h2 { margin-bottom: 7px; color: #111c35; font-size: 28px; letter-spacing: -.03em; }
.login-panel-copy { margin: 0 0 20px; }
.login-panel label { color: #35425a; font-weight: 650; }
.login-panel input { min-height: 50px; }
.login-panel .primary { min-height: 50px; }

.topbar {
  position: relative;
  z-index: 50;
  top: 0;
  overflow: visible;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(124, 169, 255, .24);
  border-radius: 20px;
  background:
    linear-gradient(110deg, rgba(7, 18, 40, .93), rgba(13, 37, 79, .91) 58%, rgba(28, 24, 81, .91)),
    radial-gradient(circle at 20% 0, rgba(32, 224, 232, .22), transparent 32%);
  box-shadow: 0 16px 50px rgba(0, 5, 18, .36), inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: blur(24px) saturate(140%);
}
.topbar::after { position: absolute; right: 12%; bottom: -1px; left: 12%; height: 1px; content: ""; background: linear-gradient(90deg, transparent, rgba(79, 224, 244, .58), rgba(118, 95, 255, .58), transparent); }
.topbar h1 { color: #fff; font-size: 23px; letter-spacing: -.025em; }
.topbar .brand-kicker { color: #72f2f8; letter-spacing: .18em; }
.topbar .muted { color: #aebed9; }
.topbar .secondary { border-color: rgba(188, 213, 255, .24); color: #e7efff; background: rgba(255,255,255,.075); box-shadow: none; }
.topbar .secondary:hover { border-color: rgba(107, 237, 247, .58); background: rgba(42, 139, 205, .18); }
.user-box > span:first-child { color: #d9e5f7; font-size: 13px; font-weight: 700; }
.quota-badge { border-color: rgba(75, 238, 247, .28); color: #c8fcff; background: rgba(24, 199, 211, .12); box-shadow: inset 0 0 20px rgba(33, 223, 232, .06); }

.lumins-command-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, .8fr) minmax(520px, 1.2fr);
  gap: 34px;
  align-items: center;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 28px 32px;
  border: 1px solid rgba(112, 159, 255, .23);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 86% 16%, rgba(77, 218, 235, .17), transparent 28%),
    radial-gradient(circle at 18% 110%, rgba(109, 82, 255, .26), transparent 40%),
    linear-gradient(125deg, rgba(10, 25, 54, .96), rgba(13, 34, 72, .93) 55%, rgba(28, 24, 77, .93));
  box-shadow: 0 18px 52px rgba(0, 5, 22, .28), inset 0 1px rgba(255,255,255,.06);
}
.lumins-command-hero::before { position: absolute; inset: 0; content: ""; opacity: .22; background-image: linear-gradient(rgba(112, 161, 235, .18) 1px, transparent 1px), linear-gradient(90deg, rgba(112, 161, 235, .18) 1px, transparent 1px); background-size: 34px 34px; mask-image: linear-gradient(90deg, transparent, #000 58%, transparent); }
.lumins-command-hero > * { position: relative; z-index: 1; }
.system-live { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 11px; color: #74edf5; font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.system-live span { width: 8px; height: 8px; border-radius: 50%; background: #4af2b0; box-shadow: 0 0 0 5px rgba(74, 242, 176, .1), 0 0 18px rgba(74, 242, 176, .75); animation: lumins-live 1.8s ease-in-out infinite; }
.lumins-command-copy h2 { margin: 0 0 8px; color: #fff; font-size: clamp(24px, 2.5vw, 34px); letter-spacing: -.035em; }
.lumins-command-copy > p:last-child { max-width: 650px; margin: 0; color: #aebfdb; line-height: 1.75; }
.lumins-pipeline { display: grid; grid-template-columns: minmax(130px, 1fr) 30px minmax(130px, 1fr) 30px minmax(130px, 1fr); align-items: center; }
.lumins-pipeline > div { display: grid; gap: 4px; min-height: 105px; align-content: center; padding: 15px; border: 1px solid rgba(132, 181, 255, .18); border-radius: 15px; background: rgba(5, 16, 37, .55); box-shadow: inset 0 1px rgba(255,255,255,.04), 0 14px 34px rgba(0,0,0,.13); backdrop-filter: blur(14px); }
.lumins-pipeline span { color: #5ee7f0; font-size: 11px; font-weight: 900; letter-spacing: .12em; }
.lumins-pipeline strong { color: #f4f7ff; font-size: 14px; }
.lumins-pipeline small { color: #8fa5c7; line-height: 1.45; }
.lumins-pipeline > i { height: 1px; background: linear-gradient(90deg, rgba(75, 228, 239, .22), rgba(91, 128, 255, .75), rgba(125, 94, 255, .24)); box-shadow: 0 0 10px rgba(90, 142, 255, .4); }

#workspace { position: relative; }
.card {
  position: relative;
  isolation: isolate;
  margin-bottom: 18px;
  padding: 25px;
  border: 1px solid rgba(210, 229, 255, .66);
  border-radius: 21px;
  background:
    radial-gradient(circle at 8% 0, rgba(48, 207, 230, .13), transparent 27%),
    radial-gradient(circle at 96% 8%, rgba(111, 88, 255, .14), transparent 30%),
    linear-gradient(145deg, rgba(250, 253, 255, .88), rgba(232, 240, 253, .76));
  box-shadow:
    0 24px 70px rgba(0, 8, 32, .25),
    inset 0 1px rgba(255,255,255,.94),
    inset 0 0 0 1px rgba(255,255,255,.28);
  -webkit-backdrop-filter: blur(28px) saturate(155%);
  backdrop-filter: blur(28px) saturate(155%);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.card::before { position: absolute; z-index: 2; top: -1px; right: 28px; left: 28px; height: 2px; content: ""; border-radius: 999px; background: linear-gradient(90deg, transparent, rgba(42, 224, 236, .84), rgba(95, 83, 255, .82), transparent); opacity: .78; box-shadow: 0 0 18px rgba(70, 178, 255, .32); }
.card::after { position: absolute; z-index: 0; inset: 0; content: ""; pointer-events: none; border-radius: inherit; opacity: .72; background: linear-gradient(115deg, rgba(255,255,255,.34), transparent 22%, transparent 72%, rgba(111, 93, 255, .06)), linear-gradient(rgba(96, 145, 220, .055) 1px, transparent 1px), linear-gradient(90deg, rgba(96, 145, 220, .055) 1px, transparent 1px); background-size: auto, 38px 38px, 38px 38px; mask-image: linear-gradient(145deg, #000, transparent 82%); }
.card > * { position: relative; z-index: 1; }
.card:hover { border-color: rgba(143, 203, 246, .88); box-shadow: 0 28px 78px rgba(0, 10, 40, .3), 0 0 0 1px rgba(82, 205, 239, .08), inset 0 1px rgba(255,255,255,.96); }
.card-heading { gap: 18px; align-items: flex-start; }
.card-heading h2 { position: relative; margin-bottom: 6px; padding-left: 16px; color: #111e39; font-size: 20px; letter-spacing: -.02em; }
.card-heading h2::before { position: absolute; top: .45em; left: 0; width: 7px; height: 7px; content: ""; border-radius: 50%; background: linear-gradient(135deg, var(--lumins-cyan), var(--lumins-violet)); box-shadow: 0 0 12px rgba(47, 182, 255, .55); }
.card-heading p { line-height: 1.65; }
h1, h2, h3, strong { text-wrap: balance; }
h2 { color: #111e39; }
h3 { color: #1a2947; }
.muted { color: #6a768c; }
label { gap: 7px; color: #34425c; font-weight: 620; }
input, select, textarea {
  min-height: 44px;
  border-color: #d4deec;
  border-radius: 11px;
  padding: 10px 12px;
  color: #13203a;
  background: linear-gradient(180deg, #fff, #f8fafe);
  box-shadow: 0 1px 0 rgba(255,255,255,.8) inset;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:hover, select:hover, textarea:hover { border-color: #b9c9e1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #6878ff; background: #fff; box-shadow: 0 0 0 4px rgba(89, 102, 242, .11), 0 8px 20px rgba(64, 83, 180, .06); }
input[readonly] { color: #59667b; background: #f1f4f9; }
.primary, .secondary, .danger-action { min-height: 40px; border-radius: 11px; padding: 9px 17px; font-weight: 750; letter-spacing: .005em; }
.primary { border-color: rgba(104, 115, 255, .6); background: linear-gradient(128deg, #2e76ed 0%, #5866f2 47%, #7456e8 100%); box-shadow: 0 10px 24px rgba(67, 80, 220, .25), inset 0 1px rgba(255,255,255,.24); }
.primary:hover { background: linear-gradient(128deg, #2368db, #4e59df 48%, #6848d8); box-shadow: 0 14px 30px rgba(59, 74, 211, .32); }
.secondary { border-color: #cfdaea; color: #293956; background: rgba(255,255,255,.88); box-shadow: 0 4px 12px rgba(30, 48, 82, .045); }
.secondary:hover { border-color: #9db2d4; background: #fff; box-shadow: 0 8px 20px rgba(29, 48, 84, .1); }
.small { min-height: 34px; padding: 6px 11px; }
.link-button { color: #4d5de7; font-weight: 750; }
.notice { border-color: rgba(93, 137, 239, .24); border-radius: 14px; color: #234e8b; background: linear-gradient(110deg, rgba(235,244,255,.96), rgba(244,242,255,.92)); }

.quota-card { grid-template-columns: minmax(240px, .46fr) minmax(0, 1.54fr); gap: 22px; }
.quota-card > div:first-child { position: relative; min-height: 100%; overflow: hidden; padding: 23px; border: 1px solid rgba(80, 144, 255, .23); border-radius: 17px; color: #fff; background: radial-gradient(circle at 86% 12%, rgba(37, 225, 234, .22), transparent 30%), linear-gradient(145deg, #102d62, #1b3c7b 53%, #312c7e); box-shadow: 0 16px 36px rgba(16, 45, 98, .24); }
.quota-card > div:first-child::after { position: absolute; right: -46px; bottom: -60px; width: 170px; height: 170px; content: ""; border: 1px solid rgba(104, 235, 245, .15); border-radius: 50%; box-shadow: 0 0 0 22px rgba(104, 235, 245, .035), 0 0 0 48px rgba(104, 235, 245, .02); }
.quota-card > div:first-child .muted { color: #b8c9e3; }
.quota-value { color: #fff; font-size: 38px; letter-spacing: -.035em; text-shadow: 0 0 28px rgba(89, 231, 243, .22); }
.quota-ledger-item { padding: 12px 2px; }
.quota-ledger-value { color: #244c8b; }
.quota-ledger-scroll { max-height: 430px; padding-right: 10px; }
.quota-ledger-actions { border-top-color: #e0e7f2; }

.project-grid { grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 18px; margin-top: 20px; }
.project-grid > form, .project-grid > div:not(.project-sdk-upload) { min-width: 0; padding: 19px; border: 1px solid rgba(196, 218, 248, .66); border-radius: 16px; background: linear-gradient(145deg, rgba(255,255,255,.66), rgba(232,241,253,.52)); box-shadow: 0 12px 30px rgba(35, 67, 120, .08), inset 0 1px rgba(255,255,255,.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.project-source-selector { border-color: rgba(190, 213, 245, .7); border-radius: 12px; background: rgba(255,255,255,.52); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.project-creation-selector { border-color: rgba(94, 91, 232, .22); background: linear-gradient(125deg, rgba(87, 100, 241, .08), rgba(20, 200, 214, .07)); }
.copy-source-field { border-radius: 13px; }
.project-summary { min-height: 100px; border: 1px solid rgba(195, 216, 244, .72); border-radius: 13px; background: linear-gradient(145deg, rgba(255,255,255,.7), rgba(232,241,254,.48)); box-shadow: inset 0 1px rgba(255,255,255,.8); }
.project-sdk-upload { border-color: rgba(68, 131, 238, .4); border-radius: 15px; background: linear-gradient(125deg, rgba(237,245,255,.95), rgba(245,242,255,.88)); }
.mode-choice, .material-upload-card, .public-knowledge-control, .ai-settings-form, .user-ai-editor { border: 1px solid rgba(195, 217, 247, .68); border-radius: 14px; background: linear-gradient(145deg, rgba(255,255,255,.64), rgba(229,239,253,.5)); box-shadow: 0 10px 26px rgba(41, 68, 115, .07), inset 0 1px rgba(255,255,255,.86); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); }
.support-card, .knowledge-repository-card, .knowledge-candidate-card, .public-knowledge-card, .issue-chat-card { border-left-width: 1px; }
.support-card::before { opacity: .85; background: linear-gradient(90deg, transparent, #18cad6, #4985ff, transparent); }
.support-layout > form, .support-layout > div, .repair-layout > form, .repair-layout > div { min-width: 0; padding: 18px; border: 1px solid rgba(195, 217, 247, .66); border-radius: 15px; background: linear-gradient(145deg, rgba(255,255,255,.64), rgba(231,240,253,.5)); box-shadow: 0 12px 30px rgba(41, 70, 120, .07), inset 0 1px rgba(255,255,255,.86); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); }
.conversation { border-color: rgba(190, 214, 246, .72); border-radius: 14px; background: radial-gradient(circle at 100% 0, rgba(91, 111, 255, .11), transparent 34%), linear-gradient(145deg, rgba(248,251,255,.76), rgba(228,238,253,.58)); box-shadow: inset 0 1px rgba(255,255,255,.82); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.message-bubble { padding: 12px 14px; border-radius: 14px; box-shadow: 0 5px 16px rgba(40, 57, 91, .045); }
.message-codex { border-color: #b9c9ff; background: linear-gradient(145deg, #eef4ff, #f1efff); }
.message-customer { border-color: #cfd9e9; background: #fff; }
.message-admin { border-color: #b8e0d1; background: linear-gradient(145deg, #eefbf5, #f6fffb); }
.issue-chat-conversation { border-radius: 16px; background: radial-gradient(circle at 100% 0, rgba(75, 127, 255, .11), transparent 34%), linear-gradient(155deg, #f6f9ff, #f5f6fb); }
.issue-chat-composer { border-radius: 16px; box-shadow: 0 16px 36px rgba(45, 65, 124, .1); }
.task-progress { border-radius: 13px; background: linear-gradient(120deg, #f1f7ff, #f4f2ff); box-shadow: inset 3px 0 0 rgba(91, 104, 238, .62); }
.knowledge-repository-card::before { background: linear-gradient(90deg, transparent, #20d8aa, #19cce4, transparent); }
.knowledge-candidate-card::before { background: linear-gradient(90deg, transparent, #7967f2, #4c86ff, transparent); }
.public-knowledge-card::before { background: linear-gradient(90deg, transparent, #f0a431, #f3ca60, transparent); }
.knowledge-repository-metric, .knowledge-candidate-metric, .knowledge-repository-content-types > div, .knowledge-candidate-item, .knowledge-repository-chain-item, .knowledge-task-audit-item { border-radius: 13px; box-shadow: 0 8px 22px rgba(32, 51, 80, .05); }
.notification-toast { top: 20px; right: 22px; border-color: rgba(107, 145, 255, .35); border-radius: 15px; color: #1b3765; background: rgba(244, 248, 255, .96); box-shadow: 0 20px 50px rgba(0, 8, 30, .28); backdrop-filter: blur(18px); }
table { overflow: hidden; border: 1px solid #e1e7f1; border-radius: 12px; background: #fff; }
th { background: #f3f6fa; }
progress { accent-color: #5965ef; }
* { scrollbar-width: thin; scrollbar-color: #8095bd #edf1f7; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-track { border-radius: 999px; background: #edf1f7; }
*::-webkit-scrollbar-thumb { border: 2px solid #edf1f7; border-radius: 999px; background: linear-gradient(#7890bb, #6d67db); }
body.quota-overdue { background: radial-gradient(circle at 10% 0, rgba(180, 35, 24, .25), transparent 30%), linear-gradient(150deg, #14080b, #16101f 50%, #07101e); }
body.quota-overdue #appView .card { border-color: rgba(211, 128, 119, .52); background: linear-gradient(150deg, #fffafa, #fff5f3); }

@keyframes lumins-ambient { from { transform: translateX(-50%) scale(.94); opacity: .72; } to { transform: translateX(-50%) scale(1.06); opacity: 1; } }
@keyframes lumins-live { 0%, 100% { transform: scale(.85); opacity: .7; } 50% { transform: scale(1.12); opacity: 1; } }

@media (max-width: 1120px) {
  .login-card { grid-template-columns: minmax(0, 1fr) minmax(360px, .82fr); }
  .login-showcase { padding: 52px 42px 44px; }
  .login-panel { padding: 48px 38px; }
  .lumins-command-hero { grid-template-columns: 1fr; }
  .lumins-pipeline { max-width: 760px; }
}

@media (max-width: 900px) {
  .shell { padding: 16px 16px 34px; }
  .login-card { grid-template-columns: 1fr; width: min(680px, calc(100vw - 30px)); margin: 3vh auto; }
  .login-showcase { min-height: auto; padding: 46px 38px 38px; }
  .login-showcase h1 { font-size: clamp(36px, 8vw, 52px); }
  .login-signal { top: 44%; right: -72px; opacity: .42; }
  .login-feature-grid { margin-top: 38px; }
  .login-panel { padding: 42px 38px; }
  .topbar { position: relative; top: 0; }
  .lumins-command-hero { padding: 24px; }
  .lumins-pipeline { grid-template-columns: 1fr; gap: 9px; }
  .lumins-pipeline > div { min-height: auto; }
  .lumins-pipeline > i { width: 1px; height: 16px; margin-left: 28px; }
  .quota-card { grid-template-columns: 1fr; }
  .project-grid, .project-grid > form { width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr); }
  .project-grid > div:not(.project-sdk-upload) { min-width: 0; }
  .project-grid > form, .project-grid > div:not(.project-sdk-upload), .support-layout > form, .support-layout > div, .repair-layout > form, .repair-layout > div { padding: 16px; }
}

@media (max-width: 620px) {
  .shell { padding: 9px 9px 28px; }
  .login-card { width: calc(100vw - 18px); margin: 9px auto; border-radius: 22px; }
  .login-showcase { padding: 34px 24px 26px; }
  .login-showcase h1 { margin-top: 16px; font-size: 35px; }
  .login-lead { font-size: 14px; }
  .login-signal { display: none; }
  .login-feature-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 28px; }
  .login-feature-grid > div { grid-template-columns: auto 1fr; align-items: center; padding: 11px 12px; }
  .login-feature-grid small { grid-column: 2; }
  .login-panel { padding: 32px 23px; }
  .topbar { padding: 16px; border-radius: 16px; }
  .topbar-brand { align-items: flex-start; }
  .topbar h1 { font-size: 19px; }
  .topbar .brand-kicker { font-size: 9px; }
  .topbar .user-box { gap: 8px; }
  .user-box > span:first-child { width: 100%; }
  .lumins-command-hero { padding: 20px 18px; border-radius: 18px; }
  .lumins-command-copy h2 { font-size: 25px; }
  .card { padding: 18px; border-radius: 17px; }
  .card { -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); }
  .card::after { opacity: .5; background-size: auto, 30px 30px, 30px 30px; }
  .card::before { right: 18px; left: 18px; }
  .card-heading { align-items: stretch; flex-direction: column; }
  .card-heading > button { width: fit-content; }
  .quota-card > div:first-child { padding: 19px; }
  .quota-value { font-size: 34px; }
  .project-grid > form, .project-grid > div:not(.project-sdk-upload) { padding: 14px; }
  .project-source-selector { align-items: flex-start; flex-direction: column; gap: 10px; }
  .project-source-selector label { width: 100%; }
  .quota-ledger-actions { align-items: stretch; flex-direction: column; }
  .quota-ledger-actions button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::after, .system-live span { animation: none; }
  .primary, .secondary, .card { transition: none; }
}

/* Lumins deep-glass workspace: visible ice-glass surfaces instead of plain white cards. */
#workspace {
  isolation: isolate;
  color: #dce8fb;
  --glass-surface: rgba(11, 28, 59, .76);
  --glass-surface-soft: rgba(22, 42, 82, .54);
  --glass-surface-strong: rgba(8, 22, 50, .84);
  --glass-border: rgba(135, 190, 255, .34);
  --glass-border-bright: rgba(116, 231, 247, .55);
  --glass-text: #edf5ff;
  --glass-muted: #9fb1cc;
}
#workspace::before,
#workspace::after {
  position: fixed;
  z-index: -1;
  width: min(48vw, 660px);
  aspect-ratio: 1;
  content: "";
  pointer-events: none;
  border-radius: 50%;
  filter: blur(8px);
  opacity: .72;
  will-change: transform;
}
#workspace::before {
  top: 15%;
  left: -18%;
  background: radial-gradient(circle, rgba(22, 218, 230, .22), rgba(39, 111, 255, .12) 38%, transparent 70%);
  animation: lumins-glass-orbit-left 16s ease-in-out infinite alternate;
}
#workspace::after {
  right: -20%;
  bottom: -8%;
  background: radial-gradient(circle, rgba(124, 87, 255, .26), rgba(47, 107, 255, .1) 42%, transparent 72%);
  animation: lumins-glass-orbit-right 18s ease-in-out infinite alternate;
}

#workspace .card {
  color: var(--glass-text);
  border-color: var(--glass-border);
  background:
    radial-gradient(circle at 10% -8%, rgba(41, 222, 235, .2), transparent 30%),
    radial-gradient(circle at 96% 4%, rgba(126, 93, 255, .22), transparent 34%),
    linear-gradient(138deg, rgba(19, 44, 88, .82), rgba(12, 29, 64, .76) 48%, rgba(27, 24, 75, .73));
  box-shadow:
    0 30px 90px rgba(0, 4, 22, .48),
    0 0 0 1px rgba(69, 151, 255, .08),
    inset 0 1px rgba(255, 255, 255, .16),
    inset 0 0 56px rgba(67, 122, 255, .055);
  -webkit-backdrop-filter: blur(34px) saturate(175%);
  backdrop-filter: blur(34px) saturate(175%);
}
#workspace .card::before {
  height: 1px;
  right: 22px;
  left: 22px;
  opacity: 1;
  background: linear-gradient(90deg, transparent, rgba(73, 236, 244, .96), rgba(105, 132, 255, .94) 54%, rgba(151, 96, 255, .9), transparent);
  box-shadow: 0 0 18px rgba(76, 213, 246, .52), 0 0 34px rgba(104, 88, 255, .22);
}
#workspace .card::after {
  opacity: .36;
  background:
    linear-gradient(116deg, rgba(255, 255, 255, .13), transparent 18%, transparent 72%, rgba(120, 86, 255, .12)),
    linear-gradient(rgba(111, 170, 255, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 170, 255, .11) 1px, transparent 1px);
  background-size: auto, 40px 40px, 40px 40px;
  -webkit-mask-image: linear-gradient(145deg, #000, transparent 86%);
  mask-image: linear-gradient(145deg, #000, transparent 86%);
}
#workspace .card:hover {
  border-color: rgba(121, 219, 246, .58);
  box-shadow:
    0 34px 100px rgba(0, 5, 28, .55),
    0 0 0 1px rgba(63, 224, 239, .13),
    0 0 44px rgba(70, 105, 255, .12),
    inset 0 1px rgba(255, 255, 255, .2);
}

#workspace .card h2,
#workspace .card h3,
#workspace .card .card-heading h2,
#workspace .card .card-heading h3,
#workspace .card .public-knowledge-status,
#workspace .card .config-section summary {
  color: #f3f7ff;
}
#workspace .card .muted,
#workspace .card .job-meta,
#workspace .card .quota-ledger-time,
#workspace .card .message-bubble small,
#workspace .card .task-progress-label {
  color: var(--glass-muted);
}
#workspace .card label { color: #cbd8eb; }
#workspace .card a { color: #79d9ff; }
#workspace .card .link-button { color: #8ea6ff; }

#workspace input,
#workspace select,
#workspace textarea {
  color: #f0f6ff;
  border-color: rgba(138, 179, 235, .34);
  background: linear-gradient(145deg, rgba(5, 17, 39, .74), rgba(17, 31, 66, .62));
  box-shadow: inset 0 1px rgba(255, 255, 255, .055), 0 8px 22px rgba(0, 5, 24, .12);
}
#workspace input::placeholder,
#workspace textarea::placeholder { color: #8294b2; opacity: 1; }
#workspace select option { color: #edf4ff; background: #0c1a36; }
#workspace input:hover,
#workspace select:hover,
#workspace textarea:hover { border-color: rgba(113, 207, 244, .55); }
#workspace input:focus,
#workspace select:focus,
#workspace textarea:focus {
  color: #fff;
  border-color: #66d9ef;
  background: rgba(7, 21, 48, .88);
  box-shadow: 0 0 0 4px rgba(60, 205, 237, .12), 0 0 28px rgba(82, 105, 255, .18), inset 0 1px rgba(255, 255, 255, .07);
}
#workspace input[readonly] { color: #aebed7; background: rgba(26, 41, 71, .58); }
#workspace input::file-selector-button {
  margin-right: 10px;
  padding: 7px 11px;
  border: 1px solid rgba(133, 187, 246, .36);
  border-radius: 8px;
  color: #dcecff;
  background: linear-gradient(135deg, rgba(46, 106, 196, .62), rgba(91, 72, 191, .58));
}

#workspace .secondary,
#workspace .issue-attachment-button {
  color: #dce9ff;
  border-color: rgba(143, 185, 240, .35);
  background: linear-gradient(145deg, rgba(38, 64, 108, .52), rgba(27, 37, 80, .52));
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 8px 20px rgba(0, 7, 30, .14);
}
#workspace .secondary:hover,
#workspace .issue-attachment-button:hover {
  color: #fff;
  border-color: rgba(91, 225, 241, .58);
  background: linear-gradient(145deg, rgba(42, 103, 164, .62), rgba(75, 58, 160, .58));
}

#workspace .project-grid > form,
#workspace .project-grid > div:not(.project-sdk-upload),
#workspace .project-source-selector,
#workspace .project-summary,
#workspace .project-sdk-upload,
#workspace .mode-choice,
#workspace .material-upload-card,
#workspace .public-knowledge-control,
#workspace .ai-settings-form,
#workspace .user-ai-editor,
#workspace .support-layout > form,
#workspace .support-layout > div,
#workspace .repair-layout > form,
#workspace .repair-layout > div,
#workspace .conversation,
#workspace .issue-chat-composer,
#workspace .project-conversation-guide,
#workspace .issue-stage-hint,
#workspace .task-progress,
#workspace .document-row,
#workspace .config-diff,
#workspace .knowledge-repository-path,
#workspace .knowledge-repository-truth,
#workspace .knowledge-repository-metric,
#workspace .knowledge-overview-file,
#workspace .knowledge-repository-content-map,
#workspace .knowledge-repository-content-types > div,
#workspace .knowledge-repository-chain-item,
#workspace .knowledge-safety-note,
#workspace .knowledge-lifecycle-note,
#workspace .knowledge-candidate-metric,
#workspace .knowledge-task-audit-item,
#workspace .knowledge-candidate-item {
  color: #dce8f8;
  border-color: rgba(132, 181, 241, .25);
  background:
    radial-gradient(circle at 100% 0, rgba(102, 83, 229, .13), transparent 34%),
    linear-gradient(145deg, rgba(30, 56, 102, .48), rgba(12, 28, 61, .56));
  box-shadow: 0 16px 38px rgba(0, 6, 28, .19), inset 0 1px rgba(255, 255, 255, .075);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}
#workspace .project-creation-selector,
#workspace .mode-choice.selected {
  border-color: rgba(95, 220, 239, .48);
  background: linear-gradient(125deg, rgba(25, 132, 190, .28), rgba(83, 61, 181, .32));
  box-shadow: 0 0 0 1px rgba(51, 222, 236, .08), 0 14px 34px rgba(0, 8, 33, .2);
}
#workspace .project-summary,
#workspace .knowledge-candidate-summary,
#workspace .knowledge-repository-chain-summary,
#workspace .project-conversation-guide ol { color: #c7d5e9; }
#workspace .project-conversation-guide h3,
#workspace .issue-chat-new h3 { color: #aebdff; }
#workspace .issue-stage-hint { color: #b9caff; border-left-color: #7188ff; }
#workspace .mode-badge,
#workspace .knowledge-task-outcome,
#workspace .knowledge-candidate-badge.status {
  color: #d9d3ff;
  background: rgba(112, 87, 224, .22);
}

#workspace .conversation,
#workspace .issue-chat-conversation {
  background:
    radial-gradient(circle at 100% 0, rgba(83, 100, 229, .2), transparent 34%),
    linear-gradient(150deg, rgba(7, 22, 52, .72), rgba(15, 28, 65, .64));
}
#workspace .message-bubble {
  color: #e8f0ff;
  border-color: rgba(135, 177, 231, .26);
  background: linear-gradient(145deg, rgba(28, 50, 91, .72), rgba(18, 32, 70, .7));
  box-shadow: 0 10px 28px rgba(0, 5, 25, .2), inset 0 1px rgba(255, 255, 255, .06);
}
#workspace .message-customer,
#workspace .issue-chat-conversation .message-customer {
  color: #edf4ff;
  border-color: rgba(102, 153, 255, .42);
  background: linear-gradient(145deg, rgba(42, 79, 147, .72), rgba(39, 44, 111, .68));
}
#workspace .message-codex {
  color: #edf3ff;
  border-color: rgba(137, 116, 255, .42);
  background: linear-gradient(145deg, rgba(59, 55, 133, .72), rgba(29, 51, 101, .68));
}
#workspace .message-admin {
  color: #eafff7;
  border-color: rgba(61, 211, 164, .38);
  background: linear-gradient(145deg, rgba(22, 105, 90, .54), rgba(20, 56, 72, .68));
}

#workspace table {
  color: #dce7f8;
  border-color: rgba(129, 174, 231, .22);
  background: rgba(7, 20, 46, .5);
}
#workspace th { color: #adbad1; background: rgba(32, 52, 91, .58); }
#workspace th,
#workspace td,
#workspace .job,
#workspace .compact-item,
#workspace .user-account-item,
#workspace .section-title,
#workspace .config-section,
#workspace .firmware-request-heading,
#workspace .log-item,
#workspace .quota-ledger-actions,
#workspace .knowledge-repository-chain-heading,
#workspace .knowledge-candidate-list-heading,
#workspace .knowledge-task-audit-heading { border-color: rgba(132, 171, 221, .18); }
#workspace .quota-ledger-value,
#workspace .task-progress-value,
#workspace .task-progress-activity,
#workspace .material-round-label,
#workspace .issue-status { color: #87c9ff; }
#workspace .knowledge-repository-path strong,
#workspace .knowledge-overview-file strong,
#workspace .knowledge-repository-metric > strong,
#workspace .knowledge-repository-content-types strong { color: #7de6c4; }
#workspace .knowledge-repository-chain-path,
#workspace .knowledge-candidate-resolution { color: #7bd9b6; }
#workspace .knowledge-candidate-metric > strong { color: #b8a9ff; }
#workspace .knowledge-repository-content-types span,
#workspace .knowledge-candidate-summary { color: #c8d5e7; }
#workspace .knowledge-repository-metric > small,
#workspace .knowledge-repository-content-types small,
#workspace .knowledge-candidate-metric > small,
#workspace .knowledge-candidate-meta,
#workspace .knowledge-task-audit-meta { color: #90a2bd; }
#workspace .notice {
  color: #c5dcff;
  border-color: rgba(91, 158, 245, .32);
  background: linear-gradient(110deg, rgba(18, 64, 119, .46), rgba(56, 41, 119, .38));
  box-shadow: 0 12px 30px rgba(0, 7, 30, .16), inset 0 1px rgba(255, 255, 255, .05);
}
#workspace .task-progress-overdue,
#workspace .task-progress-queue-timeout { border-color: rgba(232, 185, 85, .5); background: rgba(102, 72, 13, .3); }
#workspace .task-progress-stale,
#workspace .task-progress-interrupted { border-color: rgba(222, 112, 99, .5); background: rgba(111, 39, 43, .3); }
#workspace * { scrollbar-color: #6879bd rgba(9, 24, 53, .72); }
#workspace *::-webkit-scrollbar-track { background: rgba(9, 24, 53, .72); }
#workspace *::-webkit-scrollbar-thumb { border-color: rgba(9, 24, 53, .72); background: linear-gradient(#37bfd0, #7969df); }

body.quota-overdue #workspace .card {
  color: #f8e8ea;
  border-color: rgba(230, 125, 118, .45);
  background:
    radial-gradient(circle at 90% 0, rgba(215, 82, 102, .18), transparent 34%),
    linear-gradient(145deg, rgba(76, 25, 47, .83), rgba(40, 19, 45, .8));
}

@keyframes lumins-glass-orbit-left {
  from { transform: translate3d(-5%, -4%, 0) scale(.92); }
  to { transform: translate3d(22%, 11%, 0) scale(1.08); }
}
@keyframes lumins-glass-orbit-right {
  from { transform: translate3d(4%, 7%, 0) scale(1.04); }
  to { transform: translate3d(-18%, -10%, 0) scale(.9); }
}

@media (max-width: 620px) {
  body { background-attachment: scroll; }
  #workspace::before,
  #workspace::after { width: 92vw; opacity: .5; filter: blur(4px); animation: none; }
  #workspace .card {
    background:
      radial-gradient(circle at 8% 0, rgba(38, 218, 231, .17), transparent 28%),
      radial-gradient(circle at 96% 5%, rgba(123, 91, 255, .2), transparent 30%),
      linear-gradient(145deg, rgba(18, 42, 83, .86), rgba(13, 28, 61, .82) 52%, rgba(31, 27, 75, .78));
    -webkit-backdrop-filter: blur(22px) saturate(155%);
    backdrop-filter: blur(22px) saturate(155%);
  }
  #workspace .card::after { opacity: .25; background-size: auto, 30px 30px, 30px 30px; }
  #workspace .project-grid > form,
  #workspace .project-grid > div:not(.project-sdk-upload),
  #workspace .project-source-selector,
  #workspace .project-summary,
  #workspace .project-sdk-upload,
  #workspace .mode-choice,
  #workspace .material-upload-card,
  #workspace .public-knowledge-control,
  #workspace .ai-settings-form,
  #workspace .user-ai-editor,
  #workspace .support-layout > form,
  #workspace .support-layout > div,
  #workspace .repair-layout > form,
  #workspace .repair-layout > div,
  #workspace .conversation,
  #workspace .issue-chat-composer,
  #workspace .project-conversation-guide,
  #workspace .task-progress,
  #workspace .document-row { -webkit-backdrop-filter: none; backdrop-filter: none; }
  #workspace .knowledge-repository-paths { grid-template-columns: minmax(0, 1fr); }
  #workspace .issue-chat-conversation .message-customer,
  #workspace .issue-chat-conversation .message-codex,
  #workspace .message-customer { margin-right: 0; margin-left: 0; }
  #workspace .workspace-heading,
  #workspace .section-title,
  #workspace .submit-row,
  #workspace .firmware-submit-row,
  #workspace .job-title,
  #workspace .compact-item { align-items: stretch; flex-direction: column; }
  #workspace .table-wrap { border-radius: 12px; background: rgba(7, 20, 46, .42); }
  #workspace .table-wrap table { min-width: 680px; }
}

@media (prefers-reduced-motion: reduce) {
  #workspace::before,
  #workspace::after { animation: none; }
}

/* Account-scoped Lumins themes. Mixed is the default: blue-violet stage with light cards. */
html[data-theme="mixed"] {
  color-scheme: light;
  --ui-page-text: #dce8fb;
  --ui-page-bg: radial-gradient(circle at 11% -8%, rgba(47, 107, 255, .42), transparent 31%), radial-gradient(circle at 94% 12%, rgba(117, 92, 255, .34), transparent 30%), radial-gradient(circle at 52% 100%, rgba(14, 190, 199, .12), transparent 37%), linear-gradient(150deg, #050914 0%, #081426 38%, #0b1730 67%, #07101e 100%);
  --ui-grid-line: rgba(113, 155, 230, .11);
  --ui-ambient: radial-gradient(circle, rgba(57, 111, 255, .11), transparent 66%);
  --ui-topbar: linear-gradient(110deg, rgba(7, 18, 40, .93), rgba(13, 37, 79, .91) 58%, rgba(28, 24, 81, .91)), radial-gradient(circle at 20% 0, rgba(32, 224, 232, .22), transparent 32%);
  --ui-hero: radial-gradient(circle at 86% 16%, rgba(77, 218, 235, .17), transparent 28%), radial-gradient(circle at 18% 110%, rgba(109, 82, 255, .26), transparent 40%), linear-gradient(125deg, rgba(10, 25, 54, .96), rgba(13, 34, 72, .93) 55%, rgba(28, 24, 77, .93));
  --ui-stage-text: #ffffff;
  --ui-stage-muted: #aebfdb;
  --ui-stage-panel: rgba(5, 16, 37, .55);
  --ui-accent: #185fae;
  --ui-accent-bright: #20d9e6;
  --ui-secondary-accent: #715cff;
  --ui-card-text: #17243c;
  --ui-card-title: #111e39;
  --ui-muted: #53627a;
  --ui-label: #2e3d57;
  --ui-link: #185fae;
  --ui-card-border: rgba(210, 229, 255, .72);
  --ui-card-bg: radial-gradient(circle at 8% 0, rgba(48, 207, 230, .1), transparent 27%), radial-gradient(circle at 96% 8%, rgba(111, 88, 255, .1), transparent 30%), linear-gradient(145deg, #f9fcff, #edf3fc);
  --ui-card-shadow: 0 24px 70px rgba(0, 8, 32, .25), inset 0 1px rgba(255,255,255,.94), inset 0 0 0 1px rgba(255,255,255,.28);
  --ui-inner-text: #273750;
  --ui-inner-border: rgba(184, 210, 244, .74);
  --ui-inner-bg: radial-gradient(circle at 100% 0, rgba(103, 89, 230, .06), transparent 34%), linear-gradient(145deg, #f8fbff, #edf3fc);
  --ui-control-text: #172033;
  --ui-control-placeholder: #58677d;
  --ui-control-border: rgba(159, 185, 222, .72);
  --ui-control-bg: #fbfdff;
  --ui-option-bg: #ffffff;
  --ui-secondary-text: #263b5d;
  --ui-secondary-bg: #f7faff;
  --ui-conversation-bg: linear-gradient(150deg, #f7faff, #eaf1fb);
  --ui-bubble-bg: linear-gradient(145deg, #ffffff, #eff5ff);
  --ui-customer-bg: linear-gradient(145deg, #e7f1ff, #ebe9ff);
  --ui-codex-bg: linear-gradient(145deg, #efeaff, #e4f0ff);
  --ui-admin-bg: linear-gradient(145deg, #e6f8f0, #eefbf7);
  --ui-table-bg: rgba(255,255,255,.82);
  --ui-table-head: rgba(231,238,250,.92);
  --ui-notice-bg: linear-gradient(110deg, rgba(232,244,255,.94), rgba(241,237,255,.9));
  --ui-notice-text: #234e8b;
  --ui-orb-left: radial-gradient(circle, rgba(22, 218, 230, .16), rgba(39, 111, 255, .09) 38%, transparent 70%);
  --ui-orb-right: radial-gradient(circle, rgba(124, 87, 255, .2), rgba(47, 107, 255, .08) 42%, transparent 72%);
  --ui-scroll-track: rgba(226, 234, 247, .9);
  --ui-scroll-thumb: linear-gradient(#52a9d9, #7569df);
  --ui-quota-bg: radial-gradient(circle at 86% 12%, rgba(37, 225, 234, .22), transparent 30%), linear-gradient(145deg, #102d62, #1b3c7b 53%, #312c7e);
  --ui-card-surface-a: #f9fcff;
  --ui-card-surface-b: #edf3fc;
  --ui-inner-surface-a: #f8fbff;
  --ui-inner-surface-b: #edf3fc;
  --ui-control-surface: #fbfdff;
  --ui-secondary-surface: #f7faff;
  --ui-primary-button-text: #ffffff;
  --ui-primary-button-a: #3153bd;
  --ui-primary-button-b: #553eb5;
  --ui-disabled-text: #48576c;
  --ui-disabled-bg: #d7e0ec;
  --ui-success-text: #0b6842;
  --ui-warning-text: #765100;
  --ui-danger-text: #a12828;
  --ui-success-bg: #e1f4e9;
  --ui-warning-bg: #fff1c9;
  --ui-danger-bg: #fde4e2;
  --ui-badge-text: #274da1;
  --ui-badge-bg: #dce8f8;
  --ui-page-surface-a: #050914;
  --ui-page-surface-b: #0b1730;
}

html[data-theme="midnight-violet"] {
  color-scheme: dark;
  --ui-page-text: #dce8fb;
  --ui-page-bg: radial-gradient(circle at 11% -8%, rgba(47, 107, 255, .42), transparent 31%), radial-gradient(circle at 94% 12%, rgba(117, 92, 255, .34), transparent 30%), radial-gradient(circle at 52% 100%, rgba(14, 190, 199, .12), transparent 37%), linear-gradient(150deg, #050914 0%, #081426 38%, #0b1730 67%, #07101e 100%);
  --ui-grid-line: rgba(113, 155, 230, .11);
  --ui-ambient: radial-gradient(circle, rgba(57, 111, 255, .11), transparent 66%);
  --ui-topbar: linear-gradient(110deg, rgba(7, 18, 40, .93), rgba(13, 37, 79, .91) 58%, rgba(28, 24, 81, .91)), radial-gradient(circle at 20% 0, rgba(32, 224, 232, .22), transparent 32%);
  --ui-hero: radial-gradient(circle at 86% 16%, rgba(77, 218, 235, .17), transparent 28%), radial-gradient(circle at 18% 110%, rgba(109, 82, 255, .26), transparent 40%), linear-gradient(125deg, rgba(10, 25, 54, .96), rgba(13, 34, 72, .93) 55%, rgba(28, 24, 77, .93));
  --ui-stage-text: #ffffff;
  --ui-stage-muted: #aebfdb;
  --ui-stage-panel: rgba(5, 16, 37, .55);
  --ui-accent: #75e6f3;
  --ui-accent-bright: #49ecf4;
  --ui-secondary-accent: #9760ff;
  --ui-card-text: #dce8fb;
  --ui-card-title: #f3f7ff;
  --ui-muted: #b4c4db;
  --ui-label: #cbd8eb;
  --ui-link: #79d9ff;
  --ui-card-border: rgba(135, 190, 255, .34);
  --ui-card-bg: radial-gradient(circle at 10% -8%, rgba(41, 222, 235, .14), transparent 30%), radial-gradient(circle at 96% 4%, rgba(126, 93, 255, .15), transparent 34%), linear-gradient(138deg, #183457, #101f3d 48%, #201d50);
  --ui-card-shadow: 0 30px 90px rgba(0, 4, 22, .48), 0 0 0 1px rgba(69, 151, 255, .08), inset 0 1px rgba(255,255,255,.16), inset 0 0 56px rgba(67,122,255,.055);
  --ui-inner-text: #dce8f8;
  --ui-inner-border: rgba(132, 181, 241, .25);
  --ui-inner-bg: radial-gradient(circle at 100% 0, rgba(102, 83, 229, .1), transparent 34%), linear-gradient(145deg, #173254, #101f3a);
  --ui-control-text: #f0f6ff;
  --ui-control-placeholder: #a9bad2;
  --ui-control-border: rgba(138, 179, 235, .34);
  --ui-control-bg: #0d1d38;
  --ui-option-bg: #0c1a36;
  --ui-secondary-text: #dce9ff;
  --ui-secondary-bg: #213758;
  --ui-conversation-bg: linear-gradient(150deg, #0b2040, #15294b);
  --ui-bubble-bg: linear-gradient(145deg, #1b365b, #172b4e);
  --ui-customer-bg: linear-gradient(145deg, #28558d, #303f7a);
  --ui-codex-bg: linear-gradient(145deg, #453f83, #284b7d);
  --ui-admin-bg: linear-gradient(145deg, #176b5c, #173e54);
  --ui-table-bg: rgba(7, 20, 46, .5);
  --ui-table-head: rgba(32, 52, 91, .58);
  --ui-notice-bg: linear-gradient(110deg, rgba(18, 64, 119, .46), rgba(56, 41, 119, .38));
  --ui-notice-text: #c5dcff;
  --ui-orb-left: radial-gradient(circle, rgba(22, 218, 230, .22), rgba(39, 111, 255, .12) 38%, transparent 70%);
  --ui-orb-right: radial-gradient(circle, rgba(124, 87, 255, .26), rgba(47, 107, 255, .1) 42%, transparent 72%);
  --ui-scroll-track: rgba(9, 24, 53, .72);
  --ui-scroll-thumb: linear-gradient(#37bfd0, #7969df);
  --ui-quota-bg: radial-gradient(circle at 86% 12%, rgba(37, 225, 234, .22), transparent 30%), linear-gradient(145deg, #102d62, #1b3c7b 53%, #312c7e);
  --ui-card-surface-a: #183457;
  --ui-card-surface-b: #101f3d;
  --ui-inner-surface-a: #173254;
  --ui-inner-surface-b: #101f3a;
  --ui-control-surface: #0d1d38;
  --ui-secondary-surface: #213758;
  --ui-primary-button-text: #ffffff;
  --ui-primary-button-a: #3159b8;
  --ui-primary-button-b: #5139a8;
  --ui-disabled-text: #bdcbe0;
  --ui-disabled-bg: #263958;
  --ui-success-text: #83e4b5;
  --ui-warning-text: #ffd27f;
  --ui-danger-text: #ffb3b3;
  --ui-success-bg: #174a3d;
  --ui-warning-bg: #554219;
  --ui-danger-bg: #552d39;
  --ui-badge-text: #ece9ff;
  --ui-badge-bg: #35416e;
  --ui-page-surface-a: #050914;
  --ui-page-surface-b: #0b1730;
}

html[data-theme="obsidian-cyan"] {
  color-scheme: dark;
  --ui-page-text: #d9f5f1;
  --ui-page-bg: radial-gradient(circle at 12% -6%, rgba(0, 207, 188, .22), transparent 31%), radial-gradient(circle at 95% 14%, rgba(40, 130, 161, .22), transparent 30%), linear-gradient(150deg, #02090d, #04171c 44%, #062029 72%, #020c12);
  --ui-grid-line: rgba(80, 208, 194, .09);
  --ui-ambient: radial-gradient(circle, rgba(16, 205, 189, .1), transparent 66%);
  --ui-topbar: radial-gradient(circle at 14% 0, rgba(32, 236, 205, .16), transparent 34%), linear-gradient(112deg, rgba(2, 15, 20, .96), rgba(5, 39, 43, .93) 58%, rgba(6, 29, 45, .94));
  --ui-hero: radial-gradient(circle at 88% 15%, rgba(56, 227, 205, .18), transparent 30%), radial-gradient(circle at 10% 110%, rgba(25, 139, 177, .2), transparent 40%), linear-gradient(125deg, rgba(3, 25, 29, .97), rgba(6, 47, 50, .94) 55%, rgba(5, 30, 47, .95));
  --ui-stage-text: #effffc;
  --ui-stage-muted: #9bc5c1;
  --ui-stage-panel: rgba(0, 19, 23, .58);
  --ui-accent: #73eadb;
  --ui-accent-bright: #53f2da;
  --ui-secondary-accent: #39a8d5;
  --ui-card-text: #d9f0ee;
  --ui-card-title: #f0fffc;
  --ui-muted: #b2d0cc;
  --ui-label: #c0dcda;
  --ui-link: #6ee8d9;
  --ui-card-border: rgba(103, 215, 202, .29);
  --ui-card-bg: radial-gradient(circle at 8% 0, rgba(42, 225, 196, .11), transparent 29%), radial-gradient(circle at 96% 7%, rgba(47, 148, 181, .12), transparent 32%), linear-gradient(140deg, #0a3d42, #07252d 52%, #061f2a);
  --ui-card-shadow: 0 30px 90px rgba(0, 8, 12, .58), 0 0 0 1px rgba(46, 205, 187, .07), inset 0 1px rgba(255,255,255,.11);
  --ui-inner-text: #d5ece9;
  --ui-inner-border: rgba(100, 198, 190, .24);
  --ui-inner-bg: radial-gradient(circle at 100% 0, rgba(45, 180, 174, .08), transparent 34%), linear-gradient(145deg, #0d4144, #092b34);
  --ui-control-text: #edfffc;
  --ui-control-placeholder: #a4c3bf;
  --ui-control-border: rgba(102, 192, 185, .34);
  --ui-control-bg: #06262d;
  --ui-option-bg: #06242b;
  --ui-secondary-text: #d8f4f0;
  --ui-secondary-bg: #153f46;
  --ui-conversation-bg: linear-gradient(150deg, #082c33, #0a3840);
  --ui-bubble-bg: linear-gradient(145deg, #0f4244, #0a303a);
  --ui-customer-bg: linear-gradient(145deg, #0d5d5c, #0b4654);
  --ui-codex-bg: linear-gradient(145deg, #15515c, #0c3b4c);
  --ui-admin-bg: linear-gradient(145deg, #12664f, #0b433d);
  --ui-table-bg: rgba(2, 27, 34, .58);
  --ui-table-head: rgba(12, 62, 67, .62);
  --ui-notice-bg: linear-gradient(110deg, rgba(9, 71, 74, .5), rgba(6, 52, 65, .46));
  --ui-notice-text: #b9eee8;
  --ui-orb-left: radial-gradient(circle, rgba(31, 232, 202, .2), rgba(8, 126, 132, .1) 40%, transparent 70%);
  --ui-orb-right: radial-gradient(circle, rgba(42, 158, 189, .18), rgba(6, 93, 116, .09) 42%, transparent 72%);
  --ui-scroll-track: rgba(3, 35, 41, .8);
  --ui-scroll-thumb: linear-gradient(#2bc6b2, #2784a8);
  --ui-quota-bg: radial-gradient(circle at 86% 12%, rgba(62, 241, 210, .2), transparent 30%), linear-gradient(145deg, #063a40, #07565a 53%, #123f58);
  --ui-card-surface-a: #0a3d42;
  --ui-card-surface-b: #061f2a;
  --ui-inner-surface-a: #0d4144;
  --ui-inner-surface-b: #092b34;
  --ui-control-surface: #06262d;
  --ui-secondary-surface: #153f46;
  --ui-primary-button-text: #ffffff;
  --ui-primary-button-a: #087067;
  --ui-primary-button-b: #176485;
  --ui-disabled-text: #c2d9d6;
  --ui-disabled-bg: #22454a;
  --ui-success-text: #8ae7b9;
  --ui-warning-text: #ffd180;
  --ui-danger-text: #ffb4b4;
  --ui-success-bg: #174b3e;
  --ui-warning-bg: #504019;
  --ui-danger-bg: #542e35;
  --ui-badge-text: #d8fffa;
  --ui-badge-bg: #1d5056;
  --ui-page-surface-a: #02090d;
  --ui-page-surface-b: #062029;
}

html[data-theme="aurora-mist"] {
  color-scheme: light;
  --ui-page-text: #17233f;
  --ui-page-bg: radial-gradient(circle at 8% -5%, rgba(63, 154, 255, .26), transparent 32%), radial-gradient(circle at 94% 10%, rgba(153, 115, 255, .22), transparent 31%), radial-gradient(circle at 52% 102%, rgba(47, 210, 221, .16), transparent 38%), linear-gradient(150deg, #e8f2ff, #f1f3ff 46%, #e9f8fb);
  --ui-grid-line: rgba(71, 112, 177, .08);
  --ui-ambient: radial-gradient(circle, rgba(85, 126, 255, .13), transparent 66%);
  --ui-topbar: radial-gradient(circle at 12% 0, rgba(56, 210, 225, .2), transparent 34%), linear-gradient(115deg, rgba(239, 249, 255, .88), rgba(226, 236, 255, .84) 58%, rgba(239, 229, 255, .84));
  --ui-hero: radial-gradient(circle at 88% 10%, rgba(103, 227, 235, .28), transparent 29%), radial-gradient(circle at 13% 110%, rgba(148, 112, 255, .3), transparent 42%), linear-gradient(125deg, rgba(52, 105, 212, .94), rgba(82, 102, 225, .92) 55%, rgba(114, 74, 210, .91));
  --ui-stage-text: #ffffff;
  --ui-stage-muted: #dbe7ff;
  --ui-stage-panel: rgba(27, 61, 139, .32);
  --ui-accent: #205dab;
  --ui-accent-bright: #21bbd1;
  --ui-secondary-accent: #8465db;
  --ui-card-text: #17243d;
  --ui-card-title: #12203b;
  --ui-muted: #53647d;
  --ui-label: #34435e;
  --ui-link: #205dab;
  --ui-card-border: rgba(150, 184, 230, .58);
  --ui-card-bg: radial-gradient(circle at 8% 0, rgba(48, 207, 230, .09), transparent 27%), radial-gradient(circle at 96% 8%, rgba(111, 88, 255, .09), transparent 30%), linear-gradient(145deg, #f8fbff, #edf3fc);
  --ui-card-shadow: 0 24px 70px rgba(65, 91, 143, .18), inset 0 1px rgba(255,255,255,.9), inset 0 0 0 1px rgba(255,255,255,.28);
  --ui-inner-text: #273752;
  --ui-inner-border: rgba(160, 191, 232, .56);
  --ui-inner-bg: radial-gradient(circle at 100% 0, rgba(112, 91, 230, .06), transparent 34%), linear-gradient(145deg, #f7faff, #eef3fb);
  --ui-control-text: #17233a;
  --ui-control-placeholder: #58677d;
  --ui-control-border: rgba(143, 176, 220, .64);
  --ui-control-bg: #fbfdff;
  --ui-option-bg: #f4f7ff;
  --ui-secondary-text: #29405f;
  --ui-secondary-bg: #f4f8ff;
  --ui-conversation-bg: linear-gradient(150deg, #f8fbff, #eaf1fb);
  --ui-bubble-bg: linear-gradient(145deg, #ffffff, #eff5ff);
  --ui-customer-bg: linear-gradient(145deg, #e2efff, #e9e7ff);
  --ui-codex-bg: linear-gradient(145deg, #eee8ff, #e4f0ff);
  --ui-admin-bg: linear-gradient(145deg, #e3f7ef, #eefbf7);
  --ui-table-bg: rgba(255,255,255,.62);
  --ui-table-head: rgba(226,237,252,.76);
  --ui-notice-bg: linear-gradient(110deg, rgba(225,241,255,.76), rgba(237,230,255,.7));
  --ui-notice-text: #28538e;
  --ui-orb-left: radial-gradient(circle, rgba(31, 204, 222, .18), rgba(59, 126, 255, .1) 38%, transparent 70%);
  --ui-orb-right: radial-gradient(circle, rgba(141, 101, 255, .2), rgba(86, 119, 255, .09) 42%, transparent 72%);
  --ui-scroll-track: rgba(225, 235, 249, .84);
  --ui-scroll-thumb: linear-gradient(#53b8d4, #7a70dc);
  --ui-quota-bg: radial-gradient(circle at 86% 12%, rgba(60, 230, 234, .25), transparent 30%), linear-gradient(145deg, #2768bd, #4c64d1 53%, #7358c5);
  --ui-card-surface-a: #f8fbff;
  --ui-card-surface-b: #edf3fc;
  --ui-inner-surface-a: #f7faff;
  --ui-inner-surface-b: #eef3fb;
  --ui-control-surface: #fbfdff;
  --ui-secondary-surface: #f4f8ff;
  --ui-primary-button-text: #ffffff;
  --ui-primary-button-a: #3153bd;
  --ui-primary-button-b: #553eb5;
  --ui-disabled-text: #48576c;
  --ui-disabled-bg: #d7e0ec;
  --ui-success-text: #0b6842;
  --ui-warning-text: #765100;
  --ui-danger-text: #a12828;
  --ui-success-bg: #e1f4e9;
  --ui-warning-bg: #fff1c9;
  --ui-danger-bg: #fde4e2;
  --ui-badge-text: #274da1;
  --ui-badge-bg: #dce8f8;
  --ui-page-surface-a: #e8f2ff;
  --ui-page-surface-b: #e9f8fb;
}

html[data-theme="pearl-sunrise"] {
  color-scheme: light;
  --ui-page-text: #33253a;
  --ui-page-bg: radial-gradient(circle at 9% -7%, rgba(255, 183, 100, .3), transparent 32%), radial-gradient(circle at 93% 11%, rgba(183, 119, 226, .22), transparent 31%), radial-gradient(circle at 50% 103%, rgba(246, 189, 145, .2), transparent 40%), linear-gradient(150deg, #fff5e9, #fbf3ee 47%, #f5edf8);
  --ui-grid-line: rgba(135, 94, 121, .07);
  --ui-ambient: radial-gradient(circle, rgba(226, 145, 105, .14), transparent 66%);
  --ui-topbar: radial-gradient(circle at 12% 0, rgba(255, 197, 116, .22), transparent 34%), linear-gradient(115deg, rgba(255, 249, 239, .9), rgba(250, 234, 224, .86) 58%, rgba(244, 229, 249, .86));
  --ui-hero: radial-gradient(circle at 88% 12%, rgba(255, 211, 128, .24), transparent 30%), radial-gradient(circle at 12% 110%, rgba(186, 106, 213, .3), transparent 42%), linear-gradient(125deg, rgba(121, 67, 112, .95), rgba(152, 78, 123, .93) 55%, rgba(185, 104, 105, .92));
  --ui-stage-text: #fffdf9;
  --ui-stage-muted: #f4dfe2;
  --ui-stage-panel: rgba(89, 42, 77, .32);
  --ui-accent: #94465d;
  --ui-accent-bright: #df9a54;
  --ui-secondary-accent: #9b63c2;
  --ui-card-text: #35283b;
  --ui-card-title: #312238;
  --ui-muted: #675767;
  --ui-label: #554257;
  --ui-link: #94465d;
  --ui-card-border: rgba(210, 172, 181, .52);
  --ui-card-bg: radial-gradient(circle at 8% 0, rgba(255, 190, 109, .1), transparent 27%), radial-gradient(circle at 96% 8%, rgba(180, 115, 219, .09), transparent 30%), linear-gradient(145deg, #fffaf6, #f7ebef);
  --ui-card-shadow: 0 24px 70px rgba(104, 68, 92, .17), inset 0 1px rgba(255,255,255,.92), inset 0 0 0 1px rgba(255,255,255,.3);
  --ui-inner-text: #49384a;
  --ui-inner-border: rgba(211, 177, 188, .5);
  --ui-inner-bg: radial-gradient(circle at 100% 0, rgba(186, 113, 215, .06), transparent 34%), linear-gradient(145deg, #fff9f5, #f9eff1);
  --ui-control-text: #3b2a3b;
  --ui-control-placeholder: #6f5e6d;
  --ui-control-border: rgba(199, 163, 179, .62);
  --ui-control-bg: #fffaf8;
  --ui-option-bg: #fffaf6;
  --ui-secondary-text: #60465d;
  --ui-secondary-bg: #fff7f4;
  --ui-conversation-bg: linear-gradient(150deg, #fff9f5, #f8edf1);
  --ui-bubble-bg: linear-gradient(145deg, #fffcf9, #faeff2);
  --ui-customer-bg: linear-gradient(145deg, #ffeddc, #f7e5f5);
  --ui-codex-bg: linear-gradient(145deg, #f4e7fb, #ffede1);
  --ui-admin-bg: linear-gradient(145deg, #e7f7ec, #f7f8eb);
  --ui-table-bg: rgba(255,253,249,.68);
  --ui-table-head: rgba(247,230,235,.8);
  --ui-notice-bg: linear-gradient(110deg, rgba(255,237,220,.8), rgba(243,230,249,.76));
  --ui-notice-text: #75465d;
  --ui-orb-left: radial-gradient(circle, rgba(255, 176, 91, .18), rgba(218, 121, 123, .08) 38%, transparent 70%);
  --ui-orb-right: radial-gradient(circle, rgba(183, 106, 219, .18), rgba(201, 113, 158, .08) 42%, transparent 72%);
  --ui-scroll-track: rgba(245, 231, 234, .88);
  --ui-scroll-thumb: linear-gradient(#dc9664, #a76bc3);
  --ui-quota-bg: radial-gradient(circle at 86% 12%, rgba(255, 213, 135, .25), transparent 30%), linear-gradient(145deg, #8d4c72, #a45d7b 53%, #8b5b9d);
  --ui-card-surface-a: #fffaf6;
  --ui-card-surface-b: #f7ebef;
  --ui-inner-surface-a: #fff9f5;
  --ui-inner-surface-b: #f9eff1;
  --ui-control-surface: #fffaf8;
  --ui-secondary-surface: #fff7f4;
  --ui-primary-button-text: #ffffff;
  --ui-primary-button-a: #94465d;
  --ui-primary-button-b: #7a477e;
  --ui-disabled-text: #5f5060;
  --ui-disabled-bg: #eadde1;
  --ui-success-text: #0b6842;
  --ui-warning-text: #765100;
  --ui-danger-text: #a12828;
  --ui-success-bg: #e1f4e9;
  --ui-warning-bg: #fff1c9;
  --ui-danger-bg: #fde4e2;
  --ui-badge-text: #7d3d56;
  --ui-badge-bg: #f0dfe6;
  --ui-page-surface-a: #fff5e9;
  --ui-page-surface-b: #f5edf8;
}

html[data-theme] body { color: var(--ui-page-text); background: var(--ui-page-bg); }
html[data-theme] body::before { background-image: linear-gradient(var(--ui-grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--ui-grid-line) 1px, transparent 1px); }
html[data-theme] body::after { background: var(--ui-ambient); }
html[data-theme] .topbar { border-color: color-mix(in srgb, var(--ui-accent) 30%, transparent); background: var(--ui-topbar); }
html[data-theme] .topbar h1,
html[data-theme] .topbar .user-box > span:first-child { color: var(--ui-card-title); }
html[data-theme="mixed"] .topbar h1,
html[data-theme="mixed"] .topbar .user-box > span:first-child,
html[data-theme="midnight-violet"] .topbar h1,
html[data-theme="midnight-violet"] .topbar .user-box > span:first-child,
html[data-theme="obsidian-cyan"] .topbar h1,
html[data-theme="obsidian-cyan"] .topbar .user-box > span:first-child { color: var(--ui-stage-text); }
html[data-theme] .topbar .brand-kicker { color: var(--ui-accent-bright); }
html[data-theme] .topbar .muted { color: var(--ui-stage-muted); }
html[data-theme="aurora-mist"] .topbar .muted,
html[data-theme="pearl-sunrise"] .topbar .muted { color: var(--ui-muted); }
html[data-theme] .topbar .secondary { color: var(--ui-secondary-text); border-color: var(--ui-control-border); background: var(--ui-secondary-bg); }
html[data-theme="mixed"] .topbar .secondary,
html[data-theme="midnight-violet"] .topbar .secondary,
html[data-theme="obsidian-cyan"] .topbar .secondary { color: var(--ui-stage-text); }
html[data-theme] .lumins-command-hero { color: var(--ui-stage-text); border-color: color-mix(in srgb, var(--ui-accent-bright) 28%, transparent); background: var(--ui-hero); }
html[data-theme] .lumins-command-copy h2 { color: var(--ui-stage-text); }
html[data-theme] .lumins-command-copy > p:last-child { color: var(--ui-stage-muted); }
html[data-theme] .system-live,
html[data-theme] .lumins-pipeline span { color: var(--ui-accent-bright); }
html[data-theme] .lumins-pipeline > div { border-color: color-mix(in srgb, var(--ui-accent-bright) 23%, transparent); background: var(--ui-stage-panel); }
html[data-theme] .lumins-pipeline strong { color: var(--ui-stage-text); }
html[data-theme] .lumins-pipeline small { color: var(--ui-stage-muted); }
html[data-theme] #workspace { color: var(--ui-page-text); }
html[data-theme] #workspace::before { background: var(--ui-orb-left); }
html[data-theme] #workspace::after { background: var(--ui-orb-right); }
html[data-theme] #appView .card {
  color: var(--ui-card-text);
  border-color: var(--ui-card-border);
  background: var(--ui-card-bg);
  box-shadow: var(--ui-card-shadow);
}
html[data-theme] #appView .card::before { background: linear-gradient(90deg, transparent, var(--ui-accent-bright), var(--ui-accent) 54%, var(--ui-secondary-accent), transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--ui-accent-bright) 44%, transparent); }
html[data-theme] #appView .card::after { background: linear-gradient(116deg, rgba(255,255,255,.16), transparent 18%, transparent 72%, color-mix(in srgb, var(--ui-secondary-accent) 10%, transparent)), linear-gradient(color-mix(in srgb, var(--ui-accent) 9%, transparent) 1px, transparent 1px), linear-gradient(90deg, color-mix(in srgb, var(--ui-accent) 9%, transparent) 1px, transparent 1px); background-size: auto, 40px 40px, 40px 40px; }
html[data-theme] #appView .card:hover { border-color: color-mix(in srgb, var(--ui-accent-bright) 58%, var(--ui-card-border)); box-shadow: var(--ui-card-shadow), 0 0 44px color-mix(in srgb, var(--ui-accent) 12%, transparent); }
html[data-theme] #appView .card h2,
html[data-theme] #appView .card h3,
html[data-theme] #appView .card .card-heading h2,
html[data-theme] #appView .card .card-heading h3,
html[data-theme] #appView .card .public-knowledge-status,
html[data-theme] #appView .card .config-section summary { color: var(--ui-card-title); }
html[data-theme] #appView .card .muted,
html[data-theme] #appView .card .job-meta,
html[data-theme] #appView .card .quota-ledger-time,
html[data-theme] #appView .card .message-bubble small,
html[data-theme] #appView .card .task-progress-label { color: var(--ui-muted); }
html[data-theme] #appView .card label { color: var(--ui-label); }
html[data-theme] #appView .card a { color: var(--ui-link); }
html[data-theme] #appView input,
html[data-theme] #appView select,
html[data-theme] #appView textarea { color: var(--ui-control-text); border-color: var(--ui-control-border); background: var(--ui-control-bg); }
html[data-theme] #appView input::placeholder,
html[data-theme] #appView textarea::placeholder { color: var(--ui-control-placeholder); }
html[data-theme] #appView select option { color: var(--ui-control-text); background: var(--ui-option-bg); }
html[data-theme] #appView input:focus,
html[data-theme] #appView select:focus,
html[data-theme] #appView textarea:focus { color: var(--ui-control-text); border-color: var(--ui-accent-bright); background: var(--ui-control-bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-accent-bright) 14%, transparent), 0 0 28px color-mix(in srgb, var(--ui-secondary-accent) 14%, transparent); }
html[data-theme] #appView input[readonly] { color: var(--ui-muted); background: var(--ui-inner-bg); }
html[data-theme] #appView .secondary,
html[data-theme] #appView .issue-attachment-button { color: var(--ui-secondary-text); border-color: var(--ui-control-border); background: var(--ui-secondary-bg); }
html[data-theme] #appView .project-grid > form,
html[data-theme] #appView .project-grid > div:not(.project-sdk-upload),
html[data-theme] #appView .project-source-selector,
html[data-theme] #appView .project-summary,
html[data-theme] #appView .project-sdk-upload,
html[data-theme] #appView .mode-choice,
html[data-theme] #appView .material-upload-card,
html[data-theme] #appView .public-knowledge-control,
html[data-theme] #appView .ai-settings-form,
html[data-theme] #appView .user-ai-editor,
html[data-theme] #appView .support-layout > form,
html[data-theme] #appView .support-layout > div,
html[data-theme] #appView .repair-layout > form,
html[data-theme] #appView .repair-layout > div,
html[data-theme] #appView .conversation,
html[data-theme] #appView .issue-chat-composer,
html[data-theme] #appView .project-conversation-guide,
html[data-theme] #appView .issue-stage-hint,
html[data-theme] #appView .task-progress,
html[data-theme] #appView .document-row,
html[data-theme] #appView .config-diff,
html[data-theme] #appView .knowledge-repository-path,
html[data-theme] #appView .knowledge-repository-truth,
html[data-theme] #appView .knowledge-repository-metric,
html[data-theme] #appView .knowledge-overview-file,
html[data-theme] #appView .knowledge-repository-content-map,
html[data-theme] #appView .knowledge-repository-content-types > div,
html[data-theme] #appView .knowledge-repository-chain-item,
html[data-theme] #appView .knowledge-safety-note,
html[data-theme] #appView .knowledge-lifecycle-note,
html[data-theme] #appView .knowledge-candidate-metric,
html[data-theme] #appView .knowledge-task-audit-item,
html[data-theme] #appView .knowledge-candidate-item { color: var(--ui-inner-text); border-color: var(--ui-inner-border); background: var(--ui-inner-bg); }
html[data-theme] #appView .conversation,
html[data-theme] #appView .issue-chat-conversation { background: var(--ui-conversation-bg); }
html[data-theme] #appView .message-bubble { color: var(--ui-inner-text); border-color: var(--ui-inner-border); background: var(--ui-bubble-bg); }
html[data-theme] #appView .message-customer,
html[data-theme] #appView .issue-chat-conversation .message-customer { color: var(--ui-inner-text); background: var(--ui-customer-bg); }
html[data-theme] #appView .message-codex { color: var(--ui-inner-text); background: var(--ui-codex-bg); }
html[data-theme] #appView .message-admin { color: var(--ui-inner-text); background: var(--ui-admin-bg); }
html[data-theme] #appView table { color: var(--ui-inner-text); border-color: var(--ui-inner-border); background: var(--ui-table-bg); }
html[data-theme] #appView th { color: var(--ui-muted); background: var(--ui-table-head); }
html[data-theme] #appView .notice { color: var(--ui-notice-text); border-color: var(--ui-inner-border); background: var(--ui-notice-bg); }
html[data-theme] #appView .quota-card > div:first-child { background: var(--ui-quota-bg); }
html[data-theme] #appView .quota-ledger-value,
html[data-theme] #appView .task-progress-value,
html[data-theme] #appView .task-progress-activity,
html[data-theme] #appView .material-round-label,
html[data-theme] #appView .issue-status { color: var(--ui-accent); }
html[data-theme] #workspace * { scrollbar-color: var(--ui-accent) var(--ui-scroll-track); }
html[data-theme] #workspace *::-webkit-scrollbar-track { background: var(--ui-scroll-track); }
html[data-theme] #workspace *::-webkit-scrollbar-thumb { border-color: var(--ui-scroll-track); background: var(--ui-scroll-thumb); }

.theme-settings-open { overflow: hidden; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.official-materials-card { overflow: hidden; }
.official-materials-card::before { opacity: .88; }
.official-materials-kicker { margin: 0 0 7px 16px; color: var(--ui-accent); font-size: 11px; font-weight: 900; letter-spacing: .16em; }
.official-materials-release { display: inline-flex; min-height: 32px; align-items: center; padding: 6px 11px; border: 1px solid color-mix(in srgb, var(--ui-accent) 38%, var(--ui-inner-border)); border-radius: 999px; color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 10%, transparent); font-size: 12px; font-weight: 800; white-space: nowrap; }
.official-materials-release.unavailable { color: #b94b52; border-color: rgba(185,75,82,.34); background: rgba(185,75,82,.08); }
.official-materials-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-top: 18px; padding: 10px; border: 1px solid var(--ui-inner-border); border-radius: 17px; background: var(--ui-inner-bg); box-shadow: inset 0 1px rgba(255,255,255,.2); }
.official-materials-search input { min-height: 48px; border-radius: 12px; }
.official-materials-search button { min-width: 126px; }
.official-materials-examples { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.official-materials-examples button { min-height: 31px; padding: 5px 10px; border: 1px solid var(--ui-inner-border); border-radius: 999px; color: var(--ui-secondary-text); background: var(--ui-secondary-bg); font-size: 12px; font-weight: 700; }
.official-materials-examples button:hover { border-color: var(--ui-accent); color: var(--ui-accent); }
.official-materials-facts { margin: 13px 0 0; line-height: 1.65; }
.official-materials-results { display: grid; gap: 18px; margin-top: 17px; }
.official-materials-ambiguity, .official-materials-empty { padding: 14px 16px; border: 1px solid color-mix(in srgb, #d89d38 42%, var(--ui-inner-border)); border-radius: 14px; color: var(--ui-notice-text); background: var(--ui-notice-bg); line-height: 1.65; }
.official-materials-ambiguity p { margin: 0; }
.official-chip-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.official-chip-choices button { min-height: 32px; padding: 5px 11px; border: 1px solid color-mix(in srgb, var(--ui-accent) 48%, var(--ui-inner-border)); border-radius: 999px; color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 10%, var(--ui-secondary-bg)); font-weight: 800; }
.official-chip-choices button:hover { color: var(--ui-primary-button-text); background: var(--ui-primary-button-bg); }
.official-result-section { display: grid; gap: 10px; }
.official-result-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.official-result-heading h3 { margin: 0; font-size: 16px; }
.official-result-heading span { color: var(--ui-muted); font-size: 12px; }
.official-result-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.official-result-card { display: flex; min-width: 0; flex-direction: column; justify-content: space-between; gap: 12px; padding: 15px; border: 1px solid var(--ui-inner-border); border-radius: 15px; color: var(--ui-inner-text); background: var(--ui-inner-bg); box-shadow: 0 10px 24px color-mix(in srgb, var(--ui-accent) 6%, transparent); }
.official-result-card h4 { margin: 8px 0 5px; color: var(--ui-card-title); font-size: 15px; line-height: 1.45; }
.official-result-card p { margin: 0; color: var(--ui-muted); line-height: 1.65; white-space: pre-wrap; }
.official-result-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.official-result-badges span { padding: 3px 7px; border-radius: 999px; color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 10%, transparent); font-size: 10px; font-weight: 800; }
.official-result-actions { display: flex; gap: 8px; justify-content: flex-end; }
.official-result-actions a, .official-page-hit > a { display: inline-flex; width: fit-content; min-height: 34px; align-items: center; justify-content: center; padding: 6px 11px; border-radius: 9px; text-decoration: none; }
.official-page-hit > a { align-self: flex-end; }
.official-help-foot { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.official-help-foot small { color: var(--ui-muted); line-height: 1.5; }
.official-help-detail { max-height: 420px; margin: 0; padding: 13px; overflow: auto; border: 1px solid var(--ui-inner-border); border-radius: 12px; color: var(--ui-inner-text); background: var(--ui-conversation-bg); font: inherit; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.theme-settings-trigger { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.theme-settings-trigger > span:first-child { color: var(--ui-accent-bright); font-size: 16px; }
.theme-settings-backdrop { position: fixed; z-index: 1200; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(1, 6, 18, .62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.theme-settings-panel { width: min(1040px, calc(100vw - 36px)); max-height: min(760px, calc(100vh - 36px)); overflow-y: auto; padding: 28px; border: 1px solid var(--ui-card-border); border-radius: 24px; color: var(--ui-card-text); background: var(--ui-card-bg); box-shadow: 0 38px 120px rgba(0, 4, 22, .58), inset 0 1px rgba(255,255,255,.18); -webkit-backdrop-filter: blur(34px) saturate(170%); backdrop-filter: blur(34px) saturate(170%); }
.theme-settings-heading { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.theme-settings-heading .brand-kicker { margin: 0 0 8px; color: var(--ui-accent); }
.theme-settings-heading h2 { margin: 0 0 6px; color: var(--ui-card-title); font-size: 25px; }
.theme-settings-heading p:last-child { margin: 0; color: var(--ui-muted); line-height: 1.6; }
.theme-settings-close { display: grid; width: 44px; height: 44px; flex: 0 0 auto; place-items: center; border: 1px solid var(--ui-control-border); border-radius: 13px; color: var(--ui-card-title); background: var(--ui-secondary-bg); font-size: 25px; line-height: 1; }
.theme-option-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 25px 0; }
.theme-option { position: relative; display: grid; gap: 12px; align-content: start; min-height: 220px; margin: 0; padding: 12px; border: 1px solid var(--ui-inner-border); border-radius: 17px; color: var(--ui-label); background: var(--ui-inner-bg); cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.theme-option:hover { transform: translateY(-2px); border-color: var(--ui-accent); }
.theme-option.selected { border-color: var(--ui-accent-bright); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ui-accent-bright) 13%, transparent), 0 16px 38px color-mix(in srgb, var(--ui-accent) 17%, transparent); }
.theme-option input { position: absolute; top: 18px; right: 18px; z-index: 2; width: 18px !important; min-height: 18px !important; margin: 0; accent-color: var(--ui-accent); }
.theme-option > span:last-child { display: grid; gap: 4px; }
.theme-option strong { color: var(--ui-card-title); font-size: 15px; }
.theme-option small { color: var(--ui-muted); font-style: normal; line-height: 1.45; }
.theme-option em { width: fit-content; margin-top: 4px; padding: 3px 7px; border-radius: 999px; color: var(--ui-accent); background: color-mix(in srgb, var(--ui-accent) 12%, transparent); font-size: 10px; font-style: normal; font-weight: 800; }
.theme-preview { position: relative; display: block; height: 112px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); border-radius: 13px; box-shadow: inset 0 1px rgba(255,255,255,.3); }
.theme-preview i { position: absolute; display: block; border-radius: 7px; box-shadow: 0 5px 14px rgba(0,0,0,.16); }
.theme-preview i:nth-child(1) { top: 13px; right: 12px; left: 12px; height: 22px; }
.theme-preview i:nth-child(2) { top: 46px; bottom: 12px; left: 12px; width: 52%; }
.theme-preview i:nth-child(3) { top: 46px; right: 12px; bottom: 12px; width: 28%; }
.theme-preview-mixed { background: linear-gradient(145deg, #071429, #29216a); }
.theme-preview-mixed i { background: rgba(249,252,255,.9); }
.theme-preview-midnight { background: linear-gradient(145deg, #071429, #29216a); }
.theme-preview-midnight i { border: 1px solid rgba(105,199,255,.3); background: linear-gradient(145deg, rgba(27,63,111,.9), rgba(25,27,78,.88)); }
.theme-preview-obsidian { background: linear-gradient(145deg, #020b0e, #06434a); }
.theme-preview-obsidian i { border: 1px solid rgba(76,231,206,.28); background: linear-gradient(145deg, rgba(10,69,70,.92), rgba(4,35,45,.9)); }
.theme-preview-aurora { background: linear-gradient(145deg, #dceeff, #eee5ff); }
.theme-preview-aurora i { border: 1px solid rgba(104,148,213,.25); background: rgba(255,255,255,.68); }
.theme-preview-pearl { background: linear-gradient(145deg, #fff0dc, #f3e3f5); }
.theme-preview-pearl i { border: 1px solid rgba(205,151,168,.25); background: rgba(255,252,246,.72); }
.theme-settings-actions { display: flex; justify-content: flex-end; gap: 10px; align-items: center; padding-top: 18px; border-top: 1px solid var(--ui-inner-border); }
.theme-settings-actions .message { flex: 1 1 auto; margin: 0; color: var(--ui-muted); }
.theme-settings-actions button { min-height: 44px; }

@media (max-width: 900px) {
  .theme-option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .official-result-list { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  html[data-theme] #appView .card { background: var(--ui-card-bg); }
  html[data-theme] #workspace .table-wrap { background: var(--ui-table-bg); }
  .topbar .user-box { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .topbar .user-box > #currentUser,
  .topbar .user-box > #currentQuota,
  .topbar .user-box > .support-shortcut:not(.hidden) { grid-column: 1 / -1; width: 100%; }
  .topbar .theme-settings-trigger,
  .topbar #logoutButton { width: 100%; min-height: 44px; justify-content: center; }
  .theme-settings-backdrop { align-items: end; padding: 8px; }
  .theme-settings-panel { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 19px 16px; border-radius: 22px; }
  .theme-settings-heading h2 { font-size: 21px; }
  .theme-option-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; margin: 18px 0; }
  .theme-option { grid-template-columns: 126px minmax(0, 1fr); min-height: 116px; align-items: center; }
  .theme-preview { height: 92px; }
  .theme-settings-actions { align-items: stretch; flex-wrap: wrap; }
  .theme-settings-actions .message { width: 100%; flex-basis: 100%; }
  .theme-settings-actions button { flex: 1 1 130px; }
  .official-materials-card .card-heading { display: grid; }
  .official-materials-release { width: fit-content; }
  .official-materials-search { grid-template-columns: minmax(0, 1fr); }
  .official-materials-search button { width: 100%; }
  .official-materials-examples { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .official-materials-examples button { flex: 0 0 auto; }
  .official-result-card { padding: 13px; }
  .official-result-actions, .official-help-foot { align-items: stretch; flex-direction: column; }
  .official-result-actions a, .official-page-hit > a, .official-help-foot button { width: 100%; }
}
/* Payment is an isolated dialog; QR always keeps an opaque white quiet zone. */
.recharge-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); box-sizing: border-box; padding: 26px; border: 1px solid #737cc0; border-radius: 22px; background: #151d39; color: #f1f4ff; overflow-y: auto; box-shadow: 0 24px 90px #0009; }
.recharge-dialog::backdrop { background: #030619b8; backdrop-filter: blur(5px); }
.recharge-dialog .muted { color: #bbc4e3; font-size: 13px; line-height: 1.65; }
.recharge-dialog input { background: #0d142b; color: #fff; border-color: #65749b; }
.recharge-dialog .secondary { background: #273452; color: #f1f4ff; border-color: #65749b; }
.recharge-dialog .card-heading { gap: 12px; }
.recharge-price { font-size: 22px; font-weight: 700; color: #8be4de; }
.recharge-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 0; }
.recharge-total strong { font-size: 28px; overflow-wrap: anywhere; }
.recharge-order { padding: 18px 0; border-top: 1px solid #59678c; border-bottom: 1px solid #59678c; margin: 18px 0; overflow-wrap: anywhere; }
.recharge-qr { display: block; width: 240px; height: 240px; max-width: 100%; margin: 16px auto; background: #fff; border-radius: 8px; }
.recharge-qr.hidden { display: none; }
.recharge-admin { padding: 20px 0; margin-bottom: 18px; border-block: 1px solid #8290b855; }
.recharge-settings-form { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; }
.recharge-settings-form > label { min-width: 180px; flex: 1; }
.recharge-settings-form .recharge-enable { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 12px 0; }
.recharge-enable input { width: 18px; height: 18px; }
.recharge-history { max-height: 280px; overflow-y: auto; padding: 10px 0; }
.recharge-history-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #8290b855; font-size: 13px; }
.recharge-history-item span { min-width: 0; overflow-wrap: anywhere; }
.recharge-history-item button { flex-shrink: 0; }
@media (max-width: 600px) { .recharge-dialog { padding: 18px; } .recharge-settings-form { flex-direction: column; align-items: stretch; } }
#appView #rechargeDialog h2, #appView #rechargeDialog h3, #appView #rechargeDialog label { color: #f1f4ff; }
#appView #rechargeDialog .message { color: #b3ece3; }
#appView #rechargeDialog .error-message { color: #ffb5bd; }
#appView #rechargeDialog input { background: #0d142b; color: #fff; border-color: #8496c6; }
#appView #rechargeDialog .secondary { background: #273452; color: #f1f4ff; border-color: #8496c6; }
#appView #rechargeDialog .brand-kicker { color: #99afff; }

/* Readability contract shared by customer and administrator workspaces. */
html[data-theme] #appView .primary,
html[data-theme] #appView .card a.primary {
  color: var(--ui-primary-button-text);
  border-color: color-mix(in srgb, var(--ui-primary-button-a) 72%, var(--ui-card-border));
  background: linear-gradient(128deg, var(--ui-primary-button-a), var(--ui-primary-button-b));
  text-shadow: 0 1px 1px rgba(0, 0, 0, .18);
}
html[data-theme] #appView .primary:hover,
html[data-theme] #appView .card a.primary:hover,
html[data-theme] #appView .official-chip-choices button:hover {
  color: var(--ui-primary-button-text);
  background: linear-gradient(128deg, var(--ui-primary-button-b), var(--ui-primary-button-a));
}
html[data-theme] #appView .card a.secondary { color: var(--ui-secondary-text); }
html[data-theme] #appView button:disabled,
html[data-theme] #appView .card a[aria-disabled="true"] {
  opacity: 1;
  color: var(--ui-disabled-text);
  border-color: color-mix(in srgb, var(--ui-disabled-text) 34%, var(--ui-disabled-bg));
  background: var(--ui-disabled-bg);
  box-shadow: none;
  text-shadow: none;
}
html[data-theme] #appView input:not([type="checkbox"]):not([type="radio"]):disabled,
html[data-theme] #appView select:disabled,
html[data-theme] #appView textarea:disabled {
  opacity: 1;
  color: var(--ui-disabled-text);
  border-color: color-mix(in srgb, var(--ui-disabled-text) 34%, var(--ui-disabled-bg));
  background: var(--ui-disabled-bg);
}

html[data-theme] #appView .project-conversation-guide h3,
html[data-theme] #appView .project-conversation-guide ol,
html[data-theme] #appView .project-conversation-guide li,
html[data-theme] #appView .project-summary,
html[data-theme] #appView .knowledge-candidate-summary,
html[data-theme] #appView .knowledge-repository-chain-summary {
  color: var(--ui-inner-text);
}
html[data-theme] #appView .project-conversation-guide strong { color: var(--ui-card-title); }
html[data-theme] #appView .issue-stage-hint { color: var(--ui-inner-text); }
html[data-theme] #appView .card .message-bubble small { color: var(--ui-inner-text); }

html[data-theme] #appView .knowledge-repository-path strong,
html[data-theme] #appView .knowledge-overview-file strong,
html[data-theme] #appView .knowledge-repository-metric > strong,
html[data-theme] #appView .knowledge-repository-content-types strong,
html[data-theme] #appView .knowledge-repository-chain-path,
html[data-theme] #appView .knowledge-candidate-resolution {
  color: var(--ui-success-text);
}
html[data-theme] #appView .knowledge-candidate-metric > strong { color: var(--ui-accent); }
html[data-theme] #appView .knowledge-repository-content-types span,
html[data-theme] #appView .knowledge-repository-metric > small,
html[data-theme] #appView .knowledge-repository-content-types small,
html[data-theme] #appView .knowledge-candidate-metric > small,
html[data-theme] #appView .knowledge-candidate-meta,
html[data-theme] #appView .knowledge-task-audit-meta {
  color: var(--ui-muted);
}
html[data-theme] #appView .mode-badge,
html[data-theme] #appView .knowledge-task-outcome,
html[data-theme] #appView .knowledge-candidate-badge.status {
  color: var(--ui-badge-text);
  background: var(--ui-badge-bg);
}
html[data-theme] #appView .knowledge-candidate-status-rejected,
html[data-theme] #appView .knowledge-candidate-status-withdrawn { opacity: 1; }

html[data-theme] #appView .message,
html[data-theme] #appView .status-approved,
html[data-theme] #appView .status-succeeded { color: var(--ui-success-text); }
html[data-theme] #appView .message.warning-message,
html[data-theme] #appView .status-queued,
html[data-theme] #appView .status-queued_codex,
html[data-theme] #appView .status-reviewing,
html[data-theme] #appView .status-waiting_isolated_jlstudio_export { color: var(--ui-warning-text); }
html[data-theme] #appView .message.error-message,
html[data-theme] #appView .error,
html[data-theme] #appView .status-needs_more,
html[data-theme] #appView .status-failed,
html[data-theme] #appView .task-status-interrupted,
html[data-theme] #appView .issue-status.task-status-interrupted { color: var(--ui-danger-text); }
html[data-theme] #appView .status-implementing,
html[data-theme] #appView .status-queued_build,
html[data-theme] #appView .status-building { color: var(--ui-accent); }

html[data-theme] #appView .task-progress-overdue,
html[data-theme] #appView .task-progress-queue-timeout {
  border-color: var(--ui-warning-text);
  background: var(--ui-warning-bg);
}
html[data-theme] #appView .task-progress-overdue .task-progress-activity,
html[data-theme] #appView .task-progress-queue-timeout .task-progress-activity { color: var(--ui-warning-text); }
html[data-theme] #appView .task-progress-stale,
html[data-theme] #appView .task-progress-interrupted {
  border-color: var(--ui-danger-text);
  background: var(--ui-danger-bg);
}
html[data-theme] #appView .task-progress-stale .task-progress-activity,
html[data-theme] #appView .task-progress-interrupted .task-progress-activity { color: var(--ui-danger-text); }

html[data-theme] #appView .maintenance-dialog {
  position: fixed;
  inset: 0;
  width: min(880px, calc(100vw - 28px));
  height: fit-content;
  max-height: calc(100dvh - 36px);
  margin: auto;
  padding: 24px;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--ui-card-text);
  background: linear-gradient(135deg, var(--ui-card-surface-a), var(--ui-card-surface-b));
}
.maintenance-dialog::backdrop { background: rgba(8, 19, 42, .62); backdrop-filter: blur(3px); }
.maintenance-dialog h2 { margin-bottom: 6px; }
.maintenance-dialog .card-heading { align-items: flex-start; }
.maintenance-dialog .card-heading > div { min-width: 0; }
.maintenance-detail, .maintenance-paths dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.maintenance-paths { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 10px; padding: 14px; border-radius: 10px; background: var(--ui-inner-surface-a); }
.maintenance-paths dt { color: var(--ui-muted); font-size: 13px; }
.maintenance-paths dd { margin: 0; color: var(--ui-inner-text); font-size: 13px; }
.maintenance-files { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px; background: var(--ui-inner-surface-a); }
.maintenance-file, .maintenance-confirm { display: flex; align-items: flex-start; gap: 10px; }
.maintenance-file { padding: 10px 0; margin: 0; }
.maintenance-file-row + .maintenance-file-row { border-top: 1px solid var(--border); }
.maintenance-file-row details { margin: 0 0 10px 28px; font-size: 13px; }
.maintenance-file-row summary { cursor: pointer; }
.maintenance-preview { max-height: 200px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px; color: var(--ui-inner-text); background: var(--ui-inner-surface-b); border-radius: 8px; font-size: 12px; }
.maintenance-file input, .maintenance-confirm input { width: 18px; min-height: 18px; height: 18px; flex: 0 0 18px; margin: 3px 0 0; accent-color: var(--primary); }
.maintenance-file span { min-width: 0; }
.maintenance-file strong, .maintenance-file small { display: block; overflow-wrap: anywhere; white-space: pre-wrap; }
html[data-theme] #appView .maintenance-file strong { color: var(--ui-inner-text); }
html[data-theme] #appView .maintenance-file small { margin-top: 5px; color: var(--ui-muted); }
.maintenance-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.maintenance-actions p { flex: 1 1 240px; margin: 5px 0; }
.maintenance-issues { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.maintenance-issue-detail { max-height: 260px; overflow-y: auto; overscroll-behavior: contain; margin-bottom: 12px; }
html[data-theme] #appView .status-waiting_engineer { color: var(--ui-warning-text); }
@media (max-width: 600px) {
  html[data-theme] #appView .maintenance-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); padding: 16px; }
  .maintenance-paths { grid-template-columns: 1fr; gap: 6px; }
  .maintenance-paths dd { margin-bottom: 8px; }
  .maintenance-actions button { width: 100%; }
}
.engineering-record-body { overflow-wrap: anywhere; }
.engineering-record-table { overflow-x: auto; margin: 10px 0 20px; }
.engineering-record-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.engineering-record-table th, .engineering-record-table td { padding: 9px; border-bottom: 1px solid var(--border-color, #9cacc4); text-align: left; vertical-align: top; min-width: 90px; }
.engineering-record-table th { font-weight: 700; }
.engineering-record-table td { white-space: pre-line; overflow-wrap: anywhere; }
#projectRecordBody > p { overflow-wrap: anywhere; }

/* Shared five-row paging; hidden records remain in DOM with their edit state. */
.pagination-hidden, .list-pagination.hidden { display: none !important; }
.list-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ui-border, #d9e3f1); }
.list-pagination-summary { flex: 1 1 160px; min-width: 0; text-align: center; color: var(--ui-muted, #65728a); font-size: 12px; overflow-wrap: anywhere; }
.list-pagination button { flex: 0 0 auto; min-height: 34px; }
.list-pagination-jump { display: flex; align-items: center; flex: 0 0 auto; gap: 6px; margin: 0; color: var(--ui-muted, #65728a); font-size: 12px; }
.list-pagination-jump input { width: 62px; min-width: 0; min-height: 32px; height: 32px; margin: 0; padding: 4px 6px; text-align: center; }
@media (max-width: 640px) {
  .list-pagination { gap: 8px; }
  .list-pagination-summary { flex-basis: 100%; order: -1; }
  .list-pagination-jump { margin-left: auto; }
}

/* Candidate review stays within the existing five-row paginated list. */
#knowledgeCandidateMessage { white-space: pre-line; overflow-wrap: anywhere; }
#knowledgeCandidateMessage:not(:empty) { margin: 12px 0 18px; padding: 12px 14px; border: 1px solid currentColor; border-radius: 9px; line-height: 1.7; }
.knowledge-candidate-review { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ui-inner-border, #e0e5ee); }
.knowledge-candidate-review > summary { cursor: pointer; color: var(--ui-inner-text, #354158); font-weight: 700; line-height: 1.7; }
.knowledge-review-section { margin: 12px 0; color: var(--ui-inner-text, #354158); overflow-wrap: anywhere; }
.knowledge-review-section > strong { display: block; font-size: 12px; }
.knowledge-review-section > p { margin: 5px 0 0; white-space: pre-wrap; font-size: 13px; line-height: 1.7; }
.knowledge-candidate-review > button { width: auto; margin-top: 4px; }


/* On-demand curation keeps raw candidates, review drafts, and publication distinct. */
.curation-settings { margin: 16px 0; padding: 14px 16px; border: 1px solid var(--ui-inner-border, var(--border)); border-radius: 12px; background: var(--ui-inner-bg, #f5f8fc); }
.curation-settings > summary, .curation-legacy-details > summary { cursor: pointer; font-weight: 700; }
.curation-settings fieldset { min-width: 0; margin: 18px 0 8px; padding: 0; border: 0; }
.curation-settings legend { font-size: 14px; font-weight: 700; }
.curation-runtime-fields { display: grid; grid-template-columns: minmax(180px, 2fr) minmax(100px, 1fr) minmax(100px, 1fr); gap: 12px; }
.curation-runtime-fields label { margin: 8px 0; }
.curation-checkbox { display: flex; align-items: center; gap: 9px; margin: 0; cursor: pointer; }
.curation-checkbox input { width: 17px; height: 17px; min-height: 17px; margin: 0; flex: 0 0 auto; }
.curation-start-actions, .curation-progress-heading, .curation-job-actions, .curation-review-actions, .curation-publish-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.curation-start-actions { margin: 18px 0 4px; }
.curation-progress-heading, .curation-publish-actions { justify-content: space-between; }
.curation-progress-heading p { margin: 6px 0; }
.curation-review-note { padding: 12px 14px; border-radius: 10px; background: var(--ui-inner-bg, #f5f8fc); color: var(--ui-muted, var(--muted)); line-height: 1.7; font-size: 13px; }
.curation-groups { display: grid; gap: 12px; }
.curation-group { border: 1px solid var(--ui-inner-border, var(--border)); border-radius: 12px; background: var(--ui-inner-bg, #f7f9fd); overflow: hidden; }
.curation-group > summary { padding: 16px; cursor: pointer; font-weight: 700; line-height: 1.6; }
.curation-group-select { padding: 0 16px 12px; font-size: 13px; }
.curation-group-items { display: grid; gap: 10px; padding: 0 12px 12px; }
.curation-group > .list-pagination { margin: 0 12px 12px; }
.curation-item { border: 1px solid var(--ui-inner-border, var(--border)); border-radius: 10px; padding: 14px; background: var(--ui-control-bg, #fff); color: var(--ui-inner-text, #273752); }
.curation-item-heading { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.curation-item-heading > label { flex: 1 1 220px; align-items: flex-start; line-height: 1.6; }
.curation-item-heading input { margin-top: 3px; }
.curation-badge { display: inline-block; padding: 4px 9px; border-radius: 30px; font-size: 12px; color: var(--ui-badge-text, #234775); background: var(--ui-badge-bg, #e7eef9); }
.curation-recommendation-discard { color: var(--ui-danger-text, #a12825); background: var(--ui-danger-bg, #fff0ed); }
.curation-recommendation-defer { color: var(--ui-warning-text, #77510a); background: var(--ui-warning-bg, #fff7df); }
.curation-value-reason { margin: 10px 0; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.curation-item-detail > summary { cursor: pointer; font-size: 13px; color: var(--ui-link, var(--primary)); }
.curation-source-evidence { margin-top: 12px; }
.curation-source-evidence > summary { cursor: pointer; font-size: 13px; color: var(--ui-link, var(--primary)); }
.curation-group-error { margin: 0 16px 14px; color: var(--ui-danger-text, var(--danger)); }
.curation-detail-section h4 { margin: 16px 0 5px; font-size: 13px; }
.curation-detail-section p { margin: 0; font-size: 13px; line-height: 1.75; white-space: pre-wrap; overflow-wrap: anywhere; }
.curation-review-actions { margin: 18px 0; padding: 14px 0; border-top: 1px solid var(--ui-inner-border, var(--border)); border-bottom: 1px solid var(--ui-inner-border, var(--border)); }
.curation-review-actions > strong { margin-right: auto; }
.curation-discard { color: var(--ui-danger-text, var(--danger)); }
.curation-legacy-details > summary { padding: 2px 0; }
.curation-legacy-details[open] > summary { margin-bottom: 20px; }
.curation-release-list { display: grid; gap: 10px; margin-top: 12px; }
.curation-release-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid var(--ui-inner-border, var(--border)); border-radius: 10px; }
.curation-release-item p { margin: 6px 0 0; font-size: 13px; }
.curation-confirm-dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); padding: 24px; border: 1px solid var(--ui-card-border, var(--border)); border-radius: 16px; color: var(--ui-card-text, #17243d); background: var(--ui-card-bg, #fff); box-shadow: 0 24px 90px rgba(0, 0, 0, .28); }
.curation-confirm-dialog::backdrop { background: rgba(10, 20, 40, .55); backdrop-filter: blur(3px); }
.curation-confirm-dialog h2 { margin: 0 0 12px; }
.curation-confirm-content { max-height: 55dvh; overflow-y: auto; }
.curation-confirm-content > p { margin: 0; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.curation-confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
@media (max-width: 650px) {
  .curation-runtime-fields { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .curation-review-actions > strong { width: 100%; }
  .curation-review-actions button { flex: 1 1 140px; }
  .curation-publish-actions { align-items: stretch; }
  .curation-publish-actions button { width: 100%; }
}
