* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html,
body {
  margin: 0;
}
body {
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2 {
  margin: 0;
  letter-spacing: -0.015em;
}
p {
  margin: 0;
}
code,
.mono,
.mono-sm {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.mono-sm {
  font-size: 12.5px;
}
.muted {
  color: var(--muted);
}
.nowrap {
  white-space: nowrap;
}
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.console {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 18px 14px;
  border-right: 1px solid var(--border);
  background: var(--card);
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 6px;
}
.brand-logo {
  display: grid;
  width: 24px;
  height: 24px;
}
.brand-logo svg {
  width: 100%;
  height: 100%;
}
.wordmark {
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.03em;
}
.wordmark-accent {
  color: var(--accent);
}
.org-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.org-switch-name {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.org-switch select {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  cursor: pointer;
}
.org-switch:has(select)::after {
  content: "";
  width: 16px;
  height: 16px;
  margin-left: auto;
  flex-shrink: 0;
  background: var(--chevron) center / 16px no-repeat;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-nav a,
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-weight: 550;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.side-nav a:hover,
.side-link:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}
.side-nav a[aria-current] {
  background: var(--accent-soft);
  color: var(--accent);
}
.side-group {
  padding: 4px 10px 6px;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.side-nav + .side-nav {
  margin-top: 6px;
}
.side-nav .org-switch {
  margin-bottom: 6px;
}
.side-foot {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.side-account {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 12.5px;
}
.side-account span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.main {
  width: 100%;
  min-width: 0;
  padding: 24px 32px 80px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover {
  background: var(--surface);
  text-decoration: none;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}
.btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}
.btn.danger {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}
.btn.ghost {
  border-color: transparent;
  background: none;
  color: var(--muted);
}
.btn.ghost:hover:not(:disabled) {
  background: var(--surface);
  color: var(--text);
}
.btn.sm {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.icon-button:hover {
  background: var(--surface);
  color: var(--text);
}

input:not([type="checkbox"]),
select,
textarea {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}
textarea {
  resize: vertical;
}
select {
  appearance: none;
  padding-right: 32px;
  background: var(--card) var(--chevron) right 10px center / 14px no-repeat;
  cursor: pointer;
}
select.compact {
  width: auto;
  min-height: 30px;
  font-size: 13px;
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-halo);
}
textarea.mono,
input.mono {
  font-size: 13px;
}

.page-header {
  margin-bottom: 20px;
}
.crumbs {
  display: flex;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}
.crumbs a {
  color: var(--muted);
}
.crumbs span {
  display: inline-flex;
  align-items: center;
}
.crumb-sep {
  width: 14px;
  height: 14px;
  margin: 0 2px;
  transform: rotate(-90deg);
}
.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.page-title h1 {
  font-size: 22px;
  line-height: 34px;
}
.page-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 640px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13.5px;
}
.page-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.panel {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.panel > .panel-title,
.panel > .panel-text,
.panel > .usage-grid,
.panel > .btn,
.panel > .fingerprint {
  margin: 0 18px 14px;
}
.panel > .panel-title {
  margin-top: 16px;
  margin-bottom: 6px;
  font-size: 15px;
}
.panel > .panel-text {
  color: var(--muted);
  font-size: 13.5px;
}
.panel > .fingerprint {
  display: inline-block;
}
.danger-zone {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.toolbar > select {
  width: auto;
}
.toolbar .usage {
  min-width: 200px;
  margin-left: auto;
}
.search {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  max-width: 320px;
}
.search .icon {
  position: absolute;
  left: 10px;
  color: var(--muted);
}
.search input {
  padding-left: 32px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}
.table th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: nowrap;
}
.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tbody tr:last-child td {
  border-bottom: none;
}
.table.clickable tbody tr {
  cursor: pointer;
}
.table tbody tr:hover td {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table .center {
  text-align: center;
}
.table-empty {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 18px;
  color: var(--muted);
}
.table-more {
  display: flex;
  justify-content: center;
  padding: 12px;
  border-top: 1px solid var(--border);
}
.cell-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
}
a.cell-title:hover {
  text-decoration: none;
  color: var(--accent);
}
.cell-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
}
.row-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chip {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge .icon {
  width: 13px;
  height: 13px;
}
.badge.accent {
  background: var(--accent-soft);
  color: var(--accent);
}
.badge.ok {
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok);
}
.badge.warn {
  background: var(--warn-soft);
  color: var(--warn);
}
.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.cell-title .badge {
  font-weight: 500;
}
.avatar {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.avatar.sm {
  width: 24px;
  height: 24px;
  font-size: 11px;
}
.avatar.md {
  width: 30px;
  height: 30px;
  font-size: 13px;
}
.avatar.lg {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 15px;
}
.avatar-stack {
  display: flex;
  align-items: center;
}
.avatar-stack .avatar {
  margin-right: -6px;
  box-shadow: 0 0 0 2px var(--card);
}
.avatar-stack .muted {
  margin-left: 12px;
  font-size: 12.5px;
}
.fingerprint {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.alert {
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--danger-soft);
  color: var(--text);
  font-size: 13.5px;
}
.alert.warn {
  background: var(--warn-soft);
}
.alert.action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.invite-banner {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--accent-soft);
}
.invite-banner-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.invite-banner-row > span {
  flex: 1;
}
.invite-banner-row + .invite-banner-row {
  border-top: 1px solid var(--border);
}
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.tabs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: -1px;
  padding: 8px 12px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.tabs a:hover {
  color: var(--text);
}
.tabs a[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--text);
}
.tab-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 4px 4px;
  padding: 4px 10px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  align-self: center;
}
.tab-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tab-count {
  padding: 0 6px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 18px;
}
.tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
}
.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface);
}
.segmented button {
  padding: 4px 12px;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.segmented button[aria-selected="true"] {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}

.secret-name code {
  font-size: 13px;
  font-weight: 600;
}
.secrets-table .secret-name {
  width: 30%;
}
.value-toggle {
  max-width: 100%;
  overflow: hidden;
  padding: 2px 6px;
  margin-left: -6px;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.value-toggle:hover {
  background: var(--surface);
}
.value-toggle.shown {
  color: var(--text);
  letter-spacing: 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.value-plain {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-all;
}
.secret-name .badge {
  margin-left: 8px;
}
.inline-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inline-edit-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.inline-edit-actions .segmented {
  margin-right: auto;
}
tr.editing td {
  background: var(--accent-soft);
}
.matrix-summary {
  padding: 12px 14px 0;
}
.matrix th a {
  color: var(--muted);
}
.cell-set {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ok) 14%, transparent);
  color: var(--ok);
}
.cell-set .icon {
  width: 13px;
  height: 13px;
}
.cell-missing {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent);
  border-radius: 50%;
  color: var(--warn);
  font-size: 12px;
  text-decoration: none;
}
.cell-missing:hover {
  background: var(--warn-soft);
  text-decoration: none;
}
.empty-state {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.panel .empty-state {
  border: 0;
  border-radius: 0;
  background: none;
}
.empty-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.empty-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}
.empty-action {
  flex-shrink: 0;
}
.empty-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
}
.empty-icon .icon {
  width: 18px;
  height: 18px;
}
@media (max-width: 640px) {
  .empty-state {
    flex-wrap: wrap;
  }
  .empty-action {
    width: 100%;
  }
}

.dialog {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.28);
}
.dialog::backdrop {
  background: rgb(0 0 0 / 0.45);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 0;
}
.dialog-head h2 {
  font-size: 16px;
}
.dialog-text {
  padding: 8px 18px 0;
  color: var(--muted);
  font-size: 13.5px;
}
.dialog-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 18px 4px;
}
.dialog-error {
  margin: 12px 18px 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--danger-soft);
  font-size: 13px;
}
.dialog-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field-label {
  font-size: 13px;
  font-weight: 600;
}
.field-hint {
  color: var(--muted);
  font-size: 12.5px;
}
.form-error {
  color: var(--danger);
  font-size: 13px;
}
.env-values {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.env-value {
  display: grid;
  grid-template-columns: 130px 1fr;
  align-items: start;
  gap: 10px;
}
.env-value.off textarea {
  opacity: 0.45;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.check input {
  accent-color: var(--accent);
}
.verify {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 10px;
  background: var(--surface);
}
.verify .fingerprint {
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
}

.menu {
  position: relative;
}
.menu > .icon-button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
}
.menu-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 190px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.2);
}
.menu-list button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: none;
  border-radius: 7px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.menu-list button:hover {
  background: var(--surface);
}
.menu-list button.danger {
  color: var(--danger);
}

.usage {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
}
.usage-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
}
.usage-value {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.usage-bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface);
}
.usage-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}
.usage-bar span.full {
  background: var(--warn);
}
.usage-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.console.solo,
.console.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.console.loading {
  justify-content: center;
  gap: 16px;
  padding: 24px 16px;
}
.solo-head {
  align-self: stretch;
  padding: 18px 24px;
}
.solo-main {
  width: min(560px, 100%);
  padding: 32px 16px 80px;
}
.welcome h1 {
  font-size: 24px;
}
.welcome > .muted {
  margin-top: 6px;
}
.welcome-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}
.welcome-form .btn {
  align-self: flex-start;
}
.locked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.locked > .icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}
.spinner {
  display: block;
  width: 22px;
  height: 22px;
  margin: 24px auto;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.toaster {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 40px));
  padding: 10px 8px 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.22);
  pointer-events: auto;
  animation: toast-in 160ms ease-out;
}
.toast > svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.toast.success > svg {
  color: var(--accent);
}
.toast.error {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
}
.toast.error > svg {
  color: var(--danger);
}
.toast > span {
  flex: 1;
}
.toast-close {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.toast-close:hover {
  background: var(--surface);
  color: var(--text);
}
.toast-close svg {
  width: 14px;
  height: 14px;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: 2px;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 200ms;
}
.progress.active {
  opacity: 1;
  transition-delay: 80ms;
}
.progress::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 35%;
  background: var(--accent);
  animation: progress 1.1s ease-in-out infinite;
}
@keyframes progress {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(300%);
  }
}

.spin {
  display: inline-block;
  flex: none;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0.8;
  animation: spin 0.7s linear infinite;
}
.spin.md {
  width: 20px;
  height: 20px;
}
[aria-busy="true"].btn,
.btn[aria-busy="true"]:disabled {
  opacity: 0.85;
  cursor: progress;
}

.skeleton {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    var(--surface) 0%,
    color-mix(in srgb, var(--surface) 55%, var(--border)) 50%,
    var(--surface) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
@keyframes shimmer {
  from {
    background-position: 100% 0;
  }
  to {
    background-position: -100% 0;
  }
}
.skeleton-table {
  display: flex;
  flex-direction: column;
}
.skeleton-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 16px;
  border-top: 1px solid var(--border);
}
.skeleton-row:first-child {
  border-top: 0;
}
.page-skeleton .page-header {
  margin-bottom: 20px;
}
tr.pending-row {
  opacity: 0.55;
  transition: opacity 150ms;
}
@media (prefers-reduced-motion: reduce) {
  .skeleton,
  .progress::before,
  .toast {
    animation: none;
  }
}

@media (max-width: 860px) {
  .console {
    grid-template-columns: minmax(0, 1fr);
  }
  .sidebar {
    min-width: 0;
    position: static;
    height: auto;
    gap: 12px;
    padding: 12px 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .side-nav {
    flex-direction: row;
    overflow-x: auto;
  }
  .side-nav a {
    width: auto;
    white-space: nowrap;
  }
  .side-foot {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-top: 0;
  }
  .side-link {
    width: auto;
  }
  .main {
    padding: 20px 16px 64px;
  }
  .page-title-row {
    flex-direction: column;
  }
  .page-actions {
    flex-wrap: wrap;
  }
  .panel {
    overflow-x: auto;
  }
  .usage-grid {
    grid-template-columns: 1fr;
  }
  .env-value {
    grid-template-columns: 1fr;
  }
  .toolbar .usage {
    margin-left: 0;
  }
}

.toolbar-text {
  flex: 1;
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.tabs .tab-ci {
  margin-left: auto;
}
.tabs .tab-ci .icon {
  width: 15px;
  height: 15px;
}
.copy-field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
}
.copy-field code,
.copy-field pre {
  flex: 1;
  min-width: 0;
  margin: 0;
  overflow-x: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  white-space: pre;
}
.copy-field.block {
  align-items: flex-start;
}

.wordmark-product {
  margin-left: 0.18em;
  color: var(--muted);
  font-weight: 600;
}

.side-skeleton {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 6px;
}

.domain-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 18px 16px;
}
.domain-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.domain-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12.5px;
}
.domain-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.domain-chip button:hover {
  background: var(--card);
  color: var(--text);
}
.domain-chip svg {
  width: 12px;
  height: 12px;
}
.domain-add {
  display: flex;
  gap: 8px;
  max-width: 520px;
}
.domain-add input {
  flex: 1;
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 14px;
}
.panel-head h2 {
  font-size: 15px;
}
.panel-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13.5px;
}
.panel-head-action {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}
.panel > .panel-head + .usage-grid,
.panel > .panel-head + .fingerprint {
  margin-top: 0;
}
.panel.narrow {
  max-width: 640px;
}
.facts {
  margin: 0;
}
.facts > div {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
}
.facts dt {
  color: var(--muted);
  font-size: 13.5px;
}
.facts dd {
  margin: 0;
  font-weight: 500;
}
.panel-note {
  margin: 0;
  padding: 14px 18px 0;
  color: var(--muted);
  font-size: 13.5px;
}
.panel-foot {
  display: flex;
  gap: 8px;
  padding: 16px 18px;
}
.activity-table th:first-child,
.activity-table td:first-child {
  width: 150px;
  white-space: nowrap;
}
.activity-table th:nth-child(2),
.activity-table td:nth-child(2) {
  width: 32%;
}
@media (max-width: 640px) {
  .panel-head {
    flex-wrap: wrap;
  }
  .facts > div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}
.table th:first-child,
.table td:first-child {
  padding-left: 18px;
}
.table th:last-child,
.table td:last-child {
  padding-right: 18px;
}

.row-actions-inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.table .icon-button {
  width: 28px;
  height: 28px;
}
.icon-button.danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn.danger-text {
  color: var(--danger);
}
.btn.danger-text:hover:not(:disabled) {
  background: var(--danger-soft);
  color: var(--danger);
}
.btn.danger:hover:not(:disabled) {
  background: color-mix(in srgb, var(--danger) 88%, #000);
}
.btn .spin,
.btn .icon {
  flex: none;
}

.key-check {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.fingerprint.large {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  gap: 6px 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  letter-spacing: 0.08em;
}

.consequences {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  font-size: 13.5px;
}
