/* Shared customer workspace; brand tokens stay in app.css. */
.product-body .workspace-inner { gap: 12px 20px; padding-block: 16px 0; }
.product-body .workspace-inner > .company-switch { flex: 1; }
.product-body .company-switch select { max-width: 460px; }
.product-body .workspace-links { order: 2; width: 100%; gap: 4px; border-top: 1px solid var(--border); padding-top: 4px; }
.product-body .workspace-links a { padding: 12px 16px; border-bottom: 3px solid transparent; white-space: nowrap; }
.product-body .workspace-links a:hover { background: var(--surface-page); text-decoration: none; }
.product-body .workspace-links a[aria-current] { border-bottom-color: var(--brand); text-decoration: none; }
.product-body .page-heading { margin-block: 32px 24px; }
.product-body .page-heading h1 { margin-block: 8px 12px; font-size: 32px; line-height: 1.2; }
.product-body .page-heading p:last-child { margin-bottom: 0; }
.product-body .page-heading > div { min-width: 0; max-width: 850px; }
.product-body .page-heading .eyebrow { margin-top: 12px; margin-bottom: 8px; }
.product-body .panel { box-shadow: 0 1px 2px rgb(20 24 20 / 3%); }
.product-body .panel > :last-child { margin-bottom: 0; }
.product-body .section-heading h2 { margin-bottom: 0; }
.product-body .dashboard-layout { gap: 24px; grid-template-columns: minmax(0, 1fr) 320px; }
.product-body .dashboard-layout > section, .product-body .dashboard-layout > aside { min-width: 0; }
.product-body .dashboard-layout aside .panel { padding: 24px; }
.product-body .registry { display: grid; gap: 10px; border: 0; background: transparent; }
.product-body .list-card { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px 24px; gap: 20px; }
.product-body .list-card:hover { border-color: var(--brand); box-shadow: var(--shadow-raised); }
.product-body .list-card > div { min-width: 0; }
.product-body .list-card h2, .product-body .list-card h3 { font-family: var(--font-sans); font-size: 17px; line-height: 24px; overflow-wrap: break-word; }
.product-body .list-card .record-number { flex: 0 0 104px; font-size: 11px; }
.product-body .list-card .badge { white-space: normal; flex-shrink: 0; max-width: 160px; }
.product-body .filters { background: var(--surface-raised); grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.product-body .filters .button { justify-self: start; min-width: 120px; }
.product-body .filters > a { align-self: center; padding: 8px 0; }
.product-body .filters > .muted { margin-bottom: 0; align-self: center; }
.product-body .filters > .errorlist { grid-column: 1 / -1; }
.product-body .filter-actions { display: flex; align-items: center; gap: 20px; grid-column: 1 / -1; }
.product-body .comparison-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; margin-bottom: 24px; }
.product-body .comparison-overview .panel { margin: 0; }
.product-body .comparison-overview h2 { font: 600 17px/24px var(--font-sans); }
.product-body .comparison-overview .total-amount { font-size: 28px; color: var(--brand); margin-block: 20px 12px; }
.product-body input:not([type="checkbox"]):not([type="hidden"]), .product-body select { min-height: 44px; }
.product-body input:hover, .product-body select:hover, .product-body textarea:hover { border-color: var(--brand); }
.product-body label, .product-body .form-field > legend { font-size: 13px; line-height: 19px; letter-spacing: 0; }
.product-body .form-layout { grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr); gap: 48px; padding-top: 40px; }
.product-body .form-layout .form-intro { max-width: 370px; }
.product-body .form-intro > .lead { font-size: 16px; line-height: 25px; }
.product-body .form-shell .form-intro { position: static; }
.product-body .intro-note { display: flex; align-items: flex-start; gap: 16px; padding: 20px; margin-block: 24px; background: var(--surface-sunken); border-radius: var(--radius-md); color: var(--ink-muted); }
.product-body .intro-note .icon { color: var(--brand); }
.product-body .intro-note p { margin: 0; font-size: 14px; line-height: 22px; }
.product-body .intro-steps { list-style: none; padding: 0; margin-block: 32px; }
.product-body .intro-steps li { display: flex; gap: 16px; padding-block: 16px; border-top: 1px solid var(--border); }
.product-body .intro-steps span { color: var(--accent); font-family: var(--font-mono); }
.product-body .editor-form { min-width: 0; }
.product-body .editor-form > .panel { margin-bottom: 24px; }
.product-body .editor-form .section-heading { margin-bottom: 24px; gap: 12px; }
.product-body .field-grid, .product-body .item-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.product-body .form-field { min-width: 0; margin-bottom: 20px; }
.product-body .field-grid > .form-field, .product-body .item-fields > .form-field { margin: 0; }
.product-body .field-wide, .product-body .item-fields > .errorlist { grid-column: 1 / -1; }
.product-body .form-field > legend { font-family: var(--font-sans); font-weight: 600; padding: 0; margin-bottom: 8px; }
.product-body fieldset.form-field { border: 0; padding: 0; }
.product-body .required-mark { color: var(--accent); }
.product-body .checkbox-field { align-self: end; }
.product-body .checkbox-field > label { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; margin: 0; }
.product-body .checkbox-field > label:has(input:checked) { background: var(--success-tint); border-color: var(--success); }
.product-body .checkbox-field input { flex-shrink: 0; margin: 0; }
.product-body .role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.product-body .item-form { min-width: 0; border-top: 3px solid var(--brand); }
.product-body .item-form legend { font-size: 17px; max-width: 100%; }
.product-body .item-fields > input[type="hidden"] { display: none; }
.product-body .editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 20px 24px; margin-block: 24px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); border-top: 3px solid var(--brand); }
.product-body .editor-actions > div:first-child { flex: 1 1 260px; }
.product-body .editor-actions p { margin: 4px 0 0; }
.product-body .editor-actions .button { min-height: 44px; }
.product-body .form-errors a { color: var(--danger); text-decoration: underline; }
.product-body .form-errors p { margin-block: 8px; }
.product-body [hidden] { display: none !important; }
.product-body .purchase-progress { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; margin: 0 0 24px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); overflow: hidden; }
.product-body .purchase-progress li { display: flex; gap: 12px; align-items: center; padding: 16px; font-size: 13px; color: var(--ink-muted); }
.product-body .purchase-progress span { font-family: var(--font-mono); font-size: 12px; }
.product-body .purchase-progress [aria-current] { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.product-body .next-step { border-left: 3px solid var(--brand); padding: 20px 24px; margin-bottom: 24px; background: var(--surface-raised); border-radius: var(--radius-sm); }
.product-body .next-step p { margin: 6px 0 0; color: var(--ink-muted); }
.product-body .quick-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-block: 0 32px; }
.product-body .quick-link { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); }
.product-body .quick-link:hover { border-color: var(--brand); text-decoration: none; }
.product-body .quick-link .icon { color: var(--brand); }
.product-body .quick-link strong, .product-body .quick-link small { display: block; }
.product-body .quick-link small { color: var(--ink-muted); margin-top: 4px; font-size: 13px; font-weight: 400; }
.product-body .quick-link > span:last-child { margin-left: auto; }
.product-body .table-scroll { border: 1px solid var(--border); border-radius: var(--radius-sm); }
.product-body td, .product-body th { padding: 16px; }
.product-body tbody tr:last-child > * { border-bottom: 0; }
.product-body tbody tr:hover > td { background: var(--surface-page); }
.product-body .comparison-panel { padding: 20px; }
.product-body .comparison-panel .table-scroll { max-height: 75vh; }
.product-body .comparison-table caption { padding: 16px; }
.product-body .comparison-table thead th { position: sticky; top: 0; z-index: 2; font-family: var(--font-sans); font-size: 13px; line-height: 20px; text-transform: none; letter-spacing: 0; }
.product-body .comparison-table thead th a { display: block; margin-bottom: 8px; }
.product-body .comparison-table td:first-child, .product-body .comparison-table tbody th:first-child { position: sticky; left: 0; background: var(--surface-raised); box-shadow: 1px 0 var(--border); z-index: 1; }
.product-body .comparison-table thead th:first-child { left: 0; z-index: 3; }
.product-body .comparison-table .comparison-total td { background: var(--success-tint); color: var(--success); font-size: 17px; }
.product-body .comparison-table .comparison-total th { background: var(--success-tint); color: var(--success); }
.product-body .terms-summary { border-top: 1px solid var(--border); padding-top: 16px; }
.product-body .terms-summary .summary-total { background: var(--success-tint); color: var(--success); padding: 12px; font-weight: 600; margin-block: 4px; }
.product-body .terms-summary dd.summary-total { font-size: 20px; }
.product-body .terms-summary dd.summary-total .mono { font-size: inherit; }
.product-body .chat-history { max-width: 960px; margin-inline: auto; padding: 24px; background: var(--surface-sunken); border-radius: var(--radius-md); }
.product-body .chat-message { max-width: 88%; padding: 20px; }
.product-body .chat-message.outgoing { margin-left: auto; width: 88%; border-left: 0; border-right: 3px solid var(--brand); }
.product-body .chat-message .section-heading { margin-bottom: 12px; }
.product-body .chat-message .attachment-list:has(li:only-child) { font-size: 13px; }
.product-body .chat-message a { font-size: 13px; }
.product-body .contact-panel { border-top: 3px solid var(--success); background: var(--surface-raised); }
.product-body .auth-layout { max-width: 520px; }
.product-body .auth-layout .button { width: 100%; min-height: 44px; }
.product-body .empty-state { background: var(--surface-raised); border: 1px dashed var(--border-strong); border-radius: var(--radius-md); }
@media (max-width: 1100px) {
  .product-body .dashboard-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .product-body .form-layout { gap: 24px; grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr); }
  .product-body .quick-links { gap: 12px; }
  .product-body .quick-link { padding: 16px; gap: 12px; }
  .product-body .list-card { flex-wrap: wrap; }
  .product-body .list-card > div { flex: 1 1 280px; }
}
@media (max-width: 960px) {
  .product-body .dashboard-layout, .product-body .form-layout { grid-template-columns: 1fr; }
  .product-body .form-layout .form-intro { max-width: 700px; position: static; }
  .product-body .intro-note { margin-block: 16px; }
}
@media (max-width: 760px) {
  .product-body .workspace-inner { padding-top: 12px; }
  .product-body .workspace-links { overflow-x: auto; flex-wrap: nowrap; }
  .product-body .workspace-links a { padding: 12px; }
  .product-body .workspace-inner > .company-switch { flex: 1 1 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .product-body .company-switch label { width: auto; grid-column: 1 / -1; }
  .product-body .company-switch select { width: 100%; max-width: none; }
  .product-body .company-switch button { min-height: 44px; }
  .product-body .page-heading h1 { font-size: 28px; }
  .product-body .field-grid, .product-body .item-fields, .product-body .role-options, .product-body .filters, .product-body .quick-links { grid-template-columns: 1fr; }
  .product-body .form-layout { padding-top: 24px; }
  .product-body .list-card { padding: 16px; gap: 12px; }
  .product-body .list-card .record-number { flex-basis: 100%; }
  .product-body .list-card > div { flex-basis: 100%; }
  .product-body .list-card > span:last-child { margin-left: auto; }
  .product-body .purchase-progress { grid-template-columns: 1fr 1fr; }
  .product-body .purchase-progress li { padding: 12px; gap: 8px; }
  .product-body .editor-actions { padding: 16px; gap: 12px; }
  .product-body .editor-actions > .button { flex: 1 1 100%; }
  .product-body .comparison-panel { padding: 12px; }
  .product-body .comparison-table th, .product-body .comparison-table td { min-width: 210px; }
  .product-body .comparison-table td:first-child, .product-body .comparison-table tbody th:first-child { position: static; box-shadow: none; }
  .product-body .comparison-table thead th:first-child { left: auto; }
  .product-body .chat-history { padding: 12px; }
  .product-body .chat-message, .product-body .chat-message.outgoing { max-width: 100%; width: 100%; }
}
