:root {
  --bg0: #0e1412;
  --bg1: #16201b;
  --ink: #e8f2ea;
  --muted: #9bb0a1;
  --accent: #3dcf8e;
  --warn: #f0b429;
  --danger: #ff6b6b;
  --line: rgba(232, 242, 234, 0.12);
  --card: rgba(22, 32, 27, 0.88);
  --android: #a4c639;
  --ios: #7ec8e3;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg0);
  min-height: 100vh;
}
.bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(61, 207, 142, 0.18), transparent 60%),
    radial-gradient(700px 400px at 90% 0%, rgba(80, 140, 255, 0.12), transparent 55%),
    linear-gradient(180deg, #101816, #0b100e 70%);
  z-index: -1;
}
.top {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}
.brand { display: flex; gap: 0.85rem; align-items: center; }
.brand p { margin: 0.15rem 0 0; color: var(--muted); font-size: 0.85rem; }
.brand strong { display: inline-flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.version-pill {
  display: inline-block;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.45rem;
  border-radius: 0.4rem;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  vertical-align: middle;
}
.login-version {
  margin: -0.35rem 0 0.75rem;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
}
.mark {
  width: 2.25rem; height: 2.25rem; border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--accent), #1f7a55);
  box-shadow: 0 0 0 1px rgba(61,207,142,0.35);
}
.auth { display: flex; gap: 0.75rem; align-items: end; flex-wrap: wrap; }
.license-bar {
  flex: 1 1 12rem;
  align-self: center;
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
  color: var(--muted);
  max-width: 28rem;
}
.license-bar.ok { border-color: rgba(61, 207, 142, 0.45); color: var(--accent); }
.license-bar.denied { border-color: rgba(255, 107, 107, 0.55); color: var(--danger); }
.lang-switch {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  overflow: hidden;
  margin-bottom: 0.05rem;
}
.lang-btn {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 0;
  padding: 0.45rem 0.7rem;
  font-weight: 600;
  font-size: 0.8rem;
}
.lang-btn.active {
  background: rgba(61, 207, 142, 0.2);
  color: var(--accent);
}
.lang-btn + .lang-btn { border-left: 1px solid var(--line); }
label { display: grid; gap: 0.25rem; font-size: 0.75rem; color: var(--muted); }
input {
  background: var(--bg1);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 0.5rem;
  padding: 0.45rem 0.65rem;
  min-width: 12rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
}
button {
  background: var(--accent);
  color: #062216;
  border: 0;
  border-radius: 0.55rem;
  padding: 0.55rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); }
button.secondary.danger-btn { color: var(--danger); border-color: rgba(255, 107, 107, 0.35); }
button.secondary.danger-btn:hover { background: rgba(255, 107, 107, 0.12); }
button.danger { background: var(--danger); color: #1a0505; }

.layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1rem;
  padding: 1.25rem 1.75rem 2.5rem;
}
.workspace-switch {
  grid-column: 1 / -1;
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.25rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.2);
  width: fit-content;
}
.workspace-switch[hidden] {
  display: none !important;
}
.workspace-tab {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.workspace-tab:hover { color: var(--ink); }
.workspace-tab.active {
  background: rgba(61, 207, 142, 0.18);
  color: var(--accent);
}
.workspace {
  display: contents;
}
.workspace[hidden] {
  display: none !important;
}
.workspace-platform .side-panel {
  grid-column: 1 / -1;
}
.overview-panel { grid-column: 1 / -1; }
.install-month { margin-top: 1.25rem; }
.install-month h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
}
.install-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.install-table th,
.install-table td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.install-table th { color: var(--muted, #9aa3b2); font-weight: 500; }
.install-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.install-table td.mono { font-family: var(--mono, ui-monospace, monospace); font-size: 0.8rem; opacity: 0.85; }
.install-table td.muted { color: var(--muted, #9aa3b2); text-align: center; }
.drill-panel { grid-column: 1; grid-row: span 2; min-height: 28rem; }
.side-panel { grid-column: 2; }

/* Self-host ops: apps list full-width; adoption + API keys as a bottom pair. */
.layout[data-mode="selfhost"] {
  grid-template-columns: 1fr 1fr;
}
.layout[data-mode="selfhost"] .overview-panel {
  grid-column: 1 / -1;
}
.layout[data-mode="selfhost"] #workspaceOps .drill-panel {
  grid-column: 1 / -1;
  grid-row: auto;
  min-height: 22rem;
}
.layout[data-mode="selfhost"] #workspaceOps .side-panel {
  grid-column: auto;
  grid-row: auto;
  min-height: 14rem;
}
.layout[data-mode="selfhost"] .workspace-platform .side-panel {
  grid-column: 1 / -1;
}

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 1rem 1.1rem 1.2rem;
}
.list-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 0.75rem 0;
}
.list-toolbar input[type="search"] {
  flex: 1 1 12rem;
  min-width: 10rem;
}
.list-toolbar select {
  min-width: 7rem;
}
.list-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--muted, #9aa3b2);
}
.list-pager .pager-actions {
  display: flex;
  gap: 0.4rem;
}
.plan-presets-block input[type="number"] {
  width: 100%;
  max-width: 8rem;
  box-sizing: border-box;
}
.stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.stat {
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(61, 207, 142, 0.08);
  border: 1px solid var(--line);
  min-width: 7rem;
}
.stat strong { display: block; font-size: 1.4rem; }
.stat span { color: var(--muted); font-size: 0.8rem; }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
  min-height: 1.5rem;
}
.crumb {
  background: transparent;
  color: var(--accent);
  border: 0;
  padding: 0.15rem 0.35rem;
  font-weight: 600;
  font-size: 0.9rem;
}
.crumb.current { color: var(--ink); cursor: default; }
.sep { color: var(--muted); }

.view-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.view-head h2 { margin: 0; font-size: 1.05rem; }
.api-key-form {
  display: grid;
  gap: 0.75rem;
}
.api-key-form label { width: 100%; }
.api-key-form input { width: 100%; min-width: 0; }
.api-key-modal {
  width: min(28rem, 100%);
}
.hint { margin: 0; color: var(--muted); font-size: 0.8rem; word-break: break-all; }
.empty { color: var(--muted); }

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: end;
  margin-bottom: 0.85rem;
}
.form-row label { flex: 1 1 10rem; }
.form-row input { min-width: 0; width: 100%; }
.form-msg.danger-text { color: var(--danger); }
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(8, 12, 10, 0.72);
  backdrop-filter: blur(8px);
}
.login-gate[hidden] { display: none; }

/* Right-side drawers (tenant edit / payment create) */
.drawer-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
}
.drawer-gate[hidden] { display: none !important; }
.drawer-gate.is-open { pointer-events: auto; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(6, 10, 8, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s ease;
  cursor: pointer;
}
.drawer-gate.is-open .drawer-backdrop { opacity: 1; }
.drawer-panel {
  position: relative;
  z-index: 1;
  width: min(26.5rem, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(28, 40, 34, 0.98), rgba(16, 22, 19, 0.98));
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 48px rgba(0, 0, 0, 0.45);
  transform: translateX(100%);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer-gate.is-open .drawer-panel { transform: translateX(0); }
.drawer-form {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid var(--line);
}
.drawer-head h1 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}
.drawer-head .hint { margin: 0; }
.drawer-close {
  flex: 0 0 auto;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  padding: 0;
}
.drawer-close:hover {
  color: var(--ink);
  border-color: rgba(61, 207, 142, 0.35);
}
.drawer-body {
  flex: 1;
  overflow: auto;
  padding: 1.1rem 1.35rem 1.25rem;
  display: grid;
  gap: 0.85rem;
  align-content: start;
}
.drawer-body label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.drawer-body input,
.drawer-body select {
  width: 100%;
  min-width: 0;
}
.drawer-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.drawer-check {
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid var(--line);
  background: rgba(61, 207, 142, 0.05);
}
.drawer-foot {
  display: flex;
  gap: 0.65rem;
  padding: 0.95rem 1.35rem 1.2rem;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.18);
}
.drawer-foot button { flex: 1; }
body.drawer-open { overflow: hidden; }

.unique-ids-add-label { display: grid; gap: 0.35rem; }
.unique-ids-add-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}
.unique-ids-add-row input { flex: 1; min-width: 0; }
.unique-ids-add-row button {
  flex: 0 0 auto;
  white-space: nowrap;
}
.unique-ids-list {
  margin-top: 0;
  max-height: none;
}
.unique-ids-list .api-key-meta strong {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  word-break: break-all;
}

.data-table-wrap { margin-top: 0.75rem; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.data-table th,
.data-table td {
  text-align: left;
  padding: 0.7rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  vertical-align: middle;
}
.data-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table tbody tr:hover {
  background: rgba(61, 207, 142, 0.05);
}
.data-table tr.is-void { opacity: 0.55; }
.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.data-table .mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 0.8rem;
}
.data-table .row-sub {
  margin-top: 0.15rem;
  font-size: 0.78rem;
}
.data-table .row-actions {
  text-align: right;
  white-space: nowrap;
}
.data-table .row-actions button {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
}

@media (max-width: 720px) {
  .drawer-panel { width: 100%; }
  .drawer-grid-2 { grid-template-columns: 1fr; }
}
.login-card {
  width: min(26rem, 100%);
  display: grid;
  gap: 0.75rem;
}
.login-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 0.75rem;
}
.login-top h1 { margin: 0; font-size: 1.25rem; }
.login-card label { width: 100%; }
.login-card input { width: 100%; min-width: 0; }
.login-help { margin: 0; }
button.linkish {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent, #2a6df4);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.form-actions button { flex: 1 1 auto; }
.form-msg:not(.danger-text) { color: var(--accent); }

.card-list { display: grid; gap: 0.65rem; }
.nav-card {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(61, 207, 142, 0.06);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 0.85rem;
  padding: 0.85rem 1rem;
}
.nav-card.app-row {
  display: flex;
  gap: 0.65rem;
  align-items: stretch;
  padding: 0.55rem 0.65rem 0.55rem 0.25rem;
}
.nav-card-main {
  flex: 1;
  background: transparent;
  color: inherit;
  border: 0;
  text-align: left;
  padding: 0.35rem 0.45rem;
  border-radius: 0.65rem;
}
.nav-card-main:hover { background: rgba(61, 207, 142, 0.08); }
.app-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-self: center;
  flex: 0 0 auto;
}
button.app-delete,
button.app-edit {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  white-space: nowrap;
}
.version-actions .delete-menu {
  position: relative;
}
.version-actions .delete-menu > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  white-space: nowrap;
  border-radius: 0.55rem;
  background: var(--danger);
  color: #1a0505;
  font-weight: 600;
}
.version-actions .delete-menu > summary::-webkit-details-marker {
  display: none;
}
.version-actions .delete-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  min-width: 9.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.45rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--card);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.version-actions .delete-menu-panel button {
  width: 100%;
  justify-content: center;
  padding: 0.4rem 0.65rem;
  font-size: 0.78rem;
}
.pill.muted {
  opacity: 0.65;
  font-weight: 500;
}
.form-row label.form-grow {
  flex: 1 1 16rem;
}
.nav-card:hover { border-color: rgba(61, 207, 142, 0.45); }
.nav-card--has-patches {
  background: rgba(61, 207, 142, 0.16);
  border-color: rgba(61, 207, 142, 0.38);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-card--has-patches:hover {
  border-color: rgba(61, 207, 142, 0.55);
  background: rgba(61, 207, 142, 0.2);
}
.nav-card--has-patches .nav-card-main:hover {
  background: rgba(61, 207, 142, 0.1);
}
.nav-card--no-patches {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.06);
  opacity: 0.72;
}
.nav-card--no-patches:hover {
  border-color: rgba(61, 207, 142, 0.28);
  opacity: 0.88;
}
.nav-card--no-patches .nav-card-main:hover {
  background: rgba(255, 255, 255, 0.03);
}
.nav-card-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.45rem; }
.nav-card-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.nav-card-cta { color: var(--accent); font-size: 0.8rem; font-weight: 600; }

.platform-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}
.platform-row .label { color: var(--muted); font-size: 0.8rem; margin-right: 0.25rem; }
button.filter-pill {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  font-weight: 600;
  font-size: 0.72rem;
  cursor: pointer;
}
button.filter-pill.active {
  color: var(--ink);
  border-color: rgba(61, 207, 142, 0.55);
  background: rgba(61, 207, 142, 0.16);
}
button.filter-pill.platform.android.active {
  color: var(--android);
  border-color: rgba(164, 198, 57, 0.55);
  background: rgba(164, 198, 57, 0.16);
}
button.filter-pill.platform.ios.active {
  color: var(--ios);
  border-color: rgba(126, 200, 227, 0.55);
  background: rgba(126, 200, 227, 0.16);
}

.table-wrap { overflow: auto; }
.table-wrap th.num,
.table-wrap td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th, td { text-align: left; padding: 0.55rem 0.4rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; }

/* Shared column grid for resource snapshot + OTA snapshot tabs */
.artifact-meta-table {
  table-layout: fixed;
}
.artifact-meta-table th:nth-child(1),
.artifact-meta-table td:nth-child(1) {
  width: 5.5rem;
}
.artifact-meta-table th:nth-child(2),
.artifact-meta-table td:nth-child(2) {
  width: 6.5rem;
}
.artifact-meta-table th:nth-child(3),
.artifact-meta-table td:nth-child(3) {
  width: 13.5rem;
}
.artifact-meta-table th:nth-child(4),
.artifact-meta-table td:nth-child(4) {
  width: 6.5rem;
}
.artifact-meta-table th:nth-child(5),
.artifact-meta-table td:nth-child(5) {
  width: auto;
}
.artifact-meta-table td.mono {
  font-variant-numeric: tabular-nums;
}
.artifact-meta-table .actions {
  justify-content: flex-start;
}
.actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.actions.stacked { flex-direction: column; align-items: stretch; }
.patch-plat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  padding: 0.25rem 0;
}

.artifact-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 1rem;
  padding: 0.25rem;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 15, 12, 0.35);
}
.artifact-tab {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.artifact-tab:hover { color: var(--ink); }
.artifact-tab.active {
  background: rgba(61, 207, 142, 0.18);
  color: var(--accent);
}
.artifact-panel > .hint {
  margin: 0 0 0.75rem;
}
.panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}
.panel-toolbar .hint {
  margin: 0;
  flex: 1 1 12rem;
}

pre {
  background: #0a0f0c;
  border-radius: 0.75rem;
  padding: 0.75rem;
  overflow: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  max-height: 18rem;
}

.audit-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 22rem;
  overflow: auto;
  padding-right: 0.15rem;
}
.api-keys-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.65rem;
  max-height: 16rem;
  overflow: auto;
}
.api-key-row {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 0.55rem;
  background: rgba(10, 15, 12, 0.35);
}
.api-key-meta { display: grid; gap: 0.15rem; min-width: 0; }
.api-key-meta strong { font-size: 0.9rem; }
.api-key-meta span { color: var(--muted); font-size: 0.72rem; font-family: "IBM Plex Mono", monospace; }
.api-key-secret {
  margin: 0.75rem 0 0.35rem;
  padding: 0.75rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(240, 180, 41, 0.45);
  background: rgba(240, 180, 41, 0.08);
}
.api-key-secret-title {
  margin: 0 0 0.45rem;
  color: var(--warn);
  font-size: 0.8rem;
  font-weight: 600;
}
.api-key-secret code {
  display: block;
  word-break: break-all;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.45rem;
  background: #0a0f0c;
  margin-bottom: 0.55rem;
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.35rem 0 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.inline-check input { min-width: auto; width: auto; }
.badge-revoked {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.4);
}
.audit-row {
  display: grid;
  grid-template-columns: 7.2rem minmax(5.5rem, auto) 1fr;
  gap: 0.45rem 0.65rem;
  align-items: baseline;
  padding: 0.45rem 0.55rem;
  border-radius: 0.55rem;
  border: 1px solid transparent;
  background: rgba(10, 15, 12, 0.55);
  font-size: 0.8rem;
  line-height: 1.35;
}
.audit-row:hover {
  border-color: var(--line);
  background: rgba(61, 207, 142, 0.06);
}
.audit-time {
  color: var(--muted);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  white-space: nowrap;
}
.audit-action {
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.audit-action.warn { color: var(--warn); }
.audit-action.danger { color: var(--danger); }
.audit-meta {
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-meta strong {
  color: var(--ink);
  font-weight: 600;
}
.audit-empty {
  color: var(--muted);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.adoption-panel {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.adoption-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.adoption-summary strong {
  color: var(--ink);
  font-weight: 600;
}
.adoption-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.5rem;
}
.adoption-card {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.7rem 0.8rem;
  background: rgba(10, 15, 12, 0.45);
  display: grid;
  gap: 0.35rem;
}
.adoption-card.ok {
  border-color: rgba(61, 207, 142, 0.4);
  background: rgba(61, 207, 142, 0.08);
}
.adoption-card.bad {
  border-color: rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.08);
}
.adoption-card.warn {
  border-color: rgba(240, 180, 41, 0.4);
  background: rgba(240, 180, 41, 0.08);
}
.adoption-type {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}
.adoption-card.ok .adoption-type { color: var(--accent); }
.adoption-card.bad .adoption-type { color: var(--danger); }
.adoption-card.warn .adoption-type { color: var(--warn); }
.adoption-metrics {
  display: flex;
  gap: 0.85rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--muted);
}
.adoption-metrics b {
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
}
.adoption-platforms {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.adoption-platform {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 0.65rem 0.7rem 0.75rem;
  background: rgba(10, 15, 12, 0.35);
}
.adoption-platform-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.adoption-platform-head .pill {
  font-weight: 700;
  text-transform: none;
}
.adoption-note {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 720px) {
  .audit-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.pill {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--muted);
}
.pill.warn { color: var(--warn); border-color: rgba(240,180,41,0.4); }
.pill.danger { color: var(--danger); border-color: rgba(255,107,107,0.4); }
.pill.ok {
  color: var(--accent);
  border-color: rgba(61, 207, 142, 0.45);
  background: rgba(61, 207, 142, 0.08);
}
.pill.platform.android {
  color: var(--android);
  border-color: rgba(164, 198, 57, 0.45);
  background: rgba(164, 198, 57, 0.08);
}
.pill.platform.ios {
  color: var(--ios);
  border-color: rgba(126, 200, 227, 0.45);
  background: rgba(126, 200, 227, 0.08);
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .drill-panel, .side-panel, .overview-panel, .workspace-switch { grid-column: auto; grid-row: auto; }
  .workspace-platform .side-panel { grid-column: auto; }
}
