:root {
  --bg: #030711;
  --bg2: #071426;
  --panel: rgba(9, 21, 38, .86);
  --panel2: rgba(14, 33, 56, .9);
  --line: rgba(89, 157, 214, .22);
  --line-strong: rgba(83, 202, 255, .5);
  --text: #e9f4ff;
  --muted: #82a4c4;
  --primary: #27c8ff;
  --primary2: #1177ff;
  --accent: #63ffd2;
  --danger: #ff5b6e;
  --ok: #4dffa8;
  --shadow: 0 22px 70px rgba(0, 0, 0, .55);
  --control-h: 40px;
  --control-radius: 10px;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(20, 106, 190, .28), transparent 60%),
    radial-gradient(900px 620px at 100% 0%, rgba(0, 255, 198, .08), transparent 55%),
    linear-gradient(160deg, #040a14 0%, #030711 55%, #050b16 100%);
  color: var(--text);
  font: 14px/1.55 "Segoe UI", "Microsoft YaHei", -apple-system, sans-serif;
  letter-spacing: .1px;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(62, 150, 224, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62, 150, 224, .055) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 50% 20%, #000 20%, transparent 78%);
}
body::after {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(circle at 50% 120%, rgba(0, 212, 255, .12), transparent 50%);
}
button, input, select, textarea { font: inherit; }
button {
  cursor: pointer;
  transition: color .16s ease, background .16s ease, border-color .16s ease,
              box-shadow .16s ease, filter .16s ease, transform .16s ease;
}
code, pre {
  font-family: "Cascadia Code", Consolas, "SFMono-Regular", monospace;
  font-size: 12.5px;
}
.muted { color: var(--muted); }
a { color: #86d9ff; text-decoration: none; }
a:hover { color: var(--accent); text-shadow: 0 0 14px rgba(99, 255, 210, .5); }

.login-page {
  position: relative; z-index: 2;
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
}
.login-theme-toggle { position: fixed; top: 18px; right: 18px; z-index: 3; }
.login-card {
  position: relative; width: 390px; padding: 34px 32px;
  border: 1px solid var(--line-strong); border-radius: 18px;
  background: linear-gradient(160deg, rgba(13, 37, 63, .95), rgba(5, 14, 27, .96));
  box-shadow: var(--shadow), inset 0 0 60px rgba(39, 200, 255, .04);
  overflow: hidden;
}
.login-card::before {
  content: ""; position: absolute; inset: -1px;
  background: linear-gradient(120deg, transparent 20%, rgba(39, 200, 255, .35), transparent 55%);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude; padding: 1px; border-radius: 18px;
  pointer-events: none;
}
.login-card h1 { margin: 14px 0 6px; font-size: 25px; letter-spacing: 2px; }
.login-card h1 span { color: var(--primary); }
.login-card p { margin: 0 0 16px; }
.login-art {
  display: block; width: 132px; height: 132px; object-fit: contain;
  margin: -6px auto 10px; border-radius: 18px;
  filter: drop-shadow(0 0 22px rgba(39, 200, 255, .28));
}
.totp-card { width: 390px; }
.totp-qr {
  display: block; width: 190px; height: 190px; margin: 14px auto;
  border-radius: 10px; background: #fff; padding: 8px;
}
.totp-secret {
  display: block; text-align: center; margin: 0 0 8px;
  color: var(--accent); font-size: 12px; word-break: break-all;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 900; letter-spacing: 5px; font-size: 17px; color: #dff6ff;
  text-shadow: 0 0 24px rgba(39, 200, 255, .45);
  position: relative; padding-right: 62px;
}
.brand-text {
  display: block; min-width: 0; flex: 1 1 auto; overflow: hidden;
  line-height: 1.15;
}
.sidebar .brand { padding-right: 0; }
.brand-logo { display: block; width: 190px; max-width: 100%; height: auto; flex: 0 1 auto; }
.login-card .brand-logo { width: 220px; }
.totp-card .brand-logo { width: 210px; }
.brand-lang {
  position: absolute; right: 0; top: 2px;
}
.brand span { color: var(--primary); }
.brand small {
  display: block; color: var(--muted); font-weight: 400; letter-spacing: 2px;
  font-size: 10px; margin-top: 2px; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
label {
  display: flex; flex-direction: column; gap: 6px; margin: 12px 0;
  color: #9bc0dd; font-size: 11px; letter-spacing: .7px; text-transform: uppercase;
}
input, select {
  width: 100%; height: var(--control-h); padding: 0 13px;
  border-radius: var(--control-radius);
  border: 1px solid rgba(96, 166, 214, .3);
  background: linear-gradient(180deg, rgba(8, 22, 39, .96), rgba(4, 12, 23, .96));
  color: var(--text); outline: none;
  font-size: 13.5px;
  line-height: calc(var(--control-h) - 2px);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 13.5px; }
textarea { font-size: 13.5px; }
textarea {
  width: 100%; padding: 11px 13px; border-radius: var(--control-radius);
  border: 1px solid rgba(96, 166, 214, .3);
  background: rgba(4, 12, 23, .96); color: var(--text); outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
input::placeholder, textarea::placeholder { color: rgba(130, 164, 196, .62); }
input:hover, select:hover, textarea:hover { border-color: rgba(96, 190, 240, .48); }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(39, 200, 255, .12), 0 0 22px rgba(39, 200, 255, .12);
  background: linear-gradient(180deg, rgba(9, 28, 49, .98), rgba(4, 13, 25, .98));
}
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px; height: 18px; padding: 0; margin: 2px 0;
  border: 1px solid rgba(120, 185, 225, .5);
  border-radius: 5px;
  background: rgba(5, 18, 32, .9);
  cursor: pointer;
  vertical-align: middle;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}
input[type="checkbox"]:hover {
  border-color: rgba(120, 225, 255, .8);
  box-shadow: 0 0 10px rgba(39, 200, 255, .18);
}
input[type="checkbox"]:checked {
  border-color: #8be9ff;
  background-color: #1b9bd1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.2 8.4l3.1 3.1 6.5-6.6' fill='none' stroke='%23f5fdff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  box-shadow: 0 0 0 3px rgba(39, 200, 255, .1), 0 0 14px rgba(39, 200, 255, .24);
}
input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(150, 238, 255, .8);
  outline-offset: 2px;
}
input[type="checkbox"]:disabled {
  opacity: .45;
  cursor: default;
}
input[type="radio"] {
  width: 17px; height: 17px; padding: 0; accent-color: var(--primary);
  cursor: pointer;
}
.check { flex-direction: row; align-items: center; gap: 8px; text-transform: none; }
.check input { width: 18px; height: 18px; flex: 0 0 auto; }
button.primary {
  position: relative;
  min-height: var(--control-h); padding: 0 22px;
  border: 1px solid rgba(120, 225, 255, .38);
  border-radius: var(--control-radius);
  color: #f2fbff;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .2px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), transparent 48%),
    linear-gradient(135deg, #2d7dff 0%, #159ee8 58%, #14c7ef 100%);
  box-shadow:
    0 8px 22px rgba(20, 125, 220, .3),
    inset 0 1px 0 rgba(255, 255, 255, .28);
  text-shadow: 0 1px 2px rgba(0, 24, 48, .35);
}
button.primary::after {
  content: "";
  position: absolute; inset: 1px;
  border-radius: calc(var(--control-radius) - 1px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 55%);
  pointer-events: none;
}
button.primary:hover {
  filter: brightness(1.08) saturate(1.06);
  transform: translateY(-1px);
  border-color: rgba(150, 238, 255, .62);
  box-shadow:
    0 12px 30px rgba(20, 145, 235, .42),
    0 0 0 3px rgba(39, 200, 255, .08),
    inset 0 1px 0 rgba(255, 255, 255, .32);
}
button.primary:active {
  transform: translateY(0);
  filter: brightness(.97);
  box-shadow: 0 4px 14px rgba(20, 125, 220, .3), inset 0 1px 3px rgba(0, 24, 48, .24);
}
button.primary:focus-visible {
  outline: 2px solid rgba(150, 238, 255, .8);
  outline-offset: 2px;
}
button.primary:disabled {
  opacity: .48; cursor: default; transform: none; filter: none;
  box-shadow: none; text-shadow: none;
}
button.ghost, button.link {
  padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(7, 20, 36, .7); color: var(--text);
}
button.ghost:hover {
  border-color: rgba(39, 200, 255, .55);
  color: var(--accent);
  background: rgba(39, 200, 255, .12);
  box-shadow: inset 0 0 0 1px rgba(39, 200, 255, .2), 0 0 18px rgba(39, 200, 255, .12);
}
button.link { border: 0; color: var(--primary); background: transparent; }
button.danger {
  padding: 4px 9px; border-radius: 8px; border: 1px solid rgba(255, 91, 110, .45);
  background: rgba(255, 91, 110, .1); color: #ff9aa7;
}
button.danger:hover { background: rgba(255, 91, 110, .2); box-shadow: 0 0 16px rgba(255, 91, 110, .16); }
button.small { padding: 3px 8px; font-size: 11px; margin-left: 5px; }
button.small:first-child { margin-left: 0; }
.icon-button {
  width: 36px; height: 36px; min-width: 36px; padding: 0 !important;
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-button svg {
  width: 18px; height: 18px; display: block;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.topbar-actions {
  min-height: 36px;
}
.topbar-actions > button,
.topbar-actions > .danger,
.topbar-actions > .ghost,
.topbar-actions > .icon-button,
.topbar-actions .topbar-lang,
.topbar-actions label.inline select {
  height: 36px; min-height: 36px; box-sizing: border-box;
  padding-top: 0; padding-bottom: 0;
}
.topbar-actions > button { padding-left: 12px; padding-right: 12px; }
.topbar-actions > .icon-button { width: 36px; padding-left: 0; padding-right: 0; }
.topbar-actions label.inline { height: 36px; }
.topbar-actions .topbar-lang { min-width: 86px; font-size: 12px; padding: 0 8px; }
.form-grid button {
  width: auto; justify-self: start; min-width: 0;
  height: var(--control-h); padding: 0 18px;
}
.topbar-actions button, .panel button { width: auto; }
.tag-on { color: var(--ok); text-shadow: 0 0 12px rgba(77, 255, 168, .35); }
.tag-off { color: #ff8792; }
.tag-warn { color: #ffd166; }
.nowrap { white-space: nowrap; }
.log-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; margin-bottom: 8px;
}
.segmented {
  display: inline-flex; padding: 3px; gap: 3px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(2, 8, 15, .75);
}
.segmented button {
  border: 0; background: transparent; color: var(--muted);
  padding: 6px 12px; border-radius: 7px; font-size: 12px;
}
.segmented button.active {
  color: #eaffff; background: rgba(39, 200, 255, .16);
  box-shadow: inset 0 0 0 1px rgba(39, 200, 255, .3);
}
.log-search { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; }
.log-search .ghost { white-space: nowrap; flex: none; min-width: 56px; }
.log-host-select { min-width: 150px; max-width: 220px; }
.log-export {
  display: flex; align-items: end; gap: 10px; flex-wrap: wrap;
  padding: 10px 0 4px; border-top: 1px solid var(--line); margin-top: 8px;
}
.log-export label { margin: 0; min-width: 140px; }
.log-export input { height: var(--control-h); }
.log-range { display: flex; align-items: center; gap: 7px; }
.log-range input { width: 145px; }
.range-dash { color: var(--muted); font-size: 16px; }
.log-export button.log-action {
  height: var(--control-h); min-width: 150px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.log-search input { width: 260px; }
.log-uri { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-message { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 12px 4px 4px;
  position: sticky; bottom: 0; z-index: 3;
  background: linear-gradient(180deg, transparent, rgba(5, 14, 26, .96) 30%);
}
.pagination .ghost { margin-left: 4px; }
.pagination .ghost:first-child { margin-left: 0; }
.about-hero {
  position: relative; display: flex; align-items: center; gap: 22px;
  padding: 24px; margin: 8px 0 18px; border: 1px solid var(--line);
  border-radius: 15px; overflow: hidden;
  background: linear-gradient(135deg, rgba(14, 42, 70, .75), rgba(4, 12, 23, .92));
}
.about-art {
  width: 220px; height: 120px; object-fit: cover; opacity: .75; flex: none;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
}
.about-hero h1 { margin: 8px 0 6px; font-size: 26px; letter-spacing: 1px; }
.about-version {
  font-size: 13px; color: var(--accent); border: 1px solid rgba(99, 255, 210, .35);
  border-radius: 20px; padding: 2px 9px; vertical-align: middle; margin-left: 6px;
}
.about-cards { margin-bottom: 18px; }
.copyright {
  padding: 10px 2px 18px; color: var(--muted); font-size: 11px; letter-spacing: .4px;
}
@media (max-width: 700px) {
  .about-hero { flex-direction: column; align-items: flex-start; }
  .about-art { width: 100%; }
}
svg.icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }
.sidebar nav button { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 30px; height: 30px; display: block; flex: 0 0 auto;
  color: var(--primary); vertical-align: middle; margin-right: 0;
  filter: drop-shadow(0 0 10px rgba(39, 200, 255, .45));
}
@media (max-width: 700px) {
  .log-search input { width: 100%; }
  .log-search { width: 100%; }
}
.code-cell { white-space: nowrap; }
.code-cell select {
  width: auto; display: inline-block; min-width: 112px; padding: 5px 8px;
}
.alert {
  padding: 11px 15px; border-radius: 10px; margin: 12px 0;
  border-left: 3px solid;
}
.alert.error { background: rgba(255, 70, 92, .1); border-color: var(--danger); color: #ffb8c0; }
.alert.ok { background: rgba(48, 255, 160, .08); border-color: var(--ok); color: #a6ffd0; }
.error-toast {
  position: fixed; top: 18px; right: 18px; z-index: 1000;
  display: flex; align-items: flex-start; gap: 10px;
  max-width: min(620px, 92vw); max-height: 40vh; overflow: auto;
  padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--danger); border-left-width: 4px;
  background: #2a0d14; color: #ffd5da;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  font-size: 12px; line-height: 1.55; white-space: pre-wrap;
  word-break: break-word; overflow-wrap: anywhere;
}
.error-toast b { flex: none; color: #ff8c9b; }
.error-toast span { flex: 1; min-width: 0; }
.info-toast {
  position: fixed; top: 18px; right: 18px; z-index: 1000;
  display: flex; flex-direction: column; gap: 4px;
  max-width: min(520px, 92vw); padding: 12px 16px;
  border: 1px solid var(--primary); border-left-width: 4px; border-radius: 10px;
  background: #0a2230; color: #d8f6ff; font-size: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.info-toast b { color: var(--accent); }
.location-modal { width: min(980px, 94vw); }
.locations-editor {
  width: 100%; min-height: 420px; margin: 12px 0; resize: vertical;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px;
  line-height: 1.55; white-space: pre;
}
.nginx-editor { min-height: 220px; }
.artifact-tools { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0; }
.artifact-filter { max-width: 360px; }
.vhost-toolbar { display: flex; align-items: center; gap: 10px; margin: 10px 0; flex-wrap: wrap; }
.vhost-toolbar input { max-width: 360px; }
.check-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
  margin: 10px 0 2px; padding: 10px 12px;
  border: 1px solid rgba(60, 130, 170, .18); border-radius: 9px;
  background: rgba(8, 25, 40, .35);
}
.check-row .check { margin: 0; text-transform: none; }
.form-actions { display: flex; gap: 9px; align-items: center; margin-top: 10px; }

.layout { position: relative; z-index: 2; display: flex; min-height: 100vh; }
.sidebar {
  width: 228px; padding: 24px 14px; backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(7, 18, 32, .94), rgba(3, 10, 19, .9));
  border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 24px;
}
.sidebar nav { display: flex; flex-direction: column; gap: 5px; }
.sidebar nav button {
  position: relative; text-align: left; padding: 11px 13px; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--muted);
  letter-spacing: .5px; transition: .18s;
}
.sidebar nav button:hover { background: rgba(39, 200, 255, .06); color: var(--text); }
.sidebar nav button.active {
  background: linear-gradient(90deg, rgba(39, 200, 255, .18), rgba(39, 200, 255, .03));
  border-color: rgba(39, 200, 255, .3); color: #eaffff;
  box-shadow: inset 3px 0 0 var(--primary);
}
.sidebar-footer {
  margin-top: auto; display: flex; justify-content: space-between;
  align-items: center; color: var(--muted); font-size: 11px;
}
.lang-select {
  width: auto; padding: 2px 4px; height: 24px; border-radius: 6px;
  font-size: 10px; background: #0b1822; color: var(--text); border-color: var(--line);
  color-scheme: dark;
}
select option { background: #0b1822; color: #dff6ff; }
.topbar-lang { height: 34px; min-width: 86px; padding: 4px 8px; font-size: 12px; }
.doc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.doc-list a {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 8px; text-decoration: none;
  color: var(--text); background: rgba(255,255,255,.02);
}
.doc-list a:hover { border-color: var(--primary); }
.doc-list a b { color: var(--primary); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.doc-list a span { color: var(--muted); font-size: 11px; }
.doc-downloads { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.doc-downloads a {
  display: flex; flex-direction: column; gap: 3px; min-width: 230px;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); background: rgba(255,255,255,.02); text-decoration: none;
}
.doc-downloads a:hover { border-color: var(--primary); }
.doc-downloads a b { color: var(--primary); font-size: 12px; }
.doc-downloads a span { color: var(--muted); font-size: 11px; }
.deploy-file-chip {
  display: inline-block; margin: 3px 6px 3px 0; padding: 2px 7px;
  border: 1px solid var(--line); border-radius: 6px; font-size: 11px;
}
.artifact-modal { width: min(900px, 94vw); max-height: 86vh; overflow: auto; }
.artifact-tree {
  max-height: 46vh; overflow: auto; margin: 12px 0;
  border: 1px solid var(--line); border-radius: 8px; padding: 8px;
  background: rgba(2, 8, 15, .55);
}
.artifact-row {
  display: flex; align-items: center; gap: 8px; line-height: 1.9;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px;
}
.artifact-row a { color: var(--primary); text-decoration: none; }
.artifact-row a:hover { text-decoration: underline; }
.artifact-class { color: var(--muted); font-size: 10px; }
.artifact-publish { margin-top: 12px; }
.invoke-result {
  max-height: 55vh; overflow: auto; white-space: pre-wrap;
  overflow-wrap: anywhere; word-break: break-word; max-width: 100%;
}
.invoke-media {
  display: flex; flex-direction: column; gap: 10px; margin: 10px 0;
  padding: 10px; border: 1px solid var(--line); border-radius: 10px;
  background: rgba(2, 8, 15, .6);
}
.invoke-media img {
  display: block; max-width: 100%; max-height: 55vh; width: auto;
  margin: 0 auto; border-radius: 8px; object-fit: contain;
}
.invoke-media audio { width: 100%; }
.invoke-media video { width: 100%; max-height: 55vh; border-radius: 8px; }
.doc-modal { width: min(980px, 94vw); max-height: 88vh; }
.markdown-body {
  overflow: auto; max-height: 68vh; padding: 6px 18px 24px;
  color: var(--text); font-size: 13px; line-height: 1.75;
}
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  color: #dff6ff; margin: 18px 0 8px; line-height: 1.3;
}
.markdown-body h1 { font-size: 24px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.markdown-body h2 { font-size: 19px; }
.markdown-body h3 { font-size: 15px; }
.markdown-body p { margin: 8px 0; }
.markdown-body ul, .markdown-body ol { padding-left: 22px; margin: 8px 0; }
.markdown-body code {
  background: rgba(39,200,255,.1); color: #9fe8ff; border-radius: 4px;
  padding: 1px 5px; font-family: ui-monospace, Consolas, monospace;
}
.markdown-body pre {
  background: #08131c; border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; overflow: auto;
}
.markdown-body pre code { background: transparent; padding: 0; }
.markdown-body blockquote {
  margin: 10px 0; padding: 6px 12px; border-left: 3px solid var(--primary);
  color: var(--muted); background: rgba(39,200,255,.04);
}
.markdown-body a { color: var(--primary); }
.markdown-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.markdown-body .md-table { width: 100%; border-collapse: collapse; margin: 10px 0; }
.markdown-body .md-table th, .markdown-body .md-table td {
  border: 1px solid var(--line); padding: 6px 9px; text-align: left;
}
.markdown-body .md-table th { background: rgba(39,200,255,.08); color: #dff6ff; }
.main { flex: 1; padding: 26px 32px 60px; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.topbar h1 {
  margin: 0; font-size: 23px; letter-spacing: 1.5px; font-weight: 700;
  text-shadow: 0 0 26px rgba(39, 200, 255, .25);
}
.topbar p { margin: 5px 0 0; font-size: 11px; letter-spacing: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
label.inline { flex-direction: row; align-items: center; gap: 7px; margin: 0; text-transform: none; }
label.inline select { width: auto; padding: 6px 9px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 14px; }
.sub-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.sub-tabs button {
  margin: 0; height: 34px; padding: 0 16px; background: transparent; color: var(--muted);
  border: 1px solid var(--line); border-radius: 8px;
}
.sub-tabs button.active { color: #fff; border-color: transparent; background: linear-gradient(135deg, #2d7dff, #14b8de); }
.overview-cards { margin-top: 14px; }
.summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid rgba(80, 140, 180, .12); }
.summary-row:last-child { border-bottom: 0; }
.section-bar { display: flex; align-items: center; gap: 10px; margin: 18px 0 8px; }
.section-bar h2 { margin: 0; }
.platform-panel { border-color: rgba(45, 125, 255, .32); }
.platform-panel .panel-head h2 { color: var(--primary); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 12px 0 18px; }
.detail-grid div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; }
.detail-grid span { color: var(--muted); }
.modal h3 { margin: 16px 0 8px; font-size: 14px; }
.plugin-preview {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 9px;
}
.plugin-preview h3 { margin: 0 0 4px; }
.plugin-preview p { margin: 0; }
.plugin-nav-link {
  display: flex; align-items: center; gap: 9px; padding: 9px 12px; margin-top: 4px;
  color: var(--muted); text-decoration: none; border-radius: 8px; font-size: 13px;
}
.plugin-nav-link:hover { color: var(--text); background: rgba(45, 125, 255, .08); }
.plugin-card { text-decoration: none; color: var(--text); }
.plugin-card:hover { border-color: var(--primary); }
.activity-cards { grid-template-columns: repeat(4, minmax(120px, 1fr)); margin-top: 14px; }
.resource-card { display: flex; align-items: center; gap: 14px; }
.resource-card b { font-size: 16px; }
.resource-card span { font-size: 10px; }
.ring {
  width: 62px; height: 62px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--primary) var(--p), rgba(39, 200, 255, .1) 0);
  display: grid; place-items: center; position: relative;
}
.ring::before {
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  background: #071426; border: 1px solid var(--line);
}
.ring span {
  position: relative; z-index: 1; font-size: 11px; color: #dffbff;
}
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-head h2 { margin: 0; }
.bar-row {
  display: grid; grid-template-columns: minmax(120px, 1fr) 2fr 48px;
  gap: 10px; align-items: center; margin: 9px 0;
}
.bar-row code {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bar-row b { text-align: right; font-size: 12px; color: var(--accent); }
.bar {
  height: 7px; border-radius: 8px; background: rgba(39, 200, 255, .08);
  overflow: hidden;
}
.bar i {
  display: block; height: 100%; border-radius: 8px;
  background: linear-gradient(90deg, var(--primary2), var(--primary), var(--accent));
  box-shadow: 0 0 14px rgba(39, 200, 255, .35);
  transition: width .45s ease;
}
.card {
  position: relative; padding: 19px; border: 1px solid var(--line); border-radius: 13px;
  background: linear-gradient(155deg, rgba(18, 45, 75, .72), rgba(6, 16, 30, .9));
  overflow: hidden;
  transition: filter .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card:hover {
  filter: brightness(1.22) saturate(1.08);
  border-color: rgba(39, 200, 255, .55);
  box-shadow: 0 0 0 1px rgba(39, 200, 255, .12), 0 10px 32px rgba(0, 0, 0, .28);
}
.card::before {
  content: ""; position: absolute; inset: 0 auto auto 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: .55;
}
.card b {
  display: block; font-size: 30px; letter-spacing: 1px; color: #eaffff;
  text-shadow: 0 0 26px rgba(39, 200, 255, .35);
}
.card span { color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.panel {
  position: relative; padding: 19px; border: 1px solid var(--line); border-radius: 13px;
  background: linear-gradient(160deg, rgba(12, 29, 50, .82), rgba(5, 14, 26, .9));
  margin: 16px 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.panel h2 { margin: 0 0 11px; font-size: 15px; letter-spacing: 1px; color: #dff6ff; }
.panel-inline { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.panel-inline pre { max-height: 220px; }
.progress {
  position: relative; margin-top: 12px; height: 26px; border-radius: 8px;
  background: rgba(3, 10, 19, .9); border: 1px solid var(--line); overflow: hidden;
}
.progress-bar {
  height: 100%; background: linear-gradient(90deg, var(--primary2), var(--primary), var(--accent));
  box-shadow: 0 0 22px rgba(39, 200, 255, .5); transition: width .15s ease;
}
.progress span {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 11px; letter-spacing: .6px; color: #eaffff;
  text-shadow: 0 1px 3px #000;
}
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start;
  justify-content: center; padding: 6vh 16px 24px; overflow: auto;
  background: rgba(1, 5, 11, .78); backdrop-filter: blur(6px);
}
.modal {
  position: relative; width: min(900px, 100%); padding: 21px;
  border: 1px solid var(--line-strong); border-radius: 14px;
  background: linear-gradient(160deg, rgba(13, 34, 57, .98), rgba(4, 12, 23, .99));
  box-shadow: var(--shadow), 0 0 80px rgba(39, 200, 255, .12);
}
.modal::before {
  content: ""; position: absolute; left: 20px; right: 20px; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head h2 { margin: 0; font-size: 18px; letter-spacing: 1px; }
.modal-subtitle { margin-top: 24px !important; }
button.icon {
  background: transparent; border: 0; color: var(--muted); font-size: 26px;
  line-height: 1; padding: 0 6px; cursor: pointer;
}
button.icon:hover { color: var(--accent); }
.confirm-backdrop { align-items: center; padding-top: 24px; }
.confirm-modal { width: min(520px, 100%); }
.confirm-message { white-space: pre-line; color: #b9d6eb; margin: 18px 0 22px; }
.stats-button { min-width: 70px; font-variant-numeric: tabular-nums; }
.alias-row { display: flex; align-items: center; gap: 8px; }
.alias-row input { flex: 1; }
.alias-row button { flex: none; }
.java-modal { width: min(1000px, 100%); }
.java-source {
  width: 100%; min-height: 52vh; resize: vertical;
  background: #040c17; color: #c9ecff; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px;
  font-family: "Cascadia Code", Consolas, monospace; font-size: 12.5px;
  line-height: 1.55; tab-size: 4;
}
.code-editor {
  display: flex; align-items: stretch; overflow: hidden;
  border: 1px solid var(--line); border-radius: 10px; background: #040c17;
}
.code-editor .java-source {
  flex: 1; min-width: 0; border: 0; border-radius: 0; min-height: 52vh;
}
.code-lines {
  flex: 0 0 46px; width: 46px; margin: 0; padding: 12px 8px 12px 0;
  overflow: hidden; text-align: right; user-select: none;
  color: #5f8aa5; background: rgba(3, 10, 18, .96);
  border-right: 1px solid var(--line);
  font-family: "Cascadia Code", Consolas, monospace; font-size: 12.5px;
  line-height: 1.55; white-space: pre; tab-size: 4;
}
.code-line { position: relative; cursor: pointer; line-height: 1.55; }
.code-line.breakpoint { color: #ff7b72; }
.code-line.breakpoint::before {
  content: ""; position: absolute; left: 4px; top: 50%; width: 7px; height: 7px;
  margin-top: -3.5px; border-radius: 50%; background: #ff7b72;
}
.code-line.hit { background: rgba(255, 210, 80, .28); color: #ffd166; }
html[data-theme="light"] .code-editor { background: #0b1927; }
html[data-theme="light"] .code-lines { color: #79a8c7; }
.java-file-layout { display: flex; gap: 12px; align-items: stretch; margin-top: 10px; }
.java-modal {
  position: fixed; inset: 0; width: 100vw; height: 100vh; max-height: none; display: flex; flex-direction: column;
  padding: 0; overflow: hidden; background: #0b1118; border-radius: 0; border: 0;
}
.java-editor-tabs {
  display: flex; gap: 2px; overflow-x: auto; padding: 0 0 6px;
  border-bottom: 1px solid var(--line); margin-bottom: 6px;
}
.java-editor-tab {
  display: flex; align-items: center; gap: 5px; max-width: 220px;
  border: 1px solid transparent; border-bottom: 2px solid transparent; border-radius: 6px 6px 0 0;
  background: transparent; color: var(--muted); padding: 6px 9px; font-size: 12px;
  white-space: nowrap;
}
.java-editor-tab.active { color: #dff6ff; background: rgba(39, 200, 255, .1); border-bottom-color: var(--accent); }
.java-editor-tab.hit { color: #ffd166; }
.jd-tab-dot { color: #ff7b72; font-size: 9px; }
.jd-tab-close { margin-left: 4px; color: var(--muted); font-size: 14px; line-height: 1; }
.jd-tab-close:hover { color: #ff7b72; }
html[data-theme="light"] .java-editor-tab.active { color: #123044; }
html[data-theme="light"] .ide-sidebar,
html[data-theme="light"] .ide-right { background: #f3f9ff; }
html[data-theme="light"] .ide-sidebar { border-color: var(--line); }
html[data-theme="light"] .ide-right { border-color: var(--line); }
html[data-theme="light"] .java-file-tree-head { color: #33556b; }
.java-modal .modal-head { padding: 12px 16px; margin: 0; border-bottom: 1px solid var(--line); }
.java-modal .form-grid { padding: 12px 16px 0; }
.ide-tabs {
  display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line);
  background: rgba(3, 9, 16, .92);
}
.ide-workbench { display: flex; flex: 1; min-height: 0; }
.ide-sidebar {
  flex: 0 0 auto; min-width: 0; overflow: auto; padding: 10px;
  border-right: 1px solid var(--line); background: rgba(3, 9, 16, .92);
}
.ide-center {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
  padding: 10px 12px; overflow: auto;
}
.ide-right {
  flex: 0 0 auto; min-width: 0; display: flex; flex-direction: column;
  border-left: 1px solid var(--line); overflow: auto;
  background: rgba(3, 9, 16, .78);
}
.ide-resizer { flex: 0 0 5px; cursor: col-resize; background: transparent; }
.ide-resizer:hover { background: var(--accent); opacity: .45; }
.studio-short { color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; margin-left: 8px; }
.debug-icon {
  width: 30px; height: 30px; min-width: 30px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.debug-icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ide-right .ide-tabs { padding: 0 8px; }
.ide-props { padding: 12px; }
.ide-props label { margin-top: 0; }
.ide-center .code-editor { flex: 1; min-height: 360px; }
.ide-center .java-source { min-height: 360px; }
.prompt-layer { z-index: 200; }
.card span small { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); letter-spacing: 0; }
.dev-token-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; margin-top: 8px;
}
.dev-token-row > input { flex: 1 1 auto; min-width: 0; }
.dev-token-row > button { flex: 0 0 auto; white-space: nowrap; }
.dev-token-eye { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; }
.dev-token-eye .icon { width: 16px; height: 16px; }
.vhost-log {
  margin-top: 12px; padding: 12px; max-height: 60vh; overflow: auto;
  border: 1px solid var(--line); border-radius: 8px; background: #06101a;
  color: #c9e7ff; font: 12px/1.55 Consolas, "Courier New", monospace; white-space: pre-wrap;
}
html[data-theme="light"] .dev-token-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; margin-top: 8px;
}
.dev-token-row > input { flex: 1 1 auto; min-width: 0; }
.dev-token-row > button { flex: 0 0 auto; white-space: nowrap; }
.dev-token-eye { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; }
.dev-token-eye .icon { width: 16px; height: 16px; }
.vhost-log { background: #f4f9fd; color: #17324a; }
.compat-report {
  margin-top: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; background: rgba(3, 10, 18, .45);
}
.compat-report-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.compat-report p { margin: 6px 0 0; font-size: 13px; }
.compat-ident { color: var(--text); }
.compat-ident code { color: var(--accent); }
.compat-warning { color: var(--warning, #e6a23c); }
html[data-theme="light"] .compat-report { background: #eef6fc; }
.jdk-browser-modal { width: min(720px, 94vw); }
.jdk-pathbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; margin: 8px 0; border: 1px solid var(--line); border-radius: 8px;
  background: rgba(3, 10, 18, .6);
}
.jdk-pathbar code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jdk-browser-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.jdk-dir-list { max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px; }
.jdk-dir-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px;
  border: 0; border-radius: 6px; background: transparent; color: var(--text);
  text-align: left; font-size: 13px;
}
.jdk-dir-item:hover { background: rgba(39, 200, 255, .1); }
.jdk-dir-icon { color: var(--accent); }
html[data-theme="light"] .jdk-pathbar { background: #eef6fc; }
.prompt-modal { width: min(460px, 92vw); }
.prompt-input { margin: 12px 0; }
.ide-tab {
  border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: transparent; color: var(--muted); padding: 9px 14px; font-size: 12px;
}
.ide-tab.active { color: #dff6ff; border-bottom-color: var(--accent); background: rgba(39, 200, 255, .06); }
.tab-dot { display: inline-block; width: 7px; height: 7px; margin-left: 5px; border-radius: 50%; background: #3fb950; }
.java-file-layout { min-height: 52vh; max-height: 62vh; padding: 10px 16px; margin-top: 0; }
.java-file-tree { background: rgba(3, 9, 16, .92); }
.java-file-main { display: flex; flex-direction: column; }
.java-file-main .code-editor { flex: 1; min-height: 0; }
.java-file-main .java-source { height: 100%; min-height: 0; }
.java-modal .debug-panel, .java-modal .java-history { margin: 10px 16px; }
.java-modal .java-actions { padding: 0 16px; margin: 6px 0; }
.java-modal > .alert { margin: 8px 16px; }
html[data-theme="light"] .java-modal { background: #f7fbff; }
html[data-theme="light"] .ide-tabs { background: #eef6fc; }
html[data-theme="light"] .ide-tab.active { color: #123044; }
.java-file-tree {
  flex: 0 0 220px; max-height: 60vh; overflow: auto; padding: 8px;
  border: 1px solid var(--line); border-radius: 10px; background: rgba(3, 12, 22, .6);
}
.java-file-tree-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.java-file-item {
  display: block; width: 100%; margin: 2px 0; padding: 6px 8px; text-align: left;
  border: 0; border-radius: 6px; background: transparent; color: var(--text);
  font-family: "Cascadia Code", Consolas, monospace; font-size: 11.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.java-file-item:hover { background: rgba(39, 200, 255, .08); }
.java-file-item.active { background: rgba(39, 200, 255, .16); color: var(--accent); }
.java-file-main { flex: 1; min-width: 0; }
.java-file-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12px; }
.java-file-title code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.debug-panel {
  margin-top: 12px; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; background: rgba(4, 14, 24, .72);
}
.debug-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.debug-actions { display: flex; flex-wrap: nowrap; gap: 6px; margin-bottom: 8px; overflow-x: auto; align-items: center; }
.debug-vars { margin: 8px 0; font-size: 12px; }
.debug-vars th, .debug-vars td { padding: 6px 8px; }
.debug-eval { display: flex; gap: 8px; margin: 8px 0; }
.debug-eval input { flex: 1; }
.debug-breakpoints { margin: 6px 0; }
.debug-breakpoint-row { display: flex; align-items: center; gap: 8px; font-size: 12px; margin: 3px 0; }
.debug-breakpoint-row code { color: #ffd166; overflow: hidden; text-overflow: ellipsis; }
.debug-log { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-on { color: #7ee787; }
html[data-theme="light"] .debug-panel { background: rgba(239, 247, 255, .8); }
@media (max-width: 760px) {
  .java-file-layout { flex-direction: column; }
  .java-file-tree { flex-basis: auto; max-height: 180px; }
}
.java-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 12px; }
.java-error { white-space: pre-wrap; max-height: 240px; overflow: auto; }
.java-history { margin-top: 12px; max-height: 170px; overflow: auto; }
.java-history h3 { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.java-history-row {
  display: flex; align-items: center; gap: 8px; justify-content: space-between;
  padding: 5px 0; border-top: 1px solid var(--line); font-size: 12px;
}
.java-history-row span { flex: 1; color: var(--muted); }
.file-search { display: flex; gap: 5px; margin-bottom: 8px; }
.file-search input { flex: 1; min-width: 80px; }
.file-search select { width: 88px; padding: 0 8px; height: var(--control-h); }
.file-search button { height: var(--control-h); }
.file-actions { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; align-items: center; }
.file-actions input { min-width: 90px; flex: 1; height: var(--control-h); padding: 0 9px; font-size: 12px; }
.file-upload-label {
  position: relative; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 8px; font-size: 11px; color: var(--text);
}
.file-upload-label:hover { border-color: var(--accent); color: var(--accent); }
.file-upload-label input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-edit-actions { display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.file-edit-actions input { flex: 1; min-width: 130px; height: var(--control-h); padding: 0 9px; }
.file-search-results { max-height: 56vh; overflow: auto; }
.file-search-result small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.file-tree { max-height: 58vh; overflow: auto; }
.file-tree-row { line-height: 1.8; }
.file-dir, .file-node {
  border: 0; background: transparent; color: var(--text);
  padding: 2px 4px; border-radius: 5px; font-size: 12px; text-align: left;
}
.file-dir { color: #8fe4ff; }
.file-node:hover, .file-dir:hover { background: rgba(39,200,255,.1); }
.file-node.active { background: rgba(39,200,255,.16); color: var(--accent); }
.file-node.disabled { color: var(--muted); cursor: default; }
.file-find { display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.file-find input { width: 130px; height: var(--control-h); padding: 0 9px; }
.file-find button { padding: 3px 7px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 10px; }
.invoke-modal { width: min(1080px, 100%); }
.invoke-tabs { display: inline-flex; gap: 3px; flex-wrap: wrap; margin: 10px 0 14px; }
.invoke-tabs button { padding: 7px 12px; }
.invoke-tabs button:hover { color: #eaffff; background: rgba(39, 200, 255, .1); }
.invoke-tabs button.active { border-color: var(--accent); color: var(--accent); background: rgba(39,200,255,.16); box-shadow: inset 0 0 0 1px rgba(39,200,255,.3); }
.invoke-token { display: flex; align-items: end; gap: 10px; margin-bottom: 10px; }
.invoke-token label { flex: 1; margin: 0; }
.invoke-token input { height: var(--control-h); }
.invoke-code .invoke-result { max-height: 60vh; overflow: auto; }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.code-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.code-highlight { line-height: 1.55; }
.code-highlight code { font-family: "Cascadia Code", Consolas, monospace; }
.code-key { color: #67d7ff; }
.code-string { color: #9ee493; }
.code-comment { color: #6b879c; font-style: italic; }
.code-annotation { color: #ffd479; }
.code-number { color: #ffa86b; }
.invoke-layout { display: grid; grid-template-columns: minmax(260px, .9fr) 1.1fr; gap: 16px; }
.invoke-symbols { max-height: 58vh; overflow: auto; border-right: 1px solid var(--line); padding-right: 8px; }
.symbol-item {
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent;
}
.symbol-item:hover { background: rgba(39, 200, 255, .06); }
.symbol-item.active { background: rgba(39, 200, 255, .12); border-color: rgba(39, 200, 255, .3); }
.symbol-item.disabled { opacity: .45; cursor: default; }
.symbol-item code { display: block; font-size: 11.5px; word-break: break-all; }
.symbol-item small { color: var(--muted); font-size: 11px; }
.invoke-editor textarea {
  width: 100%; min-height: 280px; resize: vertical;
  font-family: "Cascadia Code", Consolas, monospace; font-size: 12px;
  background: #040c17; color: #c9ecff; border: 1px solid var(--line);
  border-radius: 9px; padding: 10px;
}
.invoke-result { max-height: 55vh; overflow: auto; }
@media (max-width: 800px) { .invoke-layout { grid-template-columns: 1fr; } .invoke-symbols { border-right: 0; } }
.form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 9px 16px; align-items: end;
}
.form-grid label { margin: 0; }
.form-grid input, .form-grid select, .form-grid button { height: var(--control-h); }
.form-grid label.inline { height: auto; align-self: center; min-height: var(--control-h); }
.form-grid label.inline input[type="checkbox"] { width: 18px; height: 18px; min-height: 18px; margin: 0; flex: 0 0 18px; }
.form-grid .check { height: var(--control-h); }
.form-grid button { height: var(--control-h); }
table { width: 100%; border-collapse: collapse; margin: 12px 0 24px; font-size: 13px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th {
  color: #79a8c7; font-weight: 500; font-size: 12px;
  letter-spacing: 1px; text-transform: uppercase; white-space: nowrap;
}
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--accent); }
tbody tr { transition: background .15s; }
tbody tr:hover { background: rgba(39, 200, 255, .045); }
td code { color: #8bdcff; }
pre {
  max-height: 520px; overflow: auto; padding: 15px; border-radius: 10px;
  background: rgba(2, 8, 15, .9); border: 1px solid var(--line); color: #bce7ff;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #173a57; border-radius: 8px; }
::-webkit-scrollbar-track { background: #030a13; }
@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: auto; flex-direction: row; overflow-x: auto; gap: 12px; }
  .sidebar .brand { display: none; }
  .sidebar-footer { margin-left: auto; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .main { padding: 20px 16px 40px; }
}

/* ===== Light theme ===== */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f6fa;
  --bg2: #e7eef6;
  --panel: #ffffff;
  --panel2: #f7fafc;
  --line: rgba(35, 85, 120, .16);
  --line-strong: rgba(15, 120, 175, .38);
  --text: #102a3c;
  --muted: #425a6e;
  --primary: #087fb8;
  --primary2: #0b62b5;
  --accent: #087f68;
  --danger: #c93d4e;
  --ok: #0b7f54;
  --shadow: 0 18px 46px rgba(25, 55, 85, .12);
}
html[data-theme="light"] body {
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(70, 155, 220, .12), transparent 60%),
    radial-gradient(900px 620px at 100% 0%, rgba(50, 200, 170, .08), transparent 55%),
    linear-gradient(160deg, #f7fafc 0%, #eef4f9 55%, #f5f8fb 100%);
  color: var(--text);
}
html[data-theme="light"] body::before {
  background-image:
    linear-gradient(rgba(40, 110, 160, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 110, 160, .045) 1px, transparent 1px);
}
html[data-theme="light"] body::after {
  background: radial-gradient(circle at 50% 120%, rgba(20, 150, 190, .06), transparent 50%);
}
html[data-theme="light"] .brand,
html[data-theme="light"] .topbar h1,
html[data-theme="light"] .panel h2,
html[data-theme="light"] .modal-head h2,
html[data-theme="light"] .card b {
  color: var(--text);
  text-shadow: none;
}
html[data-theme="light"] .brand span,
html[data-theme="light"] .login-card h1 span {
  color: var(--primary);
}
html[data-theme="light"] .sidebar {
  background: rgba(255, 255, 255, .94);
  border-right-color: var(--line);
}
html[data-theme="light"] .sidebar nav button {
  color: #45647d;
}
html[data-theme="light"] .sidebar nav button:hover {
  background: rgba(8, 127, 184, .07);
  color: var(--text);
}
html[data-theme="light"] .sidebar nav button.active {
  background: linear-gradient(90deg, rgba(8, 127, 184, .14), rgba(8, 127, 184, .02));
  border-color: rgba(8, 127, 184, .3);
  color: #0c3854;
}
html[data-theme="light"] .topbar {
  border-bottom-color: var(--line);
}
html[data-theme="light"] .login-card,
html[data-theme="light"] .about-hero,
html[data-theme="light"] .panel,
html[data-theme="light"] .card,
html[data-theme="light"] .modal {
  background: #ffffff;
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(25, 55, 85, .08), inset 0 1px 0 rgba(255, 255, 255, .8);
}
html[data-theme="light"] .card:hover {
  filter: brightness(1.01);
  border-color: rgba(8, 127, 184, .45);
  box-shadow: 0 12px 34px rgba(25, 55, 85, .14);
}
html[data-theme="light"] .card::before,
html[data-theme="light"] .modal::before {
  opacity: .35;
}
html[data-theme="light"] input,
html[data-theme="light"] select,
html[data-theme="light"] textarea {
  background: #ffffff;
  color: var(--text);
  border-color: rgba(60, 105, 140, .28);
}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
  color: #8a9dae;
}
html[data-theme="light"] input:focus,
html[data-theme="light"] select:focus,
html[data-theme="light"] textarea:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(8, 127, 184, .12), 0 0 16px rgba(8, 127, 184, .08);
}
html[data-theme="light"] input[type="checkbox"] {
  background-color: #ffffff;
  border-color: rgba(60, 105, 140, .4);
}
html[data-theme="light"] input[type="checkbox"]:checked {
  background-color: #0b8fbe;
  border-color: #087fb8;
}
html[data-theme="light"] select option {
  background: #ffffff;
  color: var(--text);
}
html[data-theme="light"] .check-row {
  background: #f5f9fc;
  border-color: rgba(60, 120, 160, .16);
}
html[data-theme="light"] .segmented,
html[data-theme="light"] .progress {
  background: #eef4f9;
  border-color: var(--line);
}
html[data-theme="light"] button.ghost {
  background: #ffffff;
  border-color: rgba(60, 105, 140, .28);
  color: #274b64;
}
html[data-theme="light"] button.ghost:hover {
  background: rgba(8, 127, 184, .08);
  color: var(--primary);
}
html[data-theme="light"] button.ghost:disabled {
  background: #f2f6fa;
  color: #9aafc0;
  border-color: #d9e4ee;
  opacity: 1;
}
html[data-theme="light"] .pagination,
html[data-theme="light"] .vhost-toolbar {
  color: #36546a;
  background: #ffffff;
  border-color: var(--line);
}
html[data-theme="light"] .pagination {
  box-shadow: 0 -8px 18px rgba(25, 55, 85, .04);
}
html[data-theme="light"] button.danger {
  background: #fff5f6;
  color: #b52d3f;
}
html[data-theme="light"] button.icon {
  color: #647d91;
}
html[data-theme="light"] .modal-backdrop {
  background: rgba(35, 55, 75, .32);
}
html[data-theme="light"] .error-toast {
  background: #fff3f4;
  color: #8e2635;
}
html[data-theme="light"] .info-toast {
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 10px 28px rgba(25, 55, 85, .13);
}
html[data-theme="light"] .alert.error {
  background: #fff2f4;
  color: #a52a3b;
}
html[data-theme="light"] .alert.ok {
  background: #edfbf5;
  color: #0a6e4a;
}
html[data-theme="light"] .ring::before {
  background: #ffffff;
}
html[data-theme="light"] .ring span {
  color: var(--text);
}
html[data-theme="light"] .bar {
  background: rgba(8, 127, 184, .1);
}
html[data-theme="light"] .doc-list a,
html[data-theme="light"] .doc-downloads a {
  background: #ffffff;
  color: var(--text);
}
html[data-theme="light"] th {
  color: #52728a;
}
html[data-theme="light"] td code {
  color: #08749f;
}
html[data-theme="light"] tbody tr:hover {
  background: rgba(8, 127, 184, .045);
}
html[data-theme="light"] pre {
  background: #f5f8fb;
  color: #1e425a;
  border-color: var(--line);
}
html[data-theme="light"] code {
  color: #145b78;
}
html[data-theme="light"] .copyright,
html[data-theme="light"] .muted {
  color: var(--muted);
}
html[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #b7c9d8;
}
html[data-theme="light"] ::-webkit-scrollbar-track {
  background: #eef3f8;
}

@media print {
  .sidebar, .topbar-actions, .log-toolbar, .pagination, .modal-backdrop { display: none !important; }
  .main { padding: 0; }
  body { background: #fff !important; color: #111 !important; }
  .panel, .card, .modal { box-shadow: none !important; border-color: #ccc !important; background: #fff !important; }
  a { color: #111 !important; }
}

/* Light theme text contrast refinements */
html[data-theme="light"] label {
  color: #36546a;
}
html[data-theme="light"] a {
  color: #086b9b;
  text-shadow: none;
}
html[data-theme="light"] a:hover {
  color: #064f75;
  text-shadow: none;
}
html[data-theme="light"] .sidebar nav button {
  color: #2d4c63;
}
html[data-theme="light"] .sidebar-footer,
html[data-theme="light"] .copyright,
html[data-theme="light"] .topbar p {
  color: #425a6e;
}
html[data-theme="light"] th {
  color: #3b586e;
}
html[data-theme="light"] td code,
html[data-theme="light"] .bar-row code {
  color: #0b5878;
}
html[data-theme="light"] .error-toast b {
  color: #a32838;
}
html[data-theme="light"] .tag-on { color: #08754d; text-shadow: none; }
html[data-theme="light"] .tag-off { color: #b82e42; }
html[data-theme="light"] .tag-warn { color: #8a5b00; }
html[data-theme="light"] .muted,
html[data-theme="light"] .card span,
html[data-theme="light"] .resource-card span,
html[data-theme="light"] .doc-list a span,
html[data-theme="light"] .login-card p,
html[data-theme="light"] .modal p,
html[data-theme="light"] .panel p {
  color: #425a6e;
}
html[data-theme="light"] code {
  color: #145b78;
}
html[data-theme="light"] .markdown-body {
  color: #17364a;
}
html[data-theme="light"] .markdown-body h1,
html[data-theme="light"] .markdown-body h2,
html[data-theme="light"] .markdown-body h3,
html[data-theme="light"] .markdown-body h4 {
  color: #102a3c;
}
html[data-theme="light"] .markdown-body code {
  background: #eef4f8;
  color: #144d67;
}
html[data-theme="light"] .markdown-body blockquote {
  color: #36546a;
  border-left-color: #9cb9cc;
}
html[data-theme="light"] .markdown-body table th {
  color: #2d4c63;
}
html[data-theme="light"] .file-tree,
html[data-theme="light"] .artifact-tree {
  color: var(--text);
}
html[data-theme="light"] .file-search input,
html[data-theme="light"] .file-find input,
html[data-theme="light"] .artifact-filter {
  color: var(--text);
}
