/*
 * CommandCode Bridge dashboard.
 *
 * Layout grammar follows the kiro-lb operations console (sticky header, tab
 * strip, KPI row, paired chart panels, full-width tables). Every colour, font
 * and radius comes from the yelixir.dev design tokens so the bridge keeps the
 * yElixir identity. Fonts load from yelixir.dev (CORS: *) and fall back to the
 * same system stacks the site declares.
 */

@font-face {
  font-family: "Space Grotesk";
  src: url("https://yelixir.dev/fonts/space-grotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("https://yelixir.dev/fonts/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("https://yelixir.dev/fonts/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("https://yelixir.dev/fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --ink-950: #0e0c0a;
  --ink-900: #15120f;
  --ink-850: #1b1714;
  --ink-700: #28231f;
  --cream: #f1ede5;
  --cream-2: #cbc2b4;
  --cream-3: #a69b8c;
  --gold: #e5b45b;
  --teal-lit: #7fb8bb;
  --paper: #f1ede5;
  --paper-2: #ebe5da;
  --paper-hi: #f7f4ee;
  --line-paper: #d2cbc0;
  --body-paper: #5c544a;
  --muted-paper: #6b6258;
  --rust: #9f4d2e;
  --teal-deep: #1d6a72;

  --f-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --f-serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-1: 2px;
  --r-2: 6px;
  --r-3: 14px;
  --r-pill: 999px;
  --t-fast: 160ms;
  --t-base: 260ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --max: 1320px;
  --gutter: clamp(16px, 4vw, 40px);
  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: var(--ink-950);
  --surface: var(--ink-900);
  --surface-2: var(--ink-850);
  --border: rgba(241, 237, 229, 0.12);
  --border-strong: rgba(241, 237, 229, 0.22);
  --text: var(--cream);
  --text-2: var(--cream-2);
  --muted: var(--cream-3);
  --accent: var(--gold);
  --accent-ink: var(--ink-950);
  --good: var(--teal-lit);
  --warn: var(--gold);
  --bad: #d9805c;
  --glass: rgba(21, 18, 15, 0.72);
  --chart-rgb: 229, 180, 91;
  --series: #e5b45b, #7fb8bb, #d9805c, #cbc2b4, #b58ad6, #8fb56b;
}
[data-theme="light"] {
  color-scheme: light;
  --bg: var(--paper);
  --surface: var(--paper-hi);
  --surface-2: var(--paper-2);
  --border: var(--line-paper);
  --border-strong: #bdb4a6;
  --text: var(--ink-700);
  --text-2: var(--body-paper);
  --muted: var(--muted-paper);
  --accent: var(--rust);
  --accent-ink: var(--paper-hi);
  --good: var(--teal-deep);
  --warn: #9a6a12;
  --bad: var(--rust);
  --glass: rgba(241, 237, 229, 0.8);
  --chart-rgb: 159, 77, 46;
  --series: #9f4d2e, #1d6a72, #b57920, #6b6258, #6d4c8f, #4d6b2e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 88px;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: var(--grain);
  opacity: 0.035;
  z-index: 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2,
h3 {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.skip-link:focus {
  top: 12px;
}
.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.mono {
  font-family: var(--f-mono);
}
.num {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted);
}

.icon {
  display: inline-flex;
  width: 16px;
  height: 16px;
  flex: none;
}
.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 500 11px / 1.3 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.kicker::before {
  content: "";
  width: 20px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.kicker a {
  text-decoration: none;
}
.kicker a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--glass);
  border-bottom: 1px solid var(--border);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
}
.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background:
    radial-gradient(circle at 30% 28%, rgba(247, 244, 238, 0.9), transparent 34%),
    conic-gradient(from 200deg, #7fb8bb, #5b7fd6, #b58ad6, #e57fa8, #e5b45b, #8fb56b, #7fb8bb);
  box-shadow: inset 0 0 0 1px rgba(241, 237, 229, 0.25);
}
.brand-name {
  font: 500 17px / 1.1 var(--f-display);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand-name em {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.15em;
  color: var(--accent);
}
.brand-text .kicker {
  margin-top: 4px;
  flex-wrap: wrap;
  column-gap: 6px;
  row-gap: 2px;
  font-size: 10px;
  color: var(--muted);
}
.brand-text .kicker::before {
  display: none;
}
.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font: 500 12px / 1 var(--f-mono);
  color: var(--text-2);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.status-chip[data-state="online"] .status-dot {
  background: var(--good);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent);
}
.status-chip[data-state="offline"] .status-dot {
  background: var(--bad);
}
.status-version {
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: none;
  font: 500 13px / 1 var(--f-body);
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--t-fast),
    border-color var(--t-fast),
    color var(--t-fast),
    transform var(--t-fast) var(--ease-out);
}
.btn:active:not(:disabled) {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
}
.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
}
.btn-outline {
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-outline:hover:not(:disabled) {
  background: color-mix(in srgb, var(--text) 7%, transparent);
}
.btn-outline[aria-pressed="true"] .icon {
  color: var(--good);
}
.btn-ghost {
  color: var(--text-2);
}
.btn-ghost:hover {
  background: color-mix(in srgb, var(--text) 7%, transparent);
  color: var(--text);
}
.btn-accent {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-accent:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent) 88%, var(--text));
}
.btn-danger {
  color: var(--bad);
}
.btn-danger:hover {
  background: color-mix(in srgb, var(--bad) 12%, transparent);
}
.label-short {
  display: none;
}

.select,
.input {
  height: 36px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-2);
  background: var(--surface);
  color: var(--text);
}
.select-sm {
  height: 32px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
}
.input {
  width: 100%;
  font-family: var(--f-mono);
  font-size: 13px;
}
.input::placeholder {
  color: var(--muted);
}

.banner {
  position: relative;
  z-index: 1;
  border-bottom: 1px solid var(--border);
}
.banner .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 8px;
  font-size: 13px;
}
.banner[data-tone="warn"] {
  background: color-mix(in srgb, var(--warn) 12%, transparent);
  color: var(--warn);
}
.banner[data-tone="bad"] {
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  color: var(--bad);
}

.main {
  padding-block: 24px 32px;
}
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
}
.tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  border: 0;
  border-radius: var(--r-pill);
  background: none;
  color: var(--muted);
  font: 500 13px / 1 var(--f-body);
  cursor: pointer;
  transition:
    background-color var(--t-fast),
    color var(--t-fast);
}
.tab:hover {
  color: var(--text);
}
.tab[aria-selected="true"] {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.tab[aria-selected="true"] .icon {
  color: var(--accent);
}
.tab-panel {
  display: grid;
  gap: 24px;
}
.tab-panel[hidden] {
  display: none;
}

.card {
  position: relative;
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface);
  padding: 24px;
}
.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 20px;
}
.card-title {
  font-size: 18px;
  line-height: 1.2;
}
.card-desc {
  margin-top: 6px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 13.5px;
}
.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kpis {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
}
.kpi {
  padding: 20px 22px;
}
.kpi-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font: 500 11px / 1.2 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.kpi-value {
  margin-top: 12px;
  font: 500 30px / 1.05 var(--f-display);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi-hint {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
}
.tone-bad {
  color: var(--bad);
}
.tone-good {
  color: var(--good);
}
.tone-warn {
  color: var(--warn);
}

.pair {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  align-items: stretch;
}

.chart-box {
  position: relative;
  height: 180px;
}
.chart-box canvas {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.chart-empty {
  display: grid;
  place-items: center;
  height: 100%;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-3);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 16px;
}
.figures {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.figures dt {
  color: var(--muted);
  font-size: 12px;
}
.figures dd {
  margin: 2px 0 0;
  font-variant-numeric: tabular-nums;
}
.footnote {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.donut-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
}
.donut {
  position: relative;
  width: 176px;
  height: 176px;
  flex: none;
}
.donut canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.donut-center b {
  font: 500 22px / 1.1 var(--f-display);
  font-variant-numeric: tabular-nums;
}
.donut-center span {
  color: var(--muted);
  font-size: 11px;
}
.legend {
  flex: 1;
  min-width: 200px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.legend li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto 3.5em;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.swatch {
  width: 10px;
  height: 10px;
  border-radius: var(--r-1);
}
.legend .name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--f-mono);
  font-size: 12px;
}
.legend .pct {
  color: var(--muted);
  text-align: right;
  font-size: 12px;
}

.table-scroll {
  overflow-x: auto;
  margin-inline: -24px;
  padding-inline: 24px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
th {
  padding: 0 12px 10px;
  color: var(--muted);
  font: 500 11px / 1.2 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 12px;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}
th:first-child,
td:first-child {
  padding-left: 0;
}
th:last-child,
td:last-child {
  padding-right: 0;
}
.right {
  text-align: right;
}
.cred-id {
  display: grid;
  gap: 2px;
  min-width: 140px;
}
.cred-id b {
  font-weight: 600;
}
.cred-id span {
  color: var(--muted);
  font: 12px / 1.3 var(--f-mono);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  font: 500 11.5px / 1 var(--f-body);
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge[data-tone="good"] {
  color: var(--good);
  border-color: color-mix(in srgb, var(--good) 45%, transparent);
}
.badge[data-tone="warn"] {
  color: var(--warn);
  border-color: color-mix(in srgb, var(--warn) 45%, transparent);
}
.badge[data-tone="bad"] {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
  border-color: transparent;
}
.badge[data-tone="muted"] {
  color: var(--muted);
}

.meter {
  display: grid;
  gap: 6px;
  min-width: 150px;
}
.meter-track {
  height: 6px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--text) 10%, transparent);
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--good);
}
.meter-fill[data-tone="warn"] {
  background: var(--warn);
}
.meter-fill[data-tone="bad"] {
  background: var(--bad);
}
.meter-text {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  flex: none;
}
.switch input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.switch span {
  width: 100%;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--text) 18%, transparent);
  transition: background-color var(--t-fast);
}
.switch span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform var(--t-base) var(--ease-out);
}
.switch input:checked + span {
  background: var(--accent);
}
.switch input:checked + span::after {
  transform: translateX(16px);
}
.switch input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.switch input:disabled {
  cursor: not-allowed;
}
.switch input:disabled + span {
  opacity: 0.4;
}

.cred-edit {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(120px, 1fr) minmax(180px, 2fr) auto auto;
  align-items: end;
  padding-block: 14px;
  border-top: 1px solid var(--border);
}
.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.field label,
.field .label {
  color: var(--muted);
  font: 500 11px / 1.2 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.field .help {
  color: var(--muted);
  font-size: 12px;
}

.model-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.model-toolbar .input {
  width: min(320px, 100%);
  font-family: var(--f-body);
}
.provider-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr));
}
.provider {
  border: 1px solid var(--border);
  border-radius: var(--r-3);
  background: var(--surface-2);
}
.provider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.provider-head h3 {
  font-size: 15px;
}
.provider-count {
  color: var(--muted);
  font: 500 12px / 1 var(--f-mono);
}
.model-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: center;
  padding: 10px 16px;
}
.model-row + .model-row {
  border-top: 1px solid var(--border);
}
.model-row .id {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 12px / 1.4 var(--f-mono);
  color: var(--muted);
}
.model-row .label {
  font-weight: 500;
}
.model-row .meta {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.settings-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}
.form-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.key-row {
  display: flex;
  gap: 8px;
}
.key-row .input {
  flex: 1;
}
.policy-list {
  display: grid;
  gap: 8px;
}
.policy {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-2);
  cursor: pointer;
  transition: background-color var(--t-fast);
}
.policy:hover {
  background: color-mix(in srgb, var(--text) 4%, transparent);
}
.policy:has(input:checked) {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}
.policy input {
  margin: 3px 0 0;
  accent-color: var(--accent);
}
.policy b {
  font-weight: 500;
}
.policy span {
  grid-column: 2;
  color: var(--muted);
  font-size: 12.5px;
}
.policy code {
  font: 11px / 1 var(--f-mono);
  color: var(--muted);
}

.kv-table td:first-child {
  width: 50%;
  color: var(--muted);
}
.kv-table td:last-child {
  text-align: right;
  font-weight: 500;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 40px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-3);
  text-align: center;
  color: var(--muted);
}
.empty .icon {
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.empty b {
  color: var(--text-2);
  font-weight: 500;
}

.skeleton {
  height: 14px;
  border-radius: var(--r-1);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--text) 6%, transparent) 25%,
    color-mix(in srgb, var(--text) 12%, transparent) 50%,
    color-mix(in srgb, var(--text) 6%, transparent) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}
@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.action-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 24px);
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  transform: translateX(-50%);
}
.action-bar[hidden] {
  display: none;
}
.action-text {
  color: var(--text-2);
  font-size: 13px;
}

.toast {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 40;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  transition:
    opacity var(--t-base),
    transform var(--t-base) var(--ease-out);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 720px) {
  .tab-label,
  .label-long {
    display: none;
  }
  .label-short {
    display: inline;
  }
  .header-actions {
    width: 100%;
  }
  .status-chip {
    margin-right: auto;
  }
  .card {
    padding: 18px;
  }
  .table-scroll {
    margin-inline: -18px;
    padding-inline: 18px;
  }
  .cred-edit {
    grid-template-columns: 1fr auto auto;
  }
  .cred-edit .field-key {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .action-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
