/* Gate 3 final owner corrections: retain the original controls and values. */
main:has(.workflow-steps) .stats{background:transparent}
main:has(.workflow-steps) .stat{background:linear-gradient(135deg,#fff,#f8fbfd);border:1px solid #d8e2ec;border-top:3px solid #0862c9;border-radius:12px;color:#0a1d3d;box-shadow:0 3px 7px #092b5014}
main:has(.workflow-steps) .stat span{color:#65758b}
main:has(.workflow-steps) .stat b{color:#0a1d3d}
.progress-state{display:block;font-style:normal;font-size:11px;font-weight:600;line-height:1.25;color:inherit}
.workflow-steps .progress-state{font-size:10px;margin-top:2px}
.stage-circle .current-chevron,.timeline-dot .current-chevron{display:block;width:12px;height:12px;stroke-width:2.5;color:#0862c9}
.assessment-timeline .progress-state{font-size:10px;margin-top:3px;color:#526379}
.assessment-timeline .timeline-dot{font-size:12px;font-weight:700;color:#526379}
.assessment-timeline .complete .timeline-dot{color:white}

@media(max-width:700px){
 main:has(.workflow-steps) .bottom{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px;padding:10px 0;background:#f2f6fa;border-top:1px solid #d8e2ec;z-index:4;bottom:calc(70px + env(safe-area-inset-bottom,0px))}
 main:has(.workflow-steps) .bottom button{width:100%;min-width:0;min-height:56px;height:auto;margin:0;padding:11px 12px;white-space:normal;overflow-wrap:break-word;line-height:1.35;font-size:13px;display:flex;align-items:center;justify-content:center;text-align:center}
 main:has(.workflow-steps) .bottom>button:nth-child(3):last-child{grid-column:1/-1;min-height:46px}
 .workflow-steps button{min-height:98px;gap:6px;justify-content:start}
 .workflow-steps .progress-state{font-size:9px;line-height:1.2;margin:0}
 .assessment-timeline button{min-height:82px}
 .assessment-timeline li:not(:last-child):before{top:44px;bottom:-18px}
 body[data-review-workspace] .workspace-form,body[data-review-workspace] .library-item{border-color:#d8e2ec;border-radius:12px;box-shadow:0 3px 7px #092b500b}
 body[data-review-workspace] .workspace-form label{font-size:13px;line-height:1.4}
 body[data-review-workspace] .workspace-form input,body[data-review-workspace] .workspace-form select,body[data-review-workspace] .workspace-form textarea{font-size:16px;min-height:46px;border:1px solid #c5d4e3;border-radius:8px}
 body[data-review-workspace] .workspace-form button{min-height:46px;white-space:normal;line-height:1.35}
 body[data-review-workspace] main>.actions{gap:8px;align-items:stretch}
 body[data-review-workspace] main>.actions button{min-height:44px;font-size:12px;flex:1 1 42%;padding:10px}
 body[data-review-workspace] .library-item{background:white;padding:14px;margin:12px 0;border:1px solid #d8e2ec;min-width:0;overflow-wrap:anywhere}
}
/* Gate 4: extend the approved desktop dashboard system to the original workspace forms. */
@media(min-width:701px){
 body[data-review-workspace]{--design-header-height:96px;--design-rail-width:76px;--design-ink:#0a1d3d;--design-workspace:#f2f6fa;background:#f2f6fa}
 body[data-review-workspace] #app-header{height:96px;min-height:96px;padding:3px 40px;background:#001d3d;border-bottom:2px solid #41c9f5}
 body[data-review-workspace] #app-header:before{left:37%;top:-28px;bottom:auto;width:660px;height:180px;max-width:63%;opacity:.75;clip-path:inset(0 0 56px 0);background:url('/assets/design/v3/hexagons-sparse.svg') center/contain no-repeat}
 body[data-review-workspace] .brand img{content:url('/assets/design/v3/field-advisor-landing.svg');width:275px;height:83px;object-fit:contain}
 body[data-review-workspace] #desktop-rail{top:96px;width:76px;min-height:calc(100svh - 96px);padding:18px 10px;gap:8px;background:linear-gradient(180deg,#062650,#001d3d)}
 body[data-review-workspace] #desktop-rail button{width:56px;height:48px;min-height:48px;padding:12px;justify-content:center;gap:0;border-radius:8px}
 body[data-review-workspace] #desktop-rail button span{display:none}
 body[data-review-workspace] #desktop-rail .ui-icon{width:25px;height:25px;stroke-width:2}
 body[data-review-workspace] #desktop-rail .selected{background:linear-gradient(180deg,#087bd6,#0862c9);color:white}
 body[data-review-workspace] main{max-width:1280px;margin-left:76px;margin-right:auto;padding:34px 40px 40px;min-height:calc(100svh - 150px)}
 body[data-review-workspace] h1{font-size:26px;line-height:1.2;letter-spacing:-.6px}
 body[data-review-workspace] h2{font-size:20px;line-height:1.25}
 body[data-review-workspace] .card{padding:24px;border:1px solid #d8e2ec;border-radius:12px;background:white;box-shadow:0 3px 10px #092b500c}
 body[data-review-workspace] .field label{font-size:14px;line-height:1.4}
 body[data-review-workspace] input:not([type=checkbox]),body[data-review-workspace] select,body[data-review-workspace] textarea{font-size:16px;min-height:46px;border:1px solid #c5d4e3;border-radius:8px}
 body[data-review-workspace] .actions{gap:10px}
 body[data-review-workspace] .actions button{min-height:44px;line-height:1.35;font-size:14px}
 body[data-review-workspace] .workflow-steps{gap:12px}
 body[data-review-workspace] .workflow-steps button{font-size:13px;min-height:82px;display:grid;grid-template-columns:28px 1fr;gap:4px 12px;padding:14px}
 body[data-review-workspace] .workflow-steps .stage-circle{grid-row:span 2}
 body[data-review-workspace] .workflow-steps .progress-state{font-size:11px}
 body[data-review-workspace] .library-item{background:white;border:1px solid #d8e2ec;border-radius:12px;padding:20px;margin:14px 0;box-shadow:0 3px 10px #092b5008}
 body[data-review-workspace] .bottom button{min-height:48px;white-space:normal;line-height:1.35}
 body[data-review-workspace] footer{margin-left:76px;padding:14px 40px}
}
@media(min-width:701px) and (max-width:1100px){body[data-review-workspace] main{padding-left:28px;padding-right:28px}}
@media(min-width:701px){
 body[data-review-workspace] .header-actions{gap:24px}
 body[data-review-workspace] .header-home{font-size:18px}
 body[data-review-workspace] #menu{width:48px;height:48px;min-height:48px;padding:9px;border:0;background:transparent;box-shadow:none;color:white}
 body[data-review-workspace] #menu .ui-icon{width:30px;height:30px;stroke-width:2}
 body[data-review-workspace] #secondary{top:83px;right:40px;width:312px;padding:7px;border-radius:14px;border:1px solid #d8e2ec;background:white;box-shadow:0 12px 28px #00173938}
 body[data-review-workspace] #secondary .menu-row{height:46px;min-height:46px;padding:9px 14px!important;gap:18px;font:500 18px/1.3 Arial,Helvetica,sans-serif!important}
 body[data-review-workspace] #secondary .menu-row .ui-icon{width:27px;height:27px;stroke-width:2;color:#062650}

 body[data-review-workspace] #desktop-rail .rail-home{margin-top:28px!important}
}
@media(max-width:700px){
 body:not([data-view=home]) #app-header{height:calc(72px + env(safe-area-inset-top,0px));min-height:calc(72px + env(safe-area-inset-top,0px));padding-top:calc(10px + env(safe-area-inset-top,0px))}
 body:not([data-view=home]) main{min-height:calc(100svh - 154px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))}
 body[data-view=more] main{min-height:calc(100svh - 82px - env(safe-area-inset-bottom,0px))}
}
