.logo {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 5px;
  margin: 0 0 38px;
  padding: 2px 0 26px;
}

.logo::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 87, 43, .78), rgba(217, 149, 24, .72), rgba(36, 107, 90, .6), transparent);
}

.sidebar-brand-mark {
  display: block;
  width: 172px;
  height: 66px;
  object-fit: contain;
  filter: drop-shadow(0 8px 18px rgba(233, 87, 43, .18)) drop-shadow(0 0 13px rgba(36, 107, 90, .14));
  animation: sidebar-brand-breathe 5.5s ease-in-out infinite;
}

.logo .sidebar-brand-name {
  display: block;
  color: transparent;
  background: linear-gradient(100deg, #d8ecff 0 48%, #a88af0 72%, #77bff0 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font: 800 24px/1 Bahnschrift, "Segoe UI", sans-serif;
  letter-spacing: .025em;
}

.system-status i {
  animation: runner-pulse 2s ease-in-out infinite;
}

.system-status.offline i {
  animation: none;
}

.request-modal {
  width: min(880px, 96vw);
}

.queue-note { display: flex; align-items: center; gap: 9px; margin: 14px 0 0; color: #789487; font-size: 10px; }
.queue-note i { width: 6px; height: 6px; border: 1px solid var(--acid); transform: rotate(45deg); }

.recipient-choice-list {
  display: grid;
  gap: 8px;
  max-height: 245px;
  padding-right: 5px;
  overflow-y: auto;
}

.recipient-group {
  display: grid;
  grid-template-columns: 164px 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid #304a6c;
  background: linear-gradient(105deg, rgba(18, 34, 55, .96), rgba(15, 27, 46, .92));
}

.recipient-group.current {
  border-left: 3px solid #246b5a;
  background: linear-gradient(105deg, rgba(28, 55, 84, .82), rgba(18, 31, 52, .94));
}

.recipient-group > header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 2px 8px;
}

.recipient-group > header span {
  color: #d99518;
  font: 700 9px/1 Consolas, monospace;
  letter-spacing: .12em;
}

.recipient-group > header b { margin-top: 5px; color: #d8e8f7; font-size: 12px; }
.recipient-group > header small { margin-top: 3px; color: #6f87a7; font: 9px Consolas, monospace; }
.recipient-emails { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }

.delivery-option-block { margin-top: 4px; }
.delivery-choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.delivery-choice {
  position: relative;
  display: grid !important;
  grid-template-columns: 30px 1fr 18px !important;
  align-items: center;
  gap: 10px !important;
  min-height: 92px;
  padding: 13px;
  border: 1px solid #334f72;
  background: linear-gradient(145deg, #101e31, #0e192a);
  cursor: pointer;
  overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.delivery-choice::after {
  content: "";
  position: absolute;
  inset: auto -22px -34px auto;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(112, 185, 232, .12);
  border-radius: 50%;
}
.delivery-choice:hover { transform: translateY(-2px); border-color: #5e84ad; }
.delivery-choice:has(input:checked) {
  border-color: #d99518;
  background: linear-gradient(145deg, rgba(71, 43, 25, .97), rgba(20, 61, 53, .78));
  box-shadow: inset 0 3px 0 #e9572b;
}
.delivery-choice input { position: absolute; opacity: 0; pointer-events: none; }
.delivery-choice .choice-index { color: #637c9d; font: 700 13px Consolas, monospace; }
.delivery-choice:has(input:checked) .choice-index { color: #d99518; }
.delivery-choice b,.delivery-choice small { display: block; }
.delivery-choice b { color: #dbe9f7; font-size: 12px; }
.delivery-choice small { margin-top: 6px; color: #748aa7; font-size: 9px; line-height: 1.5; }
.delivery-choice > i { color: transparent; font-style: normal; }
.delivery-choice:has(input:checked) > i { color: #72b39e; }
.delivery-choice.featured::before {
  content: "DEFAULT";
  position: absolute;
  right: 8px;
  top: 6px;
  color: rgba(217, 149, 24, .7);
  font: 700 8px Consolas, monospace;
  letter-spacing: .1em;
}

.delivery-option-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.delivery-option-summary b { margin-right: 3px; color: #6f87a7; font-size: 10px; }
.delivery-option-summary span { padding: 4px 7px; border: 1px solid #435c82; color: #b9cbe0; font: 9px Consolas, "Microsoft YaHei", monospace; }

.devcore-quota {
  display: grid;
  grid-template-columns: 1fr minmax(300px, .8fr);
  align-items: center;
  gap: 34px;
  padding: 24px 27px;
  margin-bottom: 14px;
  border: 1px solid #3e6553;
  border-left: 4px solid var(--acid);
  background: linear-gradient(105deg, #10251b, #0c1914 70%);
  position: relative;
  overflow: hidden;
}

.devcore-quota::after {
  content: "CAPACITY";
  position: absolute;
  right: -10px;
  top: -12px;
  color: rgba(121, 242, 173, .035);
  font: 700 68px Consolas, monospace;
  letter-spacing: -.08em;
  pointer-events: none;
}

.quota-copy,
.quota-meter { position: relative; z-index: 1; }
.quota-copy h2 { margin: 0 0 7px; font-size: 23px; }
.quota-copy > span,
.quota-meter small { color: var(--muted); font-size: 11px; }
.quota-number { display: flex; align-items: baseline; justify-content: space-between; }
.quota-number b { color: var(--acid); font: 700 30px Consolas, monospace; }
.quota-number span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.quota-track { height: 6px; margin: 8px 0 8px; background: #24372f; overflow: hidden; }
.quota-track i { display: block; height: 100%; background: linear-gradient(90deg, #42bd7b, var(--acid)); box-shadow: 0 0 12px rgba(121, 242, 173, .5); }
.metrics.admin-metrics { grid-template-columns: repeat(6, 1fr); }
.admin-metrics .metric { min-height: 116px; padding: 18px; }
.admin-metrics .metric b { font-size: 36px; margin-top: 18px; }
.metric.danger b { color: var(--red); }

.version-chip {
  padding: 7px 9px;
  border: 1px solid #315043;
  color: #7f9e90;
  background: rgba(9, 21, 16, .75);
  font: 10px Consolas, monospace;
  letter-spacing: .08em;
  white-space: nowrap;
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(430px, .95fr) minmax(720px, 1.65fr);
  gap: 10px;
  align-items: stretch;
  margin-bottom: 38px;
}

.control-strip.pm-strip { grid-template-columns: 1fr; }
.control-strip .devcore-quota {
  grid-template-columns: minmax(190px, 1fr) minmax(180px, .85fr);
  gap: 20px;
  min-height: 112px;
  margin: 0;
  padding: 16px 19px;
}
.control-strip .devcore-quota::after { font-size: 52px; top: -8px; }
.control-strip .quota-copy h2 { font-size: 20px; margin-bottom: 4px; }
.control-strip .quota-copy > span,
.control-strip .quota-meter small { font-size: 9px; }
.control-strip .quota-number b { font-size: 26px; }
.control-strip .metrics { margin: 0; gap: 10px; }
.control-strip .metric,
.control-strip .admin-metrics .metric {
  min-width: 0;
  min-height: 112px;
  padding: 16px;
}
.control-strip .metric b,
.control-strip .admin-metrics .metric b { margin-top: 16px; font-size: 32px; }
.control-strip .metric::after { width: 82px; height: 82px; right: -30px; bottom: -38px; }
.metric.live { border-color: #4e936f; box-shadow: inset 0 0 24px rgba(121, 242, 173, .035); }
.metric.live::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 2px; background: var(--acid); animation: live-edge 1.8s ease-in-out infinite; }

.active-pipeline {
  position: relative;
  margin: 0 0 48px;
  padding: 20px;
  border: 1px solid #365d4b;
  background: linear-gradient(120deg, rgba(15, 36, 27, .88), rgba(8, 19, 14, .5));
  overflow: hidden;
  isolation: isolate;
}
.active-pipeline::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -18%;
  top: 0;
  width: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--acid), transparent);
  box-shadow: 0 0 12px rgba(121, 242, 173, .7);
  animation: pipeline-signal 4.2s linear infinite;
}
.active-pipeline .section-heading { margin: 0 0 17px; }
.live-heading h2 { display: flex; align-items: center; gap: 12px; }
.live-orbit { position: relative; display: inline-block; width: 18px; height: 18px; border: 1px solid #4b7b64; border-radius: 50%; }
.live-orbit::before { content: ""; position: absolute; width: 5px; height: 5px; left: 6px; top: 6px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px var(--acid); animation: runner-pulse 1.8s ease-in-out infinite; }
.live-orbit::after { content: ""; position: absolute; inset: -5px; border: 1px solid transparent; border-top-color: var(--acid); border-radius: 50%; animation: orbit-spin 2.8s linear infinite; }
.capacity-status { display: flex; align-items: baseline; gap: 9px; padding: 9px 12px; border: 1px solid #355a48; background: #091711; color: #789487; }
.capacity-status b { color: var(--acid); font: 700 18px Consolas, monospace; }
.capacity-status span { font-size: 10px; letter-spacing: .08em; }
.has-active-runs .topbar { border-bottom-color: #3b6b54; }
.has-active-runs .run-card { animation: card-arrive .45s both; }
.has-active-runs .run-card:nth-child(2) { animation-delay: .06s; }
.has-active-runs .run-card:nth-child(3) { animation-delay: .12s; }
.routing-card { border-style: dashed; }
.routing-card .status-tag { color: var(--acid); border-color: #4f8a69; }
.routing-card .live-activity > i { background: transparent; border: 2px solid #3b6551; border-top-color: var(--acid); box-shadow: none; animation: routing-spin .9s linear infinite; }
.status-dot[data-status=routing]:before,
.status-dot[data-status=queued]:before { background: var(--blue); animation: runner-pulse 2s ease-in-out infinite; }

.run-card { min-height: 250px; display: flex; flex-direction: column; }
.run-card.run-leaving { pointer-events: none; animation: card-leave .28s ease forwards; }
.run-card h3 { margin-top: 22px; }
.live-activity { display: grid; grid-template-columns: 9px 1fr; gap: 11px; align-items: start; margin-top: auto; padding: 14px; background: #0b1913; border: 1px solid #263f34; }
.live-activity > i { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px rgba(121, 242, 173, .8); animation: runner-pulse 2s ease-in-out infinite; }
.live-activity span,
.live-activity b { display: block; }
.live-activity span { color: #678477; font: 9px Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; }
.live-activity b { color: #bdd1c7; font-size: 11px; line-height: 1.5; margin-top: 4px; font-weight: 500; max-height: 34px; overflow: hidden; }
.live-activity b.activity-updated { animation: activity-signal .72s ease; }
.status-tag.status-updated { animation: status-signal .55s ease; }
.run-mode { color: #738f82; font: 10px Consolas, monospace; margin-top: 11px; }
.activity-cell { display: block; max-width: 280px; color: #9db3a8; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.routing-head { padding-top: 16px; }
.routing-signal { display: grid; grid-template-columns: 34px 1fr; gap: 15px; margin-top: 28px; padding: 24px; border: 1px solid #355546; background: #0b1913; }
.routing-signal > i { width: 18px; height: 18px; margin-top: 2px; border: 2px solid #385d4b; border-top-color: var(--acid); border-radius: 50%; animation: routing-spin .9s linear infinite; }
.routing-signal b,
.routing-signal span { display: block; }
.routing-signal span { margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.btn-live { background: #102d20; border-color: var(--acid); color: var(--acid); font-weight: 700; }
.btn-live i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: var(--acid); box-shadow: 0 0 10px var(--acid); animation: runner-pulse 2s ease-in-out infinite; }

.devcore-stream-panel {
  position: fixed;
  right: min(680px, 95vw);
  top: 0;
  bottom: 0;
  width: min(700px, calc(100vw - min(680px, 95vw)));
  min-width: 520px;
  background: #07100d;
  border-left: 1px solid #3e5b4f;
  border-right: 1px solid #3e5b4f;
  z-index: 26;
  transform: translateX(calc(100% + min(680px, 95vw) + 8px));
  transition: transform .28s ease;
  box-shadow: -24px 0 70px rgba(0, 0, 0, .38);
  display: flex;
  flex-direction: column;
}
.devcore-stream-panel.open { transform: none; }
.devcore-stream-panel > header { min-height: 104px; padding: 27px 30px 20px; background: #0d1d16; border-bottom: 1px solid var(--line); position: relative; }
.devcore-stream-panel h2 { margin: 0; font-size: 22px; }
.stream-notice { display: flex; gap: 10px; align-items: center; padding: 11px 29px; border-bottom: 1px solid #243b31; color: #769185; font-size: 10px; background: #0a1712; }
.stream-notice i,
.chat-system i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--acid); box-shadow: 0 0 9px rgba(121, 242, 173, .7); }
.devcore-chat { flex: 1; min-height: 0; overflow: auto; padding: 27px 30px 50px; scroll-behavior: smooth; }
.chat-system { display: flex; gap: 10px; align-items: center; padding: 13px 15px; margin-bottom: 17px; border: 1px dashed #355246; color: var(--muted); font-size: 11px; }
.chat-system.active { color: #b9d2c5; border-style: solid; }
.chat-system.error { color: #ffaaa4; border-color: #6c3632; }
.chat-system.error i { background: var(--red); box-shadow: none; }
.chat-message { margin: 0 0 18px; border-left: 2px solid #426352; padding: 1px 0 1px 16px; }
.chat-message.assistant { border-left-color: var(--acid); background: linear-gradient(90deg, rgba(121, 242, 173, .045), transparent 65%); padding-top: 12px; padding-bottom: 12px; }
.chat-message.reasoning { border-left-color: #65a783; }
.chat-message.command { border-left-color: var(--blue); }
.chat-message.file { border-left-color: var(--amber); }
.chat-message.plan { border-left-color: #b899ff; }
.chat-label { display: flex; justify-content: space-between; gap: 14px; margin-bottom: 9px; color: var(--acid); font: 700 9px Consolas, monospace; letter-spacing: .13em; }
.chat-label time { color: #577366; font-weight: 400; letter-spacing: 0; }
.chat-message pre { margin: 0; color: #d9e5de; font: 12px/1.68 "Microsoft YaHei UI", sans-serif; white-space: pre-wrap; word-break: break-word; }
.chat-rendered { color: #d9e5de; font: 12px/1.72 "Microsoft YaHei UI", sans-serif; }
.chat-rendered h3 { margin: 17px 0 7px; color: var(--acid); font-size: 13px; line-height: 1.45; }
.chat-rendered h3:first-child { margin-top: 0; }
.chat-rendered p { margin: 0 0 9px; white-space: pre-wrap; word-break: break-word; }
.chat-rendered ul { margin: 0 0 12px; padding-left: 20px; }
.chat-rendered li { margin: 4px 0; word-break: break-word; }
.chat-message.command pre,
.chat-message.file pre { color: #b9d7ff; font-family: Consolas, monospace; font-size: 11px; }
.chat-message.file pre { color: #e8cc86; }

@keyframes routing-spin { to { transform: rotate(360deg); } }

.login-body {
  overflow: hidden;
}

.login-shell {
  width: min(1180px, 96vw);
  min-height: 660px;
  grid-template-columns: 1.28fr .72fr;
  background: #0d1c16;
}

.login-brand {
  padding: 52px 70px 58px;
  display: flex;
  flex-direction: column;
}

.login-brand::after {
  content: "∞";
  display: block;
  right: -38px;
  bottom: -72px;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: rgba(62, 137, 255, .055);
  font: 300 360px/1 "Segoe UI Symbol", serif;
  box-shadow: none;
  transform: rotate(-8deg);
}

.login-logo-lockup {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 30px;
  width: 100%;
  padding-bottom: 36px;
}

.login-logo-lockup::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(105, 180, 230, .72), rgba(145, 103, 222, .34), transparent 88%);
}

.login-logo-symbol {
  display: block;
  width: 255px;
  height: 112px;
  overflow: hidden;
  flex: 0 0 auto;
  filter: drop-shadow(0 16px 26px rgba(42, 130, 220, .22)) drop-shadow(0 0 20px rgba(145, 92, 224, .18));
}

.login-logo-symbol img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login-logo-lockup strong {
  color: var(--paper);
  font: 800 68px/.86 Bahnschrift, "Arial Narrow", sans-serif;
  letter-spacing: -.045em;
}

.login-logo-lockup strong span {
  color: var(--violet);
}

.login-copy {
  margin: auto 0 0;
  position: relative;
  z-index: 2;
}

.login-brand .login-copy h1 {
  font-size: 70px;
  line-height: 1.04;
  letter-spacing: -.055em;
  margin: 13px 0 0;
}

.delivery-loop {
  margin-top: 52px;
  position: relative;
  z-index: 3;
}

.loop-rail {
  height: 28px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.loop-rail::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 13px;
  height: 1px;
  background: linear-gradient(90deg, #3d6553, var(--acid), #3d6553);
}

.loop-rail i {
  width: 9px;
  height: 9px;
  background: #0c1813;
  border: 2px solid #6aa582;
  border-radius: 50%;
  z-index: 1;
  animation: node-pulse 3.2s ease-in-out infinite;
}

.loop-rail i:nth-child(2) { animation-delay: .55s; }
.loop-rail i:nth-child(3) { animation-delay: 1.1s; }
.loop-rail i:nth-child(4) { animation-delay: 1.65s; }

.loop-rail b {
  position: absolute;
  left: 0;
  top: 7px;
  width: 14px;
  height: 14px;
  background: var(--acid);
  box-shadow: 0 0 16px rgba(121, 242, 173, .8);
  transform: rotate(45deg);
  animation: packet-run 4.8s cubic-bezier(.65, 0, .35, 1) infinite;
}

.loop-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: #789487;
  font: 10px Consolas, monospace;
}

.orbit {
  position: absolute;
  border: 1px solid rgba(91, 164, 128, .25);
  border-radius: 50%;
  pointer-events: none;
}

.orbit-a {
  width: 420px;
  height: 420px;
  right: -200px;
  bottom: -185px;
  box-shadow: 0 0 0 55px rgba(31, 79, 57, .08), 0 0 0 110px rgba(31, 79, 57, .045);
  animation: orbit-breathe 7s ease-in-out infinite;
}

.orbit-b {
  width: 120px;
  height: 120px;
  right: 88px;
  top: 90px;
  border-style: dashed;
  animation: orbit-spin 16s linear infinite;
}

.login-panel {
  padding: 72px 56px;
  background: linear-gradient(180deg, #10221b, #0d1c16);
  position: relative;
  overflow: hidden;
}

.login-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -100%;
  height: 60%;
  background: linear-gradient(180deg, transparent, rgba(121, 242, 173, .035), transparent);
  animation: panel-scan 7s linear infinite;
}

.login-panel > div,
.login-panel > form,
.login-panel > .demo-credential {
  position: relative;
  z-index: 1;
}

.login-panel h2 {
  font-size: 34px;
}

.login-panel input {
  height: 48px;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 50px;
}

.mobile-brand > span {
  display: block;
  width: 112px;
  height: 48px;
  overflow: hidden;
  filter: drop-shadow(0 8px 18px rgba(58, 132, 222, .22));
}

.mobile-brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.mobile-brand strong {
  color: var(--paper);
  font: 800 29px/.9 Bahnschrift, "Arial Narrow", sans-serif;
  letter-spacing: -.04em;
}

.mobile-brand strong em { color: var(--violet); font-style: normal; }

@keyframes runner-pulse {
  50% { box-shadow: 0 0 18px var(--acid); transform: scale(1.25); }
}

@keyframes node-pulse {
  0%, 40%, 100% { border-color: #456b59; box-shadow: none; }
  55% { border-color: var(--acid); box-shadow: 0 0 13px var(--acid); }
}

@keyframes packet-run {
  0% { left: 0; opacity: 0; }
  8%, 92% { opacity: 1; }
  100% { left: calc(100% - 14px); opacity: 0; }
}

@keyframes orbit-breathe {
  50% { transform: scale(1.05); opacity: .7; }
}

@keyframes orbit-spin {
  to { transform: rotate(360deg); }
}

@keyframes panel-scan {
  to { top: 140%; }
}

@keyframes live-edge {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; box-shadow: 0 0 12px var(--acid); }
}

@keyframes pipeline-signal {
  to { left: 100%; }
}

@keyframes card-arrive {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

@keyframes card-leave {
  to { opacity: 0; transform: translateY(-7px) scale(.985); }
}

@keyframes activity-signal {
  0% { color: var(--acid); text-shadow: 0 0 12px rgba(121, 242, 173, .75); transform: translateX(3px); }
  100% { color: #bdd1c7; text-shadow: none; transform: none; }
}

@keyframes status-signal {
  0% { border-color: var(--acid); box-shadow: 0 0 13px rgba(121, 242, 173, .34); }
  100% { box-shadow: none; }
}

@media (max-width: 1600px) {
  .control-strip { grid-template-columns: 1fr; }
  .control-strip .metrics.admin-metrics { grid-template-columns: repeat(6, 1fr); }
  .main-stage { min-width: 0; }
}

@media (max-width: 1000px) {
  .login-shell {
    grid-template-columns: 1fr;
    width: min(500px, 96vw);
    min-height: 590px;
  }

  .login-brand { display: none; }
  .login-panel { min-height: 590px; padding: 58px; }
  .mobile-brand { display: flex; }
  .control-strip .metrics.admin-metrics { grid-template-columns: repeat(3, 1fr); }
  .metrics.admin-metrics { grid-template-columns: repeat(3, 1fr); }
  .devcore-stream-panel { right: 0; width: min(700px, 100vw); min-width: 0; z-index: 28; }
}

@media (max-width: 650px) {
  .mail-choice-grid,
  .recipient-emails,
  .delivery-choice-grid { grid-template-columns: 1fr; }
  .recipient-group { grid-template-columns: 1fr; }
  .login-body { padding: 16px; }
  .login-panel { padding: 40px 28px; }
  .top-actions { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  .version-chip { order: 3; }
  .devcore-quota { grid-template-columns: 1fr; gap: 20px; }
  .control-strip .devcore-quota { grid-template-columns: 1fr; }
  .control-strip .metrics.admin-metrics { grid-template-columns: 1fr 1fr; }
  .metrics.admin-metrics { grid-template-columns: 1fr 1fr; }
  .devcore-stream-panel > header { padding-left: 21px; }
  .devcore-chat { padding-left: 21px; padding-right: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Soft telemetry-blue surface: calm enough for long-running operational use. */
body { background: radial-gradient(circle at 82% -10%, #233657 0, transparent 34%), linear-gradient(115deg, #09101e, #101a2b 58%, #0b1324); }
.sidebar { background: rgba(8, 17, 30, .94); }
.nav-item:hover,
.nav-item.active { background: #15263d; }
.logo-glyph { border-color: var(--acid); box-shadow: 5px 5px 0 rgba(94, 119, 181, .38); }
.brand-word em,
.logo .brand-word b span,
.btn-primary { color: #0b1728; box-shadow: 5px 5px 0 #345a7b; }
.btn-primary:hover { box-shadow: 2px 2px 0 #345a7b; }
.metric { background: linear-gradient(145deg, var(--panel), #111e31); }
.metric::after { border-color: #31496b; }
.metric.live { border-color: #557ba4; box-shadow: inset 0 0 24px rgba(111, 175, 224, .045); }
.table-card { background: rgba(15, 27, 44, .82); }
td { border-bottom-color: #253a58; }
tbody tr:hover { background: #172943; }
.artifact-link { border-color: #3d5b80; }
.artifact-link:hover { background: #172c47; }
.devcore-quota { border-color: #496b92; background: linear-gradient(105deg, #172b44, #111e31 70%); }
.devcore-quota::after { color: rgba(111, 175, 224, .045); }
.quota-track { background: #263b58; }
.quota-track i { background: linear-gradient(90deg, #8279ce, var(--acid)); box-shadow: 0 0 12px rgba(111, 175, 224, .38); }
.active-pipeline { border-color: #46698f; background: linear-gradient(120deg, rgba(19, 37, 58, .92), rgba(11, 23, 39, .64)); }
.active-pipeline::before { box-shadow: 0 0 12px rgba(111, 175, 224, .56); }
.capacity-status { border-color: #46688c; background: #101e31; color: #91a9c4; }
.has-active-runs .topbar { border-bottom-color: #496d95; }
.run-card:hover { border-color: #6486ad; }
.live-activity { background: #101e31; border-color: #2c4565; }
.live-activity span { color: #7790ad; }
.live-activity b { color: #c3d2e6; }
.routing-signal { border-color: #3e5f83; background: #111f32; }
.routing-signal > i { border-color: #3e5f83; border-top-color: var(--acid); }

/* Runner-offline queue: keep the task visibly alive without implying active execution. */
.waiting-runner-card {
  border-color: rgba(139, 116, 189, .72);
  background: linear-gradient(145deg, rgba(20, 31, 53, .96), rgba(31, 26, 58, .82));
  box-shadow: inset 3px 0 0 rgba(139, 116, 189, .9);
}
.waiting-runner-card .status-tag {
  color: #c5b7eb;
  border-color: rgba(139, 116, 189, .76);
  background: rgba(91, 65, 148, .16);
}
.waiting-runner-card .live-activity > i {
  border: 1px solid #8b74bd;
  border-radius: 50%;
  background: #8b74bd;
  box-shadow: 0 0 0 0 rgba(139, 116, 189, .5);
  animation: runner-wait-pulse 2.2s ease-out infinite;
}
.waiting-runner-head h2 { color: #e6e0f7; }
.waiting-runner-signal {
  border-color: rgba(139, 116, 189, .66);
  background:
    linear-gradient(90deg, rgba(139, 116, 189, .12), transparent 62%),
    #111a2b;
}
.waiting-runner-signal > i {
  border: 1px solid #8b74bd;
  border-top-color: #8b74bd;
  background: #8b74bd;
  box-shadow: 0 0 0 0 rgba(139, 116, 189, .5);
  animation: runner-wait-pulse 2.2s ease-out infinite;
}
.status-dot[data-status=waiting_runner]:before {
  background: #8b74bd;
  box-shadow: 0 0 9px rgba(139, 116, 189, .65);
}
@keyframes runner-wait-pulse {
  0% { box-shadow: 0 0 0 0 rgba(139, 116, 189, .55); }
  70%, 100% { box-shadow: 0 0 0 9px rgba(139, 116, 189, 0); }
}
.modal { background: #142238; border-color: #46678d; }
input,
select,
textarea,
.email-row { background: #0d1829; border-color: #344f72; }
.strategy-preview,
.mail-choice,
.demo-credential code { background: #101e31; }
.mail-choice { border-color: #334f72; }
.mail-choice:has(input:checked) { border-color: #628ab2; background: #172c47; }
.detail-drawer { background: #101d30; border-left-color: #45678d; }
.timeline-mark { border-color: #58708f; }
.timeline-mark::after { background: #2c4564; }
.event-list { border-left-color: #354d6e; }
.artifact { background: #111f33; }
.license-artifact {
  border-color: rgba(128, 111, 193, .72);
  background: linear-gradient(90deg, rgba(42, 39, 82, .92), #111f33 64%);
  box-shadow: inset 3px 0 0 #806fc1;
}
.license-artifact b,
.license-artifact small { display: block; }
.license-artifact small { margin-top: 4px; }
.artifact-link.license-link { border-color: #806fc1; color: #c9bdf0; }
.release-artifact {
  border-color: rgba(82, 153, 205, .78);
  background: linear-gradient(90deg, rgba(19, 56, 84, .9), rgba(35, 31, 72, .7) 72%);
  box-shadow: inset 3px 0 0 #63addd;
}
.release-artifact b,
.release-artifact small { display: block; }
.release-artifact small { margin-top: 4px; }
.artifact-link.release-link { border-color: #548eb9; color: #a9d7f2; background: rgba(33, 74, 108, .35); }
.menu-artifact { width: 100%; cursor: pointer; text-align: left; }
.menu-artifact span { min-width: 0; }
.menu-artifact b,
.menu-artifact small { display: block; overflow-wrap: anywhere; }
.menu-artifact small { margin-top: 4px; }
.merge-screenshot-card { border-color: #3d5d82; background: #0f1b2d; }
.merge-screenshot-download { border-top-color: #3d5d82; background: #172942; }
.artifact-preview-shell { border-color: #4d719a; background: #0b1424; }
.artifact-preview-head { background: linear-gradient(90deg, #172b45, #101d30); }
.devcore-stream-panel { background: #0b1424; border-color: #45678d; }
.devcore-stream-panel > header { background: #14253b; }
.stream-notice { background: #101d30; border-bottom-color: #2d4565; }
.login-body { background: radial-gradient(circle at 12% 20%, #233a5a 0, transparent 30%), #0a1221; }
.login-shell { background: #111f33; }
.login-brand { background: linear-gradient(145deg, rgba(22, 40, 63, .94), rgba(10, 19, 34, .99)); }
.login-panel { background: linear-gradient(180deg, #172940, #101d30); }
.loop-rail::before { background: linear-gradient(90deg, #456789, var(--acid), #456789); }
.loop-rail i { background: #101d30; border-color: #7194ba; }
.orbit { border-color: rgba(111, 175, 224, .25); }

/* AutoDev polygon spectrum: operational orange with amber and deep-teal facets. */
body {
  background:
    radial-gradient(circle at 92% 8%, rgba(83, 146, 215, .2), transparent 31%),
    radial-gradient(circle at 76% 74%, rgba(129, 89, 201, .085), transparent 30%),
    linear-gradient(118deg, #09101e, #101a2b 56%, #0d1428);
}

.sidebar {
  background:
    radial-gradient(circle at 50% 2%, rgba(139, 96, 223, .13), transparent 24%),
    linear-gradient(180deg, rgba(9, 18, 33, .98), rgba(8, 16, 29, .96));
  border-right-color: #344d74;
}

.sidebar nav { gap: 7px; }
.nav-item { position: relative; border-left-color: transparent; overflow: hidden; }
.nav-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, var(--acid), var(--violet));
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .22s ease;
}
.nav-item:hover,
.nav-item.active { background: linear-gradient(90deg, rgba(31, 69, 108, .72), rgba(35, 31, 72, .32)); border-left-color: transparent; }
.nav-item:hover::before,
.nav-item.active::before { transform: scaleY(1); }
.nav-item.active .nav-index { color: #ad91f1; }
.sidebar-foot { position: relative; }
.system-status { border-bottom-color: #344a6d; }
.system-status i { background: linear-gradient(135deg, var(--acid), var(--violet)); }
.profile { border-top: 1px solid rgba(130, 104, 200, .18); }

.topbar { position: relative; border-bottom-color: transparent; }
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(233, 87, 43, .74), rgba(217, 149, 24, .5), rgba(36, 107, 90, .18));
}
.version-chip { border-color: rgba(143, 116, 215, .5); color: #a9bce0; background: rgba(18, 26, 50, .82); }
.eyebrow { color: #75b9e6; }

.btn-primary {
  background: linear-gradient(105deg, #70b8e6 0 74%, #9a7de0 100%);
  border-color: #79bce7;
  color: #091424;
  box-shadow: 5px 5px 0 rgba(89, 65, 151, .58);
}
.btn-primary:hover { border-color: #ac91eb; box-shadow: 2px 2px 0 rgba(89, 65, 151, .68); }
.btn-secondary { border-color: #668ebd; }
.btn-secondary:hover { border-color: var(--violet); color: #d99518; }
.text-button,
.text-action { color: #7dbce5; }

.metric { border-color: #354e73; }
.metric:nth-child(even)::after { border-color: rgba(146, 111, 218, .27); }
.metric.live { border-color: #657ab5; box-shadow: inset 0 0 28px rgba(133, 94, 210, .045); }
.metric.live::before { background: linear-gradient(180deg, var(--acid), var(--violet)); }
.quota-track i { background: linear-gradient(90deg, #6db4e2 0 72%, #997be0); }
.devcore-quota { border-left-color: #8b78d5; }
.devcore-quota::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(36, 107, 90, .18), rgba(217, 149, 24, .68), transparent 72%);
}

.active-pipeline { border-color: #475f8e; }
.active-pipeline::before { background: linear-gradient(90deg, transparent, var(--acid), var(--violet), transparent); }
.live-orbit::after { border-top-color: var(--violet); }
.run-card { border-color: #354a71; }
.run-card:hover { border-color: #746fb0; box-shadow: 0 16px 36px rgba(27, 60, 105, .15); }
.status-tag { border-color: #515b8b; color: #bdcbea; }
.live-activity > i { background: linear-gradient(135deg, var(--acid), var(--violet)); }

.table-card,
.project-card,
.modal,
.detail-drawer { border-color: #3a5279; }
tbody tr:hover { background: linear-gradient(90deg, rgba(27, 55, 87, .8), rgba(41, 34, 78, .3)); }
.artifact-link:hover,
.artifact:hover { border-color: #806fc1; }
.chip.active { background: linear-gradient(105deg, #d8eaff, #d8ccf7); color: #111a31; }
input:focus,
select:focus,
textarea:focus { border-color: #8274c8; box-shadow: 0 0 0 2px rgba(139, 105, 213, .12); }
.timeline-item.completed .timeline-mark { background: linear-gradient(135deg, var(--acid), var(--violet)); border-color: #d99518; }
.timeline-times {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 8px;
  color: #8299b8;
  font: 10px/1.5 Consolas, "Microsoft YaHei", monospace;
}
.timeline-copy .timeline-times span,
.timeline-copy .timeline-times strong { display: inline-flex; align-items: baseline; gap: 5px; margin: 0; }
.timeline-times time { color: #b9cae1; }
.timeline-times strong { color: #a88be8; font-weight: 700; }
.timeline-times .running-time { color: #76b9e5; }
.timeline-times.pending-time { color: #607692; }
.chat-message.assistant { border-left-color: #8b78d5; background: linear-gradient(90deg, rgba(123, 93, 198, .07), transparent 65%); }
.chat-label { color: #8fc6e9; }

.login-body {
  background:
    radial-gradient(circle at 12% 20%, rgba(44, 96, 153, .42) 0, transparent 31%),
    radial-gradient(circle at 86% 82%, rgba(113, 76, 183, .16), transparent 29%),
    #09111f;
}
.login-brand { background: linear-gradient(145deg, rgba(19, 40, 65, .96), rgba(19, 18, 48, .96)); }
.login-panel { background: linear-gradient(180deg, #172a42, #111b31); }
.loop-rail b { background: linear-gradient(135deg, var(--acid), var(--violet)); box-shadow: 0 0 16px rgba(217, 149, 24, .52); }

/* Supported-project hover panel: adjacent to the single version indicator. */
.project-guide { position: relative; z-index: 18; outline: 0; }
.project-guide::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
.project-guide-trigger { height: 31px; display: flex; align-items: center; gap: 10px; padding: 0 11px; border: 1px solid #45678f; background: rgba(16, 31, 52, .88); color: #afcbe2; cursor: default; }
.project-guide-trigger span { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 700; }
.project-guide-trigger span i { width: 6px; height: 6px; border-radius: 50%; background: #76b8e2; box-shadow: 0 0 10px rgba(118, 184, 226, .62); }
.project-guide-trigger b { color: #a78adf; font: 700 13px/1 Consolas, monospace; }
.project-guide:hover .project-guide-trigger,
.project-guide:focus-within .project-guide-trigger { border-color: #8873c4; background: #182846; }
.project-guide-panel { position: absolute; top: calc(100% + 9px); right: 0; width: min(470px, calc(100vw - 36px)); max-height: min(620px, calc(100vh - 130px)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid #506d96; background: linear-gradient(145deg, rgba(20, 39, 64, .985), rgba(26, 24, 55, .99)); box-shadow: 0 26px 65px rgba(2, 8, 20, .55); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px) scale(.985); transform-origin: top right; transition: opacity .16s ease, transform .2s ease, visibility .2s; }
.project-guide:hover .project-guide-panel,
.project-guide:focus-within .project-guide-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }
.project-guide-panel > header { padding: 20px 21px 15px; border-bottom: 1px solid rgba(91, 117, 157, .35); }
.project-guide-panel > header .eyebrow { margin: 0 0 7px; color: #76bce8; }
.project-guide-panel > header h2 { margin: 0; color: #f1f5fb; font-size: 20px; }
.project-guide-list { overflow: auto; padding: 4px 20px 18px; scrollbar-width: thin; scrollbar-color: #6d61a3 #111c31; }
.project-guide-list::-webkit-scrollbar { width: 7px; }
.project-guide-list::-webkit-scrollbar-track { background: #111c31; }
.project-guide-list::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #5b90bb, #6d58a5); border: 2px solid #111c31; }
.project-guide-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; gap: 10px; min-height: 62px; padding: 13px 0; border-top: 1px solid rgba(80, 105, 143, .3); }
.project-guide-item:first-child { border-top: 0; }
.project-guide-item > span { padding-top: 2px; color: #607b9e; font: 10px/1 Consolas, monospace; }
.project-guide-item strong { display: block; color: #e1eaf6; font-size: 12px; }
.guide-aliases { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.project-guide-item code { border: 1px solid rgba(101, 144, 184, .42); background: rgba(15, 31, 53, .86); color: #92c8e9; padding: 5px 7px; font: 10px/1.1 "Microsoft YaHei", sans-serif; }
.project-guide-empty,
.project-guide-loading { padding: 26px 8px 12px; color: #8298b4; font-size: 11px; text-align: center; }

.tfs-work-link { color: #78bde8; text-decoration: none; border-bottom: 1px solid transparent; }
.tfs-work-link:hover { color: #b39aeb; border-bottom-color: currentColor; }
.detail-head h2 .tfs-work-link { color: #f0f5fb; }
.alias-project-card { min-height: 190px; }
.alias-label { margin: 27px 0 10px; color: #728ba9; font: 10px/1 Consolas, monospace; letter-spacing: .08em; }
.project-aliases { display: flex; flex-wrap: wrap; gap: 8px; }
.project-aliases code { padding: 9px 11px; border: 1px solid #4e6692; background: #122440; color: #9dcae8; font: 11px/1 "Microsoft YaHei", sans-serif; }

.analytics-kpis { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
.analytics-kpi { min-height: 112px; padding: 18px; border: 1px solid #3d5679; background: linear-gradient(145deg,#13243c,#101b31); }
.analytics-kpi span { color: #7893b2; font-size: 10px; }
.analytics-kpi b { display: block; margin-top: 20px; color: #edf4fc; font: 700 29px/1 Consolas,monospace; }
.analytics-kpi.highlight { border-color: #7863b2; background: linear-gradient(145deg,#192c49,#282046); }
.analytics-kpi.highlight b { color: #b49bec; }
.analytics-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.analytics-card { min-height: 330px; padding: 23px; border: 1px solid #3d5679; background: rgba(15,29,49,.82); }
.analytics-card header { padding-bottom: 15px; border-bottom: 1px solid rgba(74,100,136,.42); }
.analytics-card h3 { margin: 0; font-size: 19px; }
.trend-card,.project-ranking { grid-column: 1/-1; }
.trend-legend { display: flex; justify-content: flex-end; gap: 16px; margin: 14px 0; color: #7890aa; font-size: 9px; }
.trend-legend span { display: flex; align-items: center; gap: 5px; }
.trend-legend i { width: 7px; height: 7px; }
.trend-bars { height: 205px; display: grid; grid-template-columns: repeat(14,minmax(22px,1fr)); gap: 7px; align-items: end; }
.trend-day { height: 100%; display: grid; grid-template-rows: 1fr auto; gap: 8px; }
.trend-columns { min-height: 0; display: flex; align-items: end; justify-content: center; gap: 2px; border-bottom: 1px solid #314966; }
.trend-columns i { display: block; width: 25%; min-height: 3px; transition: height .35s ease; }
.trend-day > span { color: #647c99; font: 8px/1 Consolas,monospace; text-align: center; }
.created { background: #69add9; }.delivered { background: #8874ce; }.failed { background: #bd6d7e; }
.analytics-bars { display: grid; gap: 17px; padding-top: 22px; }
.analytics-bar > div { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: #9eb2ca; font-size: 11px; }
.analytics-bar b { color: #e4edf8; font: 700 12px Consolas,monospace; }
.analytics-bar > i { display: block; height: 6px; background: #1a2a41; overflow: hidden; }
.analytics-bar em { display: block; height: 100%; background: linear-gradient(90deg,#5a9bca,#826dca); }
.analytics-project-head,.analytics-project-row { display: grid; grid-template-columns: minmax(220px,1.6fr) repeat(3,.5fr) .8fr; gap: 12px; align-items: center; padding: 12px 9px; }
.analytics-project-head { margin-top: 10px; color: #657f9e; font: 9px Consolas,monospace; }
.analytics-project-row { border-top: 1px solid rgba(68,94,129,.35); color: #a8bad0; font-size: 11px; }
.analytics-project-row b { color: #e2ebf6; }
.retry-run { border-color: #836ec1; color: #c4b2ef; }

@keyframes sidebar-brand-breathe {
  50% { transform: translateY(-2px) scale(1.015); filter: drop-shadow(0 10px 23px rgba(233, 87, 43, .24)) drop-shadow(0 0 17px rgba(36, 107, 90, .2)); }
}

@media (max-width: 1000px) {
  .sidebar .logo { display: flex; align-items: center; gap: 9px; margin: 0; padding: 0; }
  .logo::after { display: none; }
  .sidebar-brand-mark { width: 72px; height: 34px; }
  .logo .sidebar-brand-name { font-size: 17px; }
  .analytics-kpis { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 650px) {
  .sidebar-brand-mark { width: 58px; }
  .logo .sidebar-brand-name { display: none; }
  .project-guide { display: none; }
  .analytics-kpis,.analytics-layout { grid-template-columns: 1fr; }
  .trend-card,.project-ranking { grid-column: auto; }
  .trend-bars { overflow-x: auto; }
}

/* Ledger controls and dense catalog/analytics layout. */
.ledger-heading,
.dense-heading { margin-top: 20px; }
.record-filters {
  display: grid;
  grid-template-columns: minmax(190px,1.5fr) repeat(6,minmax(115px,.75fr)) auto;
  gap: 9px;
  align-items: end;
  margin-bottom: 13px;
  padding: 13px 14px;
  border: 1px solid #3d5679;
  background: linear-gradient(115deg,rgba(16,32,54,.9),rgba(25,25,55,.82));
}
.record-filters label { display: grid; gap: 6px; min-width: 0; }
.record-filters label > span { color: #7893b2; font-size: 9px; }
.record-filters input,
.record-filters select { height: 36px; padding: 7px 9px; border-color: #405a7e; background: #0d192c; font-size: 11px; }
.ledger-select,
.ledger-date { position: relative; min-width: 0; }
.ledger-select > input,
.ledger-date > input { display: none; }
.ledger-select > button,
.ledger-date > button {
  width: 100%; height: 36px; display: grid; grid-template-columns: minmax(0,1fr) 17px; align-items: center;
  gap: 8px; padding: 0 9px 0 11px; border: 1px solid #405a7e; background: #0d192c; color: #c0d0e2;
  text-align: left; font-size: 11px;
}
.ledger-select > button b,
.ledger-date > button b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.ledger-select > button i,
.ledger-date > button i { position: relative; width: 15px; height: 15px; border: 1px solid #536f94; }
.ledger-select > button i::after { content: ""; position: absolute; left: 4px; top: 3px; width: 5px; height: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); transition: transform .16s ease; }
.ledger-date > button i::before,
.ledger-date > button i::after { content: ""; position: absolute; background: #7898bd; }
.ledger-date > button i::before { left: 3px; right: 3px; top: 4px; height: 1px; box-shadow: 0 4px 0 #7898bd; }
.ledger-date > button i::after { left: 4px; top: 2px; width: 1px; height: 3px; box-shadow: 5px 0 0 #7898bd; }
.ledger-select.open > button,
.ledger-date.open > button { border-color: #806bc2; box-shadow: inset 3px 0 0 #d99518; }
.ledger-select.open > button i::after { transform: translateY(2px) rotate(225deg); }
.ledger-select-menu,
.ledger-calendar { position: absolute; z-index: 65; top: calc(100% + 7px); border: 1px solid #526f96; background: #101d31; box-shadow: 10px 14px 0 rgba(6,12,25,.25), 0 24px 60px rgba(2,7,18,.48); }
.ledger-select-menu[hidden],
.ledger-calendar[hidden] { display: none; }
.ledger-select-menu { left: 0; min-width: 100%; width: max-content; max-width: 310px; max-height: 270px; overflow-y: auto; padding: 5px; }
.ledger-select-menu button { width: 100%; min-width: 145px; padding: 9px 12px; border: 0; border-left: 3px solid transparent; background: transparent; color: #9eb3cc; text-align: left; font-size: 11px; }
.ledger-select-menu button:hover,
.ledger-select-menu button[aria-selected="true"] { border-left-color: #d99518; background: linear-gradient(90deg,#20314e,#1f2044); color: #eef4fb; }
.ledger-calendar { right: 0; width: 292px; padding: 13px; }
.ledger-date.open-up .ledger-calendar { top: auto; bottom: calc(100% + 7px); }
.ledger-calendar-head { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid #354e70; }
.ledger-calendar-head b { color: #eef4fb; text-align: center; font: 700 12px Consolas,monospace; letter-spacing: .08em; }
.ledger-calendar-head button,
.ledger-calendar-foot button { border: 1px solid #405d80; background: #152640; color: #94b7d7; }
.ledger-calendar-head button { width: 30px; height: 28px; }
.ledger-calendar-week,
.ledger-calendar-days { display: grid; grid-template-columns: repeat(7,1fr); }
.ledger-calendar-week { padding: 10px 0 5px; color: #667f9d; font: 9px Consolas,monospace; text-align: center; }
.ledger-calendar-days { gap: 3px; }
.ledger-calendar-days button { position: relative; height: 31px; border: 1px solid transparent; background: transparent; color: #bdcce0; font: 10px Consolas,monospace; }
.ledger-calendar-days button.outside { color: #52647c; }
.ledger-calendar-days button:hover { border-color: #607fa5; background: #1a2b45; }
.ledger-calendar-days button.today::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 3px; height: 3px; margin-left: -1px; background: #d99518; }
.ledger-calendar-days button.selected { border-color: #806bc2; background: linear-gradient(135deg,#284b66,#4a3471); color: #fff; }
.ledger-calendar-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid #354e70; }
.ledger-calendar-foot button { min-width: 58px; padding: 6px 9px; font-size: 10px; }
.record-filter-actions { display: flex; gap: 7px; }
.record-filter-actions .btn { height: 36px; padding: 7px 11px; }
.record-pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 12px; color: #8098b6; font: 10px Consolas,monospace; }
.record-pagination > div { display: flex; gap: 5px; }
.record-pagination button { min-width: 31px; height: 31px; padding: 0 9px; border: 1px solid #405a7e; background: #101e34; color: #9fb6d0; font: inherit; }
.record-pagination button:hover:not(:disabled),
.record-pagination button.active { border-color: #806bc2; background: #232044; color: #d9ccf5; }

.project-grid { grid-template-columns: repeat(3,minmax(240px,1fr)); gap: 10px; }
.project-card { padding: 15px 16px; }
.alias-project-card { min-height: 0; }
.project-head { gap: 10px; }
.project-head h3 { margin: 3px 0 0; font-size: 15px; }
.mode-badge { max-width: 46%; padding: 5px 7px; line-height: 1.35; text-align: right; }
.alias-label { margin: 13px 0 7px; }
.project-aliases { gap: 5px; }
.project-aliases code { padding: 6px 8px; font-size: 10px; }
.repository-label { display: flex; align-items: center; justify-content: space-between; margin: 15px 0 7px; padding-top: 12px; border-top: 1px solid #314866; color: #728ba9; font: 10px/1 Consolas,monospace; letter-spacing: .08em; }
.repository-label b { min-width: 22px; padding: 3px 5px; border: 1px solid #52698b; color: #b8cae0; text-align: center; }
.repository-paths { display: grid; gap: 5px; max-height: 184px; overflow-y: auto; padding-right: 3px; }
.repository-paths > a { display: grid; grid-template-columns: minmax(128px,.34fr) minmax(0,1fr) 15px; align-items: start; gap: 8px; min-height: 34px; padding: 7px 8px; border: 1px solid #364e70; background: #0f1d31; color: #a6bad1; text-decoration: none; }
.repository-paths > a:hover { border-color: #806bc2; background: #1b2441; }
.repository-paths span { color: #d0ddec; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repository-paths code { min-width: 0; color: #728ca9; font: 9px/1.45 Consolas,monospace; overflow-wrap: anywhere; word-break: break-word; }
.repository-paths i { color: #d99518; font-style: normal; }
#view-projects .policy-note { align-items: center; margin-bottom: 13px; padding: 11px 15px; }

.delivery-table thead th { position: sticky; top: 0; z-index: 4; background: #14243a; box-shadow: 0 1px 0 #3d5679; }

@media (min-width: 1001px) {
  body.ledger-lock { height: 100vh; overflow: hidden; }
  body.ledger-lock .app-shell { height: 100vh; min-height: 0; }
  body.ledger-lock .main-stage { height: 100vh; min-height: 0; padding-bottom: 24px; overflow: hidden; display: flex; flex-direction: column; }
  body.ledger-lock .topbar { flex: 0 0 auto; }
  body.ledger-lock #view-requests.active { flex: 1 1 auto; min-height: 0; display: grid; grid-template-rows: auto auto minmax(180px,1fr) auto; }
  body.ledger-lock #view-requests .section-heading { align-self: end; }
  body.ledger-lock .delivery-table { min-height: 0; overflow: auto; overscroll-behavior: contain; }
}

.analytics-kpis { gap: 8px; margin-bottom: 10px; }
.analytics-kpi { min-height: 78px; padding: 13px 14px; }
.analytics-kpi b { margin-top: 10px; font-size: 24px; }
.analytics-layout { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.analytics-card { min-height: 218px; padding: 15px 16px; }
.analytics-card header { padding-bottom: 9px; }
.analytics-card h3 { font-size: 16px; }
.trend-card { grid-column: span 2; }
.project-ranking { grid-column: auto; }
.trend-legend { margin: 9px 0; }
.trend-bars { height: 140px; }
.analytics-bars { gap: 10px; padding-top: 13px; }
.analytics-project-head,
.analytics-project-row { grid-template-columns: minmax(105px,1.35fr) repeat(3,.38fr) .72fr; gap: 6px; padding: 8px 4px; }
.analytics-project-head { margin-top: 5px; }
.analytics-project-row { font-size: 9px; }

@media (max-width: 1320px) {
  .record-filters { grid-template-columns: repeat(4,minmax(135px,1fr)); }
  .record-search { grid-column: span 2; }
  .project-grid { grid-template-columns: repeat(2,minmax(260px,1fr)); }
  .analytics-layout { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .trend-card { grid-column: 1/-1; }
  .project-ranking { grid-column: 1/-1; }
}
@media (max-width: 760px) {
  .record-filters { grid-template-columns: 1fr 1fr; }
  .record-search { grid-column: 1/-1; }
  .record-filter-actions { grid-column: 1/-1; justify-content: flex-end; }
  .project-grid,
  .analytics-layout { grid-template-columns: 1fr; }
  .trend-card,
  .project-ranking { grid-column: auto; }
}

/* Multi-project delivery: one requirement, independently traceable project lanes. */
.joint-badge {
  display: inline-flex !important;
  align-items: center;
  margin-left: 8px !important;
  padding: 2px 6px;
  border: 1px solid #725fae;
  color: #b7a6e8 !important;
  background: rgba(118,87,190,.12);
  font: 700 9px Consolas,monospace !important;
  letter-spacing: .04em;
}
.run-card.joint-run-card { border-color: #56649a; background: linear-gradient(145deg,#14233b,#191c3b); }
.run-card.joint-run-card:before { content:""; position:absolute; inset:0 0 auto; height:2px; background:linear-gradient(90deg,var(--acid),var(--violet)); }
.status-dot[data-status=joint_running]:before { background:var(--violet); box-shadow:0 0 10px rgba(217,149,24,.62); }
.joint-title-tip { display:grid; gap:7px; margin:14px 0 0; padding:11px 13px; border:1px solid #40547d; background:#101a32; }
.joint-title-tip b { color:#9db7d4; font-size:10px; }
.joint-title-tip code { color:#b9a9ec; font:11px Consolas,monospace; white-space:normal; }
.joint-delivery-panel { margin:22px 0; border:1px solid #4b5d8c; background:linear-gradient(140deg,rgba(17,32,58,.98),rgba(28,24,55,.96)); box-shadow:0 18px 45px rgba(4,8,24,.22); }
.joint-delivery-panel>header { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; padding:17px 18px; border-bottom:1px solid #3f4c74; }
.joint-delivery-panel h3 { margin:0; font-size:18px; }
.joint-delivery-panel>p { margin:0; padding:12px 18px; border-top:1px solid #364466; color:#91a4c1; font-size:10px; line-height:1.65; }
.joint-child-grid { display:grid; gap:8px; padding:12px; }
.joint-child { width:100%; display:grid; grid-template-columns:34px minmax(0,1fr) auto; align-items:center; gap:11px; padding:12px; border:1px solid #394b73; background:#0d172c; color:var(--paper); text-align:left; }
.joint-child:hover,.joint-child.active { border-color:#7784c1; background:#15213e; transform:none; }
.joint-child.active { box-shadow:inset 3px 0 0 var(--violet); }
.joint-child-index { color:#8976ca; font:700 11px Consolas,monospace; }
.joint-child-copy { min-width:0; display:grid; gap:3px; }
.joint-child-copy b { font-size:13px; }
.joint-child-copy small { color:#899bbb; font-size:9px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.joint-child-copy em { color:#c2cde0; font-size:10px; font-style:normal; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.joint-child>.status-dot { color:#9fb0ca; font-size:9px; white-space:nowrap; }
@media(max-width:650px){.joint-child{grid-template-columns:28px minmax(0,1fr)}.joint-child>.status-dot{grid-column:2}.joint-delivery-panel>header{align-items:flex-start;flex-direction:column}}
