* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13px;
  color: #1f2937;
  background: #fff;
  width: 100%;
  min-width: 300px;
}
header {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
  color: #fff;
  padding: 12px 14px 0;
}
.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}
.logo-row h1 { margin: 0; font-size: 14px; font-weight: 700; }
.logo-row .sub { margin: 0; font-size: 10px; opacity: 0.8; }
.logo-row > div:nth-child(2) { flex: 1; }
.icon-btn {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { background: rgba(255,255,255,0.25); }

.domain-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.domain-bar input {
  flex: 1;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  background: rgba(255,255,255,0.95);
  color: #1f2937;
  font-family: ui-monospace, monospace;
}
.domain-bar input:focus {
  outline: 2px solid rgba(255,255,255,0.5);
}
.domain-bar button {
  padding: 6px 12px;
  background: rgba(255,255,255,0.25);
  border: none;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
}
.domain-bar button:hover { background: rgba(255,255,255,0.35); }

header { padding-bottom: 12px; }

.pane { padding: 12px 14px 14px; }

main.pane { padding: 12px 14px 14px; }

.section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eaeef2;
}
.section:last-child { border-bottom: none; margin-bottom: 0; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.section-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
}
.mini-btn {
  padding: 4px 10px;
  font-size: 11px;
  border: 1px solid #d0d7de;
  border-radius: 5px;
  background: #f6f8fa;
  cursor: pointer;
  color: #1f2937;
}
.mini-btn:hover:not(:disabled) { background: #eaeef2; }

.section.collapsible {
  background: #f9fafb;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 0;
  margin-bottom: 12px;
}
.section.collapsible > summary {
  cursor: pointer;
  padding: 10px 12px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  user-select: none;
}
.section.collapsible > summary::-webkit-details-marker { display: none; }
.section.collapsible > summary h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.section.collapsible > summary::after {
  content: "▸";
  position: absolute;
  right: 16px;
  font-size: 11px;
  color: #6b7280;
}
.section.collapsible[open] > summary::after { content: "▾"; }
.section.collapsible > summary { position: relative; padding-right: 32px; }
.section.collapsible[open] > summary { border-bottom: 1px solid #e5e7eb; }
.section.collapsible .summary-hint {
  font-size: 10.5px;
  color: #6b7280;
  font-weight: normal;
}
.section.collapsible > *:not(summary) {
  padding-left: 12px;
  padding-right: 12px;
}
.section.collapsible > *:last-child {
  padding-bottom: 12px;
}

.sub-status {
  font-size: 11px;
  margin-bottom: 8px;
  margin-top: 8px;
}

.status {
  font-size: 12px;
  color: #57606a;
  background: #f6f8fa;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.status.error { color: #cf222e; background: #ffebe9; }
.status.success { color: #166534; background: #dafbe1; }
.status.loading { color: #1e40af; background: #eff6ff; }

/* ============ SITE HEADER ============ */
.site-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0 12px;
  border-bottom: 1px solid #eaeef2;
  margin-bottom: 12px;
}
.favicon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f3f4f6;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
}
.site-info { flex: 1; min-width: 0; }
.site-info .domain {
  font-family: ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #1e40af;
  word-break: break-all;
}
.site-info .title {
  font-size: 12px;
  color: #6b7280;
  margin-top: 2px;
}
.site-info .meta {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 4px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.pill {
  display: inline-block;
  padding: 1px 7px;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 600;
}
.pill.warn { background: #fef3c7; color: #92400e; }

.desc {
  font-size: 11px;
  color: #4b5563;
  background: #f9fafb;
  padding: 8px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
  line-height: 1.45;
}

/* ============ BIG STATS ============ */
.big-stats {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.bs-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
}
.bs-card.primary {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #93c5fd;
}
.bs-lab {
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.bs-big {
  font-size: 18px;
  font-weight: 800;
  color: #1f2937;
  margin-top: 4px;
  line-height: 1.1;
}
.bs-card.primary .bs-big { color: #1e40af; }
.bs-spark {
  margin-top: 6px;
  height: 24px;
}

/* ============ ENGAGEMENT ============ */
.eng-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}
.eng-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.eng-big {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
}
.eng-lab {
  font-size: 10px;
  color: #6b7280;
  margin-top: 2px;
}

h3 {
  font-size: 11px;
  font-weight: 700;
  color: #1e40af;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

/* ============ CHARTS ============ */
.chart-box {
  background: #f9fafb;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 14px;
}
.chart-box svg { display: block; width: 100%; height: auto; }

.sources-wrap {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.donut-wrap { display: flex; justify-content: center; }
.donut-wrap svg { width: 120px; height: 120px; }
.legend {
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legend-row {
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.legend-name { color: #374151; }
.legend-visits {
  color: #1f2937;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 11px;
}
.legend-pct {
  color: #6b7280;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  min-width: 42px;
  text-align: right;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}
.bar-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}
.bar-flag {
  font-family: ui-monospace, monospace;
  font-weight: 700;
  color: #374151;
  font-size: 10px;
}
.bar-track {
  background: #e5e7eb;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #1e40af);
  border-radius: 6px;
  min-width: 2px;
}
.bar-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: #1f2937;
  font-size: 11px;
}

.ai-info {
  background: linear-gradient(135deg, #faf5ff 0%, #ede9fe 100%);
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 11px;
  color: #5b21b6;
}
.ai-info .big {
  font-size: 16px;
  font-weight: 700;
  color: #4c1d95;
}

/* ============ TABLES ============ */
.kw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}
.kw-table th, .kw-table td {
  padding: 6px 8px;
  border-bottom: 1px solid #f3f4f6;
  text-align: left;
}
.kw-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #6b7280;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.kw-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.kw-table tr:last-child td { border-bottom: none; }
.kw-table a { color: #1e40af; text-decoration: none; }
.kw-table a:hover { text-decoration: underline; }

/* ============ ADS KEYWORD SPY ============ */
.ads-form label {
  display: block;
  font-size: 11px;
  color: #57606a;
  margin-bottom: 8px;
}
.ads-form input[type=text],
.ads-form input[type=number],
.ads-form select {
  display: block;
  width: 100%;
  padding: 6px 8px;
  margin-top: 3px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 12px;
  color: #1f2328;
  background: #fff;
  font-family: inherit;
}
.ads-form .row { margin-bottom: 8px; }
.ads-form .row.three { grid-template-columns: 1fr 1fr 1fr; }
.ads-form .check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #374151;
  margin-bottom: 6px;
}
.ads-form .check input { margin: 0; }

.ads-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 8px 0;
}
.ads-summary .card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.ads-summary .card .big {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  color: #1f2937;
}
.ads-summary .card .lab {
  font-size: 10px;
  color: #6b7280;
  margin-top: 2px;
}
.ads-summary .card.active .big { color: #166534; }
.ads-summary .card.active { border-color: #86efac; }
.ads-summary .card.stopped .big { color: #991b1b; }
.ads-summary .card.stopped { border-color: #fecaca; }
.ads-summary .card.duration .big { color: #c2410c; }
.ads-summary .card.duration { border-color: #fed7aa; }

.ads-toolbar {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
}
.ads-toolbar label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #57606a;
  margin: 0;
}
.ads-toolbar select {
  padding: 4px 6px;
  border: 1px solid #d0d7de;
  border-radius: 5px;
  font-size: 11px;
}

.ads-results {
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
  margin-bottom: 8px;
}
.ads-results:empty { display: none; }
.ads-results table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.ads-results th, .ads-results td {
  text-align: left;
  padding: 5px 7px;
  border-bottom: 1px solid #eaeef2;
  vertical-align: top;
}
.ads-results th {
  background: #f9fafb;
  font-weight: 600;
  position: sticky;
  top: 0;
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
}
.ads-results td.num { text-align: right; font-variant-numeric: tabular-nums; }
.ads-results a { color: #1e40af; text-decoration: none; }
.ads-results a:hover { text-decoration: underline; }
.ads-results .empty {
  padding: 16px;
  text-align: center;
  color: #9ca3af;
  font-size: 11px;
}
.ads-results .row-stopped td { opacity: 0.7; }
.ads-results .adv-name { font-weight: 600; font-size: 11px; }
.ads-results .adv-domain { font-size: 10px; color: #1e40af; }
.ads-results .adv-id { font-size: 10px; color: #9ca3af; font-family: ui-monospace, monospace; }
.ads-results .num-big { font-size: 12px; font-weight: 700; color: #c2410c; }
.ads-results .hint { color: #9ca3af; font-size: 10px; }

.badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 9.5px;
  font-weight: 700;
  white-space: nowrap;
}
.badge.ok { background: #dcfce7; color: #166534; }
.badge.stop { background: #fee2e2; color: #991b1b; }

.top-longest {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.top-longest .tl-title {
  font-size: 10px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.tl-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 6px;
  align-items: center;
  padding: 3px 0;
}
.tl-rank { font-size: 12px; font-weight: 700; color: #92400e; text-align: center; }
.tl-name {
  font-size: 11px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.tl-name a { color: #1e40af; text-decoration: none; }
.tl-name a:hover { text-decoration: underline; }
.tl-bar {
  height: 4px;
  background: #fde68a;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 2px;
}
.tl-fill { height: 100%; background: #d97706; }
.tl-fill.ok { background: #2da44e; }
.tl-fill.stop { background: #cf222e; }
.tl-meta { font-size: 10px; color: #6b7280; }

/* ============ BULK PANE ============ */
.form label {
  display: block;
  font-size: 11px;
  color: #57606a;
  margin-bottom: 8px;
}
.form input[type=text],
.form input[type=number],
.form textarea {
  display: block;
  width: 100%;
  padding: 6px 8px;
  margin-top: 3px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 13px;
  color: #1f2328;
  background: #fff;
  font-family: inherit;
}
.form textarea {
  resize: vertical;
  min-height: 100px;
  font-family: ui-monospace, monospace;
  font-size: 12px;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.row label { margin-bottom: 0; }

button {
  padding: 7px 10px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  background: #f6f8fa;
  font-size: 13px;
  cursor: pointer;
  color: #1f2328;
}
button:hover:not(:disabled) { background: #eaeef2; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.primary {
  background: #1e40af;
  border-color: #1e40af;
  color: #fff;
}
button.primary:hover:not(:disabled) { background: #1e3a8a; }

.btn-row { display: flex; gap: 8px; margin-bottom: 10px; }
.btn-row button { flex: 1; }

.bulk-status { margin-bottom: 8px; }

.results {
  max-height: 280px;
  overflow: auto;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #fff;
}
.results table { width: 100%; border-collapse: collapse; font-size: 11px; }
.results th, .results td {
  padding: 5px 6px;
  border-bottom: 1px solid #eaeef2;
  text-align: left;
  vertical-align: top;
}
.results th {
  background: #f9fafb;
  font-weight: 600;
  position: sticky;
  top: 0;
  white-space: nowrap;
  font-size: 10px;
  color: #6b7280;
  text-transform: uppercase;
}
.results td.num { text-align: right; font-variant-numeric: tabular-nums; }
.results tr.clickable { cursor: pointer; }
.results tr.clickable:hover { background: #f9fafb; }

.errors {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 8px;
  font-size: 11px;
  color: #9b1c1c;
}
.errors .err-title { font-weight: 700; margin-bottom: 4px; }
.errors ul { margin: 0; padding-left: 16px; }

.export {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.export button { flex: 1; }

/* ============ SITE INTEL ============ */
.intel-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.intel-actions button { flex: 1; }

.intel-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
}
.intel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.intel-head h3 {
  margin: 0;
  flex: 1;
  font-size: 11px;
  color: #1e40af;
}
.intel-icon {
  font-size: 14px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eff6ff;
  border-radius: 6px;
  flex-shrink: 0;
}
.intel-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: #f3f4f6;
  color: #6b7280;
}
.intel-badge.ok { background: #dcfce7; color: #166534; }
.intel-badge.warn { background: #fef3c7; color: #92400e; }
.intel-badge.bad { background: #fee2e2; color: #991b1b; }
.intel-badge.info { background: #dbeafe; color: #1e40af; }

.intel-body {
  font-size: 11.5px;
  color: #374151;
  line-height: 1.55;
}
.intel-body a {
  color: #1e40af;
  text-decoration: none;
  word-break: break-all;
}
.intel-body a:hover { text-decoration: underline; }

.intel-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px;
  padding: 3px 0;
  border-bottom: 1px dashed #f3f4f6;
}
.intel-row:last-child { border-bottom: none; }
.intel-row .k {
  color: #6b7280;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  font-weight: 600;
}
.intel-row .v {
  color: #1f2937;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.intel-list { margin: 0; padding-left: 18px; }
.intel-list li { margin-bottom: 4px; }

.intel-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #eff6ff;
  color: #1e40af;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  margin: 2px 4px 2px 0;
}
.intel-chip.green { background: #dcfce7; color: #166534; }
.intel-chip.purple { background: #f3e8ff; color: #6b21a8; }

.intel-empty {
  color: #9ca3af;
  font-size: 11px;
  font-style: italic;
}
.intel-error {
  color: #991b1b;
  background: #fee2e2;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 11px;
}

/* Proxy settings */
.intel-settings {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 11.5px;
}
.intel-settings summary {
  cursor: pointer;
  font-weight: 600;
  color: #374151;
  user-select: none;
  padding: 2px 0;
}
.intel-settings summary::-webkit-details-marker { color: #6b7280; }
.intel-settings[open] summary { margin-bottom: 8px; border-bottom: 1px solid #e5e7eb; padding-bottom: 6px; }

.proxy-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #374151;
  margin-bottom: 6px;
}
.proxy-toggle input { margin: 0; }

.proxy-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #374151;
  margin-bottom: 8px;
  padding: 6px 8px;
  background: #eff6ff;
  border-radius: 6px;
}
.proxy-info .proxy-sep { color: #9ca3af; }
#proxyBalance { font-weight: 700; color: #1e40af; }
#proxyCount { color: #6b7280; }

.proxy-select {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  font-size: 11px;
  font-family: ui-monospace, monospace;
  margin-bottom: 6px;
  background: #fff;
  cursor: pointer;
}
.proxy-select:disabled { background: #f3f4f6; cursor: not-allowed; }
.proxy-actions {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.proxy-actions button { flex: 1; padding: 5px 8px; font-size: 11px; }

.proxy-status {
  font-size: 11px;
  padding: 4px 0;
}
.proxy-status.ok { color: #166534; }
.proxy-status.bad { color: #991b1b; }

.proxy-hint {
  font-size: 10px;
  color: #9ca3af;
  line-height: 1.4;
  margin-top: 4px;
}
.proxy-hint code {
  background: #eaeef2;
  padding: 1px 4px;
  border-radius: 3px;
  font-size: 9.5px;
}


/* ===== ĐÃ BỎ: ẩn 3 tính năng (P&L ước tính, Wayback First Snapshot, Ads Keyword Spy) ===== */
#pnlBox, #intelWbCard, #paneAds { display: none !important; }

/* ============ P&L brand-bid ============ */
.pnl-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.pnl-box h3 { margin: 0 0 8px; }
.pnl-inputs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.pnl-inputs label {
  display: flex;
  flex-direction: column;
  font-size: 9.5px;
  color: #6b7280;
  gap: 2px;
}
.pnl-inputs input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 6px;
  font-size: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  color: #1f2937;
  background: #fff;
}
.pnl-inputs input:focus { outline: none; border-color: #3b82f6; }
.pnl-out { margin-top: 10px; }
.pnl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #374151;
  padding: 3px 0;
}
.pnl-row b { font-weight: 700; color: #1f2937; }
.pnl-row.pnl-sep {
  border-top: 1px dashed #e5e7eb;
  margin-top: 6px;
  padding-top: 8px;
  font-size: 10.5px;
  color: #6b7280;
}
.pnl-good { color: #059669 !important; }
.pnl-bad  { color: #dc2626 !important; }
.pnl-hint { font-size: 11px; color: #9ca3af; }
.pnl-verdict {
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  background: #fff;
  border: 1px solid #e5e7eb;
}
.pnl-verdict.pnl-good { background: #ecfdf5; border-color: #a7f3d0; }
.pnl-verdict.pnl-bad  { background: #fef2f2; border-color: #fecaca; }

/* ============ Tier quốc gia ============ */
.tier-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.tier-pill {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  color: #fff;
}
.tier-pill.t1 { background: #059669; }
.tier-pill.t2 { background: #2563eb; }
.tier-pill.t3 { background: #9ca3af; }
.tier-dom {
  font-size: 11px;
  font-weight: 700;
  margin-left: 2px;
}
.tier-dom.t1 { color: #059669; }
.tier-dom.t2 { color: #2563eb; }
.tier-dom.t3 { color: #6b7280; }
.pnl-row small { font-weight: 500; color: #9ca3af; font-size: 10px; }
