/* Mobile list summaries opt in by explicit column schema; forms stay complete. */
.mobile-list-sort,.mobile-list-control{display:none}
@media(max-width:850px){
  .table-wrap .mobile-compact-table{min-width:0!important;width:100%;display:block}
  .mobile-compact-table thead{display:none!important}
  .mobile-compact-table tbody{display:block}
  .table-wrap .mobile-compact-table .mobile-compact-row{display:flex;flex-wrap:wrap;align-items:flex-start;gap:6px 12px;margin:0;padding:14px 16px;border:0;border-bottom:1px solid var(--line);border-radius:0;width:100%;min-width:0}
  .table-wrap .mobile-compact-table .mobile-compact-row>td{display:block;min-width:0;padding:0;border:0;line-height:1.5;overflow-wrap:anywhere}
  .mobile-compact-table td::before{display:none!important}
  .mobile-compact-table .mobile-list-title{order:0;flex:1 1 45%;font-size:16px;font-weight:600}
  .mobile-compact-table .mobile-list-title .cell-title,.mobile-compact-table .mobile-list-title>strong{font-size:16px;line-height:1.5;font-weight:600}
  .mobile-compact-table .mobile-list-title .cell-sub,.mobile-compact-table .mobile-list-title p{font-size:13px;font-weight:400;margin:3px 0;line-height:1.5}
  .mobile-compact-table .mobile-list-title .cell-title,.mobile-compact-table .mobile-list-title .cell-sub,.mobile-compact-table .mobile-list-title p,.mobile-compact-table .mobile-list-title>strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  .mobile-compact-table .mobile-list-title .cell-sub~.cell-sub{display:none}
  .mobile-compact-table .mobile-list-value{order:1;flex:0 1 auto;max-width:48%;text-align:right;font-size:17px;font-weight:600;color:var(--blue)}
  .mobile-compact-table .mobile-list-value::before{content:attr(data-mobile-label);display:block!important;color:var(--muted);font-size:11px;font-weight:400;line-height:1.4;margin-bottom:3px}
  .mobile-compact-table .mobile-list-value p,.mobile-compact-table .mobile-list-value small{font-size:12px;font-weight:400;margin:3px 0;display:block}
  .mobile-compact-table .mobile-list-value.job-profit-negative{color:#bb5353}
  html[data-theme="dark"] .mobile-compact-table .mobile-list-value.job-profit-negative{color:#d28e8e}
  .mobile-compact-table .mobile-list-meta{order:2;flex:0 1 auto;max-width:100%;font-size:12px;color:var(--muted)}
  .mobile-compact-table .mobile-list-meta .cell-sub{display:inline;margin:0 0 0 6px;font-size:12px}
  .mobile-compact-table .mobile-list-labeled{flex-basis:100%}
  .mobile-compact-table .mobile-list-labeled::before{content:attr(data-mobile-label);display:block!important;color:var(--muted);font-size:12px;margin-bottom:4px}
  .mobile-compact-table .mobile-list-status{order:3;flex:1 1 auto;align-self:center;font-size:13px}
  .mobile-compact-table .mobile-list-status .cell-sub{font-size:12px;margin:3px 0}
  .mobile-compact-table .mobile-list-status .badge{font-size:12px;padding:4px 8px}
  .mobile-compact-table .mobile-list-actions{order:4;display:flex!important;flex-wrap:wrap;gap:6px;align-self:center;flex:0 1 auto}
  .mobile-compact-table .mobile-list-control{order:5;display:block!important;align-self:center;margin-left:auto;flex:0 0 auto}
  .mobile-compact-table .mobile-list-actions .button,.mobile-details-toggle{min-height:44px;font-size:12px;padding:8px 10px;white-space:normal}
  .mobile-compact-table .mobile-list-extra{order:6;display:none!important;flex-basis:100%;font-size:13px}
  .mobile-compact-table .mobile-list-expanded .mobile-list-extra{display:block!important;padding-top:8px;border-top:1px solid var(--line)}
  .mobile-compact-table .mobile-list-extra::before{content:attr(data-mobile-label);display:block!important;color:var(--muted);font-size:12px;font-weight:400;margin-bottom:3px}
  .mobile-compact-table .mobile-list-expanded .mobile-list-title .cell-title,.mobile-compact-table .mobile-list-expanded .mobile-list-title .cell-sub,.mobile-compact-table .mobile-list-expanded .mobile-list-title p,.mobile-compact-table .mobile-list-expanded .mobile-list-title>strong{display:block;overflow:visible;-webkit-line-clamp:unset}
  .mobile-compact-table .mobile-compact-row:hover>td{background:transparent!important}
  .mobile-compact-table .mobile-compact-row.clickable:hover{background:var(--blue-soft)}
  .mobile-list-sort{display:flex;flex-wrap:wrap;gap:8px;padding:10px 14px;border-bottom:1px solid var(--line)}
  .mobile-list-sort button{min-height:44px;padding:8px 12px;border:1px solid var(--line);border-radius:6px;font-size:13px}
  html[data-theme="dark"] .mobile-compact-table .cell-sub,html[data-theme="dark"] .mobile-compact-table .mobile-list-meta{color:#b2c1ce}
  .mobile-compact-table .supply-offer{margin:0 0 4px;padding:8px 10px;width:100%;font-size:13px;min-height:44px}
  .mobile-compact-table .supply-offer small{font-size:12px}
  .mobile-compact-table .supply-spec{font-size:13px}
  .mobile-compact-table .mobile-list-title .supply-spec{-webkit-line-clamp:1}
  .mobile-compact-table tfoot{display:block}
  .mobile-compact-table tfoot tr{display:block;margin:0;padding:12px 16px;border:0;border-radius:0}
  .mobile-compact-table tfoot td{display:block;font-size:12px;min-width:0;white-space:normal;overflow-wrap:anywhere}
  .job-grid{display:block}
  .job-grid .job-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:14px 16px;border:0;border-bottom:1px solid var(--line);border-radius:0;width:100%;text-align:left}
  .job-grid .job-card header{grid-column:1 / -1;margin:0;justify-content:flex-start;gap:8px}
  .job-grid .job-card h3{grid-column:1;grid-row:2;margin:0;font-size:16px;line-height:1.5}
  .job-grid .job-card p{grid-column:1;grid-row:3;font-size:13px;line-height:1.5;margin:0}
  .job-grid .job-card .status-line{grid-column:1 / -1;margin:4px 0 0}
  .job-grid .job-card footer{grid-column:2;grid-row:2 / 4;display:flex;flex-direction:column;align-items:flex-end;border:0;margin:0;padding:0;gap:3px;max-width:150px}
  .job-grid .job-card footer span{font-size:10px;line-height:1.4;text-align:right}
  .job-grid .job-card footer strong{font-size:16px;color:var(--blue);overflow-wrap:anywhere}
  .approval-card{padding:14px 16px;margin-bottom:10px}
  .approval-card header{margin-bottom:8px;gap:8px}
  .approval-card header h3{font-size:16px;margin:0}
  .approval-card header p{font-size:12px;margin:4px 0}
  .approval-card .list-row{padding:8px 0;gap:8px}
  .approval-card .actions{gap:6px;flex-wrap:wrap}
  .approval-card .actions .button{min-height:44px}
  .supply-suppliers{gap:0!important}
  .supply-suppliers>.panel{padding:14px 16px;border:0;border-bottom:1px solid var(--line);border-radius:0}
  .supply-suppliers h3{font-size:16px;margin:0 0 6px}
  .supply-suppliers p{font-size:13px;margin:3px 0;overflow-wrap:anywhere}
  .supply-suppliers .button{min-height:44px;margin-top:8px}
}
@media(max-width:360px){
  .table-wrap .mobile-compact-table .mobile-compact-row,.job-grid .job-card{padding:12px;gap:6px 8px}
  .mobile-compact-table .mobile-list-value{font-size:15px}
}

[data-record-row]{cursor:pointer}[data-record-row]:hover{background-color:#299bc30d}[data-record-row]:focus-visible{outline:2px solid #299bc3;outline-offset:-2px}.record-menu-toggle{min-width:40px;min-height:40px;font-size:22px;line-height:1}.record-actions-cell{white-space:nowrap}.record-actions-menu{max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto}.record-actions-menu :is(button,a){display:flex;align-items:center;gap:8px;width:100%;margin:0!important;text-align:left;white-space:normal;text-decoration:none}.record-actions-menu .button{border:0;background:transparent;justify-content:flex-start;color:inherit}.record-actions-menu :is(button,a):hover,.record-actions-menu :is(button,a):focus-visible{background:#299bc322}.pay-mobile-employee>.record-actions-cell{grid-column:2}.work-card>.record-menu-toggle{float:right}
.record-card-actions{display:flex;justify-content:flex-end}.record-actions-menu label{display:grid;gap:6px;padding:10px}.record-actions-menu label select{width:100%;min-width:180px}

/* Amp's shared mobile list pattern: flat separators, information left, menu right. */
@media(max-width:850px){
 #content .table-wrap .mobile-compact-table .mobile-compact-row{position:relative;display:flex;flex-wrap:wrap;align-items:center;padding:20px 68px 20px 2px;gap:5px 10px;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none;background:transparent}
 #content .mobile-compact-table .mobile-list-title{flex:1 1 100%;max-width:100%;color:var(--blue);font-size:16px;line-height:1.5}
 #content .mobile-compact-table .mobile-list-title :is(.cell-title,strong){color:var(--blue)}
 #content .mobile-compact-table :is(.mobile-list-meta,.mobile-list-status){flex:0 1 auto;max-width:100%;font-size:13px;line-height:1.6}
 #content .mobile-compact-table .mobile-list-value{order:2;text-align:left;max-width:100%;font-size:16px;flex:1 1 100%}
 #content .mobile-compact-table .mobile-list-actions{position:absolute;right:2px;top:50%;transform:translateY(-50%);max-width:54px;margin:0;justify-content:flex-end}
 #content .mobile-compact-table .mobile-list-actions:empty{display:none!important}
 #content .mobile-compact-table .mobile-list-control{flex:1 1 100%;margin:3px 0 0}
 #content .mobile-compact-table .mobile-details-toggle{min-height:36px;padding:4px 0;border:0;background:transparent;color:var(--muted)}
 #content .att-guarantee{flex-direction:row;align-items:center;padding:20px 2px;gap:12px;margin:0;border:0;border-bottom:1px solid var(--line);border-radius:0}
 #content .att-guarantee>div:first-child{flex:1;min-width:0;overflow-wrap:anywhere}
 #content .att-guarantee strong{color:var(--blue);font-size:16px}
 #content .att-guarantee .document-row-actions{flex:0 0 auto}
 #content .attachments-view .search{background:transparent}
}

/* Customer list: compact flat rows; direct category edit, details in row/menu. */
#content .customer-category-select{width:auto;min-width:108px;max-width:160px;min-height:40px;padding:6px 28px 6px 10px;border:1px solid var(--line);border-radius:5px;background:var(--surface);color:var(--text);font:inherit;font-size:13px}
@media(max-width:850px){
 #content .customer-registry .toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;padding:12px 0}
 #content .customer-registry .toolbar .search{grid-column:1/-1;min-width:0;width:100%;border-radius:5px;background:transparent}
 #content .customer-registry .toolbar select{width:100%;min-width:0;border-radius:5px}
 #content .customer-registry .toolbar .result-count{display:none}
 #content .customer-registry .mobile-compact-table .mobile-compact-row{display:grid;grid-template-columns:minmax(0,1fr) auto 40px;gap:4px 10px;padding:12px 0;align-items:center}
 #content .customer-registry .mobile-list-title{grid-column:1/3;grid-row:1;font-size:15px}
 #content .customer-registry .mobile-list-title .cell-title{font-size:15px;line-height:1.45}
 #content .customer-registry .mobile-list-title .cell-sub{-webkit-line-clamp:1;font-size:12px;margin:2px 0;color:var(--muted)}
 #content .customer-registry .mobile-list-title .customer-source{display:none}
 #content .customer-registry .mobile-list-meta{grid-column:1;grid-row:2;font-size:12px}
 #content .customer-registry .mobile-list-status{grid-column:2;grid-row:2;min-width:0;justify-self:start}
 #content .customer-registry .customer-category-select{width:124px;min-width:0;min-height:44px;max-width:100%;font-size:13px}
 #content .customer-registry .mobile-list-actions{grid-column:3;grid-row:1/3;position:static;transform:none;max-width:40px;align-self:center}
 #content .customer-registry .category-review-note{font-size:11px}
}

@media(max-width:850px){
 #content .customer-registry .table-wrap .mobile-compact-table .mobile-compact-row{grid-template-columns:minmax(0,1fr) auto 40px!important;gap:4px 10px!important}
 #content .customer-registry .mobile-compact-row .mobile-list-title{grid-column:1/3!important;grid-row:1!important}
 #content .customer-registry .mobile-compact-row .mobile-list-meta{grid-column:1!important;grid-row:2!important}
 #content .customer-registry .mobile-compact-row .mobile-list-status{grid-column:2!important;grid-row:2!important;margin-top:0}
 #content .customer-registry .mobile-compact-row .mobile-list-actions{grid-column:3!important;grid-row:1/3!important;align-self:center}
 #content .customer-registry .mobile-list-title .customer-address-missing{display:none}
}

/* Expense type and category stay beside each other in their separate cells. */
#content #expense-table .expense-classification-toggle>span:first-child{font:inherit;line-height:inherit}

@media(max-width:850px){
 #content #expense-table .mobile-compact-table .mobile-compact-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 #content #expense-table .mobile-compact-row .mobile-list-meta:nth-child(4){grid-column:1/-1!important;text-align:left}
 #content #expense-table .mobile-compact-row .expense-type-cell{grid-column:1!important;grid-row:4!important}
 #content #expense-table .mobile-compact-row .expense-category-cell{grid-column:2!important;grid-row:4!important}
 #content #expense-table .mobile-compact-row .mobile-list-status{width:100%;max-width:100%;align-self:stretch}
 #content #expense-table .mobile-list-status .document-status-toggle{width:100%;height:100%;gap:12px;padding:10px 14px;white-space:normal}
 #content #expense-table .mobile-list-status .document-status-toggle>span:first-child{min-width:0;overflow-wrap:normal}
}

/* Equal expense controls use the document status badge typography. */
#content #expense-table .expense-classification-toggle{height:44px;min-height:44px}
#content #expense-table .expense-classification-toggle>span:last-child{font-size:18px;line-height:1}
@media(min-width:851px){
 #content #expense-table th:nth-child(5),#content #expense-table th:nth-child(6){width:16%!important}
}

/* Expense labels inherit the same status badge font as document issuance. */
@media(max-width:850px){
 #content #expense-table .mobile-list-status .expense-classification-toggle{gap:6px;padding:10px}
}

/* Activity history: expand one event in place without losing the list position. */
.audit-table [data-audit-row]{cursor:pointer}.audit-table .audit-row-open>td{background:var(--blue-soft)}
.audit-toggle{min-width:44px;min-height:44px}.audit-chevron{display:inline-block;font-size:24px;transition:transform .18s ease}.audit-toggle[aria-expanded=true] .audit-chevron{transform:rotate(180deg)}
.audit-table .audit-expanded-row>td{padding:0!important;background:var(--surface)}.audit-expanded-panel{padding:18px 22px;border-left:3px solid var(--blue);animation:audit-expand .18s ease-out}.audit-expanded-panel p{margin:0 0 12px}.audit-expanded-panel table{width:100%}.audit-expanded-panel details{margin-top:12px}.audit-expanded-panel summary{cursor:pointer}.audit-expanded-panel .source-meta{white-space:pre-wrap;overflow-wrap:anywhere}
@keyframes audit-expand{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:850px){#content .table-wrap .audit-table.mobile-compact-table [data-audit-row]{display:flex!important;flex-wrap:wrap!important;padding:14px 52px 14px 2px!important;gap:5px 10px!important}#content .audit-table .mobile-compact-row>.mobile-list-meta{width:100%!important;max-width:100%!important;flex:0 0 100%!important;text-align:left;grid-column:auto!important;grid-row:auto!important}#content .audit-table .mobile-list-meta .cell-sub{margin-left:0}#content .audit-table .audit-expanded-row{display:block!important;width:100%}#content .audit-table .audit-expanded-row>td{display:block!important;width:100%}#content .audit-expanded-panel{padding:14px 10px}#content .audit-expanded-panel table{min-width:0!important;font-size:12px}#content .audit-expanded-panel th,#content .audit-expanded-panel td{padding:8px 5px!important;overflow-wrap:anywhere}.audit-table .job-code-link{white-space:normal}}
@media(prefers-reduced-motion:reduce){.audit-expanded-panel{animation:none}.audit-chevron{transition:none}}

@media(max-width:850px){#content .table-wrap .audit-table.mobile-compact-table [data-audit-row]{position:relative!important}#content .audit-table [data-audit-row]>.mobile-list-actions{position:absolute!important;right:0!important;top:50%!important;transform:translateY(-50%)!important}#content .audit-table .mobile-list-meta .cell-sub{text-align:left!important;display:block!important}}

/* Preserve amount labels in the calendar project report under compact mobile rules. */
@media(max-width:850px){#content .production-project-table.mobile-compact-table .mobile-list-labeled::before{display:inline!important;content:attr(data-mobile-label);margin-right:6px}#content .production-project-table.mobile-compact-table .mobile-list-value::before{display:block!important;content:attr(data-mobile-label)}}
