:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1d2333;
  --muted: #6b7280;
  --border: #e2e5ec;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --error: #c0392b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  padding: 32px;
}

.card h1 {
  margin: 0 0 24px 0;
  font-size: 22px;
}

form { display: flex; flex-direction: column; gap: 14px; }

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="tel"],
select,
textarea {
  font-size: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* Hide the spinner arrows on number inputs — they make the field visually
   shorter than text inputs and clash with the rounded box style above. */
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

button {
  margin-top: 4px;
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

button:hover { background: var(--accent-hover); }

.error {
  margin: 0 0 16px 0;
  padding: 10px 12px;
  background: #fdecea;
  color: var(--error);
  border-radius: 8px;
  font-size: 14px;
}

.save-ok {
  margin: 0 0 16px 0;
  padding: 10px 12px;
  background: #e8f4ec;
  color: #1f7a3a;
  border-radius: 8px;
  font-size: 14px;
}

.tenant-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tenant-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text);
}

.tenant-link:hover { border-color: var(--accent); background: #f8faff; }
.tenant-link.current { border-color: var(--accent); background: #eef3ff; }

.tenant-name { font-weight: 500; }
.tenant-slug { color: var(--muted); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

.empty { color: var(--muted); text-align: center; padding: 16px 0; }

.footer { text-align: center; margin: 20px 0 0 0; font-size: 14px; }
.footer a { color: var(--muted); }
.footer .sep { color: var(--border); margin: 0 8px; }

/* Medium layout for table-style cabinets (partner dashboard, partner triage).
   Wider than the default 420px form card so column headers don't wrap, but
   narrower than the 1320px fleet-accounts page which has many columns. */
.card-medium {
  max-width: 720px;
}
.card-medium table.tenant-list th,
.card-medium table.tenant-list td {
  white-space: nowrap;
  padding: 8px 10px;
}
.card-medium table.tenant-list {
  display: table;
  width: 100%;
  border-collapse: collapse;
}
.card-medium table.tenant-list thead th {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.card-medium table.tenant-list tbody td {
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

/* Wide layout for fleet-accounts page */
.card-wide {
  max-width: 1320px;
  padding: 24px 20px;
}
/* Both axes scroll inside the card: horizontal for the wide
   fleet-accounts table on narrow viewports, vertical so the sticky
   thead has a defined scroll container to stick within (sticky needs a
   scrollable ancestor — without max-height the page scrolls instead and
   the header doesn't latch). */
.card-wide .table-scroll {
  overflow: auto;
  max-height: calc(100vh - 180px);
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.card-header h1 {
  margin: 0;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover { color: var(--accent); }

.fleet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.fleet-table th,
.fleet-table td {
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.fleet-table thead th {
  font-weight: 500;
  color: var(--muted);
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  /* Latch column headers to the top of the table scroll container so the
     operator keeps seeing which column is which while scrolling down a
     long fleet. The ancestor `.card-wide .table-scroll` defines the
     scroll viewport (vertical max-height + overflow:auto); without that
     this would do nothing. */
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
}

.fleet-table .col-pool,
.fleet-table .col-total,
.fleet-table .col-quota,
.fleet-table .col-status {
  text-align: center;
  white-space: nowrap;
}

.fleet-table .col-index {
  text-align: right;
  width: 36px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.fleet-table .col-quota {
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.fleet-table .col-quota .quota-sep {
  color: var(--muted);
  margin: 0 1px;
}

.fleet-table .col-quota .quota-cap {
  color: var(--muted);
}

.fleet-table .col-quota .quota-pct {
  display: inline-block;
  margin-left: 6px;
  font-size: 12px;
  font-weight: 500;
}

.fleet-table .col-quota.quota-green .quota-used,
.fleet-table .col-quota.quota-green .quota-pct {
  color: #1f7a3a;
}

.fleet-table .col-quota.quota-amber .quota-used,
.fleet-table .col-quota.quota-amber .quota-pct {
  color: #b45309;
}

.fleet-table .col-quota.quota-red .quota-used,
.fleet-table .col-quota.quota-red .quota-pct {
  color: var(--error);
}

.fleet-table .col-index {
  text-align: right;
  width: 36px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.fleet-table .col-billing {
  text-align: left;
  white-space: nowrap;
  font-size: 13px;
}

.billing-day {
  display: block;
  font-weight: 500;
  color: var(--text);
}

.billing-next {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* Tenant cell: name + slug stacked vertically. Use block on the spans
   instead of `display: flex` on the <td> — flex breaks table-cell layout
   and prevents the browser from sizing the column to its content. */
.fleet-table .col-tenant { min-width: 120px; }
.fleet-table .tenant-name {
  display: block;
  font-weight: 500;
  line-height: 1.3;
  /* Keep parenthesized suffixes ("Радмир (Уфа)", "Шариков (СПб)") on the
     same line as the name; without nowrap, narrow viewports or busy quota
     columns break the suffix to a new line and the row looks broken. */
  white-space: nowrap;
}
.fleet-table .tenant-slug {
  display: block;
  color: var(--muted);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.2;
  margin-top: 1px;
}

/* Whole tenant cell is a link → click anywhere in the cell switches to
   that cabinet, skipping the picker round-trip. Keep visual identical to
   the plain-text version so the design doesn't shift; hover hints the
   row is interactive. */
.fleet-table .tenant-link-cell {
  display: block;
  color: inherit;
  text-decoration: none;
  margin: -4px -8px;
  padding: 4px 8px;
  border-radius: 6px;
}
.fleet-table .tenant-link-cell:hover {
  background: #eef3ff;
  color: var(--accent);
}
.fleet-table .tenant-link-cell:hover .tenant-slug {
  color: var(--accent);
}

.fleet-table .pool-total {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
}

.fleet-table .pool-paused {
  display: inline-block;
  margin-left: 6px;
  color: #b45309;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.fleet-table .cell-empty {
  color: var(--muted);
}

/* Negative "остáлось добавить" — added + burned exceed ordered.
   Signals a data-entry mismatch the operator should reconcile. */
.fleet-table .cell-warn .pool-total {
  color: #b91c1c;
  font-weight: 600;
}

.fleet-table .row-status-offline,
.fleet-table .row-status-error {
  background: #fbfbfc;
  color: var(--muted);
}

.fleet-table tfoot .fleet-totals td {
  border-top: 2px solid var(--border);
  background: #f7f8fa;
  font-weight: 500;
}

.fleet-table tfoot .fleet-totals .tenant-name {
  font-weight: 700;
}

.fleet-table tfoot .fleet-totals .quota-pct {
  font-weight: 700;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.badge-ok {
  background: #e8f4ec;
  color: #1f7a3a;
}

.badge-warn {
  background: #fdf3d6;
  color: #92500a;
}

.badge-error {
  background: #fdecea;
  color: var(--error);
}

.badge-pending {
  background: #f1f5f9;
  color: #475569;
  border: 1px dashed #cbd5e1;
}

/* Visual separator between client rows and internal stacks. */
.fleet-table .row-section-break td {
  padding: 14px 12px 8px 12px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-top: 2px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Pending tenants — subdued background so they read as "placeholder". */
.fleet-table .row-pending {
  background: #fbfbfc;
  color: var(--muted);
}

.badge-shortfall {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #fdf3d6;
  color: #92500a;
  white-space: nowrap;
}

.ordered-editor {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.ordered-editor-view,
.ordered-editor-form {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ordered-editor-form[hidden],
.ordered-editor-view[hidden] {
  display: none;
}

.ordered-number-input {
  width: 64px;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  border-radius: 8px;
}

.ordered-number-input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: #b8c4d8;
}

.icon-button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9aa3b2;
  background: transparent;
  border: 0;
  border-radius: 6px;
  box-shadow: none;
  cursor: pointer;
}

.icon-button:hover {
  color: #667085;
  background: #f3f5f8;
}

.icon-button:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.ordered-edit-button {
  opacity: 0.72;
}

.ordered-editor:hover .ordered-edit-button,
.ordered-edit-button:focus-visible {
  opacity: 1;
}

.ordered-confirm-button {
  color: #667085;
}

.ordered-confirm-button:hover {
  color: #166534;
  background: #eef8f1;
}

.ordered-cancel-button:hover {
  color: #b42318;
  background: #fff1f0;
}

.provider-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: #eef2f7;
  color: #334155;
  white-space: nowrap;
}

/* Per-provider tint so they're distinguishable at a glance */
.provider-wappi    { background: #e0f2fe; color: #075985; }
.provider-wazzup,
.provider-wazzup24 { background: #ede9fe; color: #5b21b6; }
.provider-whatcrm  { background: #dcfce7; color: #166534; }
.provider-radist   { background: #fef3c7; color: #854d0e; }
.provider-chatapp  { background: #fce7f3; color: #9d174d; }
.provider-gateway  { background: #fee2e2; color: #991b1b; }
.provider-byo_telegram { background: #cffafe; color: #155e75; }
.provider-chatpush { background: #e0e7ff; color: #3730a3; }

.hint {
  margin: 16px 0 0 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────────────────
   Sticky first columns for the wide fleet-accounts table. When the table
   overflows horizontally inside .table-scroll, the operator scrolls right to
   read provider / pool / quota cells and loses sight of which client they
   are looking at. Freeze the № and Клиент columns so the row identity stays
   put — same UX as Google Sheets' frozen columns.

   `position: sticky` on table cells works in all modern browsers, with two
   gotchas handled below:
     - the sticky cell needs an OPAQUE background, otherwise the scrolling
       cells underneath bleed through
     - `border-collapse: collapse` (set on .fleet-table) swallows the right
       border on sticky cells when they overlap their neighbors, so we use a
       box-shadow on col-tenant for the visual seam between frozen / scrolling
   ───────────────────────────────────────────────────────────────────────────── */
.fleet-table th.col-index,
.fleet-table td.col-index {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--card);
}

.fleet-table th.col-tenant,
.fleet-table td.col-tenant {
  position: sticky;
  left: 36px; /* must match col-index width above */
  z-index: 1;
  background: var(--card);
  box-shadow: 1px 0 0 var(--border);
}

/* Header cells layer above body sticky cells so the column titles stay on
   top when scrolling (matters once we add sticky-top to thead, but also
   prevents any z-fighting today when row tints collide with the header). */
.fleet-table thead th.col-index,
.fleet-table thead th.col-tenant {
  z-index: 2;
}

/* Row-tone overrides — without these the sticky cells would render a white
   pill on top of the row's tinted background. */
.fleet-table .row-status-offline td.col-index,
.fleet-table .row-status-offline td.col-tenant,
.fleet-table .row-status-error td.col-index,
.fleet-table .row-status-error td.col-tenant,
.fleet-table .row-pending td.col-index,
.fleet-table .row-pending td.col-tenant {
  background: #fbfbfc;
}

.fleet-table tfoot .fleet-totals td.col-index,
.fleet-table tfoot .fleet-totals td.col-tenant {
  background: #f7f8fa;
}

/* ── «Главная админка»: левое боковое меню (fleet pages) ─────────────────
   Shared by the Jinja fleet dashboards and the fleet-ui SPA (which mirrors
   these styles in Tailwind). Markup: templates/_fleet_sidebar.html. Pages
   that show it set <body class="has-fleet-nav"> so their content shifts
   right by the sidebar width; under 860px the bar collapses to the top. */
:root { --fleet-sidebar-w: 224px; }

body.has-fleet-nav { padding-left: var(--fleet-sidebar-w); }

.fleet-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--fleet-sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  overflow-y: auto;
  z-index: 20;
}

.fleet-brand { padding: 2px 10px 16px; }
.fleet-brand-title { display: block; font-size: 17px; font-weight: 600; color: var(--text); }
.fleet-brand-sub { display: block; margin-top: 3px; font-size: 11px; line-height: 1.35; color: var(--muted); }

.fleet-nav { display: flex; flex-direction: column; gap: 2px; }
.fleet-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--text);
  text-decoration: none;
}
.fleet-nav a:hover { background: var(--bg); }
.fleet-nav a.current { background: var(--accent); color: #fff; font-weight: 500; }
.fleet-nav a.current:hover { background: var(--accent-hover); }
.fleet-nav svg { width: 17px; height: 17px; flex: none; }

.fleet-nav-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fleet-nav-foot a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.fleet-nav-foot a:hover { background: var(--bg); color: var(--accent); }
.fleet-nav-foot svg { width: 16px; height: 16px; flex: none; }

/* Pull-request queues dashboard. */
.pr-queues-page {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}
.pr-queues-header { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.pr-queues-header h1 { margin: 0; font-size: 24px; }
.pr-queues-header p, .pr-queues-hint { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.pr-queues-refresh { padding: 6px 12px; border: 1px solid var(--border); border-radius: 7px; color: var(--accent); text-decoration: none; font-size: 14px; }
.pr-queues-refresh:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pr-queues-pause, .pr-queues-refusal { padding: 10px 12px; border-radius: 8px; font-size: 14px; }
.pr-queues-pause { margin: 0 0 16px; background: #fdf3d6; color: #92500a; }
.pr-queues-refusal { margin: 16px 0; background: #fdecea; color: var(--error); }
.pr-queues-table { width: 100%; margin-top: 20px; border-collapse: collapse; font-size: 14px; }
.pr-queues-table th, .pr-queues-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.pr-queues-table th { color: var(--muted); font-size: 13px; font-weight: 500; }
.pr-queues-table tbody tr:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pr-queues-table tfoot td { border-top: 2px solid var(--border); font-weight: 600; }
.pr-queues-link { color: inherit; font-weight: 500; text-decoration: none; }
.pr-queues-link:hover { color: var(--accent); text-decoration: underline; }
.pr-queues-note, .pr-queues-muted { color: var(--muted); font-size: 12px; }
.pr-queues-section { margin-top: 28px; }
.pr-queues-section h2 { margin: 0 0 8px; font-size: 17px; }
.pr-queues-list { margin: 0; padding-left: 20px; }
.pr-queues-list li { margin: 5px 0; }
.pr-merged-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.pr-merged-filter { padding: 3px 10px; border: 1px solid var(--border); border-radius: 999px; background: transparent; color: inherit; font-size: 12px; cursor: pointer; }
.pr-merged-filter.is-active { border-color: var(--accent); color: var(--accent); }
.pr-repo-tag { display: inline-block; padding: 0 6px; border-radius: 5px; background: color-mix(in srgb, var(--muted) 14%, transparent); color: var(--muted); font-size: 11px; }
.pr-merged-title { font-size: 13px; }
.pr-vps { margin-top: 20px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; }
.pr-vps h2 { margin: 0 0 8px; font-size: 17px; }
.pr-vps-row { display: grid; grid-template-columns: 28px 64px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pr-vps-row:last-of-type { border-bottom: none; }
.pr-vps-place { font-weight: 600; }
.pr-vps-running { color: var(--accent); }
.pr-vps-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-queues-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 960px) { .pr-queues-columns { grid-template-columns: minmax(0, 1fr); } }
.pr-queues-side h2 { margin: 20px 0 8px; font-size: 17px; }
.pr-repo-card { margin-bottom: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.pr-repo-card-name { margin: 0 0 2px; font-weight: 600; font-size: 14px; }
.pr-repo-card-pr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; margin-top: 4px; font-size: 13px; }
.pr-repo-card-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-repo-state { font-size: 11px; color: var(--muted); }
.pr-repo-state--green { color: #1a7f37; }
.pr-repo-state--red, .pr-repo-state--conflict { color: var(--error); }
.pr-repo-quiet summary { cursor: pointer; color: var(--muted); font-size: 13px; }

@media (max-width: 860px) {
  body.has-fleet-nav { padding-left: 0; }
  /* The accounts/providers pages center their card with a flex `.container`;
     stack it so the now-static sidebar sits as a full-width bar on top instead
     of getting squeezed into a flex row beside the content. */
  body.has-fleet-nav .container { display: block; }
  .fleet-sidebar {
    position: static;
    width: auto;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
  }
  .fleet-brand { padding: 2px 4px 10px; }
  .fleet-nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .fleet-nav-foot {
    margin-top: 10px;
    padding-top: 10px;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }
}

.impersonation-banner {
  background: #fff7d6;
  border-bottom: 1px solid #e6c87a;
  color: #5c4a00;
  padding: 10px 16px;
  font-size: 14px;
  text-align: center;
}
.impersonation-banner code {
  background: rgba(0,0,0,0.06);
  padding: 1px 6px;
  border-radius: 4px;
}
.impersonation-banner a {
  margin-left: 12px;
  color: #5c4a00;
  text-decoration: underline;
}
/* Карточка PR при наведении на номер (страница «Очереди PR»). */
.pr-card-anchor { position: relative; display: inline-block; }
.pr-card { display: none; position: absolute; z-index: 20; left: 0; top: 100%; width: max-content; max-width: min(360px, 80vw); margin-top: 6px; padding: 12px 14px; background: var(--card); color: var(--text); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 23, 42, .14); font-size: 13px; font-weight: 400; line-height: 1.45; white-space: normal; }
.pr-card-anchor:hover .pr-card, .pr-card-anchor:focus-within .pr-card { display: block; }
.pr-card-head { display: block; color: var(--muted); }
.pr-card-state { display: inline-block; margin-right: 4px; padding: 1px 9px; border-radius: 999px; font-weight: 500; }
.pr-card-state--open { background: #e6f4ea; color: #1a7f37; }
.pr-card-state--draft { background: #eef0f3; color: #57606a; }
.pr-card-state--merged { background: #f1e8fd; color: #8250df; }
.pr-card-title { display: block; margin: 8px 0; font-size: 14px; font-weight: 600; }
.pr-card-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); }
.pr-card-add { color: #1a7f37; }
.pr-card-del { color: #cf222e; }
.pr-card-anchor--flip .pr-card { left: auto; right: 0; }
