/* Customer work surfaces. Loaded by the shared shell after page-density.css.
   Auth conceal, private/hidden attributes and all interaction scripts stay authoritative. */
.public-shell .customer-workspace {
  --surface: #fff;
  --ink: #172b3b;
  --muted: #617483;
  --line: #dce5eb;
  --accent: #1a80b6;
  --accent-dark: #105378;
  --radius: 10px;
  color: var(--ink);
  background: #f3f6f8;
  min-width: 0;
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.public-shell .customer-workspace *,
.public-shell .customer-workspace *::before,
.public-shell .customer-workspace *::after { box-sizing: border-box; }
.public-shell .customer-workspace .customer-heading.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  min-height: 0;
  max-width: none;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: left;
}
.public-shell .customer-workspace .customer-heading > div { min-width: 0; }
.public-shell .customer-workspace .customer-heading h1 {
  margin: 2px 0 6px;
  max-width: none;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 600;
  letter-spacing: -.025em;
}
.public-shell .customer-workspace h2 { font-size: 15px; line-height: 1.4; font-weight: 600; letter-spacing: 0; }
.public-shell .customer-workspace h3 { font-size: 14px; line-height: 1.45; font-weight: 600; }
.public-shell .customer-workspace .eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: .07em;
}
.public-shell .customer-workspace .customer-heading .lead {
  max-width: 68ch;
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}
.public-shell .customer-workspace .fine { color: var(--muted); font-size: 13px; line-height: 1.5; }
.public-shell .customer-workspace p { margin-block: 8px; }
.public-shell .customer-workspace .panel {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px #14263a05;
}
.public-shell .customer-workspace .panel > :first-child { margin-top: 0; }
.public-shell .customer-workspace .panel > :last-child { margin-bottom: 0; }
.public-shell .customer-workspace :is(.button, .text-button, .text-link) {
  min-height: 44px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
  font-size: 14px;
}
.public-shell .customer-workspace .button { border-radius: 6px; padding: 10px 14px; }
.public-shell .customer-workspace .text-link { display: inline-flex; align-items: center; }
.public-shell .customer-workspace a { color: var(--accent-dark); }
.public-shell .customer-workspace a.button:not(.secondary) { color: #fff; }
.public-shell .customer-workspace .button.secondary {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
}
.public-shell .customer-workspace :is(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid #1a80b6;
  outline-offset: 3px;
}
.public-shell .customer-workspace :is(input, select, textarea) {
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  border-radius: 6px;
  font-size: 16px;
}
.public-shell .customer-workspace input:is([type="checkbox"], [type="radio"]) { min-height: 0; }
.public-shell .customer-workspace label:is(.check, .consent) { min-height: 44px; }
.public-shell .customer-workspace :is(fieldset, form) { min-width: 0; }
.public-shell .customer-workspace .plain-fields { gap: 12px; }
.public-shell .customer-workspace .form-grid { gap: 12px 16px; }
.public-shell .customer-workspace .list-heading { gap: 12px; margin: 0 0 12px; }
.public-shell .customer-workspace .list-heading h2 { margin: 0; }
.public-shell .customer-workspace :is(.order-actions, .recovery-actions, .internal-offer-actions, .customer-order-actions) {
  gap: 8px;
  flex-wrap: wrap;
}
.public-shell .customer-workspace .form-message { margin-block: 10px; }
.public-shell .customer-workspace .notice {
  border-radius: 6px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}

/* Account: identity, real history, then editable contact details. */
.public-shell .customer-workspace #account-identity { margin: 0 0 18px; border-left: 3px solid var(--accent); padding-block: 12px; }
.public-shell .customer-workspace #account-identity .list-heading { margin: 0; }
.public-shell .customer-workspace #account-name { margin: 0; font-size: 16px; }
.public-shell .customer-workspace .customer-overview { margin: 20px 0; }
.public-shell .customer-workspace .customer-overview-heading { gap: 12px; align-items: center; }
.public-shell .customer-workspace .customer-overview-caption { margin: 4px 0 12px; }
.public-shell .customer-workspace .customer-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.public-shell .customer-workspace .customer-overview-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}
.public-shell .customer-workspace .customer-overview-card h3 { font-size: 15px; }
.public-shell .customer-workspace .customer-overview-card-heading { align-items: baseline; gap: 8px; }
.public-shell .customer-workspace .customer-overview-total { margin: 0; font-size: 12px; }
.public-shell .customer-workspace .customer-overview-total strong { font-size: 20px; font-weight: 600; color: var(--ink); }
.public-shell .customer-workspace .customer-overview-status { margin: 8px 0; font-size: 13px; }
.public-shell .customer-workspace .customer-overview-status[data-error] { color: #a4262c; }
.public-shell .customer-workspace .customer-overview-items { margin: 0 0 10px; }
.public-shell .customer-workspace .customer-overview-items li { padding-block: 10px; }
.public-shell .customer-workspace .customer-overview-number { font-size: 14px; margin: 0; }
.public-shell .customer-workspace :is(.customer-overview-state, .customer-overview-version) { margin: 3px 0; font-size: 13px; }
.public-shell .customer-workspace .customer-overview-actions { gap: 8px; align-items: center; }
.public-shell .customer-workspace .customer-profile-grid:not([hidden]) {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(230px, 1fr);
  align-items: start;
  gap: 16px;
  margin: 24px 0 0;
  scroll-margin-top: 24px;
}
.public-shell .customer-workspace .customer-profile-card .business-fields { margin-block: 4px; padding: 14px; border-radius: 6px; }
.public-shell .customer-workspace .customer-history-connect { gap: 10px; }
.public-shell .customer-workspace .customer-history-connect h2 { margin: 0; }
.public-shell .customer-workspace #customer-login-panel { width: 100%; max-width: 480px; margin: 16px 0; }
.public-shell .customer-workspace #customer-claim-panel { max-width: 760px; }

/* Existing customer list cards are made compact without changing their JS or DTO. */
.public-shell .customer-workspace .customer-history-scope { margin: 0 0 16px; }
.public-shell .customer-workspace .customer-orders-list { min-width: 0; }
.public-shell .customer-workspace .order-filter { max-width: 300px; margin: 0 0 14px; font-size: 13px; }
.public-shell .customer-workspace #orders-list { display: grid; gap: 10px; }
.public-shell .customer-workspace .order-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 18px;
  padding: 14px 16px;
}
.public-shell .customer-workspace .order-card-header { grid-column: 1 / -1; align-items: start; gap: 12px; margin: 0; }
.public-shell .customer-workspace .order-card-header > div { min-width: 0; }
.public-shell .customer-workspace .order-card-header h2 { margin: 3px 0; font-size: 15px; }
.public-shell .customer-workspace .order-card-header p { margin: 3px 0; font-size: 14px; }
.public-shell .customer-workspace .order-card > p { margin: 2px 0; }
.public-shell .customer-workspace .order-card > strong { grid-column: 2; grid-row: 2; text-align: right; font-variant-numeric: tabular-nums; font-size: 16px; }
.public-shell .customer-workspace .order-card > .fine:first-of-type { grid-column: 1; grid-row: 2; }
.public-shell .customer-workspace .order-card > .fine:nth-of-type(2) { grid-column: 2; grid-row: 3; text-align: right; }
.public-shell .customer-workspace .order-card > :is(.decision-history, .customer-order-actions) { grid-column: 1 / -1; }
.public-shell .customer-workspace .customer-order-actions { display: flex; margin-top: 6px; }
.public-shell .customer-workspace .order-pagination { margin-top: 16px; gap: 10px; flex-wrap: wrap; }
.public-shell .customer-workspace .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 5px;
  background: #fff3d6;
  color: #785000;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
}
.public-shell .customer-workspace .badge::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: currentColor; }
.public-shell .customer-workspace .badge.approved { background: #e9f5ef; color: #19613f; }
.public-shell .customer-workspace .badge.rejected { background: #fbecec; color: #9f292e; }

/* Details: model and historical customer first; prices never mixed with live profile data. */
.public-shell .customer-workspace .customer-order-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.public-shell .customer-workspace .detail-list { margin: 12px 0; gap: 0; }
.public-shell .customer-workspace .detail-list > div { display: grid; grid-template-columns: minmax(105px, .9fr) minmax(0, 1.2fr); gap: 12px; padding-block: 9px; border-bottom: 1px solid #edf0f3; }
.public-shell .customer-workspace .detail-list > div:last-child { border-bottom: 0; }
.public-shell .customer-workspace .detail-list dt { font-size: 13px; color: var(--muted); }
.public-shell .customer-workspace .detail-list dd { min-width: 0; max-width: none; margin: 0; font-size: 14px; text-align: left; overflow-wrap: anywhere; }
.public-shell .customer-workspace .detail-list dd small { display: block; margin-top: 3px; }
.public-shell .customer-workspace :is(.customer-number, .customer-price-card .detail-list dd, .price-tax-breakdown dd) { text-align: right; font-variant-numeric: tabular-nums; }
.public-shell .customer-workspace .customer-price-card .detail-list > div:last-child { font-weight: 600; }
.public-shell .customer-workspace .customer-decision-card { gap: 8px; }
.public-shell .customer-workspace .customer-decision-card :is(h2, h3) { margin-block: 8px; }
.public-shell .customer-workspace .decision-history { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.public-shell .customer-workspace .decision-reason { white-space: pre-wrap; overflow-wrap: anywhere; }
.public-shell .customer-workspace .journey-next { margin: 0 0 14px; padding: 12px 14px; gap: 12px; border: 1px solid #d6e2f2; border-radius: 6px; background: #edf3fb; }
.public-shell .customer-workspace .journey-next h2 { margin: 0; font-size: 14px; }
.public-shell .customer-workspace .journey-next p:not(.eyebrow) { margin: 4px 0 0; font-size: 13px; line-height: 1.45; }
.public-shell .customer-workspace .shipping-address { margin-block: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #f8fafc; font-size: 14px; }
.public-shell .customer-workspace .customer-shipping-card h3 { margin-block: 14px 6px; }
.public-shell .customer-workspace .viewer-stage { height: 240px; min-height: 0; }
.public-shell .customer-workspace .viewer-toolbar { gap: 6px; flex-wrap: wrap; }

/* Publication detail uses the existing immutable summary and PDF/recovery controls. */
.public-shell .customer-workspace .customer-offer-state { font-size: 13px; color: #43586d; }
.public-shell .customer-workspace .internal-offer-detail { gap: 16px; }
.public-shell .customer-workspace .internal-offer-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.public-shell .customer-workspace .internal-offer-stack { gap: 16px; min-width: 0; }
.public-shell .customer-workspace .internal-offer-amount { margin: 6px 0; text-align: right; font-size: 28px; line-height: 1.3; font-weight: 600; font-variant-numeric: tabular-nums; }
.public-shell .customer-workspace :is(.offer-history, .publication-offer-pdf) { margin-top: 0; }

@media (hover: hover) {
  .public-shell .customer-workspace .button.secondary:hover { background: #f7fbfe; border-color: #bbdcec; }
  .public-shell .customer-workspace .text-link:hover { color: #105378; }
  .public-shell .customer-workspace .order-card:hover { border-color: #becce0; }
}
@media (max-width: 1000px) {
  .public-shell .customer-workspace .customer-overview-grid { grid-template-columns: 1fr; }
  .public-shell .customer-workspace .customer-overview-items li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; }
  .public-shell .customer-workspace .customer-overview-items li > a { grid-column: 1 / -1; }
  .public-shell .customer-workspace .customer-overview-version { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .public-shell .customer-workspace :is(.customer-order-grid, .internal-offer-grid) { grid-template-columns: 1fr; }
  .public-shell .customer-workspace .customer-profile-grid:not([hidden]) { grid-template-columns: 1fr; }
  .public-shell .customer-workspace .panel { padding: 16px; }
  .public-shell .customer-workspace .customer-heading.intro { margin-bottom: 14px; }
  .public-shell .customer-workspace .customer-heading h1 { font-size: 24px; }
  .public-shell .customer-workspace .customer-order-grid { gap: 12px; }
  .public-shell .customer-workspace .customer-overview { margin-block: 16px; }
  .public-shell .customer-workspace .viewer-stage { height: 210px; }
}
@media (max-width: 420px) {
  .public-shell .customer-workspace .customer-overview-heading { align-items:flex-start; gap:4px 12px; }
  .public-shell .customer-workspace .customer-overview-heading > div { flex:1 1 160px; min-width:0; }
  .public-shell .customer-workspace .customer-overview-heading > [data-overview-refresh] { flex:0 1 auto; min-width:0; padding:6px 2px; font-size:13px; }
  .public-shell .customer-workspace .order-card { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .public-shell .customer-workspace .order-card > :is(strong, .fine:first-of-type, .fine:nth-of-type(2)) { grid-column: 1; grid-row: auto; text-align: left; }
  .public-shell .customer-workspace .order-card-header { flex-wrap: wrap; }
  .public-shell .customer-workspace .customer-overview-items li { grid-template-columns: 1fr; }
  .public-shell .customer-workspace .customer-order-actions > .button { flex: 1 1 100%; }
  .public-shell .customer-workspace .detail-list > div { grid-template-columns: minmax(92px, .9fr) minmax(0, 1.2fr); gap: 10px; }
}
@media (max-width: 360px) {
  .public-shell .customer-workspace .customer-overview-heading > div { flex-basis:100%; }
}
/* The original customer offer uses confirmation rather than customer-heading.
   Compact only its mobile heading, leaving its forms and internal variant alone. */
@media (max-width: 640px) {
  .public-shell.customer-space[data-page="confirmation"] #offer-workspace > .intro {
    min-height:0; margin:6px 0 12px; padding:0; border:0; border-radius:0; background:none;
  }
  .public-shell.customer-space[data-page="confirmation"] #offer-workspace > .intro > div {
    display:flex; flex-wrap:wrap; align-items:center; gap:0 12px; width:100%; min-width:0;
  }
  .public-shell.customer-space[data-page="confirmation"] #offer-workspace > .intro :is(.eyebrow,h1) {
    flex:1 1 100%; min-width:0; overflow-wrap:anywhere;
  }
  .public-shell.customer-space[data-page="confirmation"] #offer-workspace > .intro .eyebrow { margin:0 0 4px; }
  .public-shell.customer-space[data-page="confirmation"] #offer-workspace > .intro h1 { margin:2px 0 6px; font-size:24px; line-height:1.25; }
  .public-shell.customer-space[data-page="confirmation"] #offer-workspace > .intro .lead { flex:1 1 auto; min-width:0; margin:0; font-size:14px; line-height:1.4; overflow-wrap:anywhere; }
  .public-shell.customer-space[data-page="confirmation"] #offer-workspace > .intro .text-link { display:inline-flex; align-items:center; flex:0 1 auto; min-height:44px; min-width:0; max-width:100%; font-size:14px; line-height:1.35; white-space:normal; overflow-wrap:anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .public-shell .customer-workspace * { scroll-behavior: auto; transition: none; animation: none; }
}
