/* Soft blue clay morphism theme */

:root {
  --clay-50: #f8fbff;
  --clay-100: #eef6ff;
  --clay-200: #dbeafe;
  --clay-300: #bfdbfe;
  --clay-400: #93c5fd;

  --text-heading: #1e3a5f;
  --text-body: #334155;
  --text-label: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --link: #2563eb;
  --link-hover: #1d4ed8;

  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.22);

  --glass-bg: linear-gradient(145deg, #ffffff 0%, #f1f7ff 100%);
  --glass-bg-solid: #f8fbff;
  --glass-border: rgba(147, 197, 253, 0.55);
  --glass-shadow: 0 10px 30px rgba(37, 99, 235, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.glass-body {
  min-height: 100vh;
  background: linear-gradient(160deg, #e8f4fc 0%, #dbeafe 45%, #cfe4ff 100%);
  background-attachment: fixed;
  color: var(--text-body);
}

.mesh-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.95) 0%, transparent 42%),
    radial-gradient(circle at 80% 80%, rgba(191, 219, 254, 0.55) 0%, transparent 48%),
    radial-gradient(circle at 50% 50%, rgba(248, 251, 255, 0.65) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* Remap legacy dark-theme Tailwind utilities to cream palette */
body.glass-body .text-white { color: var(--text-heading) !important; }
body.glass-body .text-slate-200 { color: var(--text-body) !important; }
body.glass-body .text-slate-300 { color: var(--text-label) !important; }
body.glass-body .text-slate-400 { color: var(--text-muted) !important; }
body.glass-body .text-slate-500 { color: var(--text-faint) !important; }
body.glass-body .text-indigo-300,
body.glass-body .text-indigo-400 { color: var(--link) !important; }
body.glass-body a.text-indigo-400:hover { color: var(--link-hover) !important; }

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 1.25rem;
  box-shadow: var(--glass-shadow);
}

.glass-nav {
  background: var(--glass-bg-solid);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.7);
}

.glass-sidebar {
  background: var(--glass-bg-solid);
  border-right: 1px solid var(--glass-border);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.7);
}

.glass-input {
  background: #f8fbff;
  border: 1px solid var(--clay-300);
  border-radius: 0.75rem;
  color: var(--text-heading);
  padding: 0.625rem 0.875rem;
  width: 100%;
  box-shadow: inset 0 2px 6px rgba(37, 99, 235, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.glass-input::placeholder {
  color: var(--text-faint);
}

.glass-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: #fff;
}

.glass-input option {
  background: #fffdf9;
  color: var(--text-heading);
}

.glass-btn {
  background: linear-gradient(135deg, #60a5fa 0%, #2563eb 100%);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 9999px;
  color: #f8fbff;
  padding: 0.625rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.glass-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.glass-btn-secondary {
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  border: 1px solid var(--clay-300);
  border-radius: 9999px;
  color: var(--text-label);
  padding: 0.625rem 1.25rem;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 12px rgba(37, 99, 235, 0.06);
  transition: background 0.15s, border-color 0.15s;
}

.glass-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: var(--accent);
  color: var(--text-heading);
}

.glass-table {
  width: 100%;
  border-collapse: collapse;
}

.glass-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--clay-300);
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.glass-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(191, 219, 254, 0.45);
  color: var(--text-body);
}

.glass-table tr:hover td {
  background: rgba(255, 255, 255, 0.65);
}

.row-clickable {
  cursor: pointer;
}

.searches-table tbody tr.row-clickable td {
  position: relative;
}

.searches-table tbody tr.row-clickable:hover td {
  background: rgba(219, 234, 254, 0.55);
}

.leads-table tbody tr.row-clickable:hover td {
  background: rgba(219, 234, 254, 0.55);
}

.row-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.searches-table .col-count {
  text-align: center;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.searches-table th.col-count {
  text-align: center;
}

.active-job-card.row-clickable {
  cursor: pointer;
  transition: background 0.15s ease;
}

.active-job-card.row-clickable:hover {
  background: rgba(255, 255, 255, 0.45);
}

.active-job-card.row-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.delete-search-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-danger {
  color: #b91c1c;
  border-color: rgba(248, 113, 113, 0.55);
}

.btn-danger:hover {
  background: rgba(254, 226, 226, 0.85);
  color: #991b1b;
}

.backup-files-table .backup-actions-cell {
  white-space: nowrap;
}

.backup-inline-form {
  display: inline-block;
  margin-right: 0.35rem;
}

.backup-inline-form:last-child {
  margin-right: 0;
}

.leads-table td,
.leads-table th {
  vertical-align: middle;
}

.leads-table .col-serial {
  width: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.leads-table .col-phone {
  white-space: nowrap;
  font-size: 0.8125rem;
}

.leads-table .col-status {
  white-space: nowrap;
}

.leads-table .status-pills {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.25rem;
  align-items: center;
}

.leads-table .col-name {
  min-width: 10rem;
  max-width: 14rem;
}

.maps-link-progress-banner.is-running {
  border-color: #5b7a9b;
  box-shadow: 0 0 0 1px rgba(91, 122, 155, 0.25);
}

.maps-link-progress-bar-fill {
  background: linear-gradient(90deg, #6b8caf, #5b7a9b);
}

.ai-progress-banner.is-running {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.25);
}

.ai-progress-bar-fill {
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}

.detail-progress-banner.is-running {
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.detail-progress-bar-fill {
  background: linear-gradient(90deg, #818cf8, #6366f1);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  min-width: 12rem;
  background: #fff;
  border: 1px solid var(--clay-300);
  border-radius: 0.75rem;
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.12);
  z-index: 20;
  overflow: hidden;
}

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.625rem 0.875rem;
  background: transparent;
  border: none;
  color: var(--text-body);
  cursor: pointer;
  font-size: 0.875rem;
}

.dropdown-item:hover {
  background: #eef6ff;
}

.progress-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.progress-cancel {
  border: 1px solid rgba(185, 80, 70, 0.35);
  background: rgba(185, 80, 70, 0.08);
  color: #9a4038;
  border-radius: 9999px;
  padding: 0.1rem 0.45rem;
  font-size: 0.625rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.3;
  white-space: nowrap;
}

.progress-cancel:hover:not(:disabled) {
  background: rgba(185, 80, 70, 0.15);
}

.progress-cancel:disabled {
  opacity: 0.6;
  cursor: wait;
}

.col-tag {
  white-space: nowrap;
  max-width: 5.5rem;
}

.col-tag .status-pill {
  display: inline-block;
  max-width: 5.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.status-pill {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 9999px;
  font-size: 0.625rem;
  font-weight: 600;
  background: #eef6ff;
  color: #475569;
  border: 1px solid var(--clay-300);
  white-space: nowrap;
  line-height: 1.2;
  vertical-align: middle;
}

.status-pill-success { background: rgba(34, 197, 94, 0.12); color: #15803d; border-color: rgba(34, 197, 94, 0.25); }
.status-pill-warning { background: rgba(245, 158, 11, 0.12); color: #b45309; border-color: rgba(245, 158, 11, 0.25); }
.status-pill-error { background: rgba(239, 68, 68, 0.12); color: #b91c1c; border-color: rgba(239, 68, 68, 0.25); }

.pagination-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 196, 176, 0.35);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.progress-current-lead {
  font-size: 0.75rem;
  color: var(--text-body);
  font-weight: 500;
  margin-top: 0.35rem;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.2;
}

.pill-synced { background: rgba(74, 124, 89, 0.12); color: #3d6b4f; border: 1px solid rgba(74, 124, 89, 0.25); }
.pill-pending { background: rgba(138, 129, 120, 0.12); color: #6b635c; border: 1px solid rgba(138, 129, 120, 0.25); }
.pill-ai { background: rgba(139, 115, 85, 0.12); color: #6f5a43; border: 1px solid rgba(139, 115, 85, 0.25); }
.pill-warning { background: rgba(180, 130, 50, 0.12); color: #8a6420; border: 1px solid rgba(180, 130, 50, 0.25); }
.pill-skipped { background: rgba(180, 130, 50, 0.12); color: #8a6420; border: 1px solid rgba(180, 130, 50, 0.25); }
.pill-error { background: rgba(185, 80, 70, 0.12); color: #9a4038; border: 1px solid rgba(185, 80, 70, 0.25); }

.nav-link {
  display: block;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  color: var(--text-muted);
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  background: linear-gradient(180deg, #ffffff 0%, #eef6ff 100%);
  color: var(--text-heading);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 12px rgba(37, 99, 235, 0.08);
}

.flash-success { background: rgba(74, 124, 89, 0.1); border: 1px solid rgba(74, 124, 89, 0.25); color: #3d6b4f; }
.flash-error { background: rgba(185, 80, 70, 0.1); border: 1px solid rgba(185, 80, 70, 0.25); color: #9a4038; }
.flash-info { background: rgba(139, 115, 85, 0.1); border: 1px solid rgba(139, 115, 85, 0.25); color: #6f5a43; }
.flash-warning { background: rgba(180, 130, 50, 0.1); border: 1px solid rgba(180, 130, 50, 0.25); color: #8a6420; }

.flash-message {
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  backdrop-filter: blur(10px);
}

.content-wrapper {
  position: relative;
  z-index: 1;
}

.stat-card {
  padding: 1.25rem;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-heading);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.field-description {
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.field-description code {
  font-size: 0.7rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--clay-300);
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  color: var(--text-label);
}

.setup-guide {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.setup-guide ol {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
}

.setup-guide li {
  margin-bottom: 0.35rem;
}

.filter-panel-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.filter-panel-toggle:hover .filter-panel-title {
  color: var(--text-heading);
}

.filter-panel-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.15s;
}

.filter-chevron {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  color: var(--text-muted);
  transition: transform 0.2s ease, color 0.15s;
}

.filter-chevron.is-open {
  transform: rotate(180deg);
  color: var(--accent);
}

.filter-panel-body {
  overflow: hidden;
}

[x-cloak] {
  display: none !important;
}

.fetch-progress-banner {
  margin-bottom: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--clay-300);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.fetch-progress-banner.is-running {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow);
}

.fetch-progress-bar {
  height: 0.5rem;
  border-radius: 9999px;
  background: var(--clay-200);
  overflow: hidden;
  margin-top: 0.75rem;
}

.fetch-progress-bar-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width 0.4s ease;
}

.fetch-progress-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.fetch-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(44, 40, 36, 0.35);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.fetch-modal {
  width: 100%;
  max-width: 24rem;
  padding: 1.5rem;
}

.sync-progress-banner.is-running {
  border-color: #6b8f71;
  box-shadow: 0 0 0 1px rgba(107, 143, 113, 0.25);
}

.sync-progress-bar-fill {
  background: linear-gradient(90deg, #7a9b80, #6b8f71);
}

/* —— Compact layout —— */
.page-compact { font-size: 0.8125rem; }
.page-heading { font-size: 1.125rem; font-weight: 700; color: var(--text-heading); line-height: 1.3; }
.page-subline { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 42rem; display: inline-block; vertical-align: bottom; }
.section-heading { font-size: 0.6875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-bottom: 0.5rem; }

.card-compact { padding: 0.75rem 1rem; border-radius: 0.875rem; }
.btn-compact { padding: 0.35rem 0.75rem !important; font-size: 0.75rem !important; font-weight: 600; }
.input-compact { padding: 0.35rem 0.6rem !important; font-size: 0.75rem !important; }
.label-compact { display: block; font-size: 0.6875rem; color: var(--text-muted); margin-bottom: 0.15rem; }
.link-compact { font-size: 0.75rem; color: var(--link); white-space: nowrap; }
.checkbox-compact { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: var(--text-label); white-space: nowrap; }
.form-compact { display: flex; flex-direction: column; gap: 0.6rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.form-row-2 .col-span-2 { grid-column: span 2; }

.page-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.page-toolbar-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.5rem; min-width: 0; }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.toolbar-hint { font-size: 0.6875rem; color: var(--text-faint); margin-left: auto; white-space: nowrap; }

.table-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.4rem 0.55rem;
  padding: 0.55rem 0.65rem 0.45rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.2));
  background: rgba(255, 255, 255, 0.35);
  border-radius: 0.5rem 0.5rem 0 0;
}
.table-filter-field {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}
.table-filter-search {
  flex: 1 1 11rem;
  min-width: 9rem;
}
.table-filter-label {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  line-height: 1.2;
}
.filter-select {
  min-width: 5.5rem;
  max-width: 8.5rem;
  padding-right: 1.5rem !important;
  cursor: pointer;
}
.table-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding-bottom: 0.05rem;
}
.table-filter-clear {
  text-decoration: none;
}
.table-filter-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem 0.4rem;
  padding: 0 0.65rem 0.45rem;
  margin-bottom: 0.25rem;
}
.table-filter-tags-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--accent, #2563eb);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.filter-tag:hover {
  background: rgba(37, 99, 235, 0.14);
  color: var(--accent-strong, #1d4ed8);
}

.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.35rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  white-space: nowrap;
}
.workflow-step { font-weight: 600; color: var(--text-label); }
.workflow-optional { font-weight: 500; color: var(--text-faint); }
.workflow-arrow { color: var(--text-faint); }

.table-compact th,
.table-compact td {
  padding: 0.5rem 0.6rem !important;
  font-size: 0.8125rem;
  white-space: nowrap;
  line-height: 1.4;
}
.table-compact th { font-size: 0.6875rem; padding-top: 0.55rem !important; padding-bottom: 0.55rem !important; }
.col-check { width: 1.75rem; }
.col-ellipsis { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
.col-phone { font-size: 0.6875rem; }
.nowrap { white-space: nowrap; }

.progress-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
}
.progress-text { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.progress-pct { font-weight: 600; color: var(--text-label); flex-shrink: 0; }
.progress-meta-inline { font-size: 0.6875rem; color: var(--text-muted); margin-top: 0.25rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-meta-block { margin-top: 0.2rem; }
.progress-meta-block .progress-meta-inline { display: block; margin-top: 0.15rem; }
.progress-meta-block .progress-meta-inline:first-child { margin-top: 0.25rem; }
.progress-activity { color: var(--text-body); white-space: normal; }
.progress-timing { color: var(--text-muted); font-size: 0.6875rem; white-space: nowrap; }
.progress-error { color: #b91c1c; white-space: normal; }
.progress-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.fetch-progress-banner {
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.625rem;
}
.fetch-progress-bar { height: 0.3rem; margin-top: 0.35rem; }
.fetch-progress-meta { margin-top: 0.25rem; gap: 0.5rem 0.75rem; }

.sync-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(191, 219, 254, 0.45);
}
.sync-row .input-compact { width: auto; min-width: 6rem; flex: 0 1 8rem; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.stat-card-compact { padding: 0.5rem 0.75rem; text-align: center; display: flex; align-items: center; justify-content: center; gap: 0.35rem; }
.stat-value-sm { font-size: 1.125rem; font-weight: 700; color: var(--text-heading); }
.stat-label-sm { font-size: 0.6875rem; color: var(--text-muted); }

.dashboard-active-jobs .active-job-card {
  padding: 0.65rem 0;
  border-top: 1px solid rgba(191, 219, 254, 0.35);
}
.dashboard-active-jobs .active-job-card:first-of-type { border-top: none; padding-top: 0; }
.active-job-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.45rem;
}
.active-job-title { font-size: 0.875rem; font-weight: 600; color: var(--text-heading); }
.active-job-subtitle { font-size: 0.6875rem; color: var(--text-muted); margin-top: 0.1rem; }
.active-pipeline { margin-top: 0.45rem; }
.active-pipeline + .active-pipeline { margin-top: 0.6rem; }

.backup-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem 1rem;
  font-size: 0.8125rem;
}
.backup-info-grid dt { color: var(--text-muted); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.03em; }
.backup-info-grid dd { color: var(--text-heading); margin: 0.15rem 0 0; }
.mono-text { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.75rem; word-break: break-all; }
.backup-warning { margin-top: 0.75rem; font-size: 0.8125rem; color: #b45309; }

.dashboard-page { display: flex; flex-direction: column; gap: 1rem; }
.dashboard-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}
.dashboard-title { font-size: 1.75rem; font-weight: 800; color: var(--text-heading); line-height: 1.2; }
.dashboard-subtitle { font-size: 0.875rem; color: var(--text-muted); margin-top: 0.25rem; }

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (max-width: 1100px) {
  .dashboard-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .dashboard-stat-grid { grid-template-columns: 1fr; }
}

.dashboard-stat-card {
  padding: 1rem 1.1rem;
  border-radius: 0.875rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 6.5rem;
}
.dashboard-stat-card-accent {
  background: linear-gradient(145deg, #eff6ff 0%, #dbeafe 100%);
  border-color: rgba(59, 130, 246, 0.35);
}
.dashboard-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-heading);
  line-height: 1.1;
}
.dashboard-stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-body);
}
.dashboard-stat-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: auto;
}

.dashboard-mini-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.dashboard-pill {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
}
.dashboard-pill strong { color: var(--text-heading); }

.dashboard-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
.dashboard-chart-card { padding: 1rem 1.1rem 1.1rem; }
.dashboard-chart-card-wide { grid-column: span 2; }
.dashboard-chart-caption {
  font-size: 0.6875rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
  margin-bottom: 0.65rem;
}
.dashboard-chart-wrap { position: relative; height: 220px; }
.dashboard-chart-wrap-donut { height: 240px; max-width: 320px; margin: 0 auto; }
.dashboard-chart-wrap-tall { height: 260px; }
.dashboard-recent-table { margin-top: 0.25rem; }

@media (max-width: 900px) {
  .dashboard-charts-grid { grid-template-columns: 1fr; }
  .dashboard-chart-card-wide { grid-column: span 1; }
  .dashboard-chart-wrap-donut { max-width: none; }
}

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }

.dl-compact { display: grid; gap: 0.2rem; font-size: 0.75rem; }
.dl-compact div { display: flex; gap: 0.5rem; }
.dl-compact dt { color: var(--text-muted); min-width: 3.5rem; flex-shrink: 0; }
.dl-compact dd { color: var(--text-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; font-size: 0.75rem; }
.notes-compact { font-size: 0.6875rem; color: var(--text-muted); white-space: pre-wrap; max-height: 12rem; overflow: auto; }

.pagination-compact { margin-top: 0.5rem; padding-top: 0.5rem; }

.page-size-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.inline-label {
  display: inline;
  margin: 0;
}

.page-size-select {
  width: auto;
  min-width: 4.25rem;
  padding-right: 1.5rem !important;
}

.col-usdot {
  white-space: nowrap;
}

.dot-usdot {
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
  flex-shrink: 0;
}

.dot-active { background: #22c55e; box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35); }
.dot-inactive { background: #ef4444; box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35); }
.dot-unknown { background: #94a3b8; }

.contact-chips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.45rem 0.75rem;
}

.contact-chip {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.motus-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.motus-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.45rem 0.75rem;
  margin-bottom: 0.65rem;
}

.motus-field {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.motus-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.motus-value {
  font-size: 0.75rem;
  color: var(--text-body);
  line-height: 1.3;
}

.motus-section {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(191, 219, 254, 0.45);
}

.motus-subheading {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.motus-auth-card {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(191, 219, 254, 0.55);
  border-radius: 0.5rem;
  padding: 0.4rem 0.55rem;
  margin-bottom: 0.35rem;
}

.motus-auth-type {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.2rem;
}

.motus-auth-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  color: var(--text-muted);
}

.motus-flag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.motus-extra-grid {
  display: grid;
  gap: 0.25rem;
  font-size: 0.6875rem;
}

.motus-extra-grid div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem;
  align-items: baseline;
}

.motus-extra-grid dt {
  color: var(--text-muted);
  font-weight: 600;
}

.motus-extra-grid dd {
  color: var(--text-body);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-link { padding: 0.4rem 0.75rem; font-size: 0.8125rem; }
