:root {
  --promo-bg: #631a4b;
  --bg-page: #f8f9fb;
  --bg-surface: #ffffff;
  --bg-subtle: #f4f5f8;
  --border: #e6e8ee;
  --border-strong: #d4d8e2;
  --text-main: #262b35;
  --text-secondary: #525866;
  --text-muted: #7a8191;
  --indigo: #c42250;
  --indigo-hover: #a61b43;
  --indigo-soft: #fdf2f5;
  --indigo-border: #f2c6d4;
  --dark-slate: #353b48;
  --emerald: #059669;
  --emerald-hover: #047857;
  --emerald-soft: #ecfdf5;
  --emerald-border: #a7f3d0;
  --rose: #dc2626;
  --rose-soft: #fef2f2;
  --rose-border: #fecaca;
  --amber-text: #92400e;
  --amber-soft: #fffbeb;
  --amber-border: #fde68a;
  --radius-lg: 12px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 10px rgba(38, 43, 53, 0.04);
  --shadow-lg: 0 16px 32px -8px rgba(38, 43, 53, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Brand top strip */
.povod-topbar {
  background-color: var(--promo-bg);
  color: #ffffff;
  font-size: 13px;
}

.povod-topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 9px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.povod-topbar a {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.povod-topbar a:hover {
  opacity: 0.85;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.povod-topbar-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.povod-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--indigo);
  background-color: var(--indigo-soft);
  border: 1px solid var(--indigo-border);
  padding: 7px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.povod-back-link:hover {
  background-color: var(--indigo);
  color: #ffffff;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--indigo);
  color: #ffffff;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

/* Icons */
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon-sm {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.icon-md {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--indigo);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--indigo-hover);
}

.btn-success {
  background: var(--dark-slate);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-success:hover:not(:disabled) {
  background: var(--text-main);
}

.btn-outline {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-color: var(--border-strong);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--indigo);
  color: var(--indigo);
  background: var(--indigo-soft);
}

.btn-soft {
  background: var(--indigo-soft);
  color: var(--indigo);
  border-color: var(--indigo-border);
  font-size: 12px;
  padding: 7px 12px;
}

.btn-soft:hover:not(:disabled) {
  background: #f9dce6;
}

.btn-ghost-danger {
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  padding: 6px 10px;
}

.btn-ghost-danger:hover {
  background: var(--rose-soft);
  color: var(--rose);
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--indigo);
  text-decoration: underline;
  cursor: pointer;
}

.link-btn-muted {
  background: none;
  border: none;
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: underline;
  cursor: pointer;
}

/* Main layout */
.main-stack {
  padding-top: 24px;
  padding-bottom: 44px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.card-amber {
  border-color: var(--amber-border);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head.compact {
  margin-bottom: 12px;
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.section-title-sm {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.section-desc {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--bg-page);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone:hover,
.dropzone:focus-visible {
  border-color: var(--indigo);
  background: var(--indigo-soft);
  outline: none;
}

.dropzone-active {
  border-color: var(--indigo) !important;
  background: var(--indigo-soft) !important;
}

.dropzone-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--indigo-soft);
  color: var(--indigo);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-title {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.link-accent {
  color: var(--indigo);
  text-decoration: underline;
}

.dropzone-hint {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-muted);
}

/* File list */
.file-list-wrapper {
  margin-top: 20px;
}

.file-list-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.label-caps {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-page);
}

.file-item.is-ours {
  border-color: var(--indigo-border);
  background: var(--indigo-soft);
}

.file-item-meta {
  min-width: 0;
  flex: 1;
}

.file-name-input {
  width: 100%;
  border: none;
  border-bottom: 1px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  padding: 2px 0;
}

.file-name-input:focus {
  outline: none;
  border-bottom-color: var(--indigo);
}

.file-item-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.our-tag {
  background: #f9dce6;
  color: var(--indigo-hover);
  font-weight: 600;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
}

.remove-file-btn {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
}

.remove-file-btn:hover {
  background: var(--rose-soft);
  color: var(--rose);
}

/* Summary */
.summary-stack {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
}

.kpi-card-primary {
  border-color: var(--indigo-border);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.kpi-label-primary {
  color: var(--indigo);
}

.kpi-value {
  font-size: 18px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.pill-indigo {
  background: var(--indigo-soft);
  color: var(--indigo);
}

.pill-emerald {
  background: var(--emerald-soft);
  color: var(--emerald-hover);
}

.pill-amber {
  background: var(--amber-soft);
  color: var(--amber-text);
}

.summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.summary-grid.with-gaps {
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
}

/* Ranking table */
.table-wrap-x {
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.ranking-table th {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-page);
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

.ranking-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bg-subtle);
}

.ranking-table tr.row-ours {
  background: rgba(253, 242, 245, 0.75);
}

.col-progress {
  width: 180px;
}

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.rank-badge.first {
  background: var(--amber-soft);
  color: var(--amber-text);
}

.progress-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.score-progress {
  width: 100%;
  height: 8px;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-subtle);
}

.score-progress::-webkit-progress-bar {
  background: var(--bg-subtle);
  border-radius: 999px;
}

.score-progress::-webkit-progress-value {
  background: var(--indigo);
  border-radius: 999px;
}

.score-progress.leader::-webkit-progress-value {
  background: var(--emerald);
}

.score-progress::-moz-progress-bar {
  background: var(--indigo);
  border-radius: 999px;
}

.score-progress.leader::-moz-progress-bar {
  background: var(--emerald);
}

.pct-label {
  font-size: 12px;
  font-weight: 600;
  width: 42px;
  text-align: right;
  flex-shrink: 0;
}

/* Gaps list */
.gaps-intro {
  margin-bottom: 12px;
}

.gaps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.gap-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-page);
}

.gap-name {
  font-size: 12px;
  font-weight: 600;
}

.gap-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.gap-weight {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--indigo-soft);
  color: var(--indigo);
}

.gaps-ok {
  font-size: 12px;
  color: var(--emerald-hover);
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-border);
  border-radius: 10px;
  padding: 12px;
}

/* Audit Matrix & Tabs */
.audit-toolbar {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.audit-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tabs {
  display: inline-flex;
  padding: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  gap: 4px;
}

.tab-btn {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.tab-btn:hover:not(.active) {
  color: var(--indigo);
}

.tab-btn.active {
  background: var(--indigo);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.tab-badge {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--border);
  color: var(--text-secondary);
}

.tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.search-box {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  padding: 7px 12px 7px 32px;
  font-size: 13px;
  font-family: inherit;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  width: 220px;
  color: var(--text-main);
}

.search-input:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(196, 34, 80, 0.12);
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

.checkbox-label input {
  accent-color: var(--indigo);
}

.table-scroll {
  overflow-x: auto;
  max-height: 68vh;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.audit-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-page);
  border-bottom: 1px solid var(--border);
  padding: 12px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
}

.audit-table th.sticky-col-1,
.audit-table td.sticky-col-1 {
  position: sticky;
  left: 0;
  z-index: 10;
  border-right: 1px solid var(--border);
}

.audit-table thead th.sticky-col-1 {
  z-index: 30;
}

.audit-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--bg-subtle);
}

.audit-table tbody td.sticky-col-1 {
  background: var(--bg-surface);
  min-width: 240px;
  font-weight: 500;
}

.audit-table tbody tr:hover td {
  background: var(--bg-page);
}

.audit-table th.col-ours,
.audit-table td.col-ours {
  background: rgba(253, 242, 245, 0.7);
}

.audit-table tfoot td {
  background: var(--bg-page);
  border-top: 1px solid var(--border);
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13px;
}

.factor-id {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  color: var(--text-muted);
  margin-right: 6px;
}

.weight-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.weight-pill.w5 {
  background: var(--indigo-soft);
  color: var(--indigo);
}

.weight-pill.w4 {
  background: var(--border);
  color: var(--text-main);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

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

.text-points {
  color: var(--indigo);
  font-weight: 700;
}

/* Status badges + tooltip */
.tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cell-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease;
}

.cell-toggle-btn.found {
  background: var(--emerald-soft);
  color: var(--emerald-hover);
  border-color: var(--emerald-border);
}

.cell-toggle-btn.found:hover {
  background: #d1fae5;
}

.cell-toggle-btn.missing {
  background: var(--rose-soft);
  color: var(--rose);
  border-color: var(--rose-border);
}

.cell-toggle-btn.missing:hover {
  background: #fee2e2;
}

.manual-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #f59e0b;
}

.tooltip-box {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  background: var(--dark-slate);
  color: #ffffff;
  font-size: 11px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 50;
  text-align: left;
  white-space: normal;
  font-weight: 400;
}

.tooltip-wrap:hover .tooltip-box {
  visibility: visible;
  opacity: 1;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(38, 43, 53, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-panel {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header,
.modal-footer {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-header {
  border-bottom: 1px solid var(--border);
}

.modal-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-page);
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.icon-close-btn {
  background: none;
  border: none;
  padding: 6px;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
}

.icon-close-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.weight-group-title {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--indigo);
}

.weight-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  margin-bottom: 6px;
  font-size: 13px;
}

.weight-select {
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 4px 8px;
  background: var(--bg-surface);
  color: var(--text-main);
}

/* Toasts */
.toast-container {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 340px;
}

.toast {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  background: var(--dark-slate);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.2s ease-out forwards;
  transition: opacity 0.25s ease;
}

.toast.success {
  background: var(--emerald);
}

.toast.warning {
  background: #d97706;
}

.toast.error {
  background: var(--rose);
}

.toast.toast-exit {
  opacity: 0;
}

@keyframes toastIn {
  from {
    transform: translateY(12px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 900px) {
  .kpi-grid,
  .summary-grid.with-gaps {
    grid-template-columns: 1fr;
  }
}

/* =========================================================================
   URL Input Panel & Hybrid Fetch Progress (v2)
   ========================================================================= */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.input-mode-bar {
  margin-bottom: 14px;
}

.url-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.url-textarea {
  width: 100%;
  min-height: 124px;
  resize: vertical;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--text-main);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.url-textarea:focus {
  outline: none;
  border-color: var(--indigo);
  background: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(196, 34, 80, 0.12);
}

.url-textarea:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.url-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.url-mode-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.url-mode-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.url-mode-select {
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
}

.url-mode-select:focus {
  outline: none;
  border-color: var(--indigo);
}

.url-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.url-progress-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.url-progress-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-page);
  font-size: 12px;
}

.url-progress-item.status-ok {
  border-color: var(--emerald-border);
  background: var(--emerald-soft);
}

.url-progress-item.status-err {
  border-color: var(--rose-border);
  background: var(--rose-soft);
}

.url-progress-url {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text-main);
}

.url-progress-meta {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--text-secondary);
}

.url-progress-item.status-ok .url-progress-meta {
  color: var(--emerald-hover);
}

.url-progress-item.status-err .url-progress-meta {
  color: var(--rose);
}

.source-tag {
  font-weight: 600;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.source-tag.engine-playwright {
  background: var(--amber-soft);
  color: var(--amber-text);
}

.source-tag.engine-http {
  background: var(--emerald-soft);
  color: var(--emerald-hover);
}
