/* Shared operational workspace and partner portal. */
.desk-body { min-height: 100svh; background: #f4f0e8; font-size: 1rem; line-height: 1.5; }
.desk-header { display:flex; align-items:center; justify-content:space-between; gap:1.5rem; padding:1rem 2rem; border-bottom:1px solid var(--line); background:var(--paper); }
.desk-brand { display:flex; align-items:center; gap:.75rem; font-weight:850; font-size:1.25rem; line-height:1.15; flex-shrink:0; }
.desk-brand img { border-radius:0; object-fit:contain; flex-shrink:0; }
.desk-brand small { display:block; margin-top:.3rem; color:var(--muted); font-weight:500; font-size:.75rem; }
.desk-account { display:flex; align-items:center; gap:1.25rem; font-size:.875rem; }
.desk-account form { margin:0; }
.desk-account button { min-height:2.75rem; border:0; padding:.5rem; background:none; color:var(--red-dark); cursor:pointer; }
.desk-layout { display:grid; grid-template-columns:14rem minmax(0,1fr); max-width:110rem; min-height:calc(100svh - 5rem); margin:auto; }
.desk-sidebar { padding:1.5rem 1rem; border-right:1px solid var(--line); background:var(--paper); }
.desk-sidebar nav { display:grid; gap:.35rem; }
.desk-sidebar nav a { padding:.8rem 1rem; border-radius:.65rem; font-size:.9375rem; font-weight:600; }
.desk-sidebar nav a:hover { background:var(--cream); }
.desk-sidebar nav a[aria-current=page] { background:var(--ink); color:white; }
.desk-company { display:grid; gap:.5rem; margin:2rem 1rem 0; padding-top:1.5rem; border-top:1px solid var(--line); overflow-wrap:anywhere; }
.desk-company > small,.desk-company > span { color:var(--muted); font-size:.875rem; }
.desk-company label { display:block; margin:.75rem 0 .5rem; font-size:.875rem; }
.desk-company select { width:100%; margin-bottom:.6rem; }
.desk-main { padding:clamp(1.25rem,3vw,3rem); min-width:0; }
.desk-page-heading { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:1.25rem; margin-bottom:1.75rem; }
.desk-page-heading > div { min-width:0; flex:1 1 18rem; }
.desk-page-heading p { margin:.5rem 0 0; color:var(--muted); }
.desk-main h1,.desk-login h1 { margin:0; font-family:var(--display); font-size:clamp(1.9rem,3vw,3rem); font-weight:750; letter-spacing:-.035em; line-height:1.12; overflow-wrap:anywhere; }
.desk-main h2 { margin:0; font-size:1.125rem; line-height:1.35; letter-spacing:-.015em; }
.desk-main h3 { font-size:1rem; margin:1.25rem 0 .5rem; }
.desk-overline { margin:0 0 .5rem !important; font-size:.8125rem; color:var(--red-dark) !important; }
.desk-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(10rem,1fr)); gap:1rem; margin-bottom:1.75rem; }
.desk-metrics a { display:grid; align-content:space-between; gap:1rem; min-height:8rem; padding:1.25rem; border:1px solid var(--line); border-radius:.9rem; background:var(--paper); transition:border-color .15s; }
.desk-metrics a:hover { border-color:var(--red); }
.desk-metrics span { color:var(--muted); font-size:.875rem; }
.desk-metrics strong { font-size:2.25rem; line-height:1; letter-spacing:-.04em; }
/* The grid owns spacing: cards in each row share top and bottom edges. */
.desk-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1.25rem; align-items:stretch; margin-bottom:1.25rem; }
.desk-grid > *, .desk-detail-grid > * { min-width:0; margin:0; max-width:none; }
.desk-grid > :last-child:nth-child(odd), .desk-detail-grid > :only-child { grid-column:1 / -1; }
.desk-panel { min-width:0; margin-bottom:var(--desk-panel-spacing,1.25rem); border:1px solid var(--line); border-radius:.9rem; background:var(--paper); overflow-wrap:anywhere; }
.desk-panel--padded { padding:clamp(1.1rem,2vw,1.75rem); }
.desk-panel > header { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:.75rem; padding:1.1rem 1.25rem; border-bottom:1px solid var(--line); }
.desk-panel > header > a { font-size:.875rem; color:var(--red-dark); text-decoration:underline; text-underline-offset:.2em; }
.desk-row { display:flex; justify-content:space-between; align-items:center; gap:1.25rem; padding:1.1rem 1.25rem; border-bottom:1px solid var(--line); min-width:0; }
.desk-row:last-child { border-bottom:0; }
a.desk-row:hover { background:var(--cream); }
.desk-row > div { min-width:0; }
.desk-row strong { display:block; font-weight:650; line-height:1.35; }
.desk-row small { display:block; margin-top:.25rem; font-size:.875rem; color:var(--muted); }
.desk-row p { margin:.5rem 0; }
.desk-row > span:not(.desk-status) { font-size:.9375rem; }
.desk-row-meta { display:grid; gap:.35rem; justify-items:end; text-align:right; }
.desk-status { display:inline-block; width:fit-content; max-width:100%; padding:.3rem .65rem; border-radius:.45rem; background:#eae3d7; color:#53473b; font-size:.875rem; line-height:1.4; overflow-wrap:anywhere; }
.desk-empty { margin:0; padding:2rem 1.25rem; color:var(--muted); }
.desk-muted { color:var(--muted); font-size:.875rem; }
.desk-contact { display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem; padding:1.75rem 0 .5rem; border-top:1px solid var(--line); }
.desk-contact p { color:var(--muted); margin:.5rem 0 0; }
.desk-link { color:var(--red-dark); text-decoration:underline; text-underline-offset:.2em; }
.desk-back { display:inline-flex; align-items:center; gap:.6rem; vertical-align:middle; max-width:100%; min-height:38px; padding:5px 12px 5px 5px; margin-bottom:1.25rem; border:1px solid var(--bo-line,var(--line,#d8c9b5)); border-radius:var(--ui-radius-small,8px); background:var(--bo-surface,var(--paper,#fffaf2)); color:var(--bo-ink,var(--ink,#292621)); box-shadow:2px 2px 0 #d7c6b3; font-size:.8125rem; font-weight:700; line-height:1.25; text-decoration:none; overflow-wrap:anywhere; transition:background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease; }
.desk-back .ui-arrow { box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; flex:0 0 26px; width:26px; height:26px; padding:0; border-radius:var(--ui-radius-small,5px); background:var(--bo-ink,var(--ink,#292621)); color:#fffaf0; font-size:16px!important; }
.desk-back:hover { border-color:#b99375; background:#f7ecdc; color:var(--bo-ink,var(--ink,#292621)); box-shadow:3px 3px 0 #c6aa8f; transform:translate(-1px,-1px); text-decoration:none; }
.desk-back:hover .ui-arrow { background:var(--red-dark,#8f2925); }
.desk-back:focus-visible { outline:2px solid var(--red-dark,#8f2925); outline-offset:3px; }
@media (prefers-reduced-motion:reduce) { .desk-back { transition:none; } .desk-back:hover { transform:none; } }
.desk-detail-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(18rem,1fr); gap:1.5rem; align-items:stretch; margin-bottom:1.25rem; }
.desk-facts { margin:1rem 0 0; }
.desk-facts > div { display:grid; grid-template-columns:minmax(6rem,.8fr) minmax(0,1.2fr); gap:1rem; padding:.8rem 0; border-bottom:1px solid var(--line); }
.desk-facts > div:last-child { border-bottom:0; }
.desk-facts dt { color:var(--muted); font-size:.875rem; }
.desk-facts dd { margin:0; }
.desk-form { max-width:50rem; }
.desk-field { margin:1.25rem 0; min-width:0; }
.desk-field label { display:block; font-size:.875rem; font-weight:650; margin-bottom:.5rem; }
.desk-body input:not([type=checkbox]):not([type=hidden]),.desk-body textarea,.desk-body select { display:block; width:100%; min-width:0; min-height:2.9rem; border:1px solid #bcb2a5; border-radius:.5rem; padding:.7rem .8rem; background:var(--ui-surface,#fffdf8); color:var(--ink); font:inherit; font-size:1rem; }
.desk-body textarea { resize:vertical; line-height:1.5; }
.desk-body input[type=file] { font-size:.875rem !important; padding:.5rem !important; }
.desk-field small { display:block; font-size:.8125rem; color:var(--muted); margin-top:.45rem; }
.desk-field--checkbox { display:grid; grid-template-columns:1.25rem minmax(0,1fr); gap:.65rem; align-items:start; }
.desk-field--checkbox label { grid-column:2; grid-row:1; font-weight:500; }
.desk-field--checkbox input { grid-column:1; grid-row:1; width:1.2rem; height:1.2rem; accent-color:var(--red); }
.desk-field--checkbox small { grid-column:2; }
.desk-form .errorlist { margin:.5rem 0; padding:0; list-style:none; color:var(--red-dark); font-size:.875rem; }
.desk-form .button { max-width:100%; }
.desk-filters { display:flex; flex-wrap:wrap; gap:1rem; align-items:end; margin-bottom:1.5rem; padding:1.1rem; border:1px solid var(--line); border-radius:.9rem; background:var(--paper); }
.desk-filters label { flex:1 1 10rem; font-size:.875rem; }
.desk-filters input,.desk-filters select { margin-top:.4rem; }
.desk-filters > a { padding:.6rem 0; font-size:.875rem; color:var(--red-dark); }
.desk-pagination { display:flex; flex-wrap:wrap; gap:1.5rem; align-items:center; justify-content:center; margin:1.5rem 0; font-size:.9375rem; }
.desk-pagination a { padding:.6rem .9rem; border:1px solid var(--line); border-radius:.5rem; }
.desk-notice { margin:0 0 1.5rem; padding:1rem 1.25rem; border-left:3px solid var(--red); border-radius:.4rem; background:var(--paper); }
.desk-message { padding:1rem 0; border-bottom:1px solid var(--line); }
.desk-message:last-child { border-bottom:0; }
.desk-message header { display:flex; flex-wrap:wrap; gap:.5rem 1rem; justify-content:space-between; font-size:.875rem; }
.desk-message time { color:var(--muted); }
.desk-message > small { font-size:.75rem; color:var(--red-dark); }
.desk-message p { margin:.6rem 0 0; white-space:normal; }
.desk-message--internal { margin-top:1rem; padding:1rem; border:1px dashed #bcb2a5; border-radius:.6rem; background:#f0eadf; }
.desk-message--status { color:var(--muted); }
.desk-panel summary { cursor:pointer; font-weight:650; }
.desk-panel summary::marker { color:var(--red); }
.desk-pipeline { display:grid; grid-template-columns:repeat(auto-fit,minmax(14rem,1fr)); gap:1rem; align-items:stretch; }
.desk-stage { min-width:0; border-radius:.75rem; padding:1rem; background:#e9e2d6; }
.desk-stage > header { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:1rem; }
.desk-stage h2 { font-size:.9375rem; }
.desk-deal { display:grid; gap:.65rem; padding:1rem; margin-bottom:.75rem; border:1px solid var(--line); border-radius:.6rem; background:var(--paper); overflow-wrap:anywhere; }
.desk-deal:hover { border-color:var(--red); }
.desk-deal h3 { margin:0; }
.desk-deal small { color:var(--muted); font-size:.8125rem; }
.desk-login { width:min(92vw,30rem); margin:4rem auto; }
.desk-login h1 { margin:2rem 0; }
@media(max-width:75rem) { .desk-detail-grid { grid-template-columns:1fr; } .desk-grid { grid-template-columns:1fr; } }
@media(max-width:55rem) { .desk-header { padding:1rem; } .desk-layout { grid-template-columns:1fr; } .desk-sidebar { padding:1rem; border-right:0; border-bottom:1px solid var(--line); } .desk-sidebar nav { display:flex; flex-wrap:wrap; gap:.35rem; } .desk-sidebar nav a { padding:.65rem .8rem; font-size:.875rem; } .desk-company { margin:1rem 0 0; padding-top:1rem; } .desk-company form { max-width:25rem; } .desk-main { padding:1.25rem 1rem 3rem; } .desk-account > span { display:none; } .desk-account { gap:.65rem; } }
@media(max-width:30rem) { .desk-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem; } .desk-metrics a { padding:1rem; } .desk-row { gap:.75rem; flex-wrap:wrap; } .desk-row-meta { justify-items:start; text-align:left; } .desk-header { gap:.5rem; } .desk-account > a { display:none; } .desk-brand { font-size:1.125rem; } .desk-facts > div { grid-template-columns:1fr; gap:.3rem; } }

.desk-demo { margin:0 0 1.25rem; padding:.65rem .9rem; border:1px dashed var(--line); border-radius:.5rem; color:var(--muted); font-size:.875rem; }

/* Long forms and timelines use a full row instead of leaving an empty column. */
.desk-form--columns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 1.5rem; max-width:none; }
.desk-form--columns > :not(.desk-field), .desk-form--columns > .desk-field--checkbox, .desk-form--columns > .desk-field:has(textarea) { grid-column:1 / -1; }
.desk-form--columns > .button { justify-self:start; }
@media(max-width:55rem) { .desk-form--columns { grid-template-columns:minmax(0,1fr); } }

.desk-grid > .desk-panel, .desk-grid > .demo-manager, .desk-detail-grid > .desk-panel { margin:0; max-width:none; }

.desk-panel--overview .desk-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1.25rem; }
.desk-panel--overview .desk-facts > div { display:block; padding:0; border:0; }
.desk-panel--overview .desk-facts dd { margin-top:.4rem; }
@media(max-width:75rem) { .desk-panel--overview .desk-facts { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:35rem) { .desk-panel--overview .desk-facts { grid-template-columns:minmax(0,1fr); } }

/* Card rows own their gaps. Item margins would shorten only some card surfaces. */
:is(.desk-grid, .desk-detail-grid, .work-record-grid, .ops-two, .fleet-grid,
    .access-grid, .access-profile-grid, .bo-content-grid, .migration-counts,
    .calculator-layout, .demo-grid, .demo-support-grid, .partner-store-order-grid,
    .balance-overview, .balance-actions-grid, .point-loyalty-grid)
  > :is(.desk-panel, .ops-dark-card, .demo-card, .demo-manager, .quote-summary) {
  align-self:stretch;
  min-width:0;
  margin-block:0;
}
/* Preserve spacing after the row once the cards no longer carry outer margins. */
:is(.ops-two, .fleet-grid, .access-grid, .migration-counts, .point-loyalty-grid) {
  margin-bottom:var(--desk-panel-spacing,1.25rem);
}
