.dash-sidebar-brand .navbar-logo {
  display: flex;
  align-items: center;
}

.dash-sidebar-brand .navbar-logo img {
  width: 180px;
  height: 32px;
  object-fit: contain;
  object-position: left;
}

.admin-shell .premium-promo {
  display: none !important;
}

.admin-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.data-source-note {
  margin: 0 0 16px;
  padding: 11px 14px;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
}

.data-source-note.directory {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.data-source-note.catalog {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

.source-badge.catalog {
  background: #d1fae5;
  color: #047857;
}

.admin-catalog-page {
  display: grid;
  gap: 18px;
}

.admin-catalog-page section {
  display: grid;
  gap: 10px;
}

.admin-catalog-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-icon.catalog {
  color: #047857;
  background: #d1fae5;
}

.admin-catalog-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.admin-catalog-section-head h2,
.admin-catalog-section-head p {
  margin: 0;
}

.admin-catalog-section-head p {
  margin-top: 4px;
  color: var(--fmp-muted);
  font-size: 13px;
}

.directory-company-page {
  display: grid;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
}

.directory-company-heading,
.directory-form-head,
.directory-form-actions,
.directory-source-note,
.directory-loading {
  display: flex;
  align-items: center;
}

.directory-company-heading,
.directory-form-head {
  justify-content: space-between;
  gap: 18px;
}

.directory-company-heading h1,
.directory-form-head h2,
.directory-form-head p,
.directory-source-note p {
  margin: 0;
}

.directory-database-badge {
  padding: 7px 11px;
  border-radius: 999px;
  color: #1d4ed8;
  background: #dbeafe;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.directory-source-note {
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  color: #1e40af;
  background: #eff6ff;
}

.directory-source-note svg {
  width: 20px;
  flex: 0 0 20px;
}

.directory-source-note p,
.directory-form-head p {
  margin-top: 4px;
  color: var(--fmp-muted);
  font-size: 13px;
}

.directory-company-form {
  display: grid;
  gap: 20px;
}

.directory-active-check {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
}

.directory-form-actions,
.directory-loading {
  gap: 10px;
}

.directory-published {
  color: #166534;
  background: #dcfce7;
}

.directory-draft {
  color: #92400e;
  background: #fef3c7;
}

.source-badge.directory {
  background: #eff6ff;
  color: #1d4ed8;
}

.admin-topbar-popover-wrap {
  position: relative;
}

.admin-topbar-popover-wrap .topbar-popover {
  top: 48px;
}

.admin-ticket-popover-item {
  display: grid;
  width: 100%;
  gap: 3px;
  border: 0;
  border-top: 1px solid #eef0f2;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.admin-ticket-popover-item:hover,
.popover-item.unread {
  background: #fff7ed;
}

.admin-catalogue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--fmp-border);
}

.admin-catalogue-item p {
  margin: 4px 0;
  color: var(--fmp-muted);
  font-size: 13px;
}

.listing-page {
  display: grid;
  gap: 18px;
  max-width: 1120px;
  margin: 0 auto;
}

.listing-heading,
.listing-section-title,
.listing-section-title > div,
.listing-actions,
.listing-plan-badges {
  display: flex;
  align-items: center;
}

.listing-heading,
.listing-section-title,
.listing-actions {
  justify-content: space-between;
}

.listing-heading { gap: 20px; }
.listing-heading h1 { margin: 0 0 5px; }
.listing-plan-badges { flex-wrap: wrap; gap: 8px; }

.listing-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.listing-plan-badge.free { color: #166534; background: #dcfce7; }
.listing-plan-badge.premium { color: #9a3412; background: #ffedd5; }
.listing-plan-badge.locked { color: #4b5563; background: #e5e7eb; }

.listing-editor { display: grid; gap: 20px; }
.listing-section-title { gap: 14px; }
.listing-section-title > div { gap: 12px; }
.listing-section-title h2,
.listing-section-title h3 { margin: 0 0 4px; }
.listing-section-title p { margin: 0; color: var(--fmp-muted); font-size: 13px; }
.listing-section-title.compact { padding-top: 2px; }

.listing-icon,
.premium-lock-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  color: #166534;
  background: #dcfce7;
}

.listing-icon svg,
.premium-lock-icon svg { width: 21px; height: 21px; }
.listing-icon.premium { color: var(--fmp-orange); background: #fff1e9; }
.listing-actions { gap: 16px; padding-top: 2px; }

.listing-locked-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 18px;
}

.listing-locked-grid > .listing-editor { min-width: 0; }

.premium-locked,
.web-locked {
  grid-template-columns: auto 1fr;
  align-items: start;
  border-style: dashed;
  background: linear-gradient(135deg, #fafafa, #fff7ed);
}

.premium-locked .premium-lock-icon, .web-locked .premium-lock-icon { color: #6b7280; background: #e5e7eb; }
.premium-locked h2, .web-locked h2 { margin: 5px 0 8px; }
.premium-locked p, .web-locked p { max-width: 760px; color: var(--fmp-muted); }
.premium-locked ul, .web-locked ul { margin: 12px 0 18px; padding-left: 20px; color: #4b5563; }
.web-locked li + li { margin-top: 8px; }
.web-locked .web-lock-notice { margin-bottom: 18px; padding: 12px; border-left: 3px solid #fdba74; border-radius: 4px; background: #fff7ed; font-size: 13px; }
.web-locked .web-request-note { margin: 12px 0 0; font-size: 12px; }
.web-locked .btn { display: inline-flex; align-items: center; gap: 8px; white-space: normal; text-align: center; }
.web-locked .btn svg { width: 18px; height: 18px; flex: 0 0 18px; }
.premium-enabled { border-color: #fed7aa; }

.listing-free-fields,
.listing-premium-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.listing-free-fields > label,
.listing-premium-fields > label,
.listing-location-group label,
.premium-products-field > span {
  display: grid;
  gap: 7px;
  color: #374151;
  font-size: 13px;
  font-weight: 700;
}

.listing-location-group {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 14px;
  border: 1px solid #dbe2ea;
  border-radius: 12px;
}

.listing-location-group legend {
  padding: 0 6px;
  color: #374151;
  font-size: 13px;
  font-weight: 800;
}

.listing-location-group > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.listing-field-wide,
.premium-products-field {
  grid-column: 1 / -1;
}

.listing-premium-fields input[readonly] {
  border-style: dashed;
  background: #f8fafc;
  color: #475569;
}

.premium-products-field {
  display: grid;
  gap: 7px;
}

.premium-products-field > div {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 10px 8px 14px;
  border: 1px solid #dbe2ea;
  border-radius: 9px;
  background: #fff;
}

.premium-products-field strong {
  color: #1f2937;
  font-size: 13px;
}

.listing-premium-fields small {
  color: #64748b;
  font-weight: 500;
}

.listing-shared-data-note {
  margin: -4px 0 0;
  padding: 11px 13px;
  border-radius: 10px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
}

.catalogue-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.catalogue-upload-grid > textarea,
.catalogue-upload-grid > .settings-status { grid-column: 1 / -1; }
.catalogue-upload-grid label { display: grid; gap: 7px; font-size: 13px; font-weight: 600; }
.catalogue-upload-grid .btn { justify-self: start; }
.premium-admin-control { border-color: #fed7aa; background: #fffaf5; }
.premium-admin-control h3 { margin-bottom: 4px; }
.premium-admin-control small { display: block; margin-top: 8px; color: var(--fmp-muted); }

.catalog-import-page { display: grid; gap: 18px; max-width: 1180px; margin: 0 auto; }
.catalog-import-heading,.catalog-section-head,.catalog-history-row,.catalog-result h3 { display: flex; align-items: center; }
.catalog-import-heading,.catalog-section-head { justify-content: space-between; gap: 18px; }
.catalog-import-heading h1,.catalog-section-head h2 { margin: 0 0 5px; }
.catalog-version { padding: 7px 11px; border-radius: 999px; background: #fff1e9; color: #c2410c; font-size: 12px; font-weight: 700; }
.catalog-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.catalog-step { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 13px; }
.catalog-step-number { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--fmp-orange); font-weight: 800; }
.catalog-step h2 { margin: 3px 0 7px; font-size: 17px; }
.catalog-step p,.catalog-section-head p { margin: 0 0 14px; color: var(--fmp-muted); font-size: 13px; line-height: 1.5; }
.catalog-step .btn { display: inline-flex; align-items: center; gap: 7px; }
.catalog-step .btn svg { width: 17px; height: 17px; }
.catalog-rules { margin-top: 10px; }
.catalog-rules summary { color: #c2410c; cursor: pointer; font-size: 13px; font-weight: 700; }
#catalog-options { max-height: 180px; overflow: auto; margin-top: 9px; padding: 10px; border-radius: 9px; background: #fafafa; }
#catalog-options p { margin: 0 0 8px; font-size: 11px; }
.catalog-import-form { display: grid; gap: 10px; }
.catalog-file-drop { display: grid; gap: 5px; padding: 12px; border: 1px dashed #fdba74; border-radius: 10px; background: #fffaf5; cursor: pointer; }
.catalog-file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.catalog-file-drop span { display: flex; align-items: center; gap: 7px; color: #9a3412; font-size: 13px; font-weight: 700; }
.catalog-file-drop svg { width: 17px; height: 17px; }
.catalog-file-drop small { color: var(--fmp-muted); overflow-wrap: anywhere; }
.catalog-result { display: grid; gap: 10px; }
.catalog-result.loading { display: flex; align-items: center; gap: 12px; }
.catalog-result.error { border-color: #fecaca; background: #fef2f2; }
.catalog-result.success { border-color: #bbf7d0; background: #f0fdf4; }
.catalog-result h3 { gap: 8px; margin: 0; }
.catalog-result h3 svg { width: 20px; height: 20px; }
.catalog-result p { margin: 0; }
.catalog-result ol { max-height: 260px; overflow: auto; margin: 0; padding-left: 24px; font-size: 13px; }
.catalog-result-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.catalog-result-metrics span { padding: 10px; border-radius: 9px; background: #fff; color: var(--fmp-muted); font-size: 12px; }
.catalog-result-metrics strong { display: block; color: var(--fmp-dark); font-size: 20px; }
.catalog-products-card,.catalog-history-card { display: grid; gap: 14px; }
.status-pill.catalog-active { color: #166534; background: #dcfce7; }
.status-pill.catalog-inactive { color: #991b1b; background: #fee2e2; }
.catalog-history-row { gap: 12px; padding: 11px 0; border-top: 1px solid #eef0f2; }
.catalog-history-row:first-child { border-top: 0; }
.catalog-history-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--fmp-orange); background: #fff1e9; }
.catalog-history-icon svg { width: 18px; height: 18px; }
.catalog-history-row > div:nth-child(2) { display: grid; gap: 3px; flex: 1; min-width: 0; }
.catalog-history-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-history-row small { color: var(--fmp-muted); }
.catalog-history-row > div:last-child { display: flex; gap: 6px; flex-wrap: wrap; }
.catalog-history-row > div:last-child span { padding: 5px 8px; border-radius: 7px; background: #f3f4f6; font-size: 11px; }

.analytics-page {
  display: grid;
  gap: 18px;
}

.analytics-head,
.analytics-actions,
.analytics-database-title,
.analytics-chart-head,
.analytics-trend,
.chart-legend {
  display: flex;
  align-items: center;
}

.analytics-head,
.analytics-database-title,
.analytics-chart-head {
  justify-content: space-between;
}

.analytics-head h1 {
  margin: 0 0 4px;
  font-size: 28px;
}

.analytics-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.analytics-actions .btn-sm,
.analytics-period {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid var(--fmp-border);
  border-radius: 9px;
  background: #fff;
}

.analytics-actions .btn-sm.primary {
  border-color: var(--fmp-orange);
  background: var(--fmp-orange);
  color: #fff;
}

.analytics-actions svg,
.analytics-period svg {
  width: 17px;
  height: 17px;
}

.analytics-period select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--fmp-dark);
}

#analytics-content {
  display: grid;
  gap: 18px;
}

.analytics-database {
  padding: 20px;
  border: 1px solid var(--fmp-border);
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(17, 24, 39, .035);
}

.analytics-database-title {
  margin-bottom: 16px;
}

.analytics-database-title h2 {
  margin: 0;
  font-size: 20px;
}

.analytics-database-title h2 span {
  color: var(--fmp-orange);
}

.analytics-database-title code {
  padding: 5px 8px;
  border-radius: 7px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 11px;
}

.analytics-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.analytics-metric {
  min-height: 94px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--fmp-border);
  border-radius: 12px;
  background: #fff;
}

.analytics-metric-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.analytics-metric-detail {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  background: #fff7ed;
  color: #9a3412;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.analytics-metric-detail:hover { background: #ffedd5; }
.analytics-metric-detail:focus-visible { outline: 2px solid var(--fmp-orange); outline-offset: 2px; }

.analytics-metric-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff1e8;
  color: var(--fmp-orange);
}

.analytics-metric-icon svg {
  width: 22px;
  height: 22px;
}

.analytics-metric-main > div > span {
  color: #4b5563;
  font-size: 11px;
}

.analytics-metric strong {
  display: block;
  margin: 2px 0 5px;
  color: var(--fmp-dark);
  font-size: 22px;
}

.analytics-trend {
  gap: 5px;
  white-space: nowrap;
}

.analytics-trend small {
  color: #9ca3af;
  font-size: 9px;
}

.metric-trend,
.metric-neutral {
  font-size: 10px !important;
  font-weight: 700;
}

.metric-trend.up { color: #15803d !important; }
.metric-trend.down { color: #dc2626 !important; }
.metric-neutral { color: #6b7280 !important; }

.analytics-traffic-summary { display: flex; flex-wrap: wrap; gap: 12px; margin: 14px 0; }
.analytics-traffic-summary > div { min-width: 150px; padding: 12px 16px; border: 1px solid var(--fmp-border); border-radius: 10px; background: #fff; }
.analytics-traffic-summary span { display: block; color: #4b5563; font-size: 12px; }
.analytics-traffic-summary strong { display: block; margin-top: 4px; font-size: 24px; }
.analytics-traffic-chart { display: flex; align-items: flex-end; gap: 12px; min-height: 170px; padding: 12px; border: 1px solid var(--fmp-border); border-radius: 10px; background: #fff; }
.analytics-traffic-day { flex: 1; height: 140px; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 5px; }
.analytics-traffic-bar { width: min(100%, 56px); min-height: 2px; border-radius: 5px 5px 0 0; background: var(--fmp-orange); }
.analytics-traffic-day small { color: #6b7280; font-size: 10px; white-space: nowrap; }
.analytics-traffic-details { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 16px; margin-top: 20px; }
.analytics-traffic-details article,.analytics-traffic-recent { min-width: 0; padding: 16px; border: 1px solid var(--fmp-border); border-radius: 10px; background: #fff; }
.analytics-traffic-details h3,.analytics-traffic-recent h3 { margin: 0 0 8px; font-size: 16px; }
.analytics-traffic-details h3:not(:first-child) { margin-top: 20px; }
.analytics-traffic-details p,.analytics-traffic-recent p { margin: 0 0 12px; color: #6b7280; font-size: 12px; }
.analytics-traffic-recent { margin-top: 16px; }
.analytics-traffic-details td:first-child,.analytics-traffic-recent td:nth-child(2) { overflow-wrap: anywhere; }
@media (max-width: 820px) { .analytics-traffic-details { grid-template-columns: 1fr; } }
.analytics-clicks-note { color: #4b5563; font-size: 13px; line-height: 1.5; }
.analytics-clicks-table-wrap { overflow-x: auto; }
.analytics-clicks-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 12px; }
.analytics-clicks-table th,.analytics-clicks-table td { padding: 9px 7px; border-bottom: 1px solid var(--fmp-border); text-align: left; }
.analytics-clicks-table th { color: #4b5563; background: #f9fafb; }
.analytics-clicks-pages { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; font-size: 12px; }
.analytics-clicks-pages > div { display: flex; gap: 6px; }

.analytics-source-warning {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
}

.analytics-charts {
  display: grid;
  grid-template-columns: 1.35fr .9fr 1.35fr;
  gap: 10px;
  margin-top: 10px;
}

.analytics-chart-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--fmp-border);
  border-radius: 12px;
}

.analytics-chart-head {
  min-height: 34px;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
}

.chart-legend {
  gap: 12px;
  color: #6b7280;
  font-size: 9px;
}

.chart-legend span::before {
  content: '';
  width: 7px;
  height: 7px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
}

.chart-legend .orange::before { background: var(--fmp-orange); }
.chart-legend .dark::before { background: #1f2937; }

.analytics-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-grid line {
  stroke: #e5e7eb;
  stroke-width: 1;
}

.chart-grid text,
.axis-label {
  fill: #6b7280;
  font-size: 9px;
}

.series-phone,
.series-profile {
  fill: none;
  stroke-width: 2.3;
}

path.series-phone { stroke: var(--fmp-orange); }
path.series-profile { stroke: #1f2937; }
g.series-phone circle { fill: #fff;stroke: var(--fmp-orange);stroke-width: 2; }
g.series-profile circle { fill: #fff;stroke: #1f2937;stroke-width: 2; }
.bar-users { fill: var(--fmp-orange); }
.bar-companies { fill: #1f2937; }

.ticket-chart {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.analytics-donut {
  width: 120px;
  height: 120px;
  flex: 0 0 120px;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.analytics-donut > div {
  width: 72px;
  height: 72px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  background: #fff;
  text-align: center;
}

.analytics-donut strong { font-size: 20px; }
.analytics-donut span { color: #6b7280;font-size: 10px; }
.ticket-chart ul { min-width: 115px;display: grid;gap: 8px;list-style: none; }
.ticket-chart li { display: grid;grid-template-columns: 8px 1fr auto;align-items: center;gap: 6px;font-size: 10px; }
.ticket-chart li i { width: 7px;height: 7px;border-radius: 50%; }
.analytics-database-foot { margin-top: 10px;color: #6b7280;font-size: 11px;text-align: right; }

@media (max-width: 1100px) {
  .admin-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .analytics-charts { grid-template-columns: 1fr 1fr; }
  .catalog-steps { grid-template-columns: 1fr; }
  .analytics-chart-wide:last-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .admin-overview-grid { grid-template-columns: 1fr; }
  .analytics-head { align-items: flex-start;flex-direction: column; }
  .analytics-metrics,.analytics-charts { grid-template-columns: 1fr; }
  .analytics-chart-wide:last-child { grid-column: auto; }
  .analytics-database-title { align-items: flex-start;flex-direction: column;gap: 6px; }
  .ticket-chart { flex-direction: column; }
  .admin-catalogue-item { align-items: flex-start;flex-direction: column; }
  .listing-heading,.listing-section-title,.listing-actions { align-items: flex-start;flex-direction: column; }
  .listing-locked-grid, .premium-locked, .web-locked { grid-template-columns: 1fr; }
  .catalogue-upload-grid { grid-template-columns: 1fr; }
  .catalogue-upload-grid > textarea,.catalogue-upload-grid > .settings-status { grid-column: auto; }
  .catalog-import-heading,.catalog-section-head { align-items: flex-start; flex-direction: column; }
  .catalog-result-metrics { grid-template-columns: 1fr 1fr; }
  .catalog-history-row { align-items: flex-start; }
  .catalog-history-row > div:last-child { flex-direction: column; }
  .listing-free-fields,.listing-premium-fields,.listing-location-group > div { grid-template-columns: 1fr; }
  .listing-location-group,.listing-field-wide,.premium-products-field { grid-column: auto; }
  .premium-products-field > div { align-items: stretch;flex-direction: column; }
}

/* RGSEAA · fase 1: análisis real de fuente oficial */
.data-source-note.rgseaa {
  margin-bottom: 18px;
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.rgseaa-upload {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, .75fr) auto;
  align-items: end;
  gap: 18px;
}

.rgseaa-upload h2,
.rgseaa-result h2 { margin: 0 0 8px; }
.rgseaa-upload p { margin: 0;color: #6b7280; }
.rgseaa-file { display: grid;gap: 7px;font-size: 13px;font-weight: 700;color: #374151; }
.rgseaa-file input { width: 100%;padding: 9px;border: 1px solid var(--fmp-border);border-radius: 9px;background: #fff; }
.rgseaa-upload .settings-status { grid-column: 1 / -1; }
.rgseaa-processing { margin-top: 18px;display: flex;align-items: center;gap: 12px; }
.rgseaa-processing p { margin: 0; }
.rgseaa-result { margin-top: 18px;display: grid;gap: 22px; }
.rgseaa-result-head { display: flex;align-items: center;justify-content: space-between;gap: 18px; }
.rgseaa-result-head h2 { margin-top: 8px; }
.rgseaa-result-head p { margin: 0;color: #6b7280;overflow-wrap: anywhere; }
.rgseaa-verdict { display: inline-flex;max-width: 290px;padding: 9px 12px;border-radius: 999px;font-size: 12px;font-weight: 800;text-align: center; }
.rgseaa-verdict.valid { color: #166534;background: #dcfce7; }
.rgseaa-verdict.invalid { color: #991b1b;background: #fee2e2; }
.rgseaa-metrics { grid-template-columns: repeat(4,minmax(0,1fr)); }
.rgseaa-two-columns { display: grid;grid-template-columns: minmax(0,1.4fr) minmax(300px,.6fr);gap: 18px;align-items: start; }
.rgseaa-two-columns section { min-width: 0; }
.rgseaa-control-list { display: grid;gap: 0; }
.rgseaa-control-list p { display: flex;justify-content: space-between;gap: 20px;margin: 0;padding: 12px 0;border-bottom: 1px solid #eef0f2; }
.rgseaa-control-list p:last-child { border-bottom: 0; }
.rgseaa-control-list span { color: #6b7280; }
.rgseaa-issue { display: inline-flex;padding: 3px 7px;border-radius: 999px;font-size: 11px;font-weight: 800; }
.rgseaa-issue.error { color: #991b1b;background: #fee2e2; }
.rgseaa-issue.warning { color: #92400e;background: #fef3c7; }

@media (max-width: 1000px) {
  .rgseaa-upload { grid-template-columns: 1fr 1fr; }
  .rgseaa-upload > div:first-child,.rgseaa-upload .settings-status { grid-column: 1 / -1; }
  .rgseaa-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rgseaa-two-columns { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .rgseaa-upload,.rgseaa-metrics { grid-template-columns: 1fr; }
  .rgseaa-upload > div:first-child,.rgseaa-upload .settings-status { grid-column: auto; }
  .rgseaa-result-head { align-items: flex-start;flex-direction: column; }
}

/* RGSEAA · empresas oficiales, importación y analítica */
.rgseaa-companies-section { margin-top: 24px; }
.rgseaa-admin-filters { margin-top: 14px; }
.rgseaa-admin-filters .search-row { grid-template-columns: minmax(260px,1fr) minmax(220px,.8fr) minmax(180px,.6fr) auto; }
.products-admin-filters .search-row { grid-template-columns: minmax(240px,1fr) repeat(3,minmax(150px,.55fr)) auto; }
.rgseaa-pagination { display:flex;align-items:center;justify-content:center;gap:14px;margin:18px 0; }
.rgseaa-row-actions { align-items:stretch;flex-direction:column; }
.rgseaa-source-manager { margin-top:24px; }
.rgseaa-source-manager summary { cursor:pointer;padding:4px 0; }
.rgseaa-source-manager[open] summary { margin-bottom:18px; }
.rgseaa-last-batch { display:flex;flex-direction:column;justify-content:center;gap:4px; }
.rgseaa-last-batch small { overflow-wrap:anywhere;color:#6b7280; }
.rgseaa-official-detail dl { display:grid;grid-template-columns:minmax(130px,.4fr) minmax(0,1fr);gap:0;margin:18px 0 0; }
.rgseaa-official-detail dt,.rgseaa-official-detail dd { margin:0;padding:10px;border-bottom:1px solid #eef0f2; }
.rgseaa-official-detail dt { color:#6b7280;font-weight:700; }
.rgseaa-analytics-state { min-height:210px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px; }
.rgseaa-analytics-state strong { font-size:2rem; }
.rgseaa-analytics-state span,.rgseaa-analytics-state small { color:#6b7280; }

@media (max-width: 1000px) {
  .rgseaa-admin-filters .search-row { grid-template-columns:1fr 1fr; }
}

@media (max-width: 600px) {
  .rgseaa-admin-filters .search-row { grid-template-columns:1fr; }
  .rgseaa-official-detail dl { grid-template-columns:1fr; }
  .rgseaa-official-detail dt { border-bottom:0;padding-bottom:2px; }
  .rgseaa-official-detail dd { padding-top:2px; }
}
.listing-review-notice{display:flex;gap:10px;align-items:flex-start;margin:0 0 16px;padding:14px 16px;border:1px solid #cbd5e1;border-radius:12px;background:#f8fafc;color:#334155}
.listing-review-notice p{margin:3px 0 0}
.listing-review-notice.pending{border-color:#f59e0b;background:#fffbeb;color:#92400e}
.listing-review-notice.rejected{border-color:#ef4444;background:#fef2f2;color:#991b1b}
.listing-review-pending{background:#fff7ed!important;color:#9a3412!important}
.listing-review-rejected{background:#fef2f2!important;color:#991b1b!important}
.listing-review-published{background:#ecfdf5!important;color:#166534!important}
.review-field-changed th,.review-field-changed td{background:#fff7ed}
.listing-review-detail .panel-table th{min-width:130px;text-align:left}
.listing-review-detail .panel-table td{white-space:pre-wrap;overflow-wrap:anywhere}

/* Panel de empresa · resumen de fichas, servicios y datos administrativos */
.company-overview-page{display:grid;gap:18px}
.company-overview-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:24px}
.company-overview-heading h1{margin:4px 0 6px}
.company-overview-heading .dash-sub{max-width:780px;margin:0}
.company-account-state{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto;padding:9px 12px;border:1px solid #cbd5e1;border-radius:999px;background:#f8fafc;color:#475569;font-size:12px;font-weight:800}
.company-account-state svg{width:16px;height:16px}
.company-account-state.is-active{border-color:#bbf7d0;background:#f0fdf4;color:#166534}
.company-account-state.is-pending{border-color:#fde68a;background:#fffbeb;color:#92400e}
.company-account-state.is-suspended{border-color:#fecaca;background:#fef2f2;color:#991b1b}
.company-account-state.is-inactive{border-color:#cbd5e1;background:#f1f5f9;color:#475569}
.company-overview-loading{min-height:220px;display:flex;align-items:center;justify-content:center;gap:12px;color:#64748b}
.company-overview-card{min-width:0;padding:22px}
.company-overview-card h2,.company-overview-card h3{margin:0}
.company-overview-card p{margin:4px 0 0;color:#64748b}
.company-overview-wide{width:100%}
.company-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.company-card-head>div{display:flex;align-items:flex-start;gap:12px;min-width:0}
.company-card-icon{width:40px;height:40px;display:grid;place-items:center;flex:0 0 40px;border-radius:11px;background:#fff4ed;color:var(--fmp-orange)}
.company-card-icon svg{width:20px;height:20px}
.company-card-edit{display:inline-flex;align-items:center;gap:6px;border:0;background:transparent;color:var(--fmp-orange);font:inherit;font-size:12px;font-weight:800;cursor:pointer}
.company-card-edit svg{width:14px;height:14px}
.company-file-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.company-file-item{min-width:0;display:grid;grid-template-rows:1fr auto auto;gap:14px;padding:18px;border:1px solid #e2e8f0;border-radius:14px;background:#fbfcfd}
.company-file-item.is-contracted{border-color:#fdba74;background:#fffaf5}
.company-file-item h3{margin-top:5px;font-size:16px}
.company-file-item p{font-size:13px;line-height:1.55}
.company-file-item .btn{width:100%;justify-content:center}
.company-file-kicker{color:#64748b;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.company-state{display:inline-flex;align-items:center;justify-content:center;width:max-content;max-width:100%;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:800;line-height:1.25;text-align:center}
.company-state.is-active,.company-state.is-paid{background:#dcfce7;color:#166534}
.company-state.is-pending{background:#fef3c7;color:#92400e}
.company-state.is-unpaid{background:#f1f5f9;color:#475569}
.company-state.is-unknown{background:#fee2e2;color:#991b1b}
.company-service-list{display:grid;gap:0}
.company-service-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:13px;padding:15px 0;border-bottom:1px solid #eef2f6}
.company-service-row:first-child{padding-top:2px}
.company-service-row:last-child{padding-bottom:0;border-bottom:0}
.company-service-icon{width:38px;height:38px;display:grid;place-items:center;border-radius:10px;background:#f8fafc;color:#475569}
.company-service-icon svg{width:18px;height:18px}
.company-service-copy{min-width:0}
.company-service-copy>strong{display:block;color:#1f2937;font-size:14px}
.company-service-copy p{font-size:12px}
.company-service-copy a{display:inline-flex;align-items:center;gap:5px;margin-top:7px;color:var(--fmp-orange);font-size:11px;font-weight:800;text-decoration:none}
.company-service-copy a svg{width:12px;height:12px}
.company-overview-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.company-publication-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.company-publication-grid fieldset{min-width:0;margin:0;padding:16px;border:1px solid #e2e8f0;border-radius:14px;background:#fbfcfd}
.company-publication-grid legend{padding:0 7px;color:#1f2937;font-size:13px;font-weight:800}
.company-publication-option{display:flex;align-items:flex-start;gap:11px;padding:11px 4px;border-bottom:1px solid #eef2f6;cursor:pointer}
.company-publication-option:last-child{border-bottom:0}
.company-publication-option input{width:18px;height:18px;margin:2px 0 0;accent-color:var(--fmp-orange);flex:0 0 auto}
.company-publication-option span{display:grid;gap:3px}
.company-publication-option strong{font-size:13px;color:#1f2937}
.company-publication-option small{color:#64748b;line-height:1.45}
.company-publication-option.is-disabled{cursor:not-allowed;opacity:.62}
.company-publication-actions{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:18px}
.company-detail-list{display:grid}
.company-detail-row{display:grid;grid-template-columns:minmax(125px,.42fr) minmax(0,1fr);gap:18px;padding:11px 0;border-bottom:1px solid #eef2f6;font-size:13px}
.company-detail-row:first-child{padding-top:2px}
.company-detail-row:last-child{padding-bottom:0;border-bottom:0}
.company-detail-row span{color:#64748b}
.company-detail-row strong{overflow-wrap:anywhere;color:#1f2937;font-weight:700;text-align:right}

@media (max-width:1000px){
  .company-file-grid{grid-template-columns:1fr}
  .company-file-item{grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto}
  .company-file-item>div{grid-column:1/-1}
  .company-file-item .btn{width:auto}
}

@media (max-width:760px){
  .company-overview-heading,.company-card-head{align-items:flex-start;flex-direction:column}
  .company-account-state{align-self:flex-start}
  .company-overview-columns,.company-publication-grid{grid-template-columns:1fr}
  .company-service-row{grid-template-columns:38px minmax(0,1fr)}
  .company-service-row>.company-state{grid-column:2}
}

@media (max-width:520px){
  .company-overview-card{padding:17px}
  .company-file-item{grid-template-columns:1fr}
  .company-file-item>div,.company-file-item .company-state,.company-file-item .btn{grid-column:auto;width:100%}
  .company-detail-row{grid-template-columns:1fr;gap:4px}
  .company-publication-actions{align-items:stretch;flex-direction:column}
  .company-detail-row strong{text-align:left}
}

/* Guardados de Fichas Premium · panel de empresa */
.saved-premium-page{max-width:1120px;margin:0 auto}
.saved-premium-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:20px}
.saved-premium-heading h1{margin:4px 0}
.saved-premium-count{display:inline-flex;padding:8px 12px;border-radius:999px;background:#fff1e9;color:#c2410c;font-size:12px;font-weight:800;white-space:nowrap}
.saved-premium-loading{display:flex;align-items:center;gap:12px;min-height:92px}
.saved-premium-list{display:grid;gap:14px}
.saved-premium-card{display:grid;grid-template-columns:72px minmax(0,1fr) auto;gap:18px;align-items:center;padding:20px;background:#fff;border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 7px 24px rgba(15,23,42,.035)}
.saved-premium-logo{width:72px;height:72px;display:flex;align-items:center;justify-content:center;overflow:hidden;border:1px solid #e5e7eb;border-radius:14px;background:#fff7ed;color:#c2410c;font-weight:800;font-size:20px}
.saved-premium-logo img{width:100%;height:100%;object-fit:contain;padding:7px}
.saved-premium-copy{min-width:0}
.saved-premium-copy h2{margin:3px 0 6px;font-size:19px;color:#172033}
.saved-premium-copy p{margin:5px 0;color:#667085;font-size:13px;line-height:1.5}
.saved-premium-copy small{display:block;margin-top:9px;color:#8490a2;font-size:11px}
.saved-premium-kicker{color:#e65317;font-size:10px;font-weight:800;letter-spacing:.07em;text-transform:uppercase}
.saved-premium-meta{font-weight:700;color:#475467!important}
.saved-premium-actions{display:grid;gap:8px;min-width:118px}
.saved-premium-actions .btn{justify-content:center;text-decoration:none}
.saved-premium-empty{text-align:center;padding:52px 24px}
.saved-premium-empty>svg{width:42px;height:42px;padding:10px;border-radius:50%;background:#fff1e9;color:#e65317}
.saved-premium-empty h2{margin:14px 0 7px}
.saved-premium-empty p{max-width:530px;margin:0 auto 20px;color:#667085}
@media (max-width:720px){.saved-premium-heading{flex-direction:column}.saved-premium-card{grid-template-columns:58px minmax(0,1fr)}.saved-premium-logo{width:58px;height:58px}.saved-premium-actions{grid-column:1/-1;grid-template-columns:1fr 1fr}.saved-premium-actions .btn{width:100%}}
/* Reclamaciones públicas de fichas RGSEAA */
.directory-claims-filters{display:flex;align-items:end;gap:12px;margin-top:18px}.directory-claims-filters label{display:grid;gap:6px;min-width:220px;color:#374151;font-size:13px;font-weight:600}.directory-claim-review section{display:grid;gap:12px;padding-top:14px;border-top:1px solid #e5e7eb}.directory-claim-review section h3{margin:0}.directory-claim-review textarea{resize:vertical}.status-pill.claim-pending{background:#fff4d6;color:#8a5a00}.status-pill.claim-verified{background:#e8f7ed;color:#176b34}.status-pill.claim-rejected{background:#feecec;color:#9e2a2a}@media(max-width:600px){.directory-claims-filters{align-items:stretch;flex-direction:column}.directory-claims-filters label{min-width:0}}
