/*
 * Copyright (c) 2026 MariaDB Foundation
 * SPDX-License-Identifier: GPL-2.0-only
 */

/* Marina, styled after the MariaDB Server Ecosystem Hub (ecohub.mariadb.org):
   teal gradient header and footer, sticky breadcrumb bar, white cards with
   2px grey borders, system font stack. This is the "ecohub" theme; the
   others (assets/themes/<name>.css) load after it and override these
   variables and, where the look differs, the page chrome. */
:root {
  color-scheme: light;
  --ink: #212529;
  --text: #333;
  --muted: #6c757d;
  --subtle: #495057;
  --ice: #f0f4f5;
  --surface: #f8f9fa;
  --paper: #fff;
  --teal: #003545;
  --teal2: #005570;
  --family-mariadb: #003545;
  --family-mysql: #00758f;
  --line: #e9ecef;
  --line-strong: #dee2e6;
  --line-hover: #adb5bd;
  --card: #fff;
  --on-accent: #fff;
  --accent-bg: #e3eef1;
  --accent-line: #8fb3bd;
  --selected: #eef5f6;
  --ok: #08754b;
  --ok-bg: #e1f7ed;
  --warn: #98670a;
  --warn-bg: #fff3d6;
  --warn-line: #f2d386;
  --bad: #a33030;
  --bad-bg: #fde7e7;
  --shadow: 0 4px 16px rgba(0, 53, 69, .1);
  --hero-gradient: linear-gradient(135deg, #003545 0%, #005570 100%);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-y: scroll; scrollbar-gutter: stable; }
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: clip;
}
button, input, select, textarea { font-family: inherit; }
h1, h2, h3 { margin: .2em 0; color: var(--teal); line-height: 1.25; }
h1 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.2rem; font-weight: 600; }
em { color: var(--teal2); font-style: normal; }
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }

.shell { width: min(1200px, calc(100% - 40px)); margin: 0 auto; flex: 1 0 auto; }
section { padding: 40px 0; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.eyebrow { color: var(--teal2); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.card { background: var(--card); border: 2px solid var(--line); border-radius: 10px; }
.empty { padding: 40px; color: var(--muted); }

.metrics { display: grid; grid-template-columns: repeat(3, 110px); gap: 0; overflow: hidden; background: var(--card); border: 2px solid var(--line); border-radius: 10px; }
.metrics div { padding: 20px 18px; }
.metrics div + div { border-left: 2px solid var(--line); }
.metrics strong, .metrics span { display: block; }
.metrics strong { color: var(--teal); font-size: 1.8rem; font-weight: 700; line-height: 1.2; }
.metrics span { color: var(--muted); font-size: 12px; }

.server-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.server { padding: 22px; transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease; }
.server:hover { transform: translateY(-2px); border-color: var(--teal); box-shadow: var(--shadow); }
.server-top { display: flex; justify-content: space-between; align-items: center; }
.server p, .server small, .plugin p { color: var(--muted); }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line-hover); }
.dot.up { background: #21b878; box-shadow: 0 0 0 5px #21b87818; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; background: var(--line); color: var(--subtle); font-size: .65rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.badge.active, .badge.succeeded { background: var(--ok-bg); color: var(--ok); }
.badge.quarantine, .badge.delivered { background: var(--warn-bg); color: var(--warn); }
.badge.disabled, .badge.failed { background: var(--bad-bg); color: var(--bad); }
.badge.neutral, .badge.queued { background: var(--accent-bg); color: var(--teal); }

button { padding: 9px 16px; border: 0; border-radius: 4px; background: var(--teal); color: var(--on-accent); font-size: .9rem; font-weight: 600; cursor: pointer; transition: background .2s ease, color .2s ease, box-shadow .2s ease; }
button:hover { background: var(--teal2); }
.secondary, button.secondary { background: var(--card); color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); }
.secondary:hover, button.secondary:hover { background: var(--teal); color: var(--on-accent); }

.detail { padding: 28px; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; margin: 30px 0; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px; border-bottom: 1px solid var(--line); font-size: 13px; text-align: left; }
th { color: var(--muted); font-weight: 600; }

.catalog-list { display: grid; gap: 16px; }
.plugin { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; padding: 25px; transition: border-color .2s ease, box-shadow .2s ease; }
.plugin:hover { border-color: var(--teal); box-shadow: var(--shadow); }
.plugin dl { display: grid; grid-template-columns: 1fr 1fr; margin: 0; }
.plugin dl div { padding: 5px; }
.plugin dt { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.plugin dd { margin: 2px 0; color: var(--ink); font-weight: 600; }

dialog { width: min(650px, 92vw); padding: 0; border: 1px solid var(--teal); border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
dialog::backdrop { background: rgba(0, 53, 69, .62); }
dialog form { padding: 30px; }
.dialog-title { display: flex; justify-content: space-between; gap: 12px; }
.icon, button.icon { padding: 0; background: transparent; color: var(--muted); font-size: 25px; }
.icon:hover, button.icon:hover { background: transparent; color: var(--teal); }

.stack { display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
label { display: grid; gap: 6px; color: var(--subtle); font-size: 13px; font-weight: 600; }
input, select, textarea { width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: 6px; outline: none; background: var(--card); color: var(--ink); font: inherit; transition: border-color .2s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); }
textarea { min-height: 80px; }
.alert { margin: 20px 0; padding: 13px 17px; border: 1px solid var(--accent-line); border-left: 4px solid var(--teal); border-radius: 6px; background: var(--ice); color: var(--teal); white-space: normal; }

/* Sign-in and set-password screens. */
.login { display: grid; place-items: center; align-content: center; gap: 26px; min-height: 100vh; padding: 30px 16px; background: var(--hero-gradient); }
.login-foundation img { display: block; height: 64px; }
.login-card { width: min(420px, 100%); padding: 40px; border: 0; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.login-mark { display: block; width: auto; height: 44px; margin-bottom: 10px; }
.login-logo { margin: 0 0 6px; text-align: center; }
.login-logo img { display: inline-block; width: 190px; height: auto; }
.login-logo + p { text-align: center; }
.login-card p { margin-bottom: 26px; color: var(--muted); }
.login-card form { display: grid; gap: 17px; }
.login-card button { margin-top: 8px; padding: 11px 16px; }

/* Header, hero, breadcrumb bar, and footer: the Ecosystem Hub's page chrome. */
.site-hero { padding: 0 20px; background: var(--hero-gradient); color: white; }
.hero-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; max-width: 1200px; margin: 0 auto; padding: 20px 0; }
.header-brand, .header-wordmarks { display: flex; align-items: center; gap: 14px; }
.header-wordmarks { flex-wrap: wrap; }
.header-logo img { display: block; height: 80px; }
/* A theme's partner logo sits right after the MariaDB Foundation logo. */
.header-logos { display: flex; align-items: center; gap: 14px; }
.header-logo.partner-logo img, .login-foundation.partner-logo img { height: 40px; }
.partner-logo-sep { align-self: stretch; width: 1px; min-height: 32px; margin: 8px 0; background: var(--partner-sep, rgba(255, 255, 255, .35)); }
.login-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px; }
.header-brand-sep { color: rgba(255, 255, 255, .3); font-size: 1.4rem; font-weight: 300; line-height: 1; }
.header-wordmarks .header-brand-sep { font-size: 1rem; }
.header-wordmark { color: rgba(255, 255, 255, .85); font-size: 1rem; font-weight: 600; letter-spacing: .02em; transition: color .2s ease; }
.header-wordmark:hover { color: white; }
.header-wordmark .nav-badge { margin-left: 6px; background: #ff7a1a; }
.header-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.header-btn { display: inline-flex; align-items: center; padding: 8px 20px; border-radius: 4px; font-size: .9rem; font-weight: 600; white-space: nowrap; transition: all .2s ease; }
.header-btn--solid { background: white; color: var(--teal); }
.header-btn--solid:hover { background: var(--line); }
.header-btn--outline { border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .15); color: white; }
.header-btn--outline:hover { border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .25); }

.hero__content { max-width: 1000px; margin: 0 auto; padding: 40px 0 70px; text-align: center; }
.hero__content--compact { padding: 4px 0 30px; }
.hero__content h1 { margin: 0 0 18px; color: white; font-size: 3rem; line-height: 1.2; }
.hero__content--compact h1 { margin: 0; font-size: 2rem; }
.hero-title { display: inline-flex; align-items: center; gap: 16px; }
.hero-mark { width: auto; height: .95em; }
.hero__content p { margin: 0 auto; max-width: 760px; font-size: 1.25rem; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; }
.hero-stats, .hero-cta { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 20px; background: rgba(255, 255, 255, .12); color: white; font-size: .85rem; font-weight: 600; }
.hero-cta { cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.hero-cta:hover { border-color: rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .2); }

.page-breadcrumb { position: sticky; top: 0; z-index: 100; padding: 0 20px; border-bottom: 2px solid var(--line); background: var(--surface); }
.page-breadcrumb-inner { display: flex; flex-wrap: wrap; align-items: center; max-width: 1200px; margin: 0 auto; padding: 9px 0; color: var(--muted); font-size: 1rem; font-weight: 600; }
.breadcrumb-home { display: inline-flex; align-items: center; color: var(--teal); opacity: .65; transition: opacity .2s ease; }
.breadcrumb-home:hover { opacity: 1; }
.breadcrumb-sep { margin: 0 8px; opacity: .4; }
.breadcrumb-link { color: var(--teal); }
.breadcrumb-link:hover { color: var(--teal2); text-decoration: underline; }
.breadcrumb-current { color: var(--teal); }

.site-footer { margin-top: 60px; padding: 30px 20px; background: var(--hero-gradient); color: white; text-align: center; }
.footer-content { max-width: 1200px; margin: 0 auto; }
.footer-contact { margin: 0 0 12px; font-size: .95rem; opacity: .85; }
.footer-contact a, .footer-copyright a { color: white; text-decoration: underline; text-underline-offset: 2px; }
.footer-copyright { margin: 0; font-size: .85rem; opacity: .7; }

@media (max-width: 768px) {
  .hero-top { align-items: flex-start; padding: 22px 0 6px; }
  .header-nav { flex-direction: column; align-items: flex-end; }
  .section-title { flex-wrap: wrap; }
  .section-title button, .section-title .catalog-header-actions { white-space: nowrap; }
  .header-logo img { height: 55px; }
  .header-logo.partner-logo img { height: 28px; }
  .header-btn { padding: 5px 10px; font-size: .75rem; }
  .hero__content { padding: 30px 0 50px; }
  .hero__content h1 { font-size: 2rem; }
  .hero__content--compact h1 { font-size: 1.6rem; }
  .hero__content p { font-size: 1rem; }
  .metrics { margin-top: 35px; grid-template-columns: repeat(3, 1fr); }
  .two-col, .plugin, .form-grid { grid-template-columns: 1fr; }
  .section-title { align-items: center; }
}

@media (max-width: 540px) {
  .header-brand { flex-direction: column; align-items: flex-start; gap: 6px; }
  .header-brand > .header-brand-sep { display: none; }
  .header-wordmarks { column-gap: 18px; row-gap: 2px; }
  .header-wordmarks .header-brand-sep { display: none; }
  /* Two logos side by side must still leave room for the header buttons. */
  .header-logos { gap: 10px; }
  .header-logos:has(.partner-logo) .header-logo img { height: 34px; }
  .header-logos .header-logo.partner-logo img { height: 22px; } /* beats themes' desktop sizes */
}

.plugin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.plugin-repository-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
}

.plugin-repository-link:hover {
  color: var(--teal);
}

.plugin-repository-link svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  opacity: .72;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

button.small {
  padding: 7px 11px;
  font-size: 12px;
}

button.danger {
  background: #a33030;
  color: white;
}

button.danger:hover {
  background: #7e2222;
}

dialog:has(.catalog-editor) {
  width: min(860px, 94vw);
}

dialog p {
  color: var(--muted);
  margin: 0;
}

label small {
  color: var(--muted);
  font-weight: 400;
}



#servers {
  padding-top: 28px;
}

#servers .section-title {
  margin-bottom: 28px;
}

.server-grid {
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  align-items: stretch;
}

.server.card {
  display: flex;
  flex-direction: column;
  min-height: 310px;
  padding: 24px;
  overflow: hidden;
}

.server-top {
  gap: 18px;
}

.server-identity {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 13px;
}

.database-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--ice);
}

.database-icon img {
  width: 34px;
  height: 34px;
}

.server-kicker {
  color: var(--teal2);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
}

.server-identity h3 {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-uid {
  margin: 18px 0;
  padding: 9px 11px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--subtle);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-specs {
  display: grid;
  gap: 11px;
}

.server-specs div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
}

.server-specs span {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .055em;
}

.server-specs strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.server-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.presence {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 600;
}

.presence .dot {
  width: 7px;
  height: 7px;
}

@media (max-width: 460px) {
  .server-grid {
    grid-template-columns: 1fr;
  }

  .server.card {
    padding: 19px;
  }

  .server-specs div {
    grid-template-columns: 1fr;
    gap: 1px;
  }
}

.bulk-plugin-form {
  margin: 28px 0 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.bulk-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  background: var(--surface);
}

.bulk-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.bulk-heading-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

button.operation-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 0;
  color: var(--teal);
  background: transparent;
  font-size: 12px;
}

.operation-filter-toggle svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  transition: transform .18s ease;
}

.operation-filter-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.select-all {
  display: flex;
  grid-auto-flow: column;
  align-items: center;
  white-space: nowrap;
}

.select-all input,
.plugin-selection-table input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--teal);
  cursor: pointer;
}

.operation-filters {
  display: grid;
  gap: 12px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.operation-search,
.catalog-search {
  display: grid;
  grid-template-columns: 85px minmax(220px, 420px);
  align-items: center;
  gap: 12px;
}

.operation-search span,
.catalog-search span {
  color: var(--teal);
  font-size: .9rem;
  font-weight: 700;
}

.operation-search input,
.catalog-search input {
  padding: 11px 16px;
  border-radius: 20px;
  background: var(--card);
}

.plugin-table-wrap {
  overflow-x: auto;
}

.plugin-selection-table th,
.plugin-selection-table td {
  padding: 13px 14px;
}

.plugin-selection-table tbody tr {
  transition: background .15s ease;
}

.plugin-selection-table tbody tr.selected {
  background: var(--selected);
}

.plugin-selection-table td:nth-child(2) strong,
.plugin-selection-table td:nth-child(2) small {
  display: block;
}

.plugin-selection-table td:nth-child(2) small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.check-column {
  width: 42px;
}

.state-mark {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
}

.state-mark::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aab8bc;
  content: '';
}

.state-mark.yes::before {
  background: #21b878;
}

.state-mark.unmanaged {
  color: var(--bad);
}

.state-mark.unmanaged::before {
  background: #c7353c;
  box-shadow: 0 0 0 3px rgba(199, 53, 60, .12);
}

.state-mark.no {
  color: var(--muted);
}

.operation-version {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.operation-version-select {
  width: auto;
  min-width: 0;
  padding: 3px 26px 3px 8px;
  font-size: 13px;
}

.operation-update {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  color: var(--warn);
  background: var(--warn-bg);
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.operation-update svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.empty-row {
  padding: 30px !important;
  color: var(--muted);
  text-align: center;
}

.bulk-action-bar {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 18px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.bulk-action-bar label {
  min-width: 170px;
}

/* Catalog plugins an install needs first, confirmed before they are queued. */
.dependency-confirmation {
  margin: 20px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--warn);
}

.dependency-confirmation .bulk-action-bar {
  align-items: center;
  margin: 0 -22px -18px;
}

.dependency-confirmation a.secondary {
  padding: 9px 16px;
  border-radius: 4px;
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}

.operation-requires {
  display: block;
  color: var(--warn);
}

.selection-count {
  align-self: center;
  color: var(--muted);
  font-size: 12px;
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

/* Generic in-progress spinner for plain text buttons (icon buttons like
   .catalog-refresh-button spin their own svg instead, see below). */
button.spinning:not(.catalog-refresh-button)::after {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-left: 8px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: .7;
  animation: catalog-refresh-spin .8s linear infinite;
}

.server-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editable-server-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.edit-name-button {
  display: inline-grid;
  width: 30px;
  height: 30px;
  padding: 0;
  place-items: center;
  color: var(--teal);
  background: var(--ice);
  border-radius: 6px;
}

.edit-name-button:hover {
  color: var(--on-accent);
  background: var(--teal2);
}

.edit-name-button svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.server-detail-uid {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.server-detail-actions form {
  margin: 0;
}

.server-badges {
  display: flex;
  align-items: center;
  gap: 7px;
}

.update-available {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 27px;
  padding: 4px 8px;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 99px;
  box-shadow: 0 4px 12px #b878001c;
}

.plugin-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--teal);
}

.plugin-count svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.plugin-count span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.update-available svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

.update-available strong {
  font-size: 11px;
  line-height: 1;
}

.catalog-filters {
  display: grid;
  gap: 15px;
  margin: 0 0 24px;
  padding: 0;
}

.catalog-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

button.catalog-copy-button {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  color: var(--teal);
  background: var(--ice);
  border-radius: 6px;
}

.catalog-copy-button:hover,
.catalog-copy-button.copied {
  color: var(--on-accent);
  background: var(--teal);
}

.catalog-copy-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.catalog-copy-button .copy-done-icon,
.catalog-copy-button.copied .copy-icon {
  display: none;
}

.catalog-copy-button.copied .copy-done-icon {
  display: block;
}

.catalog-key-button {
  display: inline-grid;
  place-items: center;
  width: 31px;
  height: 31px;
  color: var(--teal);
  background: var(--ice);
  border-radius: 6px;
}

.catalog-key-button:hover {
  color: var(--on-accent);
  background: var(--teal);
}

.catalog-key-button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.catalog-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.catalog-header-actions form {
  margin: 0;
}

button.catalog-refresh-button {
  display: inline-grid;
  place-items: center;
  width: 39px;
  height: 39px;
  padding: 0;
  color: var(--teal);
  background: var(--ice);
}

.catalog-refresh-button:hover {
  color: var(--on-accent);
  background: var(--teal);
}

.catalog-refresh-button svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.catalog-refresh-button:disabled {
  opacity: .7;
  cursor: default;
}

.catalog-refresh-button.spinning svg {
  animation: catalog-refresh-spin .8s linear infinite;
}

@keyframes catalog-refresh-spin {
  to { transform: rotate(360deg); }
}

.plugin {
  position: relative;
}

.plugin-external-badge {
  position: absolute;
  top: -10px;
  right: 18px;
  padding: 4px 11px;
  border-radius: 99px;
  background: var(--accent-bg);
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  box-shadow: 0 4px 10px rgba(25, 61, 66, .12);
}

.plugin-federated {
  border-style: dashed;
}

.plugin-update-badge {
  position: absolute;
  top: -10px;
  right: 18px;
  padding: 4px 11px;
  border-radius: 99px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  box-shadow: 0 4px 10px rgba(25, 61, 66, .12);
}

.catalog-filter-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
  gap: 28px;
}

.catalog-filters > .catalog-search {
  grid-template-columns: 85px minmax(0, 1fr);
}

@media (max-width: 850px) {
  .catalog-filter-top {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .catalog-filters > .catalog-search {
    grid-template-columns: 85px minmax(0, 1fr);
  }
}

.filter-group {
  display: grid;
  grid-template-columns: 85px 1fr;
  align-items: start;
  gap: 12px;
}

.filter-label {
  padding-top: 7px;
  color: var(--teal);
  font-size: .9rem;
  font-weight: 700;
}

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

button.filter-chip {
  padding: 6px 14px;
  color: var(--subtle);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: 20px;
  font-size: .85rem;
  font-weight: 500;
}

button.filter-chip:hover {
  color: var(--subtle);
  background: var(--line);
  border-color: var(--line-hover);
}

button.filter-chip.active,
button.filter-chip.active:hover {
  color: var(--on-accent);
  background: var(--teal);
  border-color: var(--teal);
}

.filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 12px;
}

/* A checkbox drawn as an on/off switch: <label class="switch"><input type="checkbox" role="switch"><span class="switch-track"></span>Label</label>. */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--subtle);
  cursor: pointer;
}

.catalog-federated-switch {
  margin-left: auto;
  margin-right: 16px;
}

.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.switch .switch-track {
  position: relative;
  width: 30px;
  height: 17px;
  background: var(--line-strong);
  border-radius: 9px;
  transition: background .15s;
}

.switch .switch-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  background: var(--card);
  border-radius: 50%;
  transition: transform .15s;
}

.switch input:checked + .switch-track {
  background: var(--teal);
}

.switch input:checked + .switch-track::after {
  transform: translateX(13px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.switch:has(input:disabled) {
  opacity: .5;
  cursor: not-allowed;
}

button.filter-clear {
  padding: 3px 0;
  color: var(--teal);
  background: transparent;
  font-size: 12px;
}

.catalog-no-matches {
  padding: 34px;
  color: var(--muted);
  text-align: center;
  box-shadow: none;
}

[hidden] {
  display: none !important;
}

button.installation-count {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 9px;
  color: var(--teal);
  background: var(--ice);
  border-radius: 99px;
  font-size: 12px;
}

button.installation-count:hover:not(:disabled) {
  color: var(--on-accent);
  background: var(--teal);
}

button.installation-count:disabled {
  color: var(--muted);
  opacity: .7;
}

.installation-dialog {
  width: min(850px, 94vw);
}

.dialog-content {
  padding: 30px;
}

.dialog-content > p {
  color: var(--muted);
}

.installation-list {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.installation-server {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) minmax(110px, .6fr) minmax(100px, .5fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px;
  border: 2px solid var(--line);
  border-radius: 8px;
  transition: .15s;
}

.installation-server:hover {
  background: var(--surface);
  border-color: var(--line-hover);
}

.installation-server > span:not(.database-icon) {
  display: grid;
}

.installation-server small {
  color: var(--muted);
  font-size: 11px;
}

.installation-server-name {
  min-width: 0;
}

.installation-server-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}




.admin-grid {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.4fr);
  gap: 16px;
}

.admin-panel {
  padding: 24px;
}

/* Always start its own row in the left column, regardless of how many
   panels precede it (that count varies with which admin sections the
   viewer can see) - keeps it in a predictable spot instead of drifting
   to the right column when the count above it is odd. */
.api-keys-panel {
  grid-column: 1;
}

.admin-panel > p,
.admin-panel-title p {
  color: var(--muted);
}

.mode-options {
  display: grid;
  gap: 8px;
}

.mode-option {
  grid-template-columns: auto 1fr;
  align-items: start;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.mode-option:has(input:checked) {
  background: var(--ice);
  border-color: var(--accent-line);
}

.mode-option input {
  width: auto;
  margin-top: 4px;
  accent-color: var(--teal);
}

.mode-option span {
  display: grid;
}

.mode-option small,
.token-row small {
  color: var(--muted);
  font-weight: 400;
}

.admin-panel-title,
.token-generator,
.token-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.token-generator label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.token-generator select {
  width: 70px;
  padding: 8px;
}

.admin-notice,
.empty-token-list {
  padding: 12px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 9px;
  font-size: 12px;
}

.token-list {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.token-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.token-row > div:first-child {
  display: grid;
  min-width: 0;
}

.token-row code {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.token-actions form {
  margin: 0;
}

@media (max-width: 620px) {
  .server-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-group {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .installation-server {
    grid-template-columns: auto 1fr;
  }

  .installation-server > span:nth-child(n+3) {
    grid-column: 2;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-panel-title,
  .token-row {
    align-items: stretch;
  }

  .admin-panel-title {
    flex-direction: column;
  }

  .token-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .bulk-heading,
  .bulk-action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .select-all {
    align-self: flex-start;
  }

  .bulk-action-bar label {
    width: 100%;
  }
}

/* Roles, users, public catalog, and plugin submissions. */

.login-footnote {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.metrics-1 {
  grid-template-columns: 130px;
}

.metrics-2 {
  grid-template-columns: repeat(2, 110px);
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  color: var(--muted);
  font-size: 12px;
}

.status-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}

.status-filters a {
  cursor: pointer;
}

.badge.active-filter {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
}

.badge.new {
  background: var(--accent-bg);
  color: var(--teal);
}

.badge.in_review {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge.reviewed_ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge.denied,
.badge.spam {
  background: var(--bad-bg);
  color: var(--bad);
}

.submission-dialog {
  width: min(760px, 94vw);
}

.submission-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
}

.submission-fields div {
  padding: 5px 0;
}

.submission-fields dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.submission-fields dd {
  margin: 2px 0;
  font-weight: 600;
}

.submission-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.submission-detection-error {
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--bad-bg);
  color: var(--bad);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.submission-marina {
  max-height: 320px;
  overflow: auto;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 4px;
}

.submission-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.as-button {
  display: inline-block;
  border-radius: 4px;
  padding: 7px 11px;
  background: var(--teal);
  color: var(--on-accent);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  cursor: pointer;
}

.as-button:hover {
  background: var(--teal2);
}

.comment-thread {
  display: grid;
  gap: 10px;
  margin: 14px 0 20px;
}

.comment {
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.comment-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.comment p {
  margin: 6px 0 0;
}

.role-checkboxes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.role-checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 99px;
  cursor: pointer;
  font-size: 12px;
}

.role-checkbox:has(input:checked) {
  background: var(--ice);
  border-color: var(--accent-line);
  color: var(--teal);
}

.role-checkbox input {
  width: auto;
  accent-color: var(--teal);
}

.user-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.user-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.user-row-identity small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.user-roles-form {
  gap: 8px;
}

.user-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.user-row-actions form {
  margin: 0;
}

@media (max-width: 620px) {
  .submission-fields {
    grid-template-columns: 1fr;
  }
}

.review-import-dialog {
  width: min(820px, 94vw);
}

.review-entry {
  display: grid;
  gap: 13px;
  margin: 0 0 16px;
  padding: 16px;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.review-entry legend {
  padding: 0 6px;
}

.review-entry legend label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.review-entry legend input {
  width: auto;
  accent-color: var(--teal);
}

.discard-form {
  margin-top: 4px;
}

.foundry-review td:first-child,
.foundry-review th:first-child {
  width: 1%;
}

.foundry-review input[type="checkbox"] {
  width: auto;
  accent-color: var(--teal);
}

.legacy-duplicates-alert,
.authority-missing-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}

.legacy-duplicate-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
}

.nav-link-with-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 99px;
  background: var(--teal);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.plugin-variants {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.plugin-variants summary {
  cursor: pointer;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.plugin-variants[open] summary {
  margin-bottom: 12px;
}

.variant-table-wrap {
  overflow-x: auto;
}

.variant-table {
  min-width: 640px;
}

.variant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.variant-table .archive-version th {
  padding-top: 12px;
  text-align: left;
  font-weight: 700;
}

.variant-table .archive-version th > span {
  margin-right: 10px;
}

.variant-table .archive-version.is-disabled th {
  color: var(--subtle);
  font-weight: 600;
}

.catalog-verify-button.status-verified {
  color: var(--ok);
  background: var(--ok-bg);
}

.catalog-verify-button.status-verified:hover {
  color: white;
  background: #08754b;
}

.catalog-verify-button.status-differs {
  color: var(--bad);
  background: var(--bad-bg);
}

.catalog-verify-button.status-differs:hover {
  color: white;
  background: #a33030;
}

.authority-badge {
  position: absolute;
  top: -10px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  box-shadow: 0 4px 10px rgba(25, 61, 66, .12);
}

.authority-badge svg {
  width: 11px;
  height: 11px;
  fill: currentColor;
  flex-shrink: 0;
}

.authority-badge.status-verified {
  background: var(--ok-bg);
  color: var(--ok);
}

.authority-badge.status-differs {
  background: var(--bad-bg);
  color: var(--bad);
}

.authority-badge.status-local {
  background: var(--warn-bg);
  color: var(--warn);
}

.variant-table .authority-badge {
  position: static;
  box-shadow: none;
}

.authority-sync-button {
  color: var(--bad);
  background: var(--bad-bg);
}

.authority-sync-button:hover {
  color: white;
  background: #a33030;
}

.authority-sync-button svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  vertical-align: -2px;
}

.authority-missing-list {
  display: grid;
  gap: 10px;
  margin-top: 15px;
}

.authority-missing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 2px solid var(--line);
  border-radius: 8px;
}

.authority-missing-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.authority-missing-form input {
  width: 160px;
}

/* Multiple catalog sources and their package selections. */
.agent-catalogs-panel,
.catalog-sources-panel { grid-column: 1 / -1; }
.source-card { border-top: 1px solid var(--line, #d9e0e5); margin-top: 1rem; padding-top: 1rem; }
.source-card > summary { cursor: pointer; padding: .5rem 0; }
.source-card > summary .source-switch { float: right; font-size: .85rem; }
.source-card.source-disabled > summary > strong { color: var(--muted); text-decoration: line-through; }
.source-card > form, .source-card > details { margin-top: 1rem; }
.source-card fieldset { max-height: 24rem; overflow-y: auto; }

[data-source-form] [hidden] { display: none; }

/* Server family logo (MariaDB seal / MySQL dolphin) on catalog cards.
   Masked so each theme can recolor it through --family-*. */
.family-logo {
  flex: none;
  width: 28px;
  height: 28px;
  background-color: var(--family-mariadb);
  -webkit-mask: url(/assets/family-mariadb-seal.svg) center / contain no-repeat;
  mask: url(/assets/family-mariadb-seal.svg) center / contain no-repeat;
}

.family-logo.family-mysql {
  background-color: var(--family-mysql);
  -webkit-mask-image: url(/assets/family-mysql.svg);
  mask-image: url(/assets/family-mysql.svg);
}

/* Plugin detail page and the catalog card heading that links to it. */
.plugin-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}

.plugin-name-link:hover {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 3px;
}



.plugin-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin: 10px 0 34px;
}

.plugin-detail-head h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  overflow-wrap: anywhere;
}

.plugin-detail-head .plugin-repository-link svg {
  width: 22px;
  height: 22px;
}

.plugin-detail-lede {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 680px;
  margin: 12px 0 4px;
}

.plugin-detail-author {
  color: var(--muted);
  margin: 0;
}

.plugin-detail-author a {
  color: var(--teal);
}

.plugin-download-metrics {
  flex-shrink: 0;
}

.plugin-download-metrics.metrics-1,
.plugin-download-metrics.metrics-2 {
  grid-template-columns: repeat(var(--metric-count, 1), minmax(150px, 1fr));
}

.plugin-download-metrics.metrics-2 {
  --metric-count: 2;
}

.plugin-download-metrics small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}

.plugin-download-metrics form {
  margin-top: 10px;
}

.plugin-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr);
  gap: 20px;
  align-items: start;
}

.plugin-detail-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.plugin-notes-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.plugin-notes,
.plugin-builds,
.plugin-community,
.plugin-facts {
  padding: 24px 26px;
  min-width: 0;
}

.plugin-notes h2,
.plugin-builds h2,
.plugin-community h2 {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.plugin-builds {
  margin-top: 20px;
}

.plugin-message {
  color: var(--muted);
  margin: 0;
}

.plugin-facts dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.plugin-facts dt {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.plugin-facts dd {
  margin: 2px 0 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.plugin-facts .badge.neutral {
  margin-top: 2px;
}

.plugin-license-key {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.plugin-license-key h3 {
  font-size: 14px;
  margin: 0 0 6px;
}

.plugin-license-key p,
.plugin-license-key ul {
  color: var(--muted);
  margin: 0 0 10px;
  padding-left: 18px;
}

.plugin-license-key p {
  padding-left: 0;
}

.plugin-license-key code {
  overflow-wrap: anywhere;
}

.plugin-version-downloads {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
  display: grid;
  gap: 4px;
}

.plugin-version-downloads li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 400;
}

.small-link {
  color: var(--teal);
  font-weight: 600;
}

.markdown {
  overflow-wrap: anywhere;
}

.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
  font-size: 1.1rem;
  margin: 1.2em 0 .4em;
}

.markdown p,
.markdown ul,
.markdown ol {
  margin: .6em 0;
}

.markdown a {
  color: var(--teal);
  text-decoration: underline;
}

.markdown code {
  background: var(--ice);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: .92em;
}

.markdown pre {
  background: #00242f;
  color: #e9ecef;
  border-radius: 12px;
  padding: 14px 16px;
  overflow-x: auto;
}

.markdown pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.plugin-notes-dialog textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
}

@media (max-width: 760px) {
  .plugin-detail-head {
    flex-direction: column;
    gap: 20px;
  }

  .plugin-detail-grid {
    grid-template-columns: 1fr;
  }

  .plugin-download-metrics.metrics-1,
  .plugin-download-metrics.metrics-2 {
    width: 100%;
    grid-template-columns: repeat(var(--metric-count, 1), 1fr);
  }
}

@media (max-width: 400px) {
  /* Small phones: tighter header so a partner logo still leaves room for the buttons. */
  .site-hero { padding: 0 14px; }
  .hero-top { gap: 10px; }
  .header-logos .header-logo.partner-logo img { height: 18px; }
}

/* Fleet search and tags */
.fleet-filters {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px 22px;
}

button.filter-chip small {
  margin-left: 3px;
  opacity: .7;
  font-size: .75rem;
}

.server-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.server-tags li,
.tag-pill {
  display: inline-block;
  padding: 2px 9px;
  color: var(--teal);
  background: var(--accent-bg);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}

.server-tag-editor {
  margin: 4px 0 26px;
}

.server-tag-editor h3 {
  margin-bottom: 10px;
}

.tag-choice {
  display: inline-flex;
  cursor: pointer;
}

.tag-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tag-choice span {
  padding: 6px 14px;
  color: var(--subtle);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: 20px;
  font-size: .85rem;
}

.tag-choice input:checked + span {
  color: var(--on-accent);
  background: var(--teal);
  border-color: var(--teal);
}

.tag-choice input:focus-visible + span {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.tag-add-row,
.tag-create-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
}

.tag-add-row label,
.tag-create-form label {
  flex: 1 1 240px;
}

.fleet-tag-table form {
  margin: 0;
  text-align: right;
}

@media (max-width: 460px) {
  .fleet-filters {
    padding: 14px;
  }

  .fleet-filters .operation-search,
  .fleet-filters .filter-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.fleet-tags-manager form {
  padding: 0;
}

/* Community: GitHub members' stars, skulls and comments. */
.header-member { display: inline-flex; align-items: center; gap: 6px; color: white; font-size: .9rem; font-weight: 600; }
.header-member img { border-radius: 50%; }

.plugin-vote-summary {
  display: flex;
  gap: 12px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.plugin-community {
  margin-top: 20px;
}

.community-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.community-votes {
  display: flex;
  gap: 8px;
}

.vote-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

button.vote-button {
  cursor: pointer;
}

button.vote-button:hover {
  border-color: var(--line-hover);
}

.vote-star.is-active {
  border-color: var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn);
}

.vote-skull.is-active {
  border-color: var(--bad);
  background: var(--bad-bg);
  color: var(--bad);
}

.community-thread {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.community-comment {
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 4px;
}

.community-comment.is-moderated {
  border-style: dashed;
  opacity: .65;
}

.community-comment .markdown > :last-child {
  margin-bottom: 0;
}

.community-author {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.community-author img {
  border-radius: 50%;
}

.community-login {
  color: var(--muted);
  font-weight: 400;
}

.community-author-badge {
  background: var(--accent-bg);
  color: var(--teal);
}

.community-replies {
  display: grid;
  gap: 10px;
  margin: 10px 0 0 28px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
}

.community-moderation {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.community-reply {
  margin: 8px 0 0 28px;
}

.community-reply summary {
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 640px) {
  .community-replies,
  .community-reply {
    margin-left: 8px;
  }
}

.plugin-community .form-note a {
  color: var(--teal);
  font-weight: 600;
}

/* Staff review metadata: trust labels and MariaDB Foundry builds. */
.plugin-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.badge.trust-verified { background: var(--ok-bg); color: var(--ok); }
.badge.trust-screened { background: var(--warn-bg); color: var(--warn); }
.badge.trust-community { background: var(--line); color: var(--subtle); }
.badge.trust-commercial { background: var(--accent-bg); color: var(--ink); border: 1px solid var(--accent-line); }
.badge.encrypted { background: var(--accent-bg); color: var(--ink); border: 1px dashed var(--accent-line); }
.badge.foundry { background: var(--accent-bg); color: var(--teal); }

.plugin-origin {
  display: block;
}

/* Foundries followed by the catalog, synced with Refresh and update. */
.foundries-panel {
  margin: 0 0 24px;
  padding: 20px 24px 12px;
}

.foundries-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.foundries-heading h3 {
  margin: 0;
}

.foundries-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.foundries-table {
  margin-top: 12px;
  overflow-x: auto;
}

.foundries-panel td {
  vertical-align: middle;
}

.foundries-panel tbody tr:last-child td {
  border-bottom: 0;
}

.foundries-panel td:first-child,
.foundries-panel th:first-child {
  width: 1%;
  padding-left: 0;
}

.foundries-panel td:last-child {
  text-align: right;
  padding-right: 0;
}

.foundries-panel td:nth-child(2) a {
  color: var(--teal);
  font-weight: 600;
  overflow-wrap: anywhere;
}

.foundries-panel input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--teal);
}

.foundry-error {
  color: var(--bad);
  font-weight: 600;
}
