/* Compact enterprise workspaces. The home dashboard intentionally keeps its existing visual system. */
body:not(.home-screen){
  --compact-red:#b4232c;
  --compact-red-dark:#941d25;
  --compact-ink:#202328;
  --compact-muted:#74777f;
  --compact-line:#e6dedd;
  --compact-soft:#f7f0f0;
  --compact-page:#fcfaf9;
  --compact-success:#23815e;
  --compact-warning:#a86618;
  background:var(--compact-page);
  color:var(--compact-ink);
}

body:not(.home-screen) #appShell:not(.hidden) .topbar{display:none!important}
body:not(.home-screen) #appShell:not(.hidden) .workspace{
  width:100%!important;
  max-width:100%!important;
  min-height:100dvh;
  margin:0!important;
  padding:0 16px calc(68px + env(safe-area-inset-bottom))!important;
  background:var(--compact-page)!important;
}
body:not(.home-screen) :is(.claim-flow,.documents-view,.admin-feature-view,.trip-planner-view){
  width:min(920px,100%);
  min-width:0;
  max-width:920px;
  margin:0 auto!important;
  padding:0 0 18px!important;
}
body:not(.home-screen) :is(button,input,textarea,select){font-family:inherit}
body:not(.home-screen) :is(input,textarea,select){
  min-height:40px;
  padding:8px 10px;
  border:1px solid #d8d2d1;
  border-radius:6px;
  background:#fff;
  color:var(--compact-ink);
  font-size:13px;
  line-height:1.35;
  box-shadow:none;
}
body:not(.home-screen) :is(input,textarea,select):focus{
  border-color:var(--compact-red);
  outline:2px solid rgba(180,35,44,.1);
  outline-offset:0;
  box-shadow:none;
}
body:not(.home-screen) textarea{resize:vertical}
body:not(.home-screen) .button{
  min-height:40px;
  padding:8px 14px;
  border-radius:6px;
  font-size:13px;
  font-weight:700;
  line-height:1.2;
  box-shadow:none!important;
  transform:none!important;
}
body:not(.home-screen) .button.primary{background:var(--compact-red)!important;color:#fff!important;border-color:var(--compact-red)!important}
body:not(.home-screen) .button.primary:hover{background:var(--compact-red-dark)!important}
body:not(.home-screen) .button.ghost{background:#fff!important;color:var(--compact-red)!important;border-color:#d9b9bb!important}
body:not(.home-screen) .button.danger{background:#fff!important;color:var(--compact-red)!important;border-color:#d9b9bb!important}
/* List actions use content width, while submit actions retain a clear touch target. */
body:not(.home-screen) .button.compact-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:auto;
  min-width:48px;
  min-height:40px;
  padding:6px 10px;
  border:1px solid #d9b9bb;
  border-radius:6px;
  font-size:13px;
  white-space:nowrap;
}
body:not(.home-screen) .button:focus-visible{outline:2px solid var(--compact-red);outline-offset:2px}
.workspace-confirm-dialog{box-sizing:border-box;width:min(390px,calc(100% - 32px));max-height:calc(100dvh - 32px);padding:16px;border:1px solid #e6dedd;border-radius:10px;background:#fff;color:#202328;font-family:inherit;overflow:auto}
.workspace-confirm-dialog::backdrop{background:rgba(0,0,0,.4)}
.workspace-confirm-dialog h2{margin:0 0 10px;font-size:16px;line-height:1.4}
.workspace-confirm-dialog p{margin:0 0 16px;font-size:14px;line-height:1.6;white-space:pre-line;overflow-wrap:anywhere}
.workspace-confirm-actions{display:flex;justify-content:flex-end;gap:8px}
.workspace-confirm-actions .button{width:auto;min-height:40px;white-space:nowrap}
body:not(.home-screen) .card{
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body:not(.home-screen) .eyebrow{display:none!important}

/* One compact inner header. */
body:not(.home-screen) :is(.documents-head,.claim-flow-head){
  position:sticky!important;
  top:0;
  z-index:40;
  display:grid!important;
  grid-template-columns:40px minmax(0,1fr) auto;
  column-gap:8px;
  align-items:center!important;
  width:auto;
  min-height:48px;
  margin:0 -16px 10px!important;
  padding:0 10px!important;
  border-bottom:1px solid var(--compact-line);
  background:rgba(252,250,249,.98)!important;
  box-shadow:none!important;
  backdrop-filter:blur(10px);
}
body:not(.home-screen) :is(.documents-head,.claim-flow-head)>div{
  display:block!important;
  min-width:0;
  grid-column:2;
  text-align:center;
}
body:not(.home-screen) :is(.documents-head,.claim-flow-head) h1,
body:not(.home-screen) .claim-flow-head strong{
  display:block;
  margin:0!important;
  color:var(--compact-ink)!important;
  font-size:18px!important;
  font-weight:750!important;
  line-height:1.25!important;
  letter-spacing:0!important;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
body:not(.home-screen) :is(.documents-head,.claim-flow-head) p{display:none!important}
body:not(.home-screen) :is(.documents-head,.claim-flow-head)>:is(button:not(.round-back),a){
  grid-column:3;
  grid-row:1;
  justify-self:end;
  min-width:0;
  white-space:nowrap;
}
body:not(.home-screen) .round-back{
  grid-column:1;
  grid-row:1;
  display:grid;
  place-items:center;
  width:40px!important;
  height:40px!important;
  min-width:40px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--compact-red)!important;
  font-size:27px!important;
  font-weight:400!important;
  line-height:1!important;
  box-shadow:none!important;
}
body:not(.home-screen) .round-back svg{width:23px!important;height:23px!important;fill:none;stroke:currentColor;stroke-width:2}
body:not(.home-screen) .feature-create-button{
  position:static!important;
  grid-column:3;
  grid-row:1;
  justify-self:end;
  min-width:56px;
  min-height:40px;
  padding:0 2px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:var(--compact-red)!important;
  font-size:13px!important;
  font-weight:700!important;
  box-shadow:none!important;
}

/* Bottom navigation is small and consistent on every inner surface. */
body:not(.home-screen) .portal-bottom-nav{
  position:fixed!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  transform:none!important;
  z-index:60!important;
  display:grid!important;
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  height:calc(58px + env(safe-area-inset-bottom))!important;
  padding:4px 10px env(safe-area-inset-bottom)!important;
  border-top:1px solid var(--compact-line)!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:none!important;
}
body:not(.home-screen) .isolation-compatibility-notice:not(.hidden){
  position:fixed!important;
  left:50%;
  bottom:calc(62px + env(safe-area-inset-bottom));
  z-index:70;
  display:flex!important;
  width:max-content;
  max-width:calc(100vw - 24px);
  min-height:28px;
  margin:0!important;
  padding:5px 9px!important;
  border:1px solid #ead7a8!important;
  border-radius:5px!important;
  background:#fff9e9!important;
  color:#775519!important;
  font-size:10px!important;
  line-height:1.2!important;
  transform:translateX(-50%);
  box-shadow:0 5px 14px rgba(80,58,18,.08)!important;
}
body:not(.home-screen) .portal-bottom-nav button{gap:1px!important;color:#737781!important}
body:not(.home-screen) .portal-bottom-nav button.active{color:var(--compact-red)!important}
body:not(.home-screen) .portal-bottom-nav button span{height:26px!important}
body:not(.home-screen) .portal-bottom-nav button span svg{width:21px!important;height:21px!important;stroke-width:1.8!important}
body:not(.home-screen) .portal-bottom-nav button strong{font-size:10px!important;line-height:1.15!important;font-weight:600!important}

/* Claim flow: title comes from the active step, so the second heading and oversized stepper are removed. */
body:not(.home-screen) #claimFlow .stepper,
body:not(.home-screen) #claimFlow .step-panel>.page-heading{display:none!important}
body:not(.home-screen) #claimFlow .step-panel{padding:0!important}
body:not(.home-screen) #claimFlow .content-grid{display:block!important}
body:not(.home-screen) #claimFlow .compact-claim-form{
  display:grid!important;
  grid-template-columns:minmax(0,1fr);
  gap:8px;
  padding:0 2px 8px;
}
body:not(.home-screen) #claimFlow .claim-section-label{display:none!important}
body:not(.home-screen) #claimFlow label,
body:not(.home-screen) #claimFlow .field-group{
  display:grid;
  gap:4px;
  min-width:0;
  padding:0;
  color:#34363b;
  font-size:13px;
  font-weight:600!important;
}
body:not(.home-screen) #claimFlow .field-group{
  grid-column:1/-1;
  grid-template-columns:78px minmax(0,1fr);
  align-items:center;
  gap:10px!important;
  padding:8px 0 10px;
  border-bottom:1px solid var(--compact-line);
}
body:not(.home-screen) #claimFlow .segmented{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:2px;
  padding:2px;
  border:1px solid #d9d3d2;
  border-radius:8px;
  background:#f3f1f1;
  overflow:hidden;
}
body:not(.home-screen) #claimFlow .segmented label{padding:0!important;border:0!important}
body:not(.home-screen) #claimFlow .segmented label+label{border-left:0!important}
body:not(.home-screen) #claimFlow .segmented span{
  min-height:32px;
  padding:0 6px;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#4e5158;
  font-size:13px;
  font-weight:600;
}
body:not(.home-screen) #claimFlow .segmented input:checked+span{background:#fff;color:var(--compact-red);box-shadow:inset 0 0 0 1px var(--compact-red)}
body:not(.home-screen) #claimFlow .claim-basic-grid{
  grid-column:1/-1;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px;
}
body:not(.home-screen) #claimFlow .claim-basic-grid>label{padding:0}
body:not(.home-screen) #claimFlow .claim-basic-grid>label+label{padding-left:0}
body:not(.home-screen) #claimFlow .compact-claim-form :is(input:not([type=radio]),select,textarea){
  box-sizing:border-box;
  width:100%;
  min-width:0;
  min-height:40px;
  padding:7px 10px;
  border:1px solid #d8d2d1;
  border-radius:6px;
  background:#fff;
  color:var(--compact-ink);
  font-size:14px;
  font-weight:500;
  box-shadow:none;
}
body:not(.home-screen) #claimFlow .compact-claim-form :is(input:not([type=radio]),select,textarea):focus{border-color:var(--compact-red);outline:2px solid rgba(180,35,44,.1);outline-offset:0}
body:not(.home-screen) #claimFlow .claim-purpose-field{grid-column:1/-1;padding:0}
body:not(.home-screen) #claimFlow .claim-purpose-field textarea{min-height:60px;max-height:220px;line-height:1.5}
body:not(.home-screen) #claimFlow .travel-fields:not(.hidden):not([hidden]){
  grid-column:1/-1;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  padding:0;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
body:not(.home-screen) #claimFlow .travel-fields>label{padding:0}
body:not(.home-screen) #claimFlow .travel-fields>.two-cols{
  grid-column:1/-1;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px;
}
body:not(.home-screen) #claimFlow .travel-fields>.two-cols>label{padding:0}
body:not(.home-screen) #claimFlow .travel-fields>.two-cols>label+label{padding-left:0}
body:not(.home-screen) #claimFlow .claim-form-actions,
body:not(.home-screen) #claimFlow .action-bar{
  grid-column:1/-1;
  position:static!important;
  left:auto;
  right:auto;
  bottom:calc(58px + env(safe-area-inset-bottom))!important;
  z-index:55;
  display:flex!important;
  justify-content:flex-end!important;
  gap:8px;
  width:min(920px,100%);
  margin:0!important;
  padding:10px 0!important;
  border-top:1px solid var(--compact-line)!important;
  background:rgba(255,255,255,.98)!important;
  transform:none!important;
}
body:not(.home-screen) #claimFlow :is(.claim-form-actions,.action-bar) .button{width:auto;min-height:44px;border-radius:6px;white-space:nowrap}
body:not(.home-screen) #claimFlow .action-bar .button.primary{flex:1}
body:not(.home-screen) #claimFlow .claim-form-actions .button.primary{flex:0 0 auto}
body:not(.home-screen):has(#claimFlow:not(.hidden)) .isolation-compatibility-notice:not(.hidden){bottom:calc(126px + env(safe-area-inset-bottom))}

/* Upload stays action-first and avoids the old large dashed drop zone. */
body:not(.home-screen) #step2 .upload-card{display:grid!important;gap:0!important;max-width:none!important;margin:0!important;padding:0!important}
body:not(.home-screen) #step2 .upload-zone{
  display:block!important;
  min-height:0!important;
  padding:6px 0 9px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
body:not(.home-screen) #step2 .upload-zone>strong,
body:not(.home-screen) #step2 .upload-zone>small{display:none!important}
body:not(.home-screen) #step2 .invoice-entry-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
  margin:0!important;
}
body:not(.home-screen) #step2 .invoice-entry-card{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:8px 6px;
  gap:6px;
  border:1px solid #d8d2d1;
  border-radius:6px;
  background:#fff;
  box-shadow:none;
}
body:not(.home-screen) #step2 .invoice-entry-card>span{width:20px;height:20px;border:0;border-radius:0;background:transparent;color:var(--compact-red);font-size:13px}
body:not(.home-screen) #step2 .invoice-entry-card svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
body:not(.home-screen) #step2 .invoice-entry-card strong{font-size:13px!important;font-weight:700!important}
body:not(.home-screen) #step2 .invoice-entry-card small{display:none!important}
body:not(.home-screen) #step2 :is(.pending-picker-entry,.existing-document-card){
  min-height:50px;
  margin:0!important;
  padding:10px 0!important;
  border:0!important;
  border-top:1px solid var(--compact-line)!important;
  border-radius:0!important;
  background:transparent!important;
}
body:not(.home-screen) #step2 .pending-picker-entry small,
body:not(.home-screen) #step2 .existing-document-head small{display:none!important}
body:not(.home-screen) #step2 .pending-picker-entry strong{font-size:13px!important}
body:not(.home-screen) #step2 .pending-picker-entry .button{width:auto;flex:0 0 auto;min-height:40px;padding:6px 10px;border:1px solid #d9b9bb;background:#fff;font-size:13px;white-space:nowrap}
body:not(.home-screen) #step2 .existing-document-head{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin:0 0 4px!important}
body:not(.home-screen) #step2 .existing-document-head .button{width:auto;min-height:40px;padding:6px 10px;font-size:13px;white-space:nowrap}
body:not(.home-screen) #step2 .existing-document-list{display:grid!important;gap:0!important}
body:not(.home-screen) #step2 .existing-document-row{
  display:grid!important;
  grid-template-columns:32px minmax(0,1fr) auto!important;
  gap:8px!important;
  min-height:49px;
  padding:7px 0!important;
  border:0!important;
  border-bottom:1px solid var(--compact-line)!important;
  border-radius:0!important;
  background:transparent!important;
}
body:not(.home-screen) #step2 .existing-document-type{width:30px!important;height:30px!important;border-radius:4px!important;background:var(--compact-soft)!important;color:var(--compact-red)!important;font-size:9px!important}
body:not(.home-screen) #step2 .existing-document-row strong{font-size:12.5px!important;font-weight:650!important}
body:not(.home-screen) #step2 .existing-document-row small{font-size:10.5px!important;color:var(--compact-muted)!important}
body:not(.home-screen) #step2 .existing-document-row>button{min-height:40px;padding:6px 10px;border:1px solid #d9b9bb;border-radius:6px;background:#fff;color:var(--compact-red);font-size:13px;white-space:nowrap}
body:not(.home-screen) #step2 .file-summary{margin:8px 0 0!important;padding:8px 10px!important;border-radius:5px!important;background:var(--compact-soft)!important;color:var(--compact-red)!important;font-size:12px!important}
body:not(.home-screen) #step2 .file-preview{gap:0!important;margin:0!important;max-height:none!important}
body:not(.home-screen) #step2 .file-line{min-height:48px;padding:9px 2px!important;border:0!important;border-bottom:1px solid var(--compact-line)!important;border-radius:0!important;font-size:12px!important}
body:not(.home-screen) #step2 #startRecognition{position:static;min-height:44px!important;margin-top:10px}
body:not(.home-screen) #step2 .processing-card{margin:10px 0!important;padding:12px 0!important;border-top:1px solid var(--compact-line)!important;background:transparent!important}
body:not(.home-screen) #step2 .processing-card h2{font-size:14px!important}
body:not(.home-screen) #step2 .processing-card p{display:none}
body:not(.home-screen) #step2 .spinner{width:30px!important;height:30px!important;border-width:3px!important}

/* Analysis: amount first, then dense summaries, compliance, and invoice rows. */
body:not(.home-screen) #step3{display:flex;flex-direction:column;gap:0!important}
body:not(.home-screen) #step3.hidden{display:none!important}
body:not(.home-screen) #step3 .amount-comparison{order:1;margin:0!important;padding:0 0 8px!important;border-bottom:1px solid var(--compact-line)!important}
body:not(.home-screen) #step3 .amount-comparison .section-title{margin:0 0 4px!important}
body:not(.home-screen) #step3 .amount-comparison .section-title h2{font-size:14px!important}
body:not(.home-screen) #step3 .analysis-amount-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));border:0!important;border-radius:0!important}
body:not(.home-screen) #step3 .analysis-amount-grid>div{padding:7px 8px!important;border-right:1px solid var(--compact-line)!important}
body:not(.home-screen) #step3 .analysis-amount-grid>div:last-child{border-right:0!important}
body:not(.home-screen) #step3 .analysis-amount-grid span{font-size:11.5px!important;color:var(--compact-muted)!important}
body:not(.home-screen) #step3 .analysis-amount-grid strong{font-size:17px!important;font-weight:700!important;color:var(--compact-ink)!important}
body:not(.home-screen) #step3 .analysis-amount-note{margin:5px 0 0!important;font-size:11.5px!important;line-height:1.35!important}
body:not(.home-screen) #step3>.result-section:nth-of-type(1){order:2}
body:not(.home-screen) #step3>.result-section:nth-of-type(2){order:3}
body:not(.home-screen) #step3>section.card:not(.result-section){order:4}
body:not(.home-screen) #step3 #analysisActions{order:5}
body:not(.home-screen) #step3 .result-section,
body:not(.home-screen) #step3>.card{margin:0!important;padding:8px 0!important;border-bottom:1px solid var(--compact-line)!important}
body:not(.home-screen) #step3 .section-title{margin:0 0 4px!important}
body:not(.home-screen) #step3 .section-title h2{font-size:14px!important;line-height:1.3!important}
body:not(.home-screen) #step3 .summary-grid{display:grid!important;grid-template-columns:1fr!important;gap:0!important;margin:0!important;border:0!important}
body:not(.home-screen) #step3 .metric-card{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:4px 12px!important;min-height:37px;padding:7px 2px!important;border:0!important;border-bottom:1px solid var(--compact-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body:not(.home-screen) #step3 .metric-card:last-child{border-bottom:0!important}
body:not(.home-screen) #step3 .metric-card span{font-size:12px!important;color:var(--compact-ink)!important}
body:not(.home-screen) #step3 .metric-card strong{font-size:13px!important;font-weight:700!important}
body:not(.home-screen) #step3 .metric-card small{grid-column:1/-1;font-size:11px!important;color:var(--compact-muted)!important}
body:not(.home-screen) #step3 .risk-list{display:grid!important;gap:5px!important}
body:not(.home-screen) #step3 .risk-item{padding:8px 9px!important;border:0!important;border-left:3px solid var(--compact-warning)!important;border-radius:4px!important;background:#fff8ea!important;box-shadow:none!important}
body:not(.home-screen) #step3 .risk-item.high{border-left-color:var(--compact-red)!important;background:#fff2f2!important}
body:not(.home-screen) #step3 .risk-item h3{font-size:12.5px!important}
body:not(.home-screen) #step3 .risk-item p{font-size:11.5px!important;line-height:1.45!important;color:#656168!important}
body:not(.home-screen) #step3 .empty-state{min-height:36px!important;padding:8px!important;border:0!important;border-radius:4px!important;background:#eef8f3!important;font-size:12px!important}
body:not(.home-screen) #step3 .invoice-list{gap:0!important;border-top:1px solid var(--compact-line)!important}
body:not(.home-screen) #step3 .invoice-compact-row{min-height:50px;border:0!important;border-bottom:1px solid var(--compact-line)!important;border-radius:0!important}
body:not(.home-screen) #step3 .invoice-compact-open{min-height:49px!important;padding:7px 38px 7px 2px!important}
body:not(.home-screen) #step3 .invoice-compact-open strong{font-size:12.5px!important;font-weight:650!important}
body:not(.home-screen) #step3 .invoice-compact-open :is(time,span){font-size:11px!important}
body:not(.home-screen) #step3 .invoice-compact-delete{right:0!important;padding:6px!important;font-size:11px!important}

/* Risk handling keeps the flagged items visible while explaining. */
body:not(.home-screen) #step4 .risk-review-summary{display:grid;gap:0;margin-bottom:8px;border-bottom:1px solid var(--compact-line)}
body:not(.home-screen) #step4 .risk-review-summary:empty{display:none!important}
body:not(.home-screen) #step4 .risk-review-count{display:flex;justify-content:space-between;gap:12px;padding:7px 0;color:var(--compact-warning)}
body:not(.home-screen) #step4 .risk-review-count strong{font-size:13.5px}
body:not(.home-screen) #step4 .risk-review-count span{font-size:11px;color:var(--compact-muted)}
body:not(.home-screen) #step4 .risk-review-row{display:grid;grid-template-columns:23px minmax(0,1fr);gap:8px;padding:8px 0;border-top:1px solid var(--compact-line)}
body:not(.home-screen) #step4 .risk-review-row>b{display:grid;place-items:center;width:21px;height:21px;border-radius:50%;background:var(--compact-soft);color:var(--compact-red);font-size:11px}
body:not(.home-screen) #step4 .risk-review-row strong{font-size:12.5px}
body:not(.home-screen) #step4 .risk-review-row p{margin:2px 0 0;font-size:11.5px;line-height:1.4;color:var(--compact-muted)}
body:not(.home-screen) #step4 .decision-card{display:flex!important;flex-direction:column-reverse;gap:0!important;max-width:none!important;margin:0!important;padding:0!important}
body:not(.home-screen) #step4 .decision-option{display:grid!important;gap:7px!important;padding:9px 0!important;border:0!important;border-radius:0!important;background:transparent!important}
body:not(.home-screen) #step4 .decision-option+.decision-option{border:0!important;border-bottom:1px solid var(--compact-line)!important}
body:not(.home-screen) #step4 .decision-option h2{font-size:14px!important}
body:not(.home-screen) #step4 .decision-option p{display:none!important}
body:not(.home-screen) #step4 textarea{min-height:88px!important}
body:not(.home-screen) #step4 .decision-option .button{min-height:44px!important}

/* Workflow becomes a compact summary plus a vertical route. */
body:not(.home-screen) #step5 .workflow-grid{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
body:not(.home-screen) #step5 .workflow-grid>section{padding:0!important;border:0!important}
body:not(.home-screen) #step5 .section-title{margin:0 0 4px!important}
body:not(.home-screen) #step5 .section-title h2{font-size:14px!important}
body:not(.home-screen) #step5 .workflow-summary{gap:0!important;border:1px solid var(--compact-line);border-radius:6px;padding:2px 10px}
body:not(.home-screen) #step5 .summary-line{min-height:34px;padding:6px 0!important;font-size:13px!important;line-height:1.5!important;align-items:center!important;gap:12px!important}
body:not(.home-screen) #step5 .summary-line span{color:var(--compact-muted)!important}
body:not(.home-screen) #step5 .summary-line strong{min-width:0;max-width:72%;text-align:right;overflow-wrap:anywhere}
body:not(.home-screen) #step5 .workflow-note{display:block!important;padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;font-size:13px!important}
body:not(.home-screen) #step5 .workflow-note summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;min-height:40px;list-style:none;cursor:pointer}
body:not(.home-screen) #step5 .workflow-note summary::-webkit-details-marker{display:none}
body:not(.home-screen) #step5 .workflow-note summary:focus-visible{outline:2px solid var(--compact-red);outline-offset:2px;border-radius:3px}
body:not(.home-screen) #step5 .workflow-note summary span{font-size:13px!important;line-height:1.5!important}
body:not(.home-screen) #step5 .workflow-note-preview{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--compact-muted)!important}
body:not(.home-screen) #step5 .workflow-note-toggle{color:var(--compact-red)!important;white-space:nowrap}
body:not(.home-screen) #step5 .workflow-note-toggle span{color:inherit!important}
body:not(.home-screen) #step5 .workflow-note-collapse{display:none}
body:not(.home-screen) #step5 .workflow-note[open] .workflow-note-expand{display:none}
body:not(.home-screen) #step5 .workflow-note[open] .workflow-note-collapse{display:inline}
body:not(.home-screen) #step5 .workflow-note pre{margin:0!important;padding:8px 0!important;border-top:1px solid var(--compact-line);font-size:13px!important;font-weight:400!important;line-height:1.6!important;overflow-wrap:anywhere;white-space:pre-wrap}
body:not(.home-screen) #step5 .workflow-route-intro,
body:not(.home-screen) #step5 #workflowActionHint{display:none!important}
body:not(.home-screen) #step5 #workflowActionHint.workflow-blocked-notice{display:block!important;margin:8px 0 0;padding:8px 10px;border:1px solid #e0c5c7;border-radius:6px;background:#fff4f4;color:#8f3034;font-size:13px;line-height:1.5;overflow-wrap:anywhere}
body:not(.home-screen) #step5 .workflow-nodes{display:grid!important;grid-template-columns:1fr!important;gap:0!important;margin:0 0 8px!important}
body:not(.home-screen) #step5 .workflow-node{
  grid-column:1 / -1!important;
  grid-row:auto!important;
  align-items:center!important;
  position:relative;
  display:grid!important;
  grid-template-columns:24px minmax(0,1fr) auto!important;
  grid-template-rows:auto!important;
  align-content:center!important;
  gap:6px!important;
  min-height:44px!important;
  padding:1px 0!important;
  border:0!important;
  border-bottom:1px solid var(--compact-line)!important;
  border-radius:0!important;
  background:transparent!important;
}
body:not(.home-screen) #step5 .workflow-node:after{display:none!important}
body:not(.home-screen) #step5 .node-index{width:24px!important;min-width:24px!important;height:24px!important;border:1px solid var(--compact-line)!important;border-radius:50%!important;background:#fff!important;color:var(--compact-muted)!important;font-size:13px!important;font-weight:600!important;box-shadow:none!important}
body:not(.home-screen) #step5 .workflow-person-input{height:40px!important;min-height:40px!important;padding:6px 8px!important;border-radius:6px!important;box-shadow:none!important;font-size:13px!important;font-weight:500!important;text-align:left!important}
body:not(.home-screen) #step5 .workflow-person-input:focus{border-color:var(--compact-red)!important;box-shadow:0 0 0 2px rgba(179,31,42,.08)!important}
body:not(.home-screen) #step5 .workflow-node-body{grid-column:2!important;grid-row:1!important;min-width:0!important}
body:not(.home-screen) #step5 .workflow-person-field{padding:0!important}
body:not(.home-screen) #step5 .workflow-node-actions{grid-column:3!important;grid-row:1!important;display:flex!important;justify-self:end!important;gap:4px!important;margin:0!important;padding:0!important}
body:not(.home-screen) #step5 .workflow-node-actions button{display:grid!important;place-items:center!important;width:40px!important;min-width:40px!important;height:40px!important;min-height:40px!important;padding:0!important;border:1px solid var(--compact-line)!important;border-radius:6px!important;background:#fff!important;color:var(--compact-muted)!important;font-size:13px!important;line-height:1!important;box-shadow:none!important}
body:not(.home-screen) #step5 .workflow-node-actions button.remove{border-color:#e7c9cc!important;color:var(--compact-red)!important}
body:not(.home-screen) #step5 .workflow-node-actions button:focus-visible{outline:2px solid var(--compact-red);outline-offset:1px}
body:not(.home-screen) #step5 .workflow-node-actions button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
body:not(.home-screen) #step5 .workflow-node-controls{display:flex!important;gap:6px!important;margin:8px 0!important;flex-wrap:wrap}
body:not(.home-screen) #step5 .workflow-node-controls .button{width:auto!important;min-height:40px!important;padding:6px 10px!important;border:1px solid var(--compact-line)!important;border-radius:6px!important;background:#fff!important;color:var(--compact-ink)!important;font-size:13px!important;font-weight:600!important;white-space:nowrap;box-shadow:none!important}
body:not(.home-screen) #step5 .workflow-node-controls .button:hover{transform:none!important}
body:not(.home-screen) #step5 #launchWorkflow{min-height:44px!important}

/* Document workspace: tabs and rows instead of cards. */
body:not(.home-screen) #documentsView .document-tabs{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-bottom:1px solid var(--compact-line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
body:not(.home-screen) #documentsView .document-tabs button{
  position:relative;
  display:flex!important;
  justify-content:center!important;
  align-items:center!important;
  gap:3px!important;
  min-width:0!important;
  min-height:42px!important;
  padding:0 2px!important;
  border:0!important;
  border-bottom:2px solid transparent!important;
  border-radius:0!important;
  background:transparent!important;
  color:#60636b!important;
  font-size:12px!important;
  font-weight:650!important;
  box-shadow:none!important;
}
body:not(.home-screen) #documentsView .document-tabs button.active{color:var(--compact-red)!important;border-bottom-color:var(--compact-red)!important}
body:not(.home-screen) #documentsView .document-tabs button small{display:inline!important;min-width:0!important;height:auto!important;margin:0!important;padding:0!important;border-radius:0!important;background:transparent!important;color:inherit!important;font-size:10px!important}
body:not(.home-screen) #documentsView .claim-export-toolbar{display:grid!important;gap:6px!important;padding:8px 0!important;border-bottom:1px solid var(--compact-line)!important}
body:not(.home-screen) #documentsView .claim-export-toolbar.hidden{display:none!important}
body:not(.home-screen) #documentsView .claim-export-scope{margin:0!important}
body:not(.home-screen) #documentsView .claim-export-scope label{display:flex!important;gap:8px!important;font-size:11.5px!important}
body:not(.home-screen) #documentsView .claim-export-scope select{min-height:34px!important;font-size:11.5px!important}
body:not(.home-screen) #documentsView .claim-export-controls{display:flex!important;flex-wrap:wrap!important;gap:8px!important;min-width:0}
body:not(.home-screen) #documentsView .claim-export-controls label,
body:not(.home-screen) #documentsView .claim-export-controls span{font-size:11.5px!important;white-space:nowrap}
body:not(.home-screen) #documentsView #clearClaimExportSelection{display:none}
body:not(.home-screen) #documentsView #exportCompletedClaims{margin-left:auto!important;min-height:36px!important;padding:6px 10px!important;font-size:11.5px!important}
body:not(.home-screen) #documentsView #claimExportHint{display:none!important}
body:not(.home-screen) #documentsView .claim-document-column-head{padding:8px 2px!important;font-size:11px!important}
body:not(.home-screen) #documentsView .document-claim-list{gap:0!important}
body:not(.home-screen) #documentsView .document-claim-card{border:0!important;border-bottom:1px solid var(--compact-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body:not(.home-screen) #documentsView .compact-document-row:has(>.document-delete){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;column-gap:8px}
body:not(.home-screen) #documentsView .compact-document-row:has(>.document-delete) .document-claim-open{min-width:0;width:100%}
body:not(.home-screen) #documentsView .compact-document-row .document-delete{
  position:static;
  inset:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  justify-self:end;
  width:auto;
  min-width:48px;
  min-height:40px;
  padding:6px 10px;
  border:1px solid #d9b9bb;
  border-radius:6px;
  background:#fff;
  color:var(--compact-red);
  font-size:13px;
  line-height:1.2;
  white-space:nowrap;
  transform:none;
}
body:not(.home-screen) #documentsView .compact-document-row .document-claim-open{min-height:58px!important;padding:9px 2px!important}
body:not(.home-screen) #documentsView .compact-document-row .document-claim-open strong{font-size:13px!important;font-weight:650!important}
body:not(.home-screen) #documentsView .compact-document-row .document-claim-open b{font-size:13px!important;color:var(--compact-ink)!important}
body:not(.home-screen) #documentsView .compact-document-row .document-claim-open :is(time,span){font-size:11px!important;color:var(--compact-muted)!important}
body:not(.home-screen) #documentsView .document-flow-state.ready{color:var(--compact-success)!important}
body:not(.home-screen) #documentsView .document-flow-state.risk{color:var(--compact-red)!important}
body:not(.home-screen) #documentsView .pending-toolbar{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:10px!important;margin:8px 0 0!important;padding:8px 0!important;border:0!important;border-bottom:1px solid var(--compact-line)!important;border-radius:0!important;background:transparent!important}
body:not(.home-screen) #documentsView .pending-toolbar small{display:none!important}
body:not(.home-screen) #documentsView .pending-toolbar>div{min-width:0;flex:1}
body:not(.home-screen) #documentsView .pending-toolbar strong{font-size:13px!important;white-space:nowrap}
body:not(.home-screen) #documentsView .pending-toolbar .button{width:auto;flex:0 0 auto;min-height:40px;padding:6px 10px;font-size:13px;white-space:nowrap}
body:not(.home-screen) #documentsView .pending-group-list{gap:0!important}
body:not(.home-screen) #documentsView .compact-pending-group{padding:0!important;border:0!important;border-bottom:1px solid var(--compact-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body:not(.home-screen) #documentsView .pending-group-toggle{min-height:44px;padding:6px 0!important}
body:not(.home-screen) #documentsView .compact-pending-group footer{display:flex;align-items:center;gap:8px;padding:0 0 8px!important}
body:not(.home-screen) #documentsView .pending-group-actions .button{width:auto;flex:0 0 auto;min-height:40px;padding:6px 10px;font-size:13px;white-space:nowrap}
body:not(.home-screen) #documentsView .pending-group-actions .pending-group-delete{margin-left:auto}

/* Shared feature pages: flat grouped rows and narrow utility controls. */
body:not(.home-screen) .admin-feature-view .feature-search-bar,
body:not(.home-screen) .compact-search{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:7px!important;
  margin:0 0 8px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
body:not(.home-screen) .compact-search input{padding-left:11px!important;background:#f4f2f2!important}
body:not(.home-screen) :is(.compact-search,.admin-feature-view .feature-search-bar) input{min-height:40px!important;height:40px!important;padding-top:7px!important;padding-bottom:7px!important;border-radius:6px!important;font-size:13px!important}
body:not(.home-screen) .admin-feature-view .feature-search-bar:has(input+input){grid-template-columns:minmax(0,1fr) minmax(100px,.7fr) auto!important}
body:not(.home-screen) .admin-feature-view .feature-search-bar .button{min-height:40px!important}
body:not(.home-screen) .admin-feature-view .feature-list{display:grid!important;gap:0!important}
body:not(.home-screen) .admin-feature-view .feature-card{
  display:grid!important;
  gap:4px!important;
  min-height:54px;
  padding:9px 2px!important;
  border:0!important;
  border-bottom:1px solid var(--compact-line)!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
body:not(.home-screen) .admin-feature-view .feature-card.hidden{display:none!important}
body:not(.home-screen) .admin-feature-view .feature-card header{gap:8px!important;flex-wrap:wrap}
body:not(.home-screen) .admin-feature-view .feature-card header>div:first-child{min-width:0;overflow-wrap:anywhere}
body:not(.home-screen) .admin-feature-view .feature-card header strong,
body:not(.home-screen) .admin-feature-view .feature-card>strong{font-size:13px!important;font-weight:700!important}
body:not(.home-screen) .admin-feature-view .feature-card :is(small,span){font-size:11px!important;color:var(--compact-muted)!important}
body:not(.home-screen) .admin-feature-view .feature-card-actions{gap:6px!important;flex-wrap:wrap!important;max-width:100%}
body:not(.home-screen) .admin-feature-view .feature-card-actions button,
body:not(.home-screen) .admin-feature-view .copy-title{
  min-height:40px!important;
  padding:6px 9px!important;
  border:1px solid #d9b9bb!important;
  border-radius:6px!important;
  background:#fff!important;
  color:var(--compact-red)!important;
  font-size:13px!important;
  font-weight:700!important;
  white-space:nowrap;
}
body:not(.home-screen) #invoiceTitlesView .invoice-title-card dl{gap:2px!important;margin:0!important}
body:not(.home-screen) #invoiceTitlesView .invoice-title-card dl>div{grid-template-columns:58px minmax(0,1fr)!important;gap:5px!important}
body:not(.home-screen) #invoiceTitlesView .invoice-title-card dt{font-size:10.5px!important;color:var(--compact-muted)!important}
body:not(.home-screen) #invoiceTitlesView .invoice-title-card dd{font-size:11.5px!important;line-height:1.35!important}
body:not(.home-screen) #invoiceTitlesView .copy-title{justify-self:start!important;margin-top:3px}
body:not(.home-screen) .feature-editor-page .feature-admin-card{padding:0!important}
body:not(.home-screen) .feature-editor-page .feature-form-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
body:not(.home-screen) .feature-editor-page .feature-form-grid textarea{grid-column:1/-1!important}
body:not(.home-screen) .feature-editor-page .feature-file-picker{min-height:40px!important;border:1px solid #d8d2d1!important;border-radius:6px!important;background:#fff!important;font-size:12px!important}
body:not(.home-screen) .feature-editor-page .form-hint{display:none!important}

/* Tips use a compact searchable accordion; the document library remains below it. */
body:not(.home-screen) #expenseTipsView .expense-tips-list{grid-template-columns:1fr!important}
body:not(.home-screen) #expenseTipsView .tip-row{min-height:47px!important;padding:0!important}
body:not(.home-screen) #expenseTipsView .tip-row>button{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:46px;padding:0 2px;border:0;background:transparent;color:var(--compact-ink);text-align:left}
body:not(.home-screen) #expenseTipsView .tip-row>button strong{font-size:13.5px}
body:not(.home-screen) #expenseTipsView .tip-row>button span{color:var(--compact-red)!important;font-size:10.5px!important}
body:not(.home-screen) #expenseTipsView .tip-copy{display:none;padding:0 2px 10px}
body:not(.home-screen) #expenseTipsView .tip-row.open .tip-copy{display:block}
body:not(.home-screen) #expenseTipsView .tip-copy :is(p,ol){margin:0;padding-left:20px;color:#555961;font-size:11.5px;line-height:1.65}
body:not(.home-screen) #expenseTipsView .tip-copy p{padding-left:0}
body:not(.home-screen) #expenseTipsView .expense-tip-document-admin{margin-top:10px!important;padding:9px 0!important;border-top:1px solid var(--compact-line)!important}
body:not(.home-screen) #expenseTipsView .expense-tip-library{gap:4px!important;margin-top:10px!important;padding-top:8px;border-top:1px solid var(--compact-line)}
body:not(.home-screen) #expenseTipsView .section-title{margin:0 0 4px!important}
body:not(.home-screen) #expenseTipsView .section-title h2{font-size:14px!important}
body:not(.home-screen) #expenseTipsView .section-title small{display:none!important}
body:not(.home-screen) #expenseTipsView .expense-tip-download{grid-column:auto!important;grid-row:auto!important;justify-self:start!important;min-height:34px!important;padding:6px 9px!important;font-size:11px!important}

/* Policy pool: company, status tabs, and dense policy rows. */
body:not(.home-screen) #riskRulesView .feature-scope-picker{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  min-height:42px;
  margin:0!important;
  padding:0 2px!important;
  border-bottom:1px solid var(--compact-line);
  color:#34363b;
  font-size:12.5px!important;
  font-weight:650!important;
}
body:not(.home-screen) #riskRulesView .feature-scope-picker.hidden{display:none!important}
body:not(.home-screen) #riskRulesView .feature-scope-picker select{width:auto;max-width:65%;min-height:36px;border:0!important;background:transparent!important;text-align:right;font-weight:650}
body:not(.home-screen) #riskRulesView .risk-rule-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));border-bottom:1px solid var(--compact-line)}
body:not(.home-screen) #riskRulesView .risk-rule-tabs button{min-height:42px;padding:0;border:0;border-bottom:2px solid transparent;background:transparent;color:#676a71;font-size:12.5px;font-weight:650}
body:not(.home-screen) #riskRulesView .risk-rule-tabs button.active{border-bottom-color:var(--compact-red);color:var(--compact-red)}
body:not(.home-screen) #riskRulesView .risk-rule-tabs small{font-size:10px;color:inherit}
body:not(.home-screen) #riskRulesView .risk-rule-card{position:relative;min-height:64px!important;padding:9px 2px!important}
body:not(.home-screen) #riskRulesView .risk-rule-card>p{margin:1px 0!important;overflow:hidden;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;font-size:13px!important;line-height:1.45!important;color:#5c6067!important}
body:not(.home-screen) #riskRulesView .risk-rule-meta{display:flex;align-items:center;flex-wrap:wrap;gap:3px 8px!important}
body:not(.home-screen) #riskRulesView .risk-rule-meta span{font-size:12px!important;line-height:1.4}
body:not(.home-screen) #riskRulesView .risk-rule-meta :is(.manual-source,.document-format-status){display:none}
body:not(.home-screen) #riskRulesView .risk-rule-card-footer{align-items:center!important;flex-direction:row!important;flex-wrap:wrap;padding:0!important}
body:not(.home-screen) #riskRulesView .risk-rule-card-footer small{font-size:12px!important}
body:not(.home-screen) #riskRulesView .risk-rule-markdown-link{width:auto;flex:0 0 auto;align-self:center;margin-left:auto;min-height:40px!important;padding:6px 9px!important;border:1px solid #d9b9bb!important;border-radius:6px!important;background:#fff!important;font-size:13px!important;white-space:nowrap}

/* Invoice search and backup actions. */
body:not(.home-screen) #invoiceSearchView .invoice-search-row{min-height:62px!important}
body:not(.home-screen) #invoiceSearchView .invoice-search-row>strong{display:flex;justify-content:space-between;font-size:13px!important}
body:not(.home-screen) #invoiceSearchView .backup-card{display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap;gap:8px!important;margin:8px 0 0!important;padding:9px 0!important;border-top:1px solid var(--compact-line)!important}
body:not(.home-screen) #invoiceSearchView .backup-card>div:first-child{gap:2px!important;min-width:0;flex:1 1 160px;overflow-wrap:anywhere}
body:not(.home-screen) #invoiceSearchView .backup-card small{font-size:10.5px!important}
body:not(.home-screen) #invoiceSearchView .backup-card>div:last-child{gap:5px!important;flex-wrap:wrap;max-width:100%}
body:not(.home-screen) #invoiceSearchView .backup-card .button{min-height:36px!important;padding:6px 9px!important;font-size:11px!important}

/* Travel: text/voice first, history rows below, generated plans as a compact timeline. */
body:not(.home-screen) #tripPlannerView .trip-planner-head p,
body:not(.home-screen) #tripPlannerView .trip-map-status{display:none!important}
body:not(.home-screen) #tripPlannerView .trip-planner-layout{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
body:not(.home-screen) #tripPlannerView .trip-planner-form{padding:0!important;gap:0!important}
body:not(.home-screen) #tripPlannerView .trip-intake{display:grid!important;gap:8px!important}
body:not(.home-screen) #tripPlannerView .trip-intake{padding:0!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body:not(.home-screen) #tripPlannerView .trip-intake-head{display:block!important}
body:not(.home-screen) #tripPlannerView .trip-intake-head>div:first-child{display:none!important}
body:not(.home-screen) #tripPlannerView .trip-intake-mode{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:0!important;border:1px solid #d8d2d1!important;border-radius:6px!important;overflow:hidden}
body:not(.home-screen) #tripPlannerView .trip-intake-mode button{min-height:40px!important;border:0!important;border-radius:0!important;background:#fff!important;color:#4f5259!important;font-size:13px!important;font-weight:650!important}
body:not(.home-screen) #tripPlannerView .trip-intake-mode button+button{border-left:1px solid var(--compact-line)!important}
body:not(.home-screen) #tripPlannerView .trip-intake-mode button.active{background:var(--compact-soft)!important;color:var(--compact-red)!important;box-shadow:inset 0 0 0 1px var(--compact-red)!important}
body:not(.home-screen) #tripPlannerView #tripIntakeText{min-height:116px!important;padding:10px!important;font-size:13px!important;line-height:1.55!important}
body:not(.home-screen) #tripPlannerView .trip-intake-feedback{margin:0!important;padding:7px 9px!important;border-radius:4px!important;font-size:11.5px!important;line-height:1.4!important}
body:not(.home-screen) #tripPlannerView .trip-add-actions{display:block!important}
body:not(.home-screen) #tripPlannerView #generateTripPlan{width:100%!important;min-height:44px!important}
body:not(.home-screen) #tripPlannerView .trip-voice-hold{min-height:110px!important;border:1px solid #d8d2d1!important;border-radius:6px!important;background:#fff!important;color:var(--compact-red)!important;box-shadow:none!important}
body:not(.home-screen) #tripPlannerView .trip-voice-hold strong{font-size:15px!important}
body:not(.home-screen) #tripPlannerView .trip-voice-hold small{font-size:11px!important;color:var(--compact-muted)!important}
body:not(.home-screen) #tripPlannerView .trip-voice-status{margin:4px 0!important;font-size:11px!important}
body:not(.home-screen) #tripPlannerView .trip-side-column{position:static!important;display:flex!important;flex-direction:column!important;gap:8px!important}
body:not(.home-screen) #tripPlannerView .trip-plan-result{order:1!important;gap:7px!important;padding:0!important}
body:not(.home-screen) #tripPlannerView .trip-saved-card{order:2!important;margin:0!important;padding:8px 0 0!important;border-top:1px solid var(--compact-line)!important}
body:not(.home-screen) #tripPlannerView .trip-saved-card .section-title{margin:0!important}
body:not(.home-screen) #tripPlannerView .trip-saved-card h2{font-size:14px!important}
body:not(.home-screen) #tripPlannerView .trip-saved-list{gap:0!important}
body:not(.home-screen) #tripPlannerView .trip-saved-item{display:grid;grid-template-columns:minmax(0,1fr) auto 40px;align-items:center;min-height:52px!important;gap:8px!important;padding:6px 0!important;border:0!important;border-bottom:1px solid var(--compact-line)!important;border-radius:0!important;background:transparent!important}
body:not(.home-screen) #tripPlannerView .trip-saved-item>[data-open-trip]{min-width:0;min-height:40px;width:100%;padding:0;gap:2px;color:var(--compact-ink)}
body:not(.home-screen) #tripPlannerView .trip-saved-item :is(strong,small){display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body:not(.home-screen) #tripPlannerView .trip-saved-item strong{font-size:13px!important}
body:not(.home-screen) #tripPlannerView .trip-saved-item small{font-size:12px!important}
body:not(.home-screen) #tripPlannerView .trip-saved-item>[data-reimburse-trip]{display:inline-flex;align-items:center;justify-content:center;min-width:48px;min-height:40px;width:auto;padding:6px 10px;border:1px solid #d9b9bb;border-radius:6px;background:#fff;color:var(--compact-red);font-size:13px;font-weight:600;line-height:1.2;white-space:nowrap}
body:not(.home-screen) #tripPlannerView .trip-saved-delete{position:static;inset:auto;display:inline-flex;align-items:center;justify-content:center;width:40px!important;min-width:40px;height:40px!important;padding:0;border:1px solid #d9b9bb;border-radius:6px!important;background:#fff!important;color:var(--compact-red)!important;font-size:22px;line-height:1}
body:not(.home-screen) #tripPlannerView .trip-result-head{gap:2px!important;padding-bottom:7px;border-bottom:1px solid var(--compact-line)}
body:not(.home-screen) #tripPlannerView .trip-result-head h2{font-size:16px!important}
body:not(.home-screen) #tripPlannerView .trip-result-head p{display:block!important;font-size:11px!important}
body:not(.home-screen) #tripPlannerView .trip-schedule-risk-summary{gap:4px!important;padding:7px 8px!important;border:0!important;border-radius:4px!important;background:#fff3df!important}
body:not(.home-screen) #tripPlannerView .trip-schedule-risk-summary>div small{display:none!important}
body:not(.home-screen) #tripPlannerView .trip-schedule-risk-summary li{padding:5px!important;border-radius:3px!important}
body:not(.home-screen) #tripPlannerView :is(.trip-plan-state,.trip-result-section-title,.trip-execution,.trip-visit-schedule,.trip-leg-advice){padding:7px 0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
body:not(.home-screen) #tripPlannerView .trip-result-section-title strong{font-size:13px!important}
body:not(.home-screen) #tripPlannerView .trip-segment-timeline{gap:0!important}
body:not(.home-screen) #tripPlannerView :is(.trip-transport-card,.trip-timeline-card,.trip-visit-row,.trip-execution-row){border-radius:4px!important;box-shadow:none!important}
body:not(.home-screen) #tripPlannerView .trip-cost-summary{padding:9px!important;border-radius:5px!important;background:var(--compact-red)!important}
body:not(.home-screen) #tripPlannerView .trip-cost-summary strong{font-size:18px!important}
body:not(.home-screen) #tripPlannerView .trip-result-actions{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
body:not(.home-screen) #tripPlannerView .trip-result-actions :is(a,button){min-height:40px!important;border:1px solid #d9b9bb!important;border-radius:5px!important;background:#fff!important;color:var(--compact-red)!important;font-size:11.5px!important}
body:not(.home-screen) #tripPlannerView .trip-result-actions .trip-pdf-download{background:var(--compact-red)!important;color:#fff!important}

/* Modals inherit the same tighter control language. */
body:not(.home-screen) .modal{padding:12px!important;background:rgba(28,24,25,.45)!important}
body:not(.home-screen) .modal-card{width:min(430px,100%)!important;padding:18px 16px!important;border:1px solid var(--compact-line)!important;border-radius:8px!important;box-shadow:0 18px 48px rgba(40,24,25,.18)!important;text-align:left!important}
body:not(.home-screen) .modal-card h2{margin:4px 0!important;font-size:17px!important}
body:not(.home-screen) .modal-card p{font-size:12px!important;line-height:1.45!important}
body:not(.home-screen) .modal-close{width:38px!important;height:38px!important;border-radius:4px!important}

body:not(.home-screen) :is(.empty-document,.feature-loading){min-height:88px!important;padding:18px 8px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;text-align:center!important}
body:not(.home-screen) .empty-document strong{font-size:13.5px!important}
body:not(.home-screen) .empty-document p{font-size:11.5px!important;line-height:1.45!important}

@media(max-width:620px){
  body:not(.home-screen) #appShell:not(.hidden) .workspace{padding-left:12px!important;padding-right:12px!important}
  body:not(.home-screen) :is(.documents-head,.claim-flow-head){margin-left:-12px!important;margin-right:-12px!important}
  body:not(.home-screen) .feature-editor-page .feature-form-grid{grid-template-columns:1fr!important}
  body:not(.home-screen) .feature-editor-page .feature-form-grid textarea{grid-column:auto!important}
  body:not(.home-screen) .admin-feature-view .feature-search-bar:has(input+input){grid-template-columns:minmax(0,1fr) minmax(0,.7fr) auto!important}
  body:not(.home-screen) #documentsView .claim-document-column-head{display:none!important}
  body:not(.home-screen) #documentsView .compact-document-row .document-claim-open{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    gap:3px 10px!important;
    padding:8px 2px!important;
  }
  body:not(.home-screen) #documentsView .document-claim-open strong{grid-row:1;grid-column:1}
  body:not(.home-screen) #documentsView .document-claim-open b{grid-row:1;grid-column:2}
  body:not(.home-screen) #documentsView .document-claim-open time{grid-row:2;grid-column:1}
  body:not(.home-screen) #documentsView .document-claim-open span{grid-row:3;grid-column:1}
  body:not(.home-screen) #documentsView .document-claim-open .document-flow-state{grid-row:2/4;grid-column:2;text-align:right}
  body:not(.home-screen) #documentsView .compact-document-row.export-selectable{padding-left:26px!important}
  body:not(.home-screen) #documentsView .claim-export-checkbox{padding-left:0!important}
}

@media(min-width:760px){
  body:not(.home-screen) :is(.documents-head,.claim-flow-head){margin-left:0!important;margin-right:0!important;border:1px solid var(--compact-line)!important;border-top:0!important}
  body:not(.home-screen) #appShell:not(.hidden) .workspace{padding-top:10px!important}
  body:not(.home-screen) :is(.claim-flow,.documents-view,.admin-feature-view,.trip-planner-view){padding:0 14px 24px!important;border-left:1px solid var(--compact-line);border-right:1px solid var(--compact-line);background:rgba(255,255,255,.42)}
  body:not(.home-screen) .portal-bottom-nav{left:50%!important;right:auto!important;width:min(920px,100%)!important;border-left:1px solid var(--compact-line)!important;border-right:1px solid var(--compact-line)!important;transform:translateX(-50%)!important}
}

.attachment-thumb{width:52px!important;height:64px!important;flex:0 0 52px;padding:3px!important;border:1px solid #e1dddd!important;border-radius:7px!important;background:#fff!important;overflow:hidden;position:relative;display:block!important;cursor:pointer}
.attachment-thumb img{width:100%;height:100%;object-fit:contain;display:block;font-size:10px}
.attachment-thumb span{position:absolute;bottom:0;left:0;right:0;background:#ffffffeb;color:#763336;font-size:10px;line-height:16px;text-align:center}
body:not(.home-screen) #step3 .invoice-compact-row{display:flex!important;align-items:center;gap:9px;padding:8px 0!important}
body:not(.home-screen) #step3 .invoice-compact-open{flex:1;min-width:0}
body:not(.home-screen) .pending-doc{display:flex!important;align-items:center;gap:9px}
body:not(.home-screen) .pending-doc>div{flex:1;min-width:0}
#invoicePreviewFrame{overflow:auto;max-height:65vh}
#invoicePreviewImage{width:100%;height:auto;object-fit:contain}
body:not(.home-screen) .attachment-thumb{width:28px!important;height:36px!important;flex:0 0 28px!important;padding:1px!important;border-radius:4px!important}
body:not(.home-screen) .attachment-thumb span{display:none}
body:not(.home-screen) #documentsView .pending-doc,body:not(.home-screen) #step3 .invoice-compact-row{min-height:48px!important;padding:5px 0!important;gap:6px!important;border-radius:0!important;border:0!important;border-bottom:1px solid #eee!important;background:transparent!important;margin:0!important}
body:not(.home-screen) #documentsView .pending-doc-list{gap:0!important}
body:not(.home-screen) .pending-inline-detail,body:not(.home-screen) #step3 .invoice-compact-open{display:flex!important;align-items:center!important;gap:6px!important;flex:1!important;min-width:0!important;padding:4px 0!important;border:0!important;background:none!important;color:var(--compact-ink);text-align:left!important;white-space:nowrap!important}
body:not(.home-screen) .pending-inline-detail strong,body:not(.home-screen) #step3 .invoice-compact-open strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px!important}
body:not(.home-screen) .pending-inline-detail b,body:not(.home-screen) #step3 .invoice-compact-open b{font-size:12px!important;white-space:nowrap;flex-shrink:0}
body:not(.home-screen) .pending-inline-detail time,body:not(.home-screen) #step3 .invoice-compact-open time{font-size:11px!important;color:#777;white-space:nowrap}
body:not(.home-screen) #documentsView .pending-doc-state{font-size:10px!important;padding:2px 4px!important;white-space:nowrap;flex-shrink:0}
body:not(.home-screen) #documentsView [data-delete-pending-doc]{width:auto;min-width:48px;min-height:40px;height:auto;padding:6px 8px;font-size:13px;white-space:nowrap;flex-shrink:0}
body:not(.home-screen) #documentsView [data-retry-pending-doc]{width:auto;min-width:40px;min-height:40px;height:auto;padding:6px;font-size:12px;white-space:nowrap;flex-shrink:0}
body:not(.home-screen) #step3 .invoice-compact-delete{width:auto!important;min-width:48px!important;min-height:40px!important;height:auto!important;padding:6px 8px!important;border:1px solid #d9b9bb!important;border-radius:6px!important;font-size:13px!important;background:#fff!important;white-space:nowrap;flex-shrink:0}
body:not(.home-screen) #pendingPickerModal .pending-picker-modal-card{display:flex!important;flex-direction:column!important;height:auto!important;max-height:calc(100dvh - 32px)!important;min-height:0!important;padding:16px!important;border-radius:12px!important;gap:10px!important}
body:not(.home-screen) #pendingPickerModal .pending-picker-modal-card>p{display:none!important}
body:not(.home-screen) #pendingPickerTitle{display:flex;align-items:center;flex:none;min-height:40px;margin:0!important;font-size:16px!important;padding-right:36px}
body:not(.home-screen) #pendingPickerGroupList{flex:0 1 auto!important;min-height:0!important;overflow-y:auto!important;max-height:60dvh;margin:0!important;padding:0!important;gap:0!important}
body:not(.home-screen) #pendingPickerModal .pending-picker-footer{display:flex!important;flex:none!important;align-items:center!important;gap:8px!important;padding-top:10px!important}
body:not(.home-screen) #pendingPickerModal .pending-picker-footer>div{display:flex!important;gap:6px!important;margin-left:auto}
body:not(.home-screen) #pendingPickerModal .pending-picker-footer{flex-wrap:wrap}
body:not(.home-screen) #pendingPickerModal .pending-picker-totals{display:flex;align-items:center;flex-wrap:wrap;gap:4px 10px;font-size:12px;min-width:0}
body:not(.home-screen) #pendingPickerModal .pending-picker-totals strong{font-size:13px;white-space:nowrap}
body:not(.home-screen) #pendingPickerModal .pending-picker-footer .button{width:auto!important;height:40px!important;min-height:40px!important;max-height:40px!important;padding:6px 10px!important;font-size:13px;white-space:nowrap}
body:not(.home-screen) #pendingPickerModal .pending-picker-group{border:0!important;border-bottom:1px solid #eee!important;border-radius:0!important}
body:not(.home-screen) #pendingPickerModal .pending-picker-group-head{min-height:48px!important}
body:not(.home-screen) #pendingPickerModal input[type=checkbox]{width:18px!important;height:18px!important;min-height:18px!important;padding:0!important}
body:not(.home-screen) #pendingPickerModal .pending-picker-group-head label{padding:8px!important}
body:not(.home-screen) #pendingPickerModal .pending-picker-document{display:grid;grid-template-columns:18px minmax(0,1fr);align-items:center;gap:8px;min-height:44px;padding:4px 8px;border:0;border-bottom:1px solid #eee;border-radius:0;background:#fff}
body:not(.home-screen) #pendingPickerModal .pending-picker-document>span{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:8px;min-width:0}
body:not(.home-screen) #pendingPickerModal .pending-picker-document strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500}
body:not(.home-screen) #pendingPickerModal .pending-picker-document b{font-size:13px;white-space:nowrap;font-weight:600}
body:not(.home-screen) #pendingPickerModal .pending-picker-document time{font-size:12px;color:var(--compact-muted);white-space:nowrap}
body:not(.home-screen) #pendingPickerModal .pending-picker-document.disabled{background:#f7f7f7;color:var(--compact-muted)}
body:not(.home-screen) #pendingPickerModal .pending-picker-documents{gap:0}
body:not(.home-screen) #claimFlow{height:auto!important;max-height:none!important;overflow:visible!important;padding-bottom:24px!important}
body:not(.home-screen) #step3 .invoice-compact-open{min-height:36px!important}
/* Short screens must keep the entire dialog reachable. */
body:not(.home-screen) .modal-card{max-height:calc(100dvh - 24px)!important;overflow-y:auto;overscroll-behavior:contain;min-height:0}
body:not(.home-screen) .modal-card h2{padding-right:36px}
body:not(.home-screen) .modal-actions{display:flex!important;gap:8px!important;align-items:center!important}
body:not(.home-screen) .modal-actions .button{flex:1;min-height:40px!important;height:40px!important;padding:6px 10px!important}
body:not(.home-screen) #pendingGroupForm{gap:10px!important}
body:not(.home-screen) #pendingGroupForm>p{display:none!important}
body:not(.home-screen) #pendingGroupNote{min-height:60px!important;height:60px}
body:not(.home-screen) #pendingEntryModal .invoice-entry-card{display:flex!important;align-items:center;justify-content:center;min-height:44px!important;height:44px!important;padding:6px!important;gap:6px!important;border-radius:6px!important}
body:not(.home-screen) #pendingEntryModal .invoice-entry-card>span{width:20px!important;height:20px!important;font-size:13px!important}
body:not(.home-screen) #pendingEntryModal .invoice-entry-card svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.8}
body:not(.home-screen) #pendingEntryModal .invoice-entry-card strong{font-size:13px!important;white-space:nowrap}
body:not(.home-screen) #pendingEntryModal .invoice-entry-card small{display:none!important}
body:not(.home-screen) :is(#riskRulesView,#invoiceTitlesView) .feature-card>header{display:flex!important;align-items:flex-start!important;gap:8px!important;flex-wrap:wrap}
body:not(.home-screen) :is(#riskRulesView,#invoiceTitlesView) .feature-card>header>div:first-child{flex:1 1 150px;min-width:0}
body:not(.home-screen) :is(#riskRulesView,#invoiceTitlesView) .feature-card-actions{display:flex!important;flex:0 1 auto!important;gap:6px!important;flex-wrap:wrap!important;max-width:100%}
body:not(.home-screen) :is(#riskRulesView,#invoiceTitlesView) .feature-card-actions button{width:auto!important;min-width:48px!important;min-height:40px!important;padding:6px 9px!important;white-space:nowrap!important;font-size:13px!important}
body.company-pending .portal-bottom-nav{display:none!important}
@media(prefers-reduced-motion:reduce){body:not(.home-screen) *{scroll-behavior:auto!important;transition:none!important;animation-duration:.01ms!important}}
