:root {
  --theme-primary: #7c818a;
  --color-navy: #7c818a;
  --color-accent: #d81818;
  --color-corner: #d81818;
  --color-corner-neutral: #1f2937;
  --color-bg: #f3f4f6;
  --color-surface: #ffffff;
  --color-border: #e5e7eb;
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-sidebar-border: rgba(255, 255, 255, 0.08);
  --color-sidebar-active: #db4040;
  --color-sidebar-hover: rgba(255, 255, 255, 0.08);
  --ui-primary-bg: #10b981;
  --ui-primary-bg-hover: #059669;
  --ui-create-project-bg: #2563eb;
  --ui-create-project-bg-hover: #1d4ed8;
  --ui-input-height: 44px;
  --ui-border-radius: 12px;
  --font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-width: 272px;
  --sidebar-width-collapsed: 76px;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }

.field input, .field select {
  width: 100%;
  height: var(--ui-input-height);
  margin-top: 6px;
  padding: 0 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--ui-border-radius);
  background: #f8fafc;
}
.field input:focus, .field select:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(124, 129, 138, 0.12);
}

.btn {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 16px; border-radius: var(--ui-border-radius);
  border: 1px solid transparent; cursor: pointer; font-weight: 600; background: #fff;
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn--primary { background: var(--ui-primary-bg); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--ui-primary-bg-hover); }
.btn--create { background: var(--ui-create-project-bg); color: #fff; }
.btn--create:hover:not(:disabled) { background: var(--ui-create-project-bg-hover); }
.btn--outline { border-color: var(--color-border); color: var(--color-text); }
.btn--outline:hover { background: #f9fafb; }
.btn--danger { background: #fff; color: var(--color-accent); border-color: #fecaca; }

.wrapper { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: var(--sidebar-width);
  background: var(--color-navy);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar.collapsed { width: var(--sidebar-width-collapsed); }
.sidebar-brand {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--color-sidebar-border);
  flex-shrink: 0;
  gap: 8px;
}
.sidebar-brand-text {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.sidebar.collapsed .sidebar-brand-text { display: none; }
.toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.toggle-btn:hover { background: rgba(255, 255, 255, 0.12); }
.sidebar-menu {
  display: flex;
  flex-direction: column;
  padding: 12px 0 16px;
  gap: 2px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.sidebar-group { display: flex; flex-direction: column; gap: 2px; }
.sidebar-group--secondary {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--color-sidebar-border);
}
.sidebar-group-label {
  margin: 0 10px 4px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.sidebar.collapsed .sidebar-group-label { display: none; }
.menu-item {
  display: flex;
  align-items: center;
  margin: 0 10px;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--ui-border-radius);
  font-size: 13px;
  font-weight: 500;
}
.menu-item:hover { background: var(--color-sidebar-hover); color: #fff; }
.menu-item.active {
  background: var(--color-sidebar-active);
  color: #fff;
  font-weight: 600;
}
.menu-icon {
  margin-right: 10px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.menu-icon svg { width: 18px; height: 18px; display: block; fill: currentColor; }
.sidebar.collapsed .menu-item { justify-content: center; padding: 10px 0; }
.sidebar.collapsed .menu-icon { margin-right: 0; }
.sidebar.collapsed .menu-item span:not(.menu-icon) { display: none; }
.sidebar-version {
  flex-shrink: 0;
  padding: 14px 16px 18px;
  text-align: center;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.42);
}
.sidebar-version span { display: block; }
.sidebar.collapsed .sidebar-version { display: none; }

.workspace { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #f8fafc; }
.main-header {
  min-height: 56px;
  height: 56px;
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 20;
}
.page-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  flex: 1;
}
.main-header h1 {
  margin: 0;
  flex-shrink: 0;
  font-size: 18px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #1f2937;
}
.header-status {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
}
#header-user {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f2937;
}
#btn-logout {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 600;
  color: #dc2626;
  background: transparent;
  border: 1.5px solid #fecaca;
  border-radius: 12px;
  cursor: pointer;
}
#btn-logout:hover { background: #fef2f2; }
.header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #7c818a;
  cursor: pointer;
  text-decoration: none;
}
.header-icon-btn svg { width: 16px; height: 16px; }
.header-icon-btn:hover { color: #1f2937; background: #f3f4f6; }
.header-icon-btn.is-spin svg { animation: headerRefreshSpin 0.65s linear infinite; }
@keyframes headerRefreshSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .header-icon-btn.is-spin svg { animation: none; }
}
.header-sep { width: 1px; height: 16px; background: #e5e7eb; }
.header-clock-wrap { display: inline-flex; align-items: center; gap: 6px; }
.header-clock {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin: 0;
  font-variant-numeric: tabular-nums;
  color: #334155;
  line-height: 1;
  white-space: nowrap;
}
.header-clock__time { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.header-clock__tz { font-size: 10px; font-weight: 600; color: #94a3b8; letter-spacing: 0.04em; }
.inbox-badge {
  position: absolute;
  top: -3px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e11d48;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}
.info-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  cursor: help;
}
.info-tip__mark {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  border: 1px solid #cbd5e1;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}
.info-tip__box {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  width: 280px;
  padding: 10px 12px;
  background: #0f172a;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  z-index: 40;
  text-transform: none;
  letter-spacing: 0;
}
.info-tip:hover .info-tip__box,
.info-tip:focus .info-tip__box,
.info-tip:focus-within .info-tip__box { display: block; }
.info-tip--end .info-tip__box { left: auto; right: 0; }
.header-clock-wrap .info-tip { width: 16px; height: 16px; flex: none; }
.header-clock-wrap .info-tip__mark {
  width: 14px; height: 14px; font-size: 10px; font-weight: 600;
  color: #94a3b8; border-color: #e2e8f0; background: transparent;
}
.header-clock-wrap .info-tip__box { width: min(272px, 72vw); z-index: 60; }
.view { flex: 1; overflow: auto; padding: 12px 24px 28px; }
.view.view--hall { padding: 0; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-head .meta-row { flex: 1 1 100%; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.search { position: relative; flex: 1 1 16rem; max-width: 20rem; min-width: 12rem; }
.search input {
  width: 100%;
  height: 36px;
  padding: 0 32px 0 36px;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='M11 11l3 3'/%3E%3C/svg%3E") 12px 50% no-repeat;
  font-size: 13px;
  font-weight: 400;
  color: #334155;
  outline: none;
}
.search input:focus {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.25);
}
.search .clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px;
  border: 0; background: #f1f5f9; color: #94a3b8; cursor: pointer;
  border-radius: 999px; font-size: 12px; line-height: 1;
}
.summary { color: #64748b; font-size: 12px; font-weight: 500; }
.registry-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
}
.registry-stats a { color: inherit; text-decoration: none; }
.registry-stats a:hover { color: #0f172a; }
.registry-stats__on { color: #0f172a; }
.registry-stats__sep { color: #cbd5e1; }
.registry-stats__err { color: #e11d48; }
.registry-stats__warn { color: #d97706; }

.card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}
.table th {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  background: #f8fafc;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  white-space: nowrap;
}
.table tbody tr { cursor: pointer; transition: background 0.12s ease; }
.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.is-alarm { background: #fff7f7; }
.table tbody tr.is-alarm:hover { background: #fff1f2; }
.table a { color: inherit; }
.cell-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-width: 0; }
.cell-main {
  font-size: 14px; font-weight: 600; color: #0f172a; line-height: 1.25;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.cell-sub {
  display: block; margin-top: 2px; font-size: 11px; font-weight: 500;
  color: #94a3b8; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.cell-empty { color: #cbd5e1; font-weight: 500; }
.cell-status { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cell-status--ok { color: #059669; }
.cell-status--warn { color: #d97706; }
.cell-status--err { color: #e11d48; }
.cell-status--muted { color: #94a3b8; }

.meta-row { display: flex; align-items: center; gap: 6px; color: #64748b; font-size: 12px; }
.dot-status { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; font-size: 11px; }
.dot-status svg { width: 6px; height: 6px; fill: currentColor; }
.dot-status--ok { color: #059669; }
.dot-status--idle { color: #64748b; }
.dot-status--wait { color: #d97706; }
.dot-status--err { color: #e11d48; }
.meta-sep { color: #cbd5e1; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
  border: 1px solid var(--color-border); border-radius: 999px;
  background: #fff; color: var(--color-text); text-decoration: none; font-size: 13px;
}
.chip.is-on { border-color: #fecaca; color: #be123c; background: #fff1f2; }
.infra-range { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.infra-range a, .infra-range__btn {
  height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: 999px;
  background: transparent; color: #64748b; font-size: 12px; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center;
}
.infra-range a:hover:not(.is-on), .infra-range__btn:hover:not(.is-on) { color: #1f2937; }
.infra-range a.is-on, .infra-range__btn.is-on {
  border-color: #fecaca; background: #fff1f2; color: #be123c;
}
.sparks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 8px 0; }
.spark-cell { background: #f9fafb; border-radius: 8px; padding: 8px 10px; }
.spark-label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); margin-bottom: 4px; }
.spark { width: 100%; height: 32px; display: block; }
.spark-empty { font-size: 12px; color: #94a3b8; }
.table tr.expand { cursor: default; }
.table tr.expand:hover { background: #fff; }

.later {
  background: #fff; border: 1px solid var(--color-border); border-radius: 12px;
  padding: 28px; color: var(--color-text-muted);
}

.card-head { padding: 20px 20px 0; }
.card-head h2 { margin: 0 0 8px; font-size: 22px; font-weight: 800; }
.tabs { display: flex; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--color-border); }
.tabs button {
  border: 0; background: none; padding: 12px 0; cursor: pointer; color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
}
.tabs button.is-on { color: var(--color-accent); border-bottom-color: var(--color-accent); font-weight: 700; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  align-items: start;
}
.form-grid .field--wide,
.form-grid .form-actions { grid-column: 1 / -1; }
.form-grid .field > label {
  font-size: 11px;
  font-weight: 700;
  color: #4b5563;
}
.field-static { min-height: 44px; display: flex; align-items: center; }
.field { display: flex; flex-direction: column; gap: 6px; color: var(--color-text-muted); font-size: 12px; }
.field--wide { grid-column: 1 / -1; }
.readonly { font-size: 22px; font-weight: 800; color: var(--color-text); }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.35);
  display: grid; place-items: center; padding: 20px; z-index: 20;
}
.modal {
  width: min(560px, 100%);
  background: #fff; border-radius: 12px; border: 1px solid var(--color-border);
}
.modal__header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--color-border); }
.modal__header h3 { margin: 0; font-size: 16px; font-weight: 800; }
.modal__body { padding: 20px; display: grid; gap: 12px; }
.modal textarea {
  width: 100%; min-height: 180px; padding: 12px;
  border: 1px solid var(--color-border); border-radius: 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px;
}
.secret-warn { color: #b45309; font-size: 13px; }
.field-hint { margin: 0; color: var(--color-text-muted); font-size: 13px; line-height: 1.45; }
.field--check {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--color-text);
}
.agent-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
  padding: 12px 0 0;
  border-top: 1px solid #f1f5f9;
}
.agent-toggle-row__copy { min-width: 0; }
.agent-toggle-row__title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.agent-toggle-row__hint {
  margin: 2px 0 0;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
}
.agent-toggle {
  appearance: none;
  -webkit-appearance: none;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 2px;
  border: 0;
  border-radius: 999px;
  background: #e2e8f0;
  cursor: pointer;
}
.agent-toggle.is-on {
  background: #2563eb;
  justify-content: flex-end;
}
.agent-toggle__knob {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
}
.adm-modal-foot .btn { min-width: 0; }
.secret-box {
  margin: 0 20px 16px;
  padding: 14px 16px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 12px;
}
.secret-box b { display: block; margin-bottom: 8px; }
.secret-box code {
  display: block;
  margin: 8px 0;
  word-break: break-all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}
.secret-box__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.ini-pre {
  margin: 8px 0 0;
  padding: 12px;
  overflow: auto;
  max-height: 240px;
  background: #f8fafc;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  white-space: pre-wrap;
}
.ini-row td { padding-top: 0; border-top: 0; }
.table .acts { display: flex; flex-wrap: wrap; gap: 6px; }
.key-issue-place { margin: 0; font-weight: 700; }
.keys-how { padding: 0 20px 20px; display: grid; gap: 10px; color: var(--color-text); }
.keys-how p { margin: 0; line-height: 1.45; }
.keys-how code { font-size: 12px; }

.health-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.health-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--ui-border-radius);
  padding: 16px 20px;
}
.health-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.health-card h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #1f2937;
}
.health-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.health-row:last-child { border-bottom: 0; }
.health-val { display: inline-flex; align-items: center; gap: 8px; color: #334155; }
.health-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.health-chart {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--ui-border-radius);
  padding: 12px 14px;
}
.health-svg { width: 100%; height: 72px; display: block; }
a.health-card { text-decoration: none; color: inherit; display: block; }
.inbox-unread { background: #eff6ff; }
.inbox-unread td:first-child .dot-status { color: #2563eb; }
#inbox-link { text-decoration: none; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  margin: 0 0 12px -8px;
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.2;
}
.crumbs a {
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  color: #64748b;
  text-decoration: none;
}
.crumbs a:hover { color: #0f172a; background: #f1f5f9; }
.crumbs-sep { color: #cbd5e1; padding: 0 2px; font-weight: 500; user-select: none; }
.crumbs-current {
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  color: #0f172a;
  font-weight: 600;
}

.entity-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.entity-head__main { min-width: 0; }
.entity-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.entity-head__pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.entity-head__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}
.entity-head__actions .btn { height: 36px; padding: 0 12px; font-size: 13px; }

.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}
.meta-chip--ok { background: #ecfdf5; color: #047857; }
.meta-chip--warn { background: #fffbeb; color: #b45309; }
.meta-chip--muted { background: #f1f5f9; color: #475569; }
button.meta-chip {
  margin: 0;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.ok-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 12px;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: -1px;
}
.tab-btn:hover { color: #1f2937; }
.tab-btn.is-active { border-bottom-color: #d81818; color: #d81818; }
.tab-btn .tab-count { font-weight: 500; color: #9ca3af; margin-left: 6px; }
.tab-btn.is-active .tab-count { color: #d81818; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.entity-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.cell-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cell-sub { color: #94a3b8; font-size: 12px; font-weight: 500; }
.panel {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  overflow: hidden;
}
.panel + .panel { margin-top: 16px; }
.stack > .panel + .panel,
.entity-split > .panel + .panel { margin-top: 0; }
.panel-body { padding: 16px; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.panel-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.meta-dl {
  display: grid;
  grid-template-columns: 9.5rem 1fr;
  gap: 8px 16px;
  margin: 0;
  font-size: 13px;
}
.meta-dl dt { color: #94a3b8; font-weight: 500; }
.meta-dl dd { margin: 0; color: #0f172a; font-weight: 500; }
.meta-dl__hint {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 400;
  color: #64748b;
}
.meta-dl + .license-fields { margin-top: 20px; }
.license-fields { display: flex; flex-direction: column; gap: 24px; }
.license-fields + .form-actions { margin-top: 20px; }
.info-banner {
  background: #eff6ff;
  color: #1e40af;
  padding: 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  gap: 8px;
  line-height: 1.45;
  border: 1px solid #bfdbfe;
}
a.btn { text-decoration: none; }
.field--stack label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #334155;
  margin-bottom: 6px;
  padding-left: 4px;
}
.field--stack input:not([type="file"]):not([type="checkbox"]) {
  background: #f8fafc;
  border-color: #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
}
.field--stack input:not([type="file"]):not([type="checkbox"]):focus {
  background: #fff;
  border-color: #94a3b8;
}
.field--stack .field-hint {
  margin-top: 6px;
  padding-left: 4px;
  line-height: 1.5;
}

.entity-link {
  color: #0f172a;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}
.entity-link:hover { color: #059669; }

.table--static tbody tr { cursor: default; }
.table tbody tr.ini-row { cursor: default; }
.table tbody tr.ini-row:hover { background: #fff; }
.secret-box { margin: 0 0 16px; }

.releases-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 12px;
}
.releases-hint {
  margin: 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
  max-width: 52rem;
}
.releases-hint code {
  font-size: 11px;
  background: #f1f5f9;
  padding: 1px 4px;
  border-radius: 4px;
}
.releases-latest-line { margin: 6px 0 0; font-size: 12px; color: #64748b; }
.releases-latest-line b { color: #0f172a; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.releases-latest-line.is-warn { color: #b45309; font-weight: 600; }
.releases-page .panel { overflow: visible; }
.releases-table tbody tr.is-latest { background: rgba(236, 253, 245, 0.35); }
.releases-ver-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}
.releases-changelog-preview {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}
.releases-plat {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 8px;
  padding: 2px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #334155;
}
.releases-latest-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid rgba(167, 243, 208, 0.85);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}
.releases-make-latest {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
  cursor: pointer;
  font-family: inherit;
}
.releases-make-latest:hover { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.btn-copy-sha {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 8px;
  padding: 4px 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: #475569;
  cursor: pointer;
  text-align: left;
}
.btn-copy-sha:hover { background: #f1f5f9; }
.releases-sha-empty { font-size: 12px; color: #cbd5e1; }
.chip-warn-soft {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  background: #fffbeb;
  color: #b45309;
  font-size: 11px;
  font-weight: 600;
}

.adm-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  padding: 24px;
}
.adm-modal-card {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}
.adm-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e2e8f0;
}
.adm-modal-title {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f172a;
}
.adm-modal-card--key { width: min(560px, 100%); }
.adm-modal-x {
  appearance: none;
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.adm-modal-x:hover { background: #f8fafc; }
.adm-modal-body { padding: 16px; display: grid; gap: 12px; }
.adm-modal-body p { margin: 0; font-size: 14px; line-height: 1.45; color: #334155; }
.adm-modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
}
.adm-modal .field textarea {
  width: 100%;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  resize: vertical;
}
.rel-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 16px;
  border: 2px dashed #e2e8f0;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.7);
  cursor: pointer;
  font-weight: 400;
}
.rel-dropzone:hover { border-color: #60a5fa; }
.rel-dropzone.is-dragover { border-color: #60a5fa; background: #eff6ff; }
.rel-dropzone.is-filled { border-color: #93c5fd; background: #f8fafc; }
.rel-dropzone.is-filled .rel-drop-title { color: #1e40af; }
.rel-dropzone input { display: none; }
.rel-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 720px) {
  .rel-pair,
  .form-grid,
  .form,
  .entity-split { grid-template-columns: 1fr; }
}
.rel-drop-icon { font-size: 24px; line-height: 1; margin-bottom: 6px; }
.rel-drop-title { font-size: 12px; font-weight: 600; color: #334155; }
.rel-drop-sub { font-size: 11px; color: #94a3b8; margin-top: 4px; }
.field-hint.is-ok { color: #047857; }
.field-hint--warn { color: #b45309; font-weight: 600; }
.rel-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-size: 12px;
  color: #334155;
}
.rel-opts label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.rel-progress { display: grid; gap: 4px; }
.rel-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #64748b;
}
.rel-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #f1f5f9;
  overflow: hidden;
}
.rel-progress-bar {
  height: 100%;
  width: 0;
  background: #3b82f6;
  transition: width 0.15s ease;
}
.rel-upload-msg { margin: 0; font-size: 11px; color: #e11d48; white-space: pre-wrap; }
.rel-upload-msg:empty { display: none; }
.table-scroll { overflow: auto; }
.releases-table { table-layout: fixed; width: 100%; min-width: 850px; }
.releases-table .releases-col-ver { width: 220px; }
.releases-table .releases-col-latest { width: 190px; text-align: center; }
.releases-table .releases-col-sha { width: 180px; }
.releases-table .releases-col-date { width: 160px; font-size: 12px; color: #64748b; white-space: nowrap; }
.releases-table .releases-col-size { width: 90px; text-align: center; font-size: 12px; font-weight: 600; color: #334155; white-space: nowrap; }
.releases-table .releases-col-nodes { width: 80px; text-align: center; font-weight: 600; color: #334155; }
.releases-table .releases-col-plat { text-align: center; }
.releases-table .releases-col-actions {
  width: 180px;
  overflow: visible;
  text-align: right;
  white-space: nowrap;
}
.releases-ver-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
}
.releases-ver-btn:hover .releases-ver-num { color: #2563eb; }
.releases-file {
  margin-top: 2px;
  font-size: 11px;
  color: #94a3b8;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.releases-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
}
.releases-download {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.releases-download:hover { background: #dbeafe; }
.release-card-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.release-card-ver {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}
.release-card-meta { display: grid; gap: 8px; font-size: 12px; color: #475569; }
.release-card-meta__row {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: 8px;
  align-items: start;
}
.release-card-meta__label { color: #94a3b8; font-weight: 600; }
.release-card-meta__mono,
.release-card-copy-text {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  word-break: break-all;
  color: #334155;
}
