:root {
  color-scheme: light;
  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-soft: #f6f7f9;
  --surface-hover: #f0f2f5;
  --line: #dde2e8;
  --line-strong: #c9d0d9;
  --text: #17202a;
  --muted: #697586;
  --faint: #8f9aa8;
  --accent: #e45c2f;
  --accent-strong: #c7451d;
  --accent-soft: #fff0ea;
  --blue: #3c6fdd;
  --blue-soft: #eaf0ff;
  --green: #21845a;
  --green-soft: #e7f6ef;
  --purple: #7756c9;
  --purple-soft: #f0ebff;
  --shadow: 0 20px 50px rgba(26, 36, 48, 0.08);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111418;
  --surface: #191d22;
  --surface-soft: #20252b;
  --surface-hover: #282e35;
  --line: #2e353d;
  --line-strong: #404955;
  --text: #eef2f6;
  --muted: #9ba6b3;
  --faint: #74808d;
  --accent: #f0784d;
  --accent-strong: #ff8b61;
  --accent-soft: #3b251e;
  --blue: #7da2f4;
  --blue-soft: #202d4d;
  --green: #69c69c;
  --green-soft: #18382c;
  --purple: #ae94ee;
  --purple-soft: #2f2845;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 0%, rgba(228, 92, 47, 0.05), transparent 26rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.app-shell {
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  height: 100vh;
  min-width: 980px;
}

.topbar {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 260px minmax(320px, 620px) 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--text);
  color: var(--surface);
}

.brand-mark svg {
  width: 25px;
  stroke-width: 2.2;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.global-search {
  display: flex;
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  transition: border-color 150ms, box-shadow 150ms, background 150ms;
}

.global-search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent);
}

.global-search svg {
  width: 19px;
  color: var(--muted);
}

.global-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.global-search input::placeholder {
  color: var(--faint);
}

kbd {
  min-width: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font: 11px var(--mono);
  text-align: center;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.privacy-dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #43a878;
  box-shadow: 0 0 0 3px var(--green-soft);
}

.icon-button,
.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  cursor: pointer;
}

.icon-button {
  width: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.icon-button:hover {
  background: var(--surface-hover);
}

.icon-button svg {
  width: 19px;
}

.primary-button {
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--accent-strong);
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 22%, transparent);
  font-weight: 650;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.primary-button svg {
  width: 18px;
  stroke-width: 2;
}

.workspace {
  display: grid;
  grid-template-columns: 258px minmax(390px, 1fr) 420px;
  min-height: 0;
  margin: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.sidebar,
.browser-panel,
.details-panel {
  min-width: 0;
  min-height: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  padding: 18px 12px 14px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.sidebar-heading,
.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quiet-button,
.text-button {
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.quiet-button:hover,
.text-button:hover {
  color: var(--accent);
}

.quiet-button:disabled {
  cursor: default;
  opacity: 0.4;
}

.text-button:disabled {
  cursor: default;
  opacity: 0.4;
}

.quiet-button:disabled:hover {
  color: var(--muted);
}

.section-label .quiet-button {
  margin-left: 6px;
  padding: 0;
  text-transform: none;
}

.section-label b {
  font-weight: 700;
}

.nav-row,
.module-row {
  display: grid;
  width: 100%;
  align-items: center;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.nav-row {
  grid-template-columns: 28px 1fr auto;
  height: 42px;
  margin: 9px 0 22px;
  padding: 0 10px;
  border-radius: 9px;
  background: transparent;
}

.nav-row:hover,
.nav-row.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(20, 30, 40, 0.08);
}

.nav-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-icon svg {
  width: 15px;
}

.count-badge {
  min-width: 25px;
  padding: 2px 7px;
  border-radius: 20px;
  background: var(--surface-hover);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.module-list {
  margin: 8px 0 12px;
  overflow: auto;
}

.user-module-list {
  min-height: 30px;
  max-height: 190px;
  flex: 0 0 auto;
}

.user-module-list.has-modules {
  min-height: 48px;
}

.user-module-empty {
  margin: 8px 9px 4px;
  color: var(--faint);
  font-size: 11px;
}

.user-module-row {
  position: relative;
}

.user-module-row .module-row {
  padding-right: 36px;
}

.module-remove {
  position: absolute;
  top: 11px;
  right: 7px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  opacity: 0.55;
}

.user-module-row:hover .module-remove,
.module-remove:focus-visible {
  opacity: 1;
}

.module-remove:hover {
  background: color-mix(in srgb, #d65042 12%, transparent);
  color: #d65042;
}

.module-remove svg {
  width: 14px;
}

.server-module-list {
  min-height: 90px;
  flex: 1 1 auto;
  margin-bottom: 4px;
}

.server-module-row {
  position: relative;
}

.server-module-row .module-row {
  padding-right: 38px;
}

.module-download {
  position: absolute;
  top: 11px;
  right: 7px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 6px;
  color: var(--faint);
  opacity: 0;
  transition: 150ms;
}

.server-module-row:hover .module-download,
.module-download:focus-visible {
  opacity: 1;
}

.module-download:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.module-download svg {
  width: 14px;
}

@media (hover: none) {
  .module-download {
    opacity: 1;
  }
}

.module-row {
  grid-template-columns: 31px minmax(0, 1fr) auto;
  gap: 2px;
  min-height: 48px;
  padding: 6px 9px;
  border-radius: 9px;
  background: transparent;
}

.module-row.loading {
  cursor: wait;
  opacity: 0.62;
}

.module-row .loaded-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.module-row:hover,
.module-row.active {
  background: var(--surface);
  color: var(--text);
}

.module-glyph {
  display: grid;
  width: 24px;
  height: 28px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--blue) 26%, transparent);
  border-radius: 6px;
  background: var(--blue-soft);
  color: var(--blue);
  font: 700 9px var(--mono);
}

.module-glyph.provided {
  border-color: color-mix(in srgb, var(--green) 28%, transparent);
  background: var(--green-soft);
  color: var(--green);
}

.module-name {
  overflow: hidden;
  font: 12px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-object-count {
  color: var(--faint);
  font-size: 10px;
}

.drop-card {
  display: grid;
  place-items: center;
  gap: 5px;
  min-height: 86px;
  padding: 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: 150ms;
}

.drop-card:hover,
.drop-card.drag-over {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.drop-card svg {
  width: 25px;
}

.drop-card strong {
  color: var(--text);
  font-size: 12px;
}

.drop-card span {
  font-size: 11px;
}

.provided-label {
  margin-top: 18px;
}

.catalog-search {
  display: flex;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  margin: 8px 3px 0;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.catalog-search svg {
  width: 15px;
  color: var(--faint);
}

.catalog-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

.catalog-search input::placeholder {
  color: var(--faint);
}

.sidebar-footer {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 13px;
  padding: 0 8px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.4;
}

.sidebar-footer svg {
  width: 18px;
  flex: 0 0 auto;
  color: var(--green);
}

.sidebar-footer strong {
  display: block;
  color: var(--muted);
}

.sidebar-footer a {
  color: var(--muted);
  text-underline-offset: 2px;
}

.sidebar-footer a:hover {
  color: var(--accent);
}

.browser-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.panel-heading {
  display: flex;
  min-height: 91px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.view-controls {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.segmented {
  display: flex;
  height: 30px;
  align-items: center;
  gap: 5px;
  padding: 0 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.segmented svg {
  width: 15px;
}

.segmented.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(20, 30, 40, 0.1);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  min-height: 61px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.summary-strip div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 18px;
  border-right: 1px solid var(--line);
}

.summary-strip div:last-child {
  border-right: 0;
}

.summary-strip strong {
  font: 600 16px var(--mono);
}

.summary-strip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
}

.tree-toolbar {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}

.filter-chips {
  display: flex;
  gap: 5px;
}

.chip {
  height: 27px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 20px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.chip:hover {
  background: var(--surface-hover);
}

.chip.active {
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}

.object-browser {
  flex: 1;
  overflow: auto;
  outline: 0;
}

.tree-group {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.tree-row,
.list-row {
  display: grid;
  width: 100%;
  min-width: 0;
  align-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.tree-row {
  grid-template-columns: minmax(0, 1fr) minmax(155px, 42%);
  gap: 12px;
  min-height: 36px;
  padding: 0 16px 0 0;
}

.tree-node {
  display: grid;
  min-width: 0;
  align-items: center;
  grid-template-columns: 18px 22px minmax(0, 1fr);
  gap: 5px;
  padding-left: var(--tree-indent);
}

.tree-row:hover,
.tree-row.selected,
.list-row:hover,
.list-row.selected {
  background: var(--surface-hover);
}

.tree-row.selected,
.list-row.selected {
  box-shadow: inset 3px 0 var(--accent);
}

.chevron {
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--faint);
}

.chevron svg {
  width: 12px;
  transition: transform 120ms;
}

.tree-row.expanded .chevron svg {
  transform: rotate(90deg);
}

.node-icon {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 5px;
  font: 700 9px var(--mono);
}

.node-icon.object {
  background: var(--blue-soft);
  color: var(--blue);
}

.node-icon.identity {
  background: var(--green-soft);
  color: var(--green);
}

.node-icon.notification {
  background: var(--purple-soft);
  color: var(--purple);
}

.node-main {
  min-width: 0;
}

.node-name {
  overflow: hidden;
  font: 12px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-meta {
  margin-left: 7px;
  color: var(--faint);
  font: 10px var(--mono);
}

.node-oid {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font: 10px var(--mono);
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.children {
  display: none;
}

.children.open {
  display: block;
}

.list-header,
.list-row {
  grid-template-columns: minmax(150px, 1.1fr) minmax(110px, 0.8fr) minmax(140px, 1fr);
  gap: 16px;
  padding: 0 18px;
}

.list-header {
  display: grid;
  height: 34px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-results-header,
.search-result-row {
  display: grid;
  grid-template-columns:
    minmax(145px, 1.15fr)
    minmax(145px, 1fr)
    minmax(95px, 0.7fr)
    minmax(150px, 1fr);
  gap: 14px;
  align-items: center;
  padding: 0 116px 0 18px;
}

.search-results-header {
  height: 34px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-soft) 70%, transparent);
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-result-shell {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.search-result-row {
  width: 100%;
  min-height: 54px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.search-result-row:hover,
.search-result-row.selected {
  background: var(--surface-hover);
}

.search-result-row.selected {
  box-shadow: inset 3px 0 var(--accent);
}

.search-result-name,
.search-result-oid,
.search-result-mib strong {
  overflow: hidden;
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-name {
  font-weight: 650;
}

.search-result-mib {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.search-result-mib small {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.search-result-oid {
  color: var(--muted);
  font-size: 10px;
}

.result-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-hover);
  color: var(--muted);
  font-size: 11px;
}

.result-notice.loading {
  color: var(--accent);
}

.list-row {
  min-height: 42px;
  border-bottom: 0;
  font-size: 11px;
}

.list-row-shell {
  position: relative;
  border-bottom: 1px solid var(--line);
}

.list-row-shell .list-row {
  padding-right: 116px;
}

.row-tree-action {
  position: absolute;
  top: 50%;
  right: 10px;
  display: inline-flex;
  height: 28px;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  transform: translateY(-50%);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 6px;
  background: var(--surface);
  color: var(--accent);
  cursor: pointer;
  font-size: 9px;
  font-weight: 750;
  opacity: 0;
  box-shadow: 0 2px 7px rgba(20, 30, 40, 0.08);
  transition: opacity 120ms, background 120ms, color 120ms;
}

.list-row-shell:hover .row-tree-action,
.list-row-shell:focus-within .row-tree-action,
.search-result-shell:hover .row-tree-action,
.search-result-shell:focus-within .row-tree-action {
  opacity: 1;
}

.row-tree-action:hover {
  background: var(--accent);
  color: #fff;
}

.row-tree-action svg {
  width: 13px;
}

@media (hover: none) {
  .row-tree-action {
    opacity: 1;
  }
}

.list-row .name-cell,
.list-row .oid-cell {
  overflow: hidden;
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.type-label {
  width: fit-content;
  padding: 3px 6px;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font: 9px var(--mono);
}

.empty-state {
  display: grid;
  height: 100%;
  min-height: 280px;
  place-items: center;
  padding: 40px;
  text-align: center;
}

.empty-state-inner {
  max-width: 310px;
}

.empty-graphic {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface-soft);
  color: var(--accent);
}

.empty-graphic::after {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 25px;
  height: 25px;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.empty-graphic svg {
  width: 40px;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.empty-state p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.details-panel {
  overflow: auto;
  background: var(--surface-soft);
}

.details-empty {
  display: grid;
  min-height: 100%;
  place-items: center;
  padding: 32px;
  color: var(--muted);
  text-align: center;
}

.details-empty svg {
  width: 35px;
  margin-bottom: 13px;
  color: var(--faint);
}

.details-empty strong {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
}

.details-empty span {
  font-size: 12px;
  line-height: 1.5;
}

.details-header {
  padding: 23px 24px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.details-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 12px;
}

.details-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.details-type::before {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.details-header h2 {
  overflow-wrap: anywhere;
  margin: 0 0 11px;
  color: var(--text);
  font: 650 20px/1.25 var(--mono);
  letter-spacing: -0.03em;
}

.module-line {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.module-line > span {
  color: var(--faint);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.module-link {
  overflow-wrap: anywhere;
  color: var(--text);
  font: 600 11px/1.45 var(--mono);
}

.source-badge {
  display: inline-flex;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-hover);
  color: var(--muted);
  font: 700 9px var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.details-download {
  width: fit-content;
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.details-download:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.details-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 14px;
  margin-top: 15px;
}

.details-tree {
  display: inline-flex;
  height: 31px;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.details-tree:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

.details-tree svg {
  width: 15px;
}

.details-body {
  padding: 20px 24px 30px;
}

.details-section {
  margin-bottom: 24px;
}

.details-section h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.oid-box,
.code-box {
  position: relative;
  padding: 11px 38px 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: 600 12px/1.55 var(--mono);
  overflow-wrap: anywhere;
}

.copy-button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: var(--surface-hover);
  color: var(--muted);
  cursor: pointer;
}

.copy-button:hover {
  color: var(--accent);
}

.copy-button svg {
  width: 14px;
}

.property-list {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.property-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.property-row:last-child {
  border-bottom: 0;
}

.property-row dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.property-row dd {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--text);
  font: 11px/1.5 var(--mono);
}

.description-section {
  position: relative;
  padding: 16px 17px 17px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent-soft) 52%, var(--surface));
}

.description-section h3 {
  color: var(--accent-strong);
}

.description {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.72;
  white-space: pre-line;
}

.description-unavailable {
  border-color: var(--line-strong);
  border-left-color: var(--muted);
  background: var(--surface);
}

.description-unavailable h3 {
  color: var(--muted);
}

.description-loading,
.description-missing {
  border-color: var(--line);
  border-left-color: var(--faint);
  background: var(--surface);
}

.description-loading .description,
.description-missing .description {
  color: var(--muted);
  font-style: italic;
}

.source-section {
  padding-top: 2px;
  border-top: 1px solid var(--line);
}

.code-box {
  max-height: 210px;
  overflow: auto;
  margin-bottom: 4px;
  padding-right: 12px;
  color: var(--muted);
  font-weight: 400;
  font-size: 10px;
  white-space: pre-wrap;
}

.row-tooltip {
  position: fixed;
  z-index: 100;
  width: min(310px, calc(100vw - 24px));
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(20, 30, 40, 0.13);
  color: var(--text);
  pointer-events: none;
}

.row-tooltip-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.row-tooltip-heading strong {
  overflow-wrap: anywhere;
  font: 650 12px/1.4 var(--mono);
}

.row-tooltip-heading span {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.row-tooltip dl {
  display: grid;
  gap: 5px;
  margin: 7px 0;
}

.row-tooltip dl div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
}

.row-tooltip dt {
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.row-tooltip dd {
  overflow-wrap: anywhere;
  margin: 0;
  font: 10px/1.45 var(--mono);
}

.row-tooltip p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.toast-region {
  position: fixed;
  z-index: 50;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
}

.toast {
  min-width: 250px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-color: color-mix(in srgb, #d64040 40%, var(--line));
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
}

dialog::backdrop {
  background: rgba(12, 17, 23, 0.42);
  backdrop-filter: blur(3px);
}

dialog form {
  padding: 25px;
}

.dialog-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: #fff0ea;
  color: #d9572e;
}

.dialog-icon svg {
  width: 22px;
}

dialog h2 {
  margin: 17px 0 7px;
  font-size: 18px;
}

dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.secondary-button,
.danger-button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.danger-button {
  border-color: #c64336;
  background: #d65042;
  color: white;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 220px minmax(380px, 1fr) 360px;
  }

  .topbar {
    grid-template-columns: 220px minmax(280px, 1fr) auto;
  }

  .privacy-pill {
    display: none;
  }
}

@media (max-width: 820px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-width: 0;
    height: auto;
    min-height: 100vh;
  }

  .topbar {
    position: sticky;
    top: 0;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 0 14px;
  }

  .brand small,
  .icon-button,
  .primary-button span {
    display: none;
  }

  .global-search {
    position: absolute;
    top: 80px;
    right: 14px;
    left: 14px;
  }

  .workspace {
    display: block;
    min-height: calc(100vh - 84px);
    margin: 60px 8px 8px;
    overflow: visible;
  }

  .sidebar {
    display: none;
  }

  .browser-panel {
    min-height: 70vh;
    border-right: 0;
  }

  .details-panel {
    min-height: 420px;
    border-top: 1px solid var(--line);
  }

  .panel-heading {
    padding: 15px;
  }

  .summary-strip div {
    padding: 0 12px;
  }

  .filter-chips .chip:nth-child(n + 3) {
    display: none;
  }
}
