/* FlipForge commercial app polish v2
   Extends the commercial dashboard visual system across existing customer routes.
   Visual-only: no scoring, evidence, grading, tenant, billing, or transaction authority changes. */

.ff-commercial-shell .page:not(.ff-commercial-dashboard) {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 26px 28px 42px;
}

.ff-commercial-shell .page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 0 0 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(216,174,59,.18);
}

.ff-commercial-shell .page-heading > div:first-child {
  max-width: 860px;
}

.ff-commercial-shell .page-heading .eyebrow {
  color: var(--ff-v2-gold);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.ff-commercial-shell .page-heading h1 {
  margin: 6px 0 0;
  color: var(--ff-v2-text);
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  font-weight: 760;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.ff-commercial-shell .page-heading p {
  max-width: 780px;
  margin: 8px 0 0;
  color: var(--ff-v2-muted);
  font-size: .94rem;
  line-height: 1.55;
}

.ff-commercial-shell .page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.ff-commercial-shell .panel {
  overflow: hidden;
  border: 1px solid var(--ff-v2-border);
  border-radius: 10px;
  background:
    radial-gradient(circle at 100% 0%, rgba(216,174,59,.035), transparent 35%),
    var(--ff-v2-panel);
  box-shadow: 0 18px 42px rgba(0,0,0,.13);
}

.ff-commercial-shell .panel + .panel {
  margin-top: 14px;
}

.ff-commercial-shell .panel-header {
  min-height: 66px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--ff-v2-border-soft);
  background: rgba(255,255,255,.008);
}

.ff-commercial-shell .panel-header h2 {
  margin: 0;
  color: var(--ff-v2-text);
  font-size: 1.05rem;
  font-weight: 720;
  letter-spacing: -.01em;
}

.ff-commercial-shell .panel-header p {
  margin: 4px 0 0;
  color: var(--ff-v2-muted);
  font-size: .75rem;
  line-height: 1.45;
}

.ff-commercial-shell .panel-body {
  padding: 18px;
}

.ff-commercial-shell .stack {
  gap: 14px;
}

.ff-commercial-shell .boundary-note,
.ff-commercial-shell .ff-dashboard-boundary {
  margin: 14px 0 18px;
  padding: 11px 13px;
  border: 1px solid rgba(216,174,59,.24);
  border-radius: 8px;
  color: #a8b2bd;
  background: rgba(216,174,59,.035);
  font-size: .72rem;
  line-height: 1.5;
}

.ff-commercial-shell .boundary-note strong,
.ff-commercial-shell .ff-dashboard-boundary strong {
  color: var(--ff-v2-gold);
}

.ff-commercial-shell .table-wrap,
.ff-commercial-shell .ff-v2-table-wrap {
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 8px;
  background: rgba(0,0,0,.08);
}

.ff-commercial-shell table {
  width: 100%;
  border-collapse: collapse;
  font-size: .78rem;
}

.ff-commercial-shell th {
  padding: 11px 12px;
  color: #9ea9b4;
  background: rgba(255,255,255,.012);
  border-bottom: 1px solid var(--ff-v2-border);
  font-size: .66rem;
  font-weight: 760;
  letter-spacing: .06em;
  text-align: left;
  text-transform: uppercase;
}

.ff-commercial-shell td {
  padding: 12px;
  color: #e9edf0;
  border-bottom: 1px solid rgba(255,255,255,.055);
  vertical-align: middle;
}

.ff-commercial-shell tbody tr:last-child td {
  border-bottom: 0;
}

.ff-commercial-shell tbody tr:hover td {
  background: rgba(216,174,59,.025);
}

.ff-commercial-shell .status-pill,
.ff-commercial-shell .staging-status,
.ff-commercial-shell .check-mark,
.ff-commercial-shell .ff-recommendation-pill {
  border-radius: 999px;
}

.ff-commercial-shell .panel-link {
  color: #e3bd50;
  font-weight: 700;
  text-decoration: none;
}

.ff-commercial-shell .panel-link:hover,
.ff-commercial-shell .panel-link:focus-visible {
  color: #f0d27a;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ff-commercial-shell .global-search {
  min-height: 42px;
  border-radius: 8px;
}

.ff-commercial-shell .global-search input {
  font-size: .84rem;
}

.ff-commercial-shell .topbar {
  min-height: 62px;
  padding-inline: 18px;
}

.ff-commercial-shell .brand-block {
  padding: 17px 14px 13px;
}

.ff-commercial-shell .brand {
  grid-template-columns: 44px minmax(0,1fr);
  gap: 10px;
}

.ff-commercial-shell .brand-mark {
  width: 42px;
  height: 42px;
}

.ff-commercial-shell .brand-mark.ff-approved-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ff-commercial-shell .brand-mark.ff-approved-brand-mark img {
  display: block;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.ff-commercial-shell .brand-name {
  color: #f5f6f7;
  font-size: 1rem;
  font-weight: 850;
  letter-spacing: .16em;
}

.ff-commercial-shell .brand-subtitle {
  margin-top: 5px;
  color: var(--ff-v2-gold);
  font-size: .52rem;
  font-weight: 760;
  letter-spacing: .13em;
}

.ff-commercial-shell .prototype-chip {
  margin: 10px 0 0 54px;
  width: max-content;
  padding: 4px 7px;
  font-size: .56rem;
}

.ff-commercial-shell .sidebar-footer {
  border-top: 1px solid var(--ff-v2-border-soft);
}

.ff-commercial-shell .plan-card {
  border-radius: 8px;
}

.ff-commercial-shell .account-link,
.ff-commercial-shell .profile-button,
.ff-commercial-shell .date-button,
.ff-commercial-shell .icon-button {
  border-radius: 8px;
}

/* Evidence, PSA, lifecycle, portfolio, compare and export surfaces share these
   density corrections so the commercial shell does not stop at Dashboard. */
.ff-commercial-shell .customer-management-page,
.ff-commercial-shell .customer-portfolio-page,
.ff-commercial-shell .customer-lifecycle-page,
.ff-commercial-shell .customer-compare-page,
.ff-commercial-shell .customer-export-page,
.ff-commercial-shell .customer-discovery-page,
.ff-commercial-shell .customer-intelligence-page,
.ff-commercial-shell .private-beta-page,
.ff-commercial-shell .customer-entitlements-page {
  font-size: .92rem;
}

.ff-commercial-shell .key-value-grid,
.ff-commercial-shell .metric-grid,
.ff-commercial-shell .private-beta-status-grid {
  gap: 12px;
}

.ff-commercial-shell .key-value,
.ff-commercial-shell .metric-card,
.ff-commercial-shell .private-beta-status-card {
  border-radius: 9px;
}

.ff-commercial-shell input,
.ff-commercial-shell select,
.ff-commercial-shell textarea {
  border-color: var(--ff-v2-border);
  border-radius: 8px;
  background: #080f16;
}

.ff-commercial-shell input:focus,
.ff-commercial-shell select:focus,
.ff-commercial-shell textarea:focus {
  border-color: rgba(216,174,59,.62);
  outline: 2px solid rgba(216,174,59,.12);
  outline-offset: 1px;
}

/* Discover source provenance: make the real marketplace card unmistakable. */
.ff-commercial-shell .ff-source-listing-strip {
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  gap: 11px;
  align-items: center;
  margin: 14px 0 10px;
  padding: 11px 12px;
  border: 1px solid rgba(216,174,59,.28);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(216,174,59,.08), rgba(216,174,59,.02)),
    rgba(0,0,0,.12);
}

.ff-commercial-shell .ff-source-listing-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(216,174,59,.38);
  border-radius: 50%;
  color: #efca63;
  background: rgba(216,174,59,.07);
  font-size: .9rem;
  font-weight: 800;
}

.ff-commercial-shell .ff-source-listing-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.ff-commercial-shell .ff-source-listing-copy small {
  color: #8f9aa6;
  font-size: .62rem;
  font-weight: 760;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.ff-commercial-shell .ff-source-listing-copy strong {
  color: #f3f5f6;
  font-size: .86rem;
}

.ff-commercial-shell .ff-source-listing-copy span {
  overflow: hidden;
  color: #9ca7b2;
  font-size: .7rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ff-commercial-shell .ff-source-listing-verified {
  padding: 4px 7px;
  border: 1px solid rgba(66,204,104,.3);
  border-radius: 999px;
  color: #77db8f;
  background: rgba(66,204,104,.06);
  font-size: .58rem;
  font-weight: 850;
  letter-spacing: .08em;
}

.ff-commercial-shell .customer-discovery-actions .ff-source-listing-button {
  border-color: rgba(216,174,59,.65);
  color: #f0ca62;
  background: rgba(216,174,59,.08);
  font-weight: 800;
}

.ff-commercial-shell .customer-discovery-actions .ff-source-listing-button:hover,
.ff-commercial-shell .customer-discovery-actions .ff-source-listing-button:focus-visible {
  border-color: #e7c458;
  color: #fff0ad;
  background: rgba(216,174,59,.14);
  box-shadow: 0 0 0 2px rgba(216,174,59,.09);
  outline: none;
}

@media (max-width: 900px) {
  .ff-commercial-shell .page:not(.ff-commercial-dashboard) {
    padding: 20px 18px 34px;
  }
  .ff-commercial-shell .page-heading {
    display: grid;
    align-items: start;
  }
  .ff-commercial-shell .page-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .ff-commercial-shell .page:not(.ff-commercial-dashboard) {
    padding: 16px 12px 28px;
  }
  .ff-commercial-shell .panel-header,
  .ff-commercial-shell .panel-body {
    padding: 14px;
  }
  .ff-commercial-shell .page-heading h1 {
    font-size: 1.75rem;
  }
  .ff-commercial-shell .ff-source-listing-strip {
    grid-template-columns: 32px minmax(0,1fr);
  }
  .ff-commercial-shell .ff-source-listing-verified {
    grid-column: 2;
    width: max-content;
  }
}
