/* Forum Monitor — minimal, dependency-free stylesheet.
   Kept intentionally small; no CSS framework (footprint matters). */

:root {
  --bg: #0f1216;
  --surface: #181d24;
  --surface-2: #1f2630;
  --border: #616870;
  --text: #e7ecf2;
  --muted: #9aa6b2;
  --accent: #4f8cff;
  --accent-hover: #3f78e0;
  --danger: #ff6b6b;
  --danger-bg: #3a1d22;
  --success: #4ade80;
  --success-bg: #16301f;
  --radius: 10px;
  --maxw: 960px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-weight: 700;
  color: var(--text);
  font-size: 1.1rem;
}
.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* App shell: left sidebar + content */
.app-shell {
  display: flex;
  align-items: stretch;
  flex: 1;
}
.sidebar {
  flex: 0 0 220px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0.75rem;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  position: sticky;
  top: 1.5rem;
}
.side-nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
}
.side-nav a .ico {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
.side-nav a:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.side-nav a.is-active {
  color: var(--text);
  background: var(--surface-2);
  font-weight: 600;
}
.side-nav-sep {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 0.5rem 0.25rem;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}
.app-shell .container {
  flex: 1 1 auto;
  margin: 0;
}

/* Right rail for live background-task panels. Reserves no space when empty. */
.sidebar-right {
  flex: 0 0 560px;
  border-left: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 1rem;
}
.sidebar-right:empty {
  display: none;
}

/* Live discovery log — a small terminal-like console. */
.discovery-log {
  position: sticky;
  top: 1.5rem;
  font-size: 0.85rem;
}
.discovery-log__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.discovery-log__spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  border-top-color: transparent;
  animation: discovery-spin 0.8s linear infinite;
  flex: 0 0 auto;
}
.discovery-log__spinner.is-done {
  border-color: var(--success);
  border-top-color: var(--success);
  animation: none;
}
@keyframes discovery-spin {
  to {
    transform: rotate(360deg);
  }
}
.discovery-log__lines {
  display: flex;
  flex-direction: column-reverse; /* newest line pinned to the bottom */
  list-style: none;
  margin: 0;
  padding: 0.6rem;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.logline {
  padding: 0.15rem 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--muted);
}
.logline::before {
  margin-right: 0.4rem;
  color: var(--muted);
  content: "›";
}
.logline--ok {
  color: var(--text);
}
.logline--ok::before {
  content: "✓";
  color: var(--success);
}
.logline--drop::before {
  content: "✗";
  color: var(--danger);
}
.discovery-log__result {
  margin: 0.75rem 0 0.5rem;
  font-weight: 600;
  color: var(--success);
}
.discovery-log__result.is-error {
  color: var(--danger);
}

@media (max-width: 720px) {
  .app-shell {
    flex-direction: column;
  }
  .sidebar {
    flex-basis: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
  }
  .side-nav {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
  }
  .sidebar-right {
    flex-basis: auto;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .discovery-log {
    position: static;
  }
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
}
.muted {
  color: var(--muted);
}
.text-small {
  font-size: 0.8rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

/* Source filter bar: a row of fields that wraps on narrow screens. */
.filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: end;
}
.filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  flex: 1 1 180px;
  min-width: 0;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 380px;
}
.form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Settings page: the field name is the bold label; the key/name is no longer
   shown above the field, and a small muted hint may sit under it. */
.settings-page .form label .field-label {
  font-weight: 600;
  color: var(--text);
}
.settings-page .form label small {
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--muted);
}
/* Sub-section heading inside a settings form (e.g. Reddit / Wykop). */
.form-subhead {
  margin: 0.6rem 0 0;
  font-size: 0.95rem;
  font-weight: 600;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="url"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.6rem 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
}
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
}

button {
  cursor: pointer;
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
}
button:hover {
  background: var(--accent-hover);
}

button.secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
button.secondary:hover {
  background: var(--border);
}

.linklike {
  background: none;
  color: var(--muted);
  padding: 0;
  border: none;
}
.linklike:hover {
  color: var(--text);
  background: none;
  text-decoration: underline;
}
.logout-form {
  margin: 0;
}

.auth {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 3rem;
}
.auth h1 {
  margin-bottom: 1.25rem;
}

.flash {
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}
.flash-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}
.flash-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success);
}

h2.card-title {
  font-size: 1.05rem;
  margin: 0 0 0.9rem;
}
.breadcrumb {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}
button.danger {
  background: var(--danger);
}
button.danger:hover {
  background: #e05555;
}
/* Link-style delete: red text, never a red fill (overrides button.danger). */
.linklike.danger,
.linklike.danger:hover {
  color: var(--danger);
  background: none;
}

/* Project list */
.project-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}
.project-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}
/* Right-aligned stats group: phrase/lead counts plus the pending-lead badge,
   pushed to the card's right edge. */
.project-stats {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
/* Pending-lead badge: a grey circle holding the count of leads awaiting review,
   sized for up to two digits. */
.pending-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  height: 1.6rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #6b7280;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1;
}
.project-link {
  font-weight: 600;
  font-size: 1.05rem;
}
.project-desc {
  width: 100%;
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
}

/* Inline add form (phrases) */
.inline-form {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.inline-form input[type="text"] {
  flex: 1;
}
.inline-form button {
  white-space: nowrap;
}
/* Phrase form: widen the phrase text, keep the match-mode select compact. */
.phrase-form input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
}
.phrase-form select {
  flex: 0 0 auto;
  width: auto;
  min-width: 9.5rem;
}

/* Phrase list */
.phrase-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.phrase-list:empty::after {
  content: attr(data-empty);
  color: var(--muted);
  font-size: 0.9rem;
}
.phrase-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.phrase-row.inactive .phrase-text {
  color: var(--muted);
  text-decoration: line-through;
}
.phrase-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.badge {
  font-size: 0.72rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  white-space: nowrap;
  display: inline-block;
}

.project-settings {
  margin-top: 1.5rem;
}
.project-settings summary {
  cursor: pointer;
  color: var(--muted);
}
.project-settings summary:hover {
  color: var(--text);
}

/* Sources */
.source-form select {
  flex: 0 0 auto;
  width: auto;
}
.source-form input[type="url"] {
  flex: 2;
}
.source-form input[type="text"] {
  flex: 1;
}
.source-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.source-list:empty::after {
  content: attr(data-empty);
  color: var(--muted);
  font-size: 0.9rem;
}
.source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.source-main {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  min-width: 0;
}

.source-main-p {
  width: 100%;
  margin: 5px 0;
}
.source-main-p.first {
  margin-bottom: 0;
}

.source-url {
  overflow-wrap: anywhere;
}
.monitor-link {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  color: var(--muted);
  vertical-align: middle;
}
.monitor-link:hover {
  color: var(--accent);
}
/* Pending source's third line: lead-context pills, domain and the project/phrase
   the source was surfaced for, kept on one wrapping row and vertically centered. */
.source-pending-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.pending-lead-ctx {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.source-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  white-space: nowrap;
}
.type-badge {
  color: var(--text);
}
/* Heuristic lead-quality score badge: green (hot) -> amber -> grey (cold). */
.score-badge {
  font-weight: 600;
}
.score-badge.score-high {
  background: #1f7a37;
  color: #fff;
}
.score-badge.score-medium {
  background: #b8860b;
  color: #fff;
}
.score-badge.score-low {
  background: var(--border);
  color: var(--muted);
}
/* LLM intent badge: opportunity (blue) / brand mention (grey) / off-topic (faint). */
.intent-badge {
  font-weight: 600;
  cursor: help;
}
.intent-badge.intent-lead {
  background: #1d4ed8;
  color: #fff;
}
.intent-badge.intent-brand {
  background: #475569;
  color: #fff;
}
.intent-badge.intent-irrelevant {
  background: var(--border);
  color: var(--muted);
}
.block-reason {
  color: var(--danger);
  font-size: 0.82rem;
}
/* Block details on their own row: reason on the left, the proxy IP that hit the
   block on the right, so an admin can route a browser through that IP by hand. */
.block-line {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.block-ip {
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}
.block-ip code {
  color: var(--text);
}

/* Topbar "Do sprawdzenia" link with a count badge in the link colour. */
.attention-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.attention-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}
.source-row.status-ignored {
  opacity: 0.6;
}

/* Status badge colors */
.status-badge.status-active {
  color: #69d28a;
  border-color: #2f6b45;
}
.status-badge.status-pending {
  color: #e0b34f;
  border-color: #6b5a2f;
}
.status-badge.status-ignored {
  color: var(--muted);
}
.status-badge.status-needs_attention {
  color: var(--danger);
  border-color: var(--danger);
}

/* Project page head + scan */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.head-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.scan-form {
  margin: 0;
}

/* Source action buttons side by side */
.source-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}
.source-buttons form {
  margin: 0;
}

/* Lead pager */
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
}
.pager .muted {
  font-size: 0.85rem;
}

/* Result tabs */
.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.tab {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
}
.tab:hover {
  background: var(--surface-2);
  color: var(--text);
}
.tab.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.strategy-badge {
  color: var(--muted);
}

/* Edit modal (phrases / sources) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 1rem;
  z-index: 100;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.modal-overlay[hidden] {
  display: none;
}
.modal-title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}
.modal-form {
  max-width: none;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 0.5rem;
}
.modal-danger {
  margin: 1rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.delete-confirm {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
}
.delete-confirm[hidden] {
  display: none;
}
.delete-confirm .checkbox-label {
  font-size: 0.82rem;
}
.field-hint {
  display: block;
  margin-top: -0.5rem;
  font-size: 0.78rem;
  color: var(--muted);
}
/* "Autodetect" control: the button with its status text beside it. */
.autodetect-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: -0.25rem;
}
.autodetect-row .autodetect-status {
  margin-top: 0;
}

/* Lead list */
.lead-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0.25rem 0 0.6rem;
}
.lead-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}
.lead-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.lead-list:empty::after {
  content: attr(data-empty);
  color: var(--muted);
  font-size: 0.9rem;
}
.lead-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.lead-main {
  min-width: 0;
}
.lead-title {
  font-weight: 600;
  overflow-wrap: anywhere;
}
.lead-meta {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  margin-top: 0.25rem;
}
/* Source attribution in the lead meta: domain in the same bright font as the
   type badge, followed by a " | " separator and the per-source count pills. */
.lead-source {
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}
.lead-source::after {
  content: " | ";
  color: var(--muted);
  margin-left: 0.3rem;
}
/* Round count badge with white text; variants set the background color. */
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  aspect-ratio: 1;
  padding: 0 0.3rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}
.count-ignored {
  background: #6b7280; /* gray */
}
.count-tracked {
  background: #2f9e54; /* green */
}
.count-activity {
  background: var(--accent); /* link / lead-title color */
}
.lead-excerpt {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: var(--text);
  overflow-wrap: anywhere;
}
.lead-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  white-space: nowrap;
}
.lead-side-top {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
/* Activity count under the lead-side links, right-aligned. */
.lead-activity {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.lead-actions {
  display: flex;
  gap: 0.85rem;
  white-space: nowrap;
}
/* Unread-activity badge: draws the eye to leads with new activity. */
.unread-badge {
  background: var(--accent, #2563eb);
  color: #fff;
  border-radius: 999px;
  padding: 0.05rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.lead-details {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

/* Lead detail page: activity timeline. */
.lead-detail-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 0.35rem;
}
.lead-detail-actions {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.timeline-item {
  display: flex;
  gap: 0.9rem;
  padding: 0.7rem 0;
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  margin-left: 0.4rem;
  position: relative;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -0.32rem;
  top: 1rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--accent, #2563eb);
}
.timeline-origin::before {
  background: var(--muted);
}
.timeline-when {
  flex: 0 0 9rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.timeline-body {
  min-width: 0;
}
.timeline-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.timeline-title {
  font-weight: 600;
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
}
.timeline-content {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

/* Project monitoring status dot (green = active, grey = paused). */
.status-dot {
  display: inline-block;
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 50%;
  background: var(--muted);
  vertical-align: middle;
  margin-right: 0.1rem;
}
.status-dot.is-on {
  background: #36c08a;
}
.status-dot.is-off {
  background: var(--muted);
}
.project-meta {
  width: 100%;
  margin: 0.3rem 0 0;
  font-size: 0.8rem;
}
.phrase-desc {
  width: 100%;
  margin: 0 0 1rem 0;
  font-size: 0.8rem;
}

/* Checkbox row in the project settings modal. */
/* Override .form label (column, centered) so the checkbox sits inline, left. */
.form .checkbox-label,
.checkbox-label {
  display: flex;
  flex-direction: row;
  align-items: center;
  align-self: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text);
}
.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

/* Cron jobs table. */
.jobs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.jobs-table th,
.jobs-table td {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.jobs-table th {
  color: var(--muted);
  font-weight: 600;
}
.job-empty-note {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--muted);
  max-width: 16rem;
}
.badge-ok {
  color: #36c08a;
  border-color: #36c08a;
}
.badge-error {
  color: var(--danger);
  border-color: var(--danger);
}
.badge-running {
  color: var(--accent);
  border-color: var(--accent);
}
.job-error summary {
  cursor: pointer;
  list-style: none;
}
.job-error-text {
  margin: 0.4rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--danger);
  font-size: 0.8rem;
}

/* Backups: kebab (three-dots) action menu. */
.col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.kebab {
  position: relative;
  display: inline-block;
}
.kebab > summary {
  cursor: pointer;
  list-style: none;
  padding: 0.1rem 0.55rem;
  border-radius: 6px;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--muted);
  user-select: none;
}
.kebab > summary::-webkit-details-marker {
  display: none;
}
.kebab > summary:hover {
  background: var(--surface-2);
  color: var(--text);
}
.kebab-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.25rem);
  z-index: 50;
  min-width: 9rem;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  padding: 0.3rem;
}
.kebab-menu a,
.kebab-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  font: inherit;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}
.kebab-menu a:hover,
.kebab-menu button:hover {
  background: var(--surface-2);
}
.kebab-menu .danger {
  color: var(--danger);
}
/* Inline labeled kebab (e.g. the lead "Ignoruj" menu): the trigger sits inline
   with the link-style row actions, so it matches their size and colour instead of
   the 1.2rem icon-only trigger used in table rows. */
.kebab-inline > summary {
  font-size: 0.85rem;
  padding: 0;
  color: var(--danger);
}
.kebab-inline > summary:hover {
  background: none;
  text-decoration: underline;
}

/* Status pill (e.g. blocked user). */
.pill {
  display: inline-block;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
  margin-left: 0.3rem;
}
.pill-danger {
  background: rgba(220, 53, 69, 0.16);
  color: var(--danger);
}

/* Two-column field row inside modal forms (e.g. project / phrase limits). */
.field-row {
  display: flex;
  gap: 0.75rem;
}
.field-row > label {
  flex: 1;
}
