.app{align-content:start}.portal{width:100%;min-width:0;align-self:start}
.portal input,.portal select,.portal textarea{border:1px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--surface-2);color:var(--ink);font:inherit;box-sizing:border-box}
.portal input:focus-visible,.portal select:focus-visible,.portal textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.portal-nav{display:flex;align-items:center;gap:16px;width:100%;max-width:none;margin:0 auto;padding:20px 28px 0;background:transparent;font-size:14px}.portal-nav[hidden]{display:none}.portal-nav .btn{border:0;background:transparent;padding:8px 0;box-shadow:none}.portal-divider{color:var(--line)}.portal-location{color:var(--muted)}
.portal-nav button{white-space:nowrap;flex-shrink:0}.portal-nav button[aria-current=page]{background:var(--accent);color:white;border-color:var(--accent)}
.portal-nav button[aria-disabled=true]{color:var(--muted)}
.portal{margin:0 auto;}.portal h2{margin:0}.portal h3{margin:0 0 10px;font-size:17px}.portal p{line-height:1.55}.portal .muted{color:var(--muted)}
.portal-head,.portal-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.portal-head{justify-content:space-between;}.portal-head p{margin:8px 0 0;color:var(--muted)}
.portal-card{background:var(--surface);border:1px solid var(--line);margin-bottom:16px;}
.portal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.portal-grid .wide{grid-column:1/-1}
.portal label{display:grid;gap:7px;font-size:13px;font-weight:650}.portal input,.portal select,.portal textarea{width:100%;min-height:44px}.portal textarea{min-height:90px}.portal form .portal-actions{margin-top:20px}
.portal-check{display:flex!important;align-items:center;gap:10px!important;font-weight:400!important}.portal-check input{width:20px;min-height:20px}
.portal-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:10px}.portal-day{min-height:180px;}.portal-day h3{font-size:13px;color:var(--muted)}.portal-day.today{border-color:var(--accent)}
.portal-job{overflow-wrap:anywhere}.portal-job p{margin:7px 0;}.portal-job .btn{padding:7px;min-height:34px;width:100%;margin-top:6px}
.portal-table-wrap{overflow:auto}.portal table{width:100%;border-collapse:collapse;font-size:13px}.portal th,.portal td{text-align:left;padding:13px 12px;border-bottom:1px solid var(--line);vertical-align:top}.portal th{color:var(--muted);font-weight:650}.portal td .btn{min-height:34px;padding:7px 10px;font-size:12px}
.portal-empty{padding:32px;text-align:center;color:var(--muted)}.portal-error{color:var(--danger);padding:14px;border:1px solid var(--danger);border-radius:12px;margin-bottom:18px}.portal-badge{display:inline-block;font-size:11px;padding:4px 8px;border-radius:20px;background:var(--accent-soft);color:var(--accent)}
.portal-success{padding:14px;border:1px solid var(--line);background:var(--accent-soft);color:var(--ink);border-radius:12px;margin-bottom:18px}
.portal .portal-delete{color:var(--danger);border-color:var(--danger);background:transparent}
.portal-job-title{display:block;width:100%;padding:0;border:0;background:transparent;text-align:left;font-weight:750;text-underline-offset:3px;overflow-wrap:anywhere}.portal-detail p{white-space:pre-wrap;overflow-wrap:anywhere;margin:6px 0 24px}.portal-detail p:last-child{margin-bottom:0}.portal-detail h3{color:var(--muted);font-size:14px}
.portal fieldset{border:1px solid var(--line);border-radius:12px;padding:16px}.portal legend{font-weight:650;padding:0 6px}.portal a{color:var(--accent)}.portal output{font-size:18px;font-weight:700;color:var(--accent)}
body.portal-active .main,body.portal-active #btn-new,body.portal-active #btn-new-fab,body.portal-active #totalbar{display:none!important}
body.portal-employee #btn-new,body.portal-employee #btn-new-fab{display:none!important}
@media(max-width:1050px){.portal-week{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:620px){.portal{padding:20px 14px 80px}.portal-nav{padding:12px 14px}.portal-grid,.portal-week{grid-template-columns:1fr}.portal-card{padding:17px}.portal-day{min-height:100px}.portal-head h2{font-size:23px}.portal th,.portal td{padding:10px 8px}.topbar .brand small{max-width:170px}}
@media print{body>*{display:none!important}body>#portal-print{display:block!important;color:#111;background:white;padding:15mm;font:12px Arial}#portal-print h1{font-size:22px}#portal-print h2{font-size:16px;margin-top:25px}#portal-print p{white-space:pre-wrap;line-height:1.6}#portal-print .print-row{break-inside:avoid;border-bottom:1px solid #ddd;padding:10px 0}#portal-print .print-row strong{display:block;margin-bottom:5px}}

/* A quiet work surface, with navigation concentrated on the home screen. */
.auth-remember{display:flex;align-items:center;gap:10px;margin:4px 0 18px;font-size:14px;color:var(--muted);cursor:pointer}.auth-remember input{width:18px;height:18px;margin:0;accent-color:var(--accent);flex-shrink:0}
body{font-size:16px}.app{grid-template-rows:auto auto 1fr}
.topbar{padding:16px 28px;box-shadow:none;background:var(--surface);border-bottom:1px solid var(--line)}
.topbar .brand h1{font-size:18px;letter-spacing:-.03em}.topbar .brand small{font-size:12px}.topbar-right{gap:8px}
.portal{max-width:none;padding:32px 28px 64px}.portal-head{margin-bottom:28px}.portal h2{font-size:30px;letter-spacing:-.045em;font-weight:750}.portal-head p{font-size:14px;margin-top:6px}.portal-card{border-radius:16px;box-shadow:none;padding:24px}.portal .btn{border-radius:10px;font-size:14px}.portal label,.portal table{font-size:14px}.portal-job .btn{font-size:13px}.portal .btn-primary{color:var(--accent-ink)}
@media(min-width:900px){body.portal-active .topbar .sync{display:none}}
@media(max-width:700px){.portal{padding:24px 18px 48px}.portal-nav{padding:16px 18px 0}.topbar{padding:14px 18px}.topbar .brand small,.topbar .sync{display:none}.portal h2{font-size:27px}.portal-card{padding:20px}}

/* Actions open over their area; the menu and area remain in place. */
body.portal-popup-open{overflow:hidden}
#portal-popup{width:calc(100vw - 64px);max-width:1320px;max-height:calc(100dvh - 64px);padding:0;border:1px solid var(--line);border-radius:22px;background:var(--bg);color:var(--ink);box-shadow:0 24px 100px rgba(0,0,0,.25);overflow:auto;overscroll-behavior:contain}
#portal-popup::backdrop{background:rgba(13,16,29,.5);backdrop-filter:blur(5px)}
.portal-popup-bar{position:sticky;top:0;z-index:2;display:flex;justify-content:flex-end;gap:8px;padding:12px 20px;background:var(--surface);border-bottom:1px solid var(--line)}
.portal-popup-bar .btn{background:transparent;font-size:14px}.portal-popup-content{padding:24px 28px 32px!important}.portal-popup-content .portal-head h2{font-size:25px}.portal-popup-content .portal-card:last-child{margin-bottom:0}#portal-popup>.portal-error,#portal-popup>.portal-success{margin:20px 28px 0}
@media(max-width:700px){#portal-popup{width:calc(100vw - 20px);max-height:calc(100dvh - 24px);border-radius:18px}.portal-popup-content{padding:20px 16px 28px!important}.portal-popup-content .portal-head h2{font-size:22px}.portal-popup-content .portal-grid{grid-template-columns:1fr}.portal-popup-bar{padding:8px 12px}}
body:not(.portal-active).view-editor{overflow:hidden}
@media(max-width:919px){body.view-editor .panel-editor{position:fixed;inset:0;z-index:30;background:rgba(13,16,29,.5);backdrop-filter:blur(5px);padding:12px 10px;overflow:auto;overscroll-behavior:contain}body.view-editor .panel-editor .editor,body.view-editor .panel-editor .detail{width:100%;max-width:none;background:var(--bg);border-radius:18px;padding:20px 16px 130px;box-shadow:0 20px 80px rgba(0,0,0,.2)}.totalbar{z-index:35}}
.portal-hours-summary{display:flex;justify-content:space-between;align-items:center;gap:24px;padding-bottom:24px;border-bottom:1px solid var(--line)}
.portal-hours-metric{display:grid;gap:6px}.portal-eyebrow{font-size:13px;font-weight:650;color:var(--muted)}.portal-hours-metric h3{font-size:32px;font-weight:750;letter-spacing:-.04em;margin:0;line-height:1.3}.portal-hours-metric>.muted{font-size:13px}.portal-hours-card>.portal-empty{padding:40px 16px;margin:0;font-size:14px}.portal-hours-summary>.portal-actions{justify-content:flex-end}
.portal-day{background:var(--surface-2);border:0;padding:12px;border-radius:16px}.portal-day>h3{font-weight:700;font-size:13px;margin:2px 0 14px}.portal-day.today{box-shadow:inset 0 0 0 1px var(--accent)}
.portal-job{background:var(--surface);padding:16px;border:1px solid var(--line);border-radius:13px;margin:10px 0;box-shadow:0 2px 5px rgba(15,23,32,.025)}
.portal-job .portal-badge{font-size:11px;padding:4px 7px}.portal-job-title{color:var(--ink);text-decoration:none;font-size:16px;line-height:1.4}.portal-job-title:hover{color:var(--accent)}.portal-job p{font-size:13px;line-height:1.55}@media(min-width:1051px) and (max-width:1799px){.portal-week{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:700px){.portal-hours-summary{flex-direction:column;align-items:flex-start;gap:18px}.portal-hours-summary>.portal-actions{justify-content:flex-start}.portal-hours-metric h3{font-size:28px}}
@media print{#portal-popup{display:none!important}#portal-popup::backdrop{display:none!important;background:transparent;backdrop-filter:none}}

@media(min-width:920px){.main{grid-template-columns:minmax(0,1fr);justify-content:stretch;padding:24px 28px}.panel-list{padding:0}.editor,.detail,body.view-editor .panel-editor .editor,body.view-editor .panel-editor .detail{max-width:none}}
@media(min-width:1800px){.portal-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}


.portal-brand-grid,.portal-product-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr));gap:16px;margin-top:20px;margin-bottom:20px}.portal-brand-card,.portal-product-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;text-align:left;padding:28px;border:1px solid transparent;border-radius:10px;background:var(--surface);box-shadow:0 2px 14px rgba(20,28,48,.055);color:var(--ink);font:inherit;cursor:pointer;transition:background .18s,box-shadow .18s;min-width:0;overflow-wrap:anywhere}.portal-brand-card:hover,.portal-product-card:hover{background:var(--surface-2);box-shadow:0 5px 20px rgba(20,28,48,.09)}.portal-brand-card:focus-visible,.portal-product-card:focus-visible{outline:2px solid var(--accent);outline-offset:3px}.portal-brand-card>strong{font-size:18px;letter-spacing:-.02em}.portal-brand-card>span,.portal-product-card>span{font-size:13px;color:var(--muted)}.portal-brand-card .portal-brand-hint{color:var(--accent);margin-top:6px;font-weight:600}.portal-product-card .portal-product-price{margin-top:auto;padding-top:12px;color:var(--accent);font-size:21px}@media(prefers-reduced-motion:reduce){.portal-brand-card,.portal-product-card{transition:none}}

.portal-brand-logo{display:flex;align-items:center;justify-content:flex-start;min-height:96px;width:100%;padding:8px 0 20px;border-radius:0;background:transparent}.portal-brand-logo img{max-width:100%;object-fit:contain}.portal-brand-logo strong{color:var(--ink);font-size:24px}
.portal-password-form{max-width:680px;margin-inline:auto}.portal-password-form .portal-grid{grid-template-columns:1fr}.portal-password-form .portal-actions{margin-top:20px}.portal-password-form input{min-width:0;width:100%}
@media screen and (max-width:1100px){
 .portal .portal-table-wrap{overflow:visible;min-width:0;border:0;border-radius:0}
 
 
 .portal .portal-table-wrap table,.portal .portal-table-wrap tbody{display:block;width:100%;min-width:0}
 .portal .portal-table-wrap thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
 .portal .portal-table-wrap tr{display:grid;gap:12px;margin:12px 0;padding:16px;border:1px solid var(--line);border-radius:14px;min-width:0}
 .portal .portal-table-wrap td{display:block;border:0;padding:0;min-width:0;overflow-wrap:anywhere;font-size:14px}
 .portal .portal-table-wrap td::before{content:attr(data-label);display:block;margin-bottom:4px;color:var(--muted);font-size:12px;font-weight:650}
 .portal .portal-table-wrap td[data-label="Ações"]::before{display:none}
 .portal .portal-table-wrap td .portal-actions{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
 .portal .portal-table-wrap td .btn{flex:1 1 110px;min-height:42px;white-space:normal;font-size:14px}
 .portal .portal-hours-summary{min-width:0;gap:16px}
 .portal .portal-hours-summary .portal-actions{flex-wrap:wrap}
 .report-suggestions select{max-width:100%;min-width:0;width:100%}
}

html.lbl-pull-enabled,html.lbl-pull-enabled body{overscroll-behavior-y:contain}

.session-loading{position:fixed;inset:0;z-index:1100;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:20px;background:var(--bg,#f3f4f8);color:var(--muted,#687585);font:500 14px/1.5 Arial,sans-serif}.session-loading img{width:80px;height:80px;object-fit:contain}.session-loading[hidden]{display:none!important}

:root[data-theme="light"]{color-scheme:only light}:root[data-theme="dark"]{color-scheme:only dark}

.day-services{display:grid;gap:16px;margin:16px 0}.day-service{min-width:0;margin:0;padding:16px;border:1px solid var(--border,#dce1eb);border-radius:14px}.day-service legend{padding:0 6px;font-weight:700}.day-service>.btn{margin-top:12px}.day-services>.btn{justify-self:start}
@media screen{.lbl-pull-hint{position:fixed;top:env(safe-area-inset-top,0px);left:50%;z-index:1000;display:flex;align-items:center;justify-content:center;gap:8px;min-width:40px;height:40px;padding:0 11px;border-radius:20px;background:var(--surface);color:var(--ink);box-shadow:0 3px 14px #14203033,0 0 0 1px var(--line);font:600 13px/1 Arial,sans-serif;pointer-events:none;white-space:nowrap;transform:translate(-50%,var(--pull-offset,-60px));will-change:transform}.lbl-pull-hint[hidden]{display:none}.lbl-pull-hint:before{content:'';width:18px;height:18px;box-sizing:border-box;border:2.5px solid var(--line);border-top-color:var(--accent);border-right-color:var(--accent);border-radius:50%;transform:rotate(var(--pull-turn,0deg));flex:none;opacity:.55;transition:opacity .15s}.lbl-pull-hint.is-ready:before{opacity:1}.lbl-pull-hint.is-returning,.lbl-pull-hint.is-refreshing,.lbl-pull-hint.is-complete{transition:transform .22s cubic-bezier(.2,.8,.2,1)}.lbl-pull-hint.is-refreshing:before{opacity:1;animation:lbl-refresh-turn .7s linear infinite}.lbl-pull-hint.is-complete{color:var(--accent)}.lbl-pull-hint.is-complete:before{width:auto;height:auto;border:0;content:'\2713';opacity:1;transform:none;font-size:15px}.lbl-pull-label:empty{display:none}@keyframes lbl-refresh-turn{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.lbl-pull-hint{transition:none!important}.lbl-pull-hint.is-refreshing:before{animation:none}}}



/* Shared visual system across the portal, quotes and authentication. */
@media screen {
:root{--surface-2:#f1f3f6;--surface-3:#e7eaf0;}
:root[data-theme="dark"]{--bg:#11151d;--surface:#191f29;--surface-2:#222a36;--surface-3:#303a49;--line:#303947;--ink:#edf0f5;--muted:#a4afc0;--accent:#b29ae9;--accent-hover:#c4b0f0;--accent-ink:#1e1535;--accent-soft:#302644;--shadow-sm:0 2px 12px rgba(0,0,0,.1)}
body{font-size:15px;line-height:1.5}
h1,h2,h3,.display{font-weight:650;letter-spacing:-.025em}
.topbar .brand h1{font-weight:700;}
.btn,.portal .btn{padding:10px 15px;}.btn-primary:hover{background:var(--accent-hover)}
.btn-icon{padding:0;min-width:40px}.btn:active{transform:none}.portal-nav{padding-top:16px;gap:12px}
.portal-head{gap:20px;}.portal-head p{max-width:70ch}.portal-actions{gap:8px}
.portal input,.portal select,.portal textarea,.f input,.f select,.f textarea{border:1px solid var(--line);padding:11px 12px;font-size:14px;box-shadow:none}
.portal input:focus-visible,.portal select:focus-visible,.portal textarea:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.portal label input,.portal label select,.portal label textarea{color:var(--ink);font-weight:400}
.portal-grid{gap:20px 24px}.portal fieldset{margin-top:24px;border-color:var(--line);padding:18px}.portal-check{padding:5px 0;color:var(--ink)!important}.portal-check input{min-height:18px;accent-color:var(--accent)}
.portal form>.portal-actions{padding-top:20px;border-top:1px solid var(--line);margin-top:28px}
.portal-week{gap:14px;align-items:start}.portal-day{min-height:180px}.portal-day.today{box-shadow:none;}.portal-day>h3{font-weight:600;padding:4px 2px}
.portal-job{box-shadow:var(--shadow-sm);margin:10px 0}.portal-job-title{font-family:inherit;line-height:1.45}.portal-job p{font-size:13px}.portal-badge,.pill{font-size:11px;}.portal table{font-size:14px}.portal th{white-space:nowrap}.portal td{vertical-align:middle}.portal tbody tr:last-child td{border-bottom:0}.portal tbody tr:hover{background:color-mix(in srgb,var(--surface-2) 55%,transparent)}
.portal-detail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}.portal-detail-item{min-width:0;padding-bottom:18px;border-bottom:1px solid var(--line)}.portal-detail-item h3{font-weight:600;color:var(--muted);margin:0 0 8px}.portal-detail-item p{font-size:15px;line-height:1.65;margin:0!important;white-space:pre-wrap;overflow-wrap:anywhere}.portal-hours-metric h3{letter-spacing:-.04em}.portal-empty{font-size:14px;}.portal-hours-card>.portal-empty{padding:42px 16px}
.portal-popup-bar{border:0}.portal-popup-bar .btn{color:var(--muted)}.portal-brand-card:hover,.portal-product-card:hover{box-shadow:var(--shadow-sm);border-color:var(--line)}
.stat,.row,.editor-head,.d-line,.search{box-shadow:var(--shadow-sm)}.stats{gap:16px}.row{padding:18px 20px}.row:hover{transform:none;box-shadow:var(--shadow-sm);background:var(--surface-2)}.row .av{border-radius:8px;font-weight:600}.chip{border-radius:6px;box-shadow:none;background:var(--surface);padding:9px 14px}.search{border:1px solid var(--line);box-shadow:none}
.editor-head{padding:22px}.editor-head .numero{font-weight:650}.seg{border-radius:8px}.seg button{border-radius:5px}.d-line{padding:18px}.d-total .v{font-weight:650}.modal{padding:26px}
body.view-editor .panel-editor .editor,body.view-editor .panel-editor .detail{border-radius:14px}.totalbar{box-shadow:0 -1px 0 var(--line);padding-top:16px;padding-bottom:16px}.auth-card{width:min(440px,100%);}.auth-brand{margin-bottom:32px}.auth h2{margin-bottom:24px}.auth .f{margin-bottom:18px}.auth .btn-primary{height:46px}.auth-remember{font-size:13px}
@media(max-width:700px){.portal-head>.portal-actions{width:100%}.portal-detail{grid-template-columns:1fr;gap:18px}.portal-popup-content{padding:10px 18px 24px!important}.portal-grid{gap:18px}.portal-day{min-height:100px}.portal-brand-card,.portal-product-card{padding:22px}}

}
@media screen and (prefers-color-scheme:dark){:root:not([data-theme="light"]){--bg:#11151d;--surface:#191f29;--surface-2:#222a36;--surface-3:#303a49;--line:#303947;--ink:#edf0f5;--muted:#a4afc0;--accent:#b29ae9;--accent-hover:#c4b0f0;--accent-ink:#1e1535;--accent-soft:#302644;--shadow-sm:0 2px 12px rgba(0,0,0,.1)}}

@media screen{.pdf-reader>p{padding:0 4px;font-size:13px}.pdf-stage{width:100%;max-height:65dvh;overflow:auto;padding:16px;background:var(--surface-3);border-radius:8px;overscroll-behavior:contain}.pdf-stage canvas{display:block;margin:0 auto;background:white;box-shadow:var(--shadow-sm)}@media(max-width:700px){.pdf-stage{max-height:58dvh}}}


/* Phone layout: compact navigation, readable controls and full-width sheets. */
@media screen and (max-width:700px){
  .topbar{padding:10px 16px;gap:8px;min-height:64px}
  .topbar .brand{gap:8px}.topbar .brand h1{font-size:15px;white-space:nowrap}
  .topbar-right{gap:3px}
  .topbar .btn-icon{min-width:44px;min-height:44px}.topbar .user-chip{display:none}
  .portal{padding:22px 16px calc(32px + env(safe-area-inset-bottom))}
  .portal-nav{padding:8px 16px 0;gap:10px}.portal-nav .btn{min-height:44px}
  .portal h2{font-size:24px;line-height:1.2}.portal-head{gap:16px;margin-bottom:20px}
  .portal-head p{font-size:14px;line-height:1.5}
  .portal-card{padding:18px;border-radius:16px}
  .portal .btn{min-height:44px;padding:11px 14px;font-size:13px;border-radius:10px}
  .portal input,.portal select,.portal textarea,.f input,.f select,.f textarea{font-size:16px;min-height:48px;border-radius:10px;max-width:100%;min-width:0}
  .portal input[type=checkbox]{min-height:20px}.portal label,.f label{font-size:13px}
  .portal-head>.portal-actions{display:flex;gap:8px;align-items:stretch}
  .portal-head>.portal-actions>.btn{flex:1 1 auto}
  .portal-head>.portal-actions>.portal-actions:not(.portal-week-picker){width:100%}
  .portal-head>.portal-actions>.portal-actions:not(.portal-week-picker)>.btn{flex:1}
  .portal-week-picker{display:grid;grid-template-columns:44px minmax(0,1fr) 44px auto;width:100%;gap:6px!important;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:14px}
  .portal-week-picker input{width:100%!important;background:transparent;border:0;padding:8px 4px;font-size:15px;min-height:44px}
  .portal-week-picker .btn{padding:8px;font-size:12px}.portal-week-picker>.btn:first-child,.portal-week-picker>.btn:nth-child(3){font-size:20px}
  .portal-week{grid-template-columns:1fr;gap:10px}.portal-day{padding:14px;min-height:0;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
  .portal-day>h3{margin:0;font-size:13px;padding:0;font-weight:650}
  .portal-day:not(:has(.portal-job)){display:flex;justify-content:space-between;align-items:center;gap:10px;background:transparent;padding:12px 14px}
  .portal-day:not(:has(.portal-job))>p{margin:0;font-size:12px}.portal-day.today{border-color:var(--accent);background:var(--accent-soft)}
  .portal-job{padding:0;margin:14px 0 0;background:transparent;box-shadow:none}.portal-job-title{font-size:17px;line-height:1.4}
  .portal-job p{font-size:14px;line-height:1.5}  #portal-popup{width:100%;max-width:100%;max-height:100dvh;height:100dvh;margin:0;border-radius:0;overscroll-behavior:contain}
  .portal-popup-bar{padding:8px 16px;background:var(--surface);border-bottom:1px solid var(--line)}
  .portal-popup-content{padding:24px 16px calc(24px + env(safe-area-inset-bottom))!important}
  .portal-popup-content .portal-head h2{font-size:24px}.portal-grid{grid-template-columns:1fr;gap:18px}
  .portal form>.portal-actions{display:grid;grid-template-columns:1fr 1fr}
  .portal-hours-summary>.portal-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.portal-hours-summary>.portal-actions>.btn:last-child{grid-column:1/-1}
  .portal-brand-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.portal-brand-card{padding:16px;gap:8px;border-radius:14px}.portal-brand-card img{max-width:100%}.portal-brand-card>strong{font-size:16px}
  .portal-product-grid{grid-template-columns:1fr}.portal-product-card{padding:20px;border-radius:14px}
  body.view-editor .panel-editor{padding:0;background:var(--bg)}
  body.view-editor .panel-editor .editor,body.view-editor .panel-editor .detail{border-radius:0;padding:16px 16px 130px;box-shadow:none}
  .editor-head{padding:16px}.editor-head .numero{font-size:20px}.seg{display:flex}.seg button{flex:1;min-height:44px;padding:8px 5px}
  .totalbar{left:0;right:0;bottom:0;width:100%;border-radius:16px 16px 0 0;padding:14px 20px calc(14px + env(safe-area-inset-bottom))}
  .auth{padding:20px}.auth-card{padding:28px 24px;border-radius:20px}.auth input{font-size:16px}
}

.portal-brand-logo img[src='brand-mitsubishi.svg']{background:#fff;padding:8px;border-radius:8px}

/* LBL workspace: soft neutral surfaces and blue planning accents. */
@media screen {
  :root{--surface-2:#f7f8fa;--surface-3:#e9ecf1;--accent-ink:#fff;--shadow-sm:0 3px 6px #20232902,0 0 0 1px #ffffff80;--shadow-lg:0 24px 80px #16203926;--dashboard-primary:#24262a;--dashboard-primary-ink:#fff;--dashboard-glow:#e0e8ff}
  :root[data-theme=dark]{--surface-2:#252a33;--surface-3:#303743;--accent-ink:#17264f;--shadow-sm:0 3px 6px #0000000a,0 0 0 1px #ffffff03;--dashboard-primary:#e8ecf5;--dashboard-primary-ink:#1e222a;--dashboard-glow:#293755}
  body{-webkit-font-smoothing:antialiased}
  .topbar{min-height:82px;padding:18px 36px;background:var(--bg);border-bottom:1px solid var(--line)}
  .topbar .brand{gap:12px}.topbar .brand h1{font-size:20px;letter-spacing:-.05em}
  .topbar .btn-icon{background:var(--surface);border:1px solid var(--line);width:42px;height:42px;}
  .topbar-right{gap:12px}  .portal{padding:30px 36px 56px}.portal-nav{padding:14px 36px 0;font-size:13px}.portal-nav .btn{color:var(--muted)}
  .portal h2{font-size:34px;font-weight:500;letter-spacing:-.055em;line-height:1.15}.portal h3{font-size:18px;font-weight:600;letter-spacing:-.035em}
  .portal-head{margin-bottom:26px;align-items:center}.portal-head p{font-size:14px;color:var(--muted);margin-top:9px}
  .portal-home>.portal-head{margin-bottom:30px}.portal-home>.portal-head h2{font-size:42px;font-weight:450;letter-spacing:-.055em}  .btn,.portal .btn{min-height:42px;background:var(--surface-2);border:1px solid var(--line);font-size:13px;box-shadow:0 2px 2px #00000002;}
  .btn:hover,.portal .btn:hover{background:var(--surface-3);border-color:color-mix(in srgb,var(--muted) 35%,var(--line))}
  .btn-primary,.portal .btn-primary{background:var(--dashboard-primary);color:var(--dashboard-primary-ink);border-color:transparent;box-shadow:inset 0 1px 1px #ffffff28,0 3px 5px #11182714}
  .btn-primary:hover,.portal .btn-primary:hover{background:var(--dashboard-primary);filter:brightness(1.12);border-color:transparent}
  .portal-card{padding:26px;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow-sm);background:linear-gradient(160deg,var(--surface),var(--surface-2));margin-bottom:22px}
  .portal input,.portal select,.portal textarea,.f input,.f select,.f textarea{border-radius:12px;background:var(--surface-2);border-color:var(--line);min-height:46px}
  .portal label,.f label{font-size:12px;letter-spacing:0;}.portal form h3{margin-bottom:22px}.portal fieldset{border-radius:16px}.portal-detail{gap:22px 32px}.portal-detail-item h3{font-size:12px}
  .portal-week-picker{padding:5px;border:1px solid var(--line);background:var(--surface);border-radius:13px;gap:6px}.portal-week-picker input{border:0;background:transparent}.portal-week-picker .btn{border:0;background:var(--surface-2)}
  .portal-day{border:1px solid var(--line);border-radius:20px;background:var(--surface-2);padding:14px}.portal-day.today{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 35%,var(--line))}.portal-day>h3{font-size:12px;letter-spacing:0}
  .portal-job{padding:18px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.portal-job-title{font-size:16px;font-weight:550}.portal-badge,.pill{border-radius:20px;padding:5px 9px;background:var(--accent-soft);color:var(--accent);font-weight:550}
  .portal-table-wrap{border-radius:16px;border:1px solid var(--line)}.portal th{padding:15px 18px}.portal td{padding:18px;border-color:var(--line)}
  .portal-hours-metric h3{font-size:36px;font-weight:500}.portal-empty{padding:44px 20px;color:var(--muted)}
  .portal-brand-card,.portal-product-card{padding:24px;background:var(--surface);border:1px solid var(--line)}.portal-brand-card:hover,.portal-product-card:hover{border-color:color-mix(in srgb,var(--accent) 35%,var(--line));background:var(--surface)}
  .portal-brand-logo{min-height:84px;padding:4px 0 16px}.portal-brand-card>strong{font-size:17px;font-weight:550}.portal-product-card>strong{font-weight:550}.portal-product-card .portal-product-price{font-size:25px;color:var(--ink);font-weight:500}#portal-popup::backdrop{background:#15192366;backdrop-filter:blur(7px)}.portal-popup-bar .btn{border-radius:24px;background:var(--surface)}.portal-popup-content .portal-head h2{font-size:30px;font-weight:500}
  .stat,.row,.editor-head,.d-line,.search{border-radius:18px;border-color:var(--line)}.stat{padding:24px;background:linear-gradient(145deg,var(--surface),var(--surface-2))}.stat .v{font-size:34px;font-weight:500}.row .total{font-weight:550}.chip,.seg{border-radius:12px}.editor-head .numero,.d-total .v{font-weight:500}
  .modal{border-radius:24px}.auth{background:radial-gradient(ellipse at 25% 15%,var(--dashboard-glow),transparent 55%),var(--bg)}.auth-card{padding:38px;}.auth h2{font-size:30px;font-weight:500}.auth-card .btn-primary{border-radius:12px}
  @media(min-width:701px) and (max-width:1200px){.portal{padding:28px}}
  @media(max-width:700px){
    .topbar{min-height:68px;padding:12px 18px;gap:6px}.topbar .brand h1{font-size:16px}.topbar .brand{gap:8px}.topbar-right{gap:5px}.topbar .btn-icon{width:40px;height:40px;min-width:40px;min-height:44px}
    .portal{padding:24px 18px 40px}.portal-nav{padding:8px 18px 0}.portal h2{font-size:28px}.portal-head{gap:14px;margin-bottom:22px}.portal-head p{font-size:13px}.portal-home>.portal-head{align-items:flex-start;gap:12px;margin-bottom:22px}.portal-home>.portal-head h2{font-size:32px}.portal-home>.portal-head>.portal-actions{width:auto}.portal-card{border-radius:20px;padding:20px}    .portal .btn{min-height:44px;border-radius:11px;font-size:13px}    .portal input,.portal select,.portal textarea,.f input,.f select,.f textarea{font-size:16px;min-height:48px}.portal input[type=checkbox]{min-height:20px}
    .portal-week-picker{width:100%;grid-template-columns:40px minmax(0,1fr) 40px auto;padding:5px}.portal-week-picker .btn{padding:8px 6px;font-size:11px}.portal-week-picker input{font-size:14px;padding:4px}
    .portal-day{padding:16px;border-radius:18px}.portal-day:not(:has(.portal-job)){padding:14px 16px}.portal-job{margin-top:14px;padding:16px;border-radius:14px}.portal-job-title{font-size:17px}    .portal-brand-grid{gap:10px}.portal-brand-card{padding:16px;border-radius:18px;gap:7px}.portal-brand-card>strong{font-size:15px}.portal-brand-card>span{font-size:12px;line-height:1.5}.portal-brand-logo{min-height:76px;padding-bottom:12px}.portal-brand-logo strong{font-size:20px}.portal-product-card{padding:20px;border-radius:18px}
    #portal-popup{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0}.portal-popup-bar{padding:10px 18px;background:var(--bg)}.portal-popup-content{padding:16px 18px calc(24px + env(safe-area-inset-bottom))!important}.portal-popup-content .portal-head h2{font-size:27px}
    .auth-card{padding:30px 24px;border-radius:24px}.portal th,.portal td{padding:14px}.portal-hours-metric h3{font-size:30px}.totalbar{border-radius:18px 18px 0 0}
  }
  @media(prefers-reduced-motion:reduce){.btn,.portal-brand-card,.portal-product-card{transition:none}}
}
@media screen and (prefers-color-scheme:dark){:root:not([data-theme=light]){--bg:#14171d;--surface:#1e222a;--surface-2:#252a33;--surface-3:#303743;--line:#343b48;--ink:#f0f2f6;--muted:#a6afc0;--accent:#99b0ff;--accent-hover:#b1c2ff;--accent-ink:#17264f;--accent-soft:#2a3553;--shadow-sm:0 3px 6px #0000000a,0 0 0 1px #ffffff03;--dashboard-primary:#e8ecf5;--dashboard-primary-ink:#1e222a;--dashboard-glow:#293755}}

@media screen {
 .report-form .report-section{padding-top:24px;margin-top:24px;border-top:1px solid var(--line);min-width:0}
 .report-section-head{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-bottom:18px}
 .report-form .report-section .report-section-head h3{margin:0;font-size:16px;line-height:1.35}
 .report-section-head>.btn{font-size:12px;min-height:40px;padding:9px 12px}
 .report-form .report-field{min-width:0}.report-form .report-field label{display:flex;flex-direction:column;gap:7px}
 .report-form input,.report-form textarea,.report-form select{box-sizing:border-box;max-width:100%}
 .report-form textarea{min-height:130px}.report-form input[readonly]{color:var(--muted);background:var(--surface-2)}
 .report-form .report-section>.portal-grid{grid-template-columns:repeat(3,minmax(0,1fr));align-items:start}
 .report-checks{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
 .report-checks label{display:flex;align-items:center;gap:8px;border:1px solid var(--line);padding:10px 12px;border-radius:9px;cursor:pointer;font-size:13px}
 .report-checks input{width:17px;min-height:17px;margin:0;accent-color:var(--accent)}
 .report-checks label:has(:checked){border-color:var(--accent);background:var(--accent-soft)}
 .report-entry{min-width:0;margin:0 0 16px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2)}
 .report-entry legend{font-weight:600;padding:0 7px;font-size:12px}
 .report-entry .portal-grid{grid-template-columns:repeat(4,minmax(0,1fr));align-items:start}
 .report-entry[data-kind=materials] .report-field[data-field=descricao]{grid-column:span 2}
 .report-entry-footer{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:14px}
 
 .report-form .report-remove{background:transparent;border-color:var(--line);color:var(--muted);font-size:12px;padding:8px 10px;min-height:36px}
 .report-form .report-remove:hover{color:var(--danger);border-color:var(--danger)}
 .report-totals{display:block;text-align:right;margin-top:8px;color:var(--ink);font-weight:600;font-size:13px;line-height:1.7}
 .report-saved{margin-top:9px;max-width:100%;font-size:12px}
 
 
 
 
 .report-suggestions{margin-top:5px;max-width:100%;font-size:12px}
 .report-suggestions summary{color:var(--accent);cursor:pointer;padding:6px 0;width:fit-content;font-weight:600}
 .report-suggestions input,.report-suggestions select{width:100%;margin-top:6px}
 .report-suggestions select{white-space:normal;min-height:90px}.report-suggestions option{padding:7px;white-space:normal;overflow-wrap:anywhere}
 .report-service-picker{margin-bottom:18px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);min-width:0}
 .report-service-picker[hidden]{display:none}.report-service-picker>input{width:100%;min-width:0}
 .report-service-caption,.report-service-status{font-size:12px;color:var(--muted);line-height:1.5;margin:0 0 12px}
 .report-service-status{margin:10px 0}
 .report-service-results{display:grid;gap:7px;max-height:320px;overflow-y:auto;overscroll-behavior:contain}
 .report-form .report-service-option{display:flex;align-items:center;justify-content:space-between;gap:16px;background:var(--surface);border:1px solid var(--line);border-radius:8px;color:var(--ink);text-align:left;width:100%;font:inherit;padding:12px;min-width:0;cursor:pointer}
 .report-form .report-service-option:hover,.report-form .report-service-option[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft)}
 .report-service-name{display:grid;gap:4px;min-width:0;overflow-wrap:anywhere}.report-service-name strong{font-size:13px;font-weight:600}.report-service-name small{font-size:11px;color:var(--muted)}
 .report-service-price{font-size:12px;font-weight:600;text-align:right;flex-shrink:0}
 .report-signature{min-width:0}.report-signature h4{font-size:13px;margin:0 0 10px}
 .report-signature canvas{display:block;width:100%;height:110px;box-sizing:border-box;touch-action:none;background:#fff;border:1px solid var(--line);border-radius:9px}
 .report-signature .btn{margin-top:8px;font-size:12px}
 @media(max-width:900px){.report-entry .portal-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-entry[data-kind=materials] .report-field[data-field=descricao]{grid-column:1/-1}.report-entry[data-kind=employees] .report-field[data-field=nome]{grid-column:1/-1;grid-row:1}}
 @media(max-width:600px){
  .report-form .report-entry{padding:12px}.report-form .report-section{margin-top:22px;padding-top:22px}.report-section-head{gap:10px;margin-bottom:16px}.report-section-head>.btn{font-size:12px;min-height:42px}
  .report-checks{gap:7px}.report-checks label{padding:9px 10px;font-size:12px}
  .report-form .report-section>.portal-grid{grid-template-columns:1fr}.report-form .report-entry .portal-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 10px}
  .report-entry .report-field[data-field=viatura],.report-entry .report-field[data-field=categoria]{grid-column:1/-1}
  .report-form .report-section:last-of-type>.portal-grid{grid-template-columns:1fr}
  .report-service-picker{padding:12px}.report-form .report-service-option{gap:10px;padding:12px 10px}
  .report-service-price{max-width:105px}.report-totals{text-align:left}.report-signature .btn{min-height:40px}
 }
}

/* Company stamp on the responsible signature */
.report-stamp{display:flex;flex-direction:column;align-items:stretch;gap:6px;margin:0 0 8px}
.report-signature .report-stamp .report-stamp-action{margin-top:0;font-weight:600}
.report-stamp-state{margin:0;font-size:12px;color:var(--muted,#5b6678)}.report-stamp-state:empty{display:none}
.report-signature.is-stamped canvas{border-color:var(--accent,#3567f6);box-shadow:0 0 0 1px var(--accent,#3567f6) inset}
.report-signature.is-stamped .report-stamp-state{color:var(--accent,#3567f6);font-weight:600}
.report-signature.is-pending .report-stamp-state{color:#b26a00;font-weight:600}
.owner-signature-pad{display:block;width:100%;aspect-ratio:3/1;height:auto;box-sizing:border-box;margin:8px 0 4px;touch-action:none;background:#fff;border:1px dashed var(--line);border-radius:12px}

/* Phone report: section cards with a summary; each section opens as a sheet */
.report-form.has-cards>.report-section:not(.is-sheet){display:none}
.report-cards-head{display:flex;align-items:center;justify-content:space-between;margin:6px 0 10px}
.report-cards-head strong{font-size:17px}
.report-cards-progress{font-size:12px;font-weight:600;padding:4px 10px;border-radius:99px;background:#eeedfe;color:#3c3489}
.report-cards{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.report-form .report-card{display:flex;align-items:center;gap:12px;width:100%;min-height:58px;padding:10px 14px;text-align:left;border:1px solid var(--line);border-radius:14px;background:var(--surface,#fff);color:var(--ink);font:inherit;cursor:pointer}
.report-card-text{display:flex;flex-direction:column;gap:2px;min-width:0;flex:1}
.report-card-text strong{font-size:15px;font-weight:600}
.report-card-text small{font-size:13px;color:var(--muted,#5b6678);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.report-card-mark{flex:none;width:24px;height:24px;border-radius:50%;border:2px solid var(--line);box-sizing:border-box}
.report-card.is-done .report-card-mark{border:0;background:#0f6e56 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/14px no-repeat}
.report-card:not(.is-done) .report-card-text small{color:var(--muted,#8a93a3)}
.report-sheet-backdrop{position:fixed;inset:0;z-index:40;background:rgba(15,20,30,.38)}
.report-form .report-section.is-sheet{position:fixed;left:0;right:0;bottom:0;z-index:41;max-height:88dvh;overflow:auto;margin:0;padding:6px 16px calc(24px + env(safe-area-inset-bottom));background:var(--surface,#fff);border-radius:20px 20px 0 0;box-shadow:0 -8px 30px rgba(15,20,30,.18);animation:report-sheet-up .2s ease-out}
.report-form .report-section.is-sheet .report-section-head{position:sticky;top:-6px;z-index:1;display:flex;align-items:center;gap:8px;padding:12px 0 10px;margin:0 0 6px;background:var(--surface,#fff)}
.report-form .report-section.is-sheet .report-section-head h3{flex:1;margin:0}
.report-form:not(.has-cards) .report-sheet-done{display:none}
html body .report-form .report-section.is-sheet .report-section-head .report-sheet-done{order:9;min-height:38px;padding:0 20px;font-weight:600}
@keyframes report-sheet-up{from{transform:translateY(40px);opacity:.4}to{transform:none;opacity:1}}
@media(prefers-reduced-motion:reduce){.report-form .report-section.is-sheet{animation:none}}

/* Signatures sheet: full screen, the report as it prints on top, the signature pads below */
html body .report-form .report-section.is-sheet.is-review{top:0;max-height:none;border-radius:0;padding-top:calc(4px + env(safe-area-inset-top))}
.report-review{margin:0 0 18px}
.report-review-hint{margin:0 0 10px;padding:10px 12px;border-radius:12px;background:#eeedfe;color:#3c3489;font-size:13px;font-weight:600}
.report-review .report-document{padding:14px;border-radius:12px;font-size:12px}
.report-review .report-document-signatures,.report-review .report-document>footer{display:none}

/* Service lines in the report (like Moloni invoice lines) */
.report-lines{display:flex;flex-direction:column;gap:8px;margin:4px 0 6px}
.report-line{display:grid;grid-template-columns:minmax(0,1fr) 112px 132px 92px auto;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface,#fff)}
.report-line-main{display:flex;flex-direction:column;gap:1px;min-width:0}
.report-line-ref{font-size:11px;font-weight:700;color:var(--accent,#3567f6)}
.report-line-main strong{font-size:14px;overflow-wrap:anywhere}
.report-line-desc{font-size:12px;color:var(--muted,#5b6678)}
.report-line-qty,.report-line-price{display:grid;grid-template-columns:auto;gap:2px;font-size:11px;color:var(--muted,#5b6678)}
.report-line-qty input,.report-line-price input{height:38px;min-height:38px;padding:0 8px;font-size:14px;text-align:right}
.report-line-qty small,.report-line-price small{font-size:11px}
.report-line-total{font-size:14px;text-align:right;font-variant-numeric:tabular-nums}
.report-lines-empty{margin:0;padding:12px;border:1px dashed var(--line);border-radius:12px;color:var(--muted,#5b6678);font-size:13px;text-align:center}
@media screen and (max-width:760px),screen and (pointer:coarse) and (max-height:540px){
  .report-line{grid-template-columns:1fr 1fr auto;grid-template-areas:"main main main" "qty price total" "remove remove remove"}
  .report-line-main{grid-area:main}.report-line-qty{grid-area:qty}.report-line-price{grid-area:price}.report-line-total{grid-area:total;align-self:end;padding-bottom:10px}
  .report-line .report-remove{grid-area:remove;justify-self:end}
}
.report-form .report-line-remove{width:32px;height:32px;min-height:32px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--muted,#5b6678);font-size:20px;line-height:1;cursor:pointer}
.report-form .report-line-remove:hover{background:var(--surface-2,#f1f3f7);color:#b42318}
@media screen and (max-width:760px),screen and (pointer:coarse) and (max-height:540px){
  .report-line{grid-template-columns:1fr 1fr auto;grid-template-areas:"main main remove" "qty price total";padding:10px 10px 12px 12px;row-gap:8px}
  .report-line .report-line-remove{grid-area:remove;align-self:start;justify-self:end}
  .report-line-total{padding-bottom:9px}
}
.report-travel-note{margin:6px 0 0;font-size:12px;color:var(--muted,#5b6678)}
/* Material lines: the description is typed in place, borderless until touched */
html body .report-form .report-line .report-line-main .report-line-name{width:calc(100% + 8px);height:40px;min-height:40px;margin:0 0 0 -8px;padding:0 8px;border:1px solid transparent;border-radius:8px;background:transparent;box-shadow:none;font-size:16px;font-weight:600}
html body .report-form .report-line .report-line-main .report-line-name:focus{border-color:var(--accent,#3567f6);background:var(--surface,#fff)}
html body .report-form .report-line .report-line-main .report-line-name:placeholder-shown{border-color:var(--line);font-weight:400}
@media screen and (max-width:760px),screen and (pointer:coarse) and (max-height:540px){.report-line{grid-template-columns:1fr 1fr 84px}}
.report-form .report-material-hand{justify-self:start;margin:0 0 10px}
/* Sheet header stays one row: title, one action, Feito */
.report-form .report-section.is-sheet .report-section-head{flex-wrap:nowrap}
.report-form .report-section.is-sheet .report-section-head h3{min-width:0;overflow-wrap:anywhere}
.report-form .report-section.is-sheet .report-section-head>.btn{flex:none;white-space:nowrap;min-height:38px;padding:0 12px;font-size:13px}
/* "Agora" beside the arrival/departure times, and services suggested by the type of work. */
.report-form .report-now{margin-top:6px;min-height:32px;padding:4px 12px;font-size:12px;border-radius:999px}
.report-suggestions{display:flex;flex-wrap:wrap;gap:8px;margin:-6px 0 18px}
.report-suggestions-title{flex-basis:100%;margin:0;color:var(--muted);font-size:12px;font-weight:600}
.report-form .report-suggestion{min-height:34px;padding:6px 12px;border:1px dashed var(--accent);border-radius:999px;background:transparent;color:var(--accent);font-size:13px;font-weight:600}

.report-document{--report-violet:#674c89;--report-line:#d6d1df;box-sizing:border-box;max-width:100%;min-width:0;padding:28px;background:#fff;color:#272a30;border:1px solid var(--report-line);border-radius:14px;font:13px/1.45 Arial,Helvetica,sans-serif;overflow-wrap:anywhere}
@media print{body:has(>#portal-print.report-document){background:#fff!important;margin:0!important}}
.report-document *{box-sizing:border-box}.report-document h2,.report-document h3,.report-document p,.report-document dl,.report-document dd{margin:0}.report-document-header{display:flex;justify-content:space-between;gap:24px;align-items:center;margin-bottom:22px}.report-document-brand{display:flex;align-items:center;gap:16px;min-width:0}.report-document-brand img{flex:0 0 76px;object-fit:contain}.report-document-brand>div{font-size:11px;text-align:center;line-height:1.55}.report-document-brand b{display:block;margin-top:4px;font-size:12px}.report-document-title{min-width:200px;text-align:center}.report-document .report-document-title h2{padding:8px 12px;border-radius:6px;background:var(--report-violet);color:#fff;font-size:15px;letter-spacing:normal}.report-document-title>strong{display:block;font-size:17px;margin-top:8px}
.report-document-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.report-document-details>div{min-width:0;border:1px solid var(--report-line);border-radius:5px;overflow:hidden}.report-document-details dt{padding:5px 10px;background:#f3eff7;color:var(--report-violet);font-weight:700;font-size:11px}.report-document-details dd{padding:8px 10px;min-height:34px}.report-document-details>div:nth-child(4),.report-document-details>div:nth-child(6),.report-document-details>div:nth-child(8){grid-column:span 2}.report-document-section{margin-top:18px;min-width:0}.report-document .report-document-section>h3{padding:7px 12px;font-size:13px;text-align:center;color:#fff;background:var(--report-violet);border-radius:5px 5px 0 0;font-weight:600}.report-document-types{display:flex;flex-wrap:wrap;gap:12px;padding:12px;border:1px solid var(--report-line);border-top:0}.report-document-types>span{display:inline-flex;align-items:center;gap:6px;font-size:12px}.report-document-check{width:15px;height:15px;border:1px solid #aaa1b9;border-radius:3px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;font-size:12px;line-height:1}.report-document-types>.selected{color:var(--report-violet);font-weight:700}.report-document-types>.selected .report-document-check{background:var(--report-violet);color:white;border-color:var(--report-violet)}
.report-document table{border-collapse:collapse;table-layout:fixed;width:100%;min-width:0;margin:0;font:inherit;color:inherit}.report-document th,.report-document td{border:1px solid var(--report-line);padding:8px 6px;text-align:left;vertical-align:top;overflow-wrap:anywhere;white-space:normal}.report-document th{font-size:11px;background:#f3eff7;color:#57436e;font-weight:600}.report-document td{font-size:12px}.report-document-staff th:nth-child(2){width:21%}.report-document-materials th:nth-child(2){width:43%}.report-document-materials td:nth-child(n+3){text-align:right}.report-document .report-document-total{padding:9px 12px;text-align:right;background:#f3eff7;color:#57436e;font-weight:700;font-size:12px}.report-document .report-document-empty{padding:14px;color:#65616d;border:1px solid var(--report-line);border-top:0}.report-document-work{padding:14px;border:1px solid var(--report-line);min-height:100px;white-space:pre-wrap}.report-document-signatures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:22px}.report-document-signatures>section{border:1px solid var(--report-line);border-radius:5px;min-height:108px;padding:10px;text-align:center}.report-document .report-document-signatures h3{font-size:11px;font-weight:500;color:inherit}.report-document-signatures img{display:block;max-width:100%;height:74px;object-fit:contain;width:100%;margin-top:5px}.report-document-signature-space{height:74px;border-bottom:1px solid var(--report-line)}.report-document>footer{text-align:center;font-size:10px;color:#77717e;margin-top:12px}
@media screen and (max-width:750px){.report-document{padding:16px;border-radius:10px}.report-document-header{flex-direction:column;gap:16px;align-items:stretch}.report-document-brand{justify-content:center;gap:10px}.report-document-brand img{width:60px;height:60px;flex-basis:60px}.report-document-brand>div{font-size:10px}.report-document-brand b{font-size:10px}.report-document-title{min-width:0}.report-document-details{grid-template-columns:repeat(2,minmax(0,1fr))}.report-document-details>div:nth-child(3),.report-document-details>div:nth-child(4),.report-document-details>div:nth-child(6),.report-document-details>div:nth-child(8){grid-column:span 2}.report-document-details>div:nth-child(7){grid-column:auto}.report-document table,.report-document tbody,.report-document tr,.report-document td{display:block;width:100%}.report-document thead{display:none}.report-document tr{padding:8px 10px;border:1px solid var(--report-line);border-top:0}.report-document td{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr);gap:12px;padding:5px 0;border:0;font-size:12px;text-align:left!important}.report-document td:before{content:attr(data-label);font-size:11px;color:#71667e;font-weight:600}.report-document-signatures{grid-template-columns:1fr}.report-document-signatures>section{min-height:104px}}
@media print{#portal-print.report-document{display:block!important;position:static!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;color:#272a30!important;width:100%!important;font-size:9pt;print-color-adjust:exact;-webkit-print-color-adjust:exact}#portal-print.report-document h2{margin:0;font-size:12pt}.report-document-header{break-inside:avoid}.report-document-details{gap:4px}.report-document-details dt{padding:3px 7px}.report-document-details dd{min-height:23px;padding:4px 7px}.report-document-section{margin-top:10px}.report-document-section>h3{break-after:avoid}.report-document th,.report-document td{padding:5px 4px}.report-document table{display:table!important}.report-document thead{display:table-header-group!important}.report-document tbody{display:table-row-group!important}.report-document tr{display:table-row!important;break-inside:avoid}.report-document td{display:table-cell!important}.report-document td:before{display:none!important}.report-document-signatures{break-inside:avoid;margin-top:14px}.report-document-work{min-height:75px}.report-document>footer{margin-top:8px}}

.report-document-signatures>section{min-width:0;break-inside:avoid}.report-document-signatures img{box-sizing:border-box;padding:4px;object-fit:contain;object-position:center}

@media print{@page lbl-report{size:A4 portrait;margin:10mm}#portal-print.report-document{page:lbl-report;width:190mm!important;max-width:190mm!important}#portal-print.report-document .report-document-brand img{display:block!important;width:20mm!important;height:20mm!important;max-width:20mm!important;flex:0 0 20mm;object-fit:contain!important}#portal-print.report-document .report-document-signatures{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3mm;break-inside:avoid-page}#portal-print.report-document .report-document-signatures>section{min-width:0!important;padding:3mm!important;overflow:hidden;break-inside:avoid-page}#portal-print.report-document .report-document-signatures img{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;height:22mm!important;max-height:22mm!important;object-fit:contain!important;object-position:center!important;padding:2mm!important;margin:2mm 0 0!important}#portal-print.report-document .report-document-signatures h3{line-height:1.3!important;font-size:8pt!important}}

/* Services lines and invoice summary (Moloni style) */
.report-document-services td{white-space:pre-line}
.report-document-services td:nth-child(n+3),.report-document-services th:nth-child(n+3){text-align:right}
.report-document-services td:nth-child(4),.report-document-services th:nth-child(4){text-align:center}
.report-document-summary{display:grid;gap:0;width:min(100%,320px);margin:14px 0 0 auto;border:1px solid var(--report-line,#d6d1df);border-radius:8px;overflow:hidden}
.report-document-summary>div{display:flex;justify-content:space-between;gap:12px;padding:7px 12px;border-bottom:1px solid var(--report-line,#d6d1df)}
.report-document-summary>div:last-child{border-bottom:0;background:#f4f0f8;font-weight:700;font-size:14px}
.report-document-summary dt,.report-document-summary dd{margin:0}
.report-document-summary dd{font-variant-numeric:tabular-nums}
.report-document .report-document-summary{margin:14px 0 0 auto!important;width:min(100%,320px)!important}
.report-document-services{table-layout:fixed;width:100%}
/* Services columns: only the final summary carries totals and VAT. */
.report-document-services th:nth-child(1),.report-document-services td:nth-child(1){width:15%}
.report-document-services th:nth-child(2),.report-document-services td:nth-child(2){width:53%}
.report-document-services th:nth-child(3),.report-document-services td:nth-child(3){width:9%}
.report-document-services th:nth-child(4),.report-document-services td:nth-child(4){width:9%}
.report-document-services th:nth-child(5),.report-document-services td:nth-child(5){width:14%}
@media screen and (max-width:750px){.report-document .report-document-services,.report-document .report-document-services td{width:100%}}

.days-document{color:#1c3042;font:14px/1.4 Arial,sans-serif}.days-paper{background:#fff;padding:24px;border:1px solid #c2cad0;border-radius:12px;margin-bottom:20px;min-width:0}.days-paper-header{display:grid;grid-template-columns:1fr 1.3fr .8fr;gap:20px;align-items:center;margin-bottom:24px}.days-paper-brand{display:flex;align-items:center;gap:12px}.days-paper-brand img{width:72px;height:72px;object-fit:contain}.days-paper-brand p{white-space:pre-line;font-size:12px}.days-paper-person{text-align:center}.days-paper-person h2{font-size:28px;margin:4px 0;text-transform:uppercase;overflow-wrap:anywhere}.days-paper-person span{font-size:12px}.days-paper-sign{border:1px solid #7a8995;border-radius:8px;height:90px;padding:10px;font-size:12px}.days-paper-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.days-document table{table-layout:fixed;width:100%;border-collapse:collapse;min-width:0}.days-document th,.days-document td{border:1px solid #c2cad0;padding:6px;font-size:12px;white-space:pre-line;overflow-wrap:anywhere}.days-document th:first-child{width:38px}.days-document thead th{background:#1c3042;color:#fff}.days-document tbody th{font-weight:700;text-align:center}.days-document td{min-height:28px}.days-row-continuation,.days-paper-overflow{display:none}
@media(max-width:760px),(pointer:coarse) and (max-height:540px){.days-paper{padding:12px}.days-paper-header{grid-template-columns:1fr;gap:12px}.days-paper-brand{justify-content:center}.days-paper-person h2{font-size:24px}.days-paper-sign{height:65px}.days-paper-grid{grid-template-columns:1fr;gap:0}.days-document td{font-size:14px}}
@media print{@page days{size:A4 landscape;margin:7mm}#portal-print.days-document{display:block!important;padding:0!important}#portal-print.days-document .days-paper{page:days;border:0;border-radius:0;margin:0;padding:0;break-after:page;font-size:8pt}#portal-print.days-document .days-paper:last-child{break-after:auto}.days-paper-header{grid-template-columns:1fr 1.3fr .8fr;gap:10px;margin-bottom:8px}.days-paper-brand{gap:8px}.days-paper-brand img{width:56px;height:56px}.days-paper-brand p{font-size:8pt;line-height:1.2;margin:0}.days-paper-person h2{font-size:16pt!important;margin:2px 0!important}.days-paper-person span{font-size:8pt}.days-paper-sign{height:54px;padding:6px;font-size:8pt}.days-paper-grid{grid-template-columns:1fr 1fr;gap:8px;align-items:start}.days-document table{display:table!important}.days-document thead{display:table-header-group!important}.days-document tbody{display:table-row-group!important}.days-document tr{display:table-row!important;break-inside:avoid}.days-document th,.days-document td{display:table-cell!important;font-size:6.5pt;padding:2px 3px;line-height:1.08;white-space:pre-line;overflow-wrap:anywhere}.days-document th:first-child{width:24px}.days-document th:before,.days-document td:before{display:none!important}.days-document td[data-overflow="true"] .days-row-description{display:none}.days-document td[data-overflow="true"] .days-row-continuation{display:inline;font-size:6.5pt;font-weight:700}.days-paper-overflow{display:block;page-break-before:always;break-before:page;font-size:8pt;line-height:1.25}.days-paper-overflow h3{font-size:12pt;margin:0 0 8px}.days-paper-overflow-entry{white-space:pre-line;overflow-wrap:anywhere;margin:0 0 8px;break-inside:avoid}.days-document{print-color-adjust:exact;-webkit-print-color-adjust:exact}}
/* Keep the paper independent of application table and theme styles. */
.days-document.days-document .days-paper-grid{align-items:start}
.days-document.days-document th,.days-document.days-document td{padding:6px!important;font:12px/1.35 Arial,sans-serif!important;color:#1c3042!important;vertical-align:top;border:1px solid #c2cad0!important;background:#fff!important}
.days-document.days-document thead th{background:#1c3042!important;color:#fff!important;font-weight:700!important;text-align:left}
.days-document.days-document th:first-child{box-sizing:border-box;width:38px!important;min-width:38px;white-space:nowrap!important;overflow-wrap:normal!important;word-break:normal!important;text-align:center}
.days-document.days-document tbody th{background:#f2f4f7!important;font-weight:700!important}
@media print{.days-document.days-document th,.days-document.days-document td{font-size:6.5pt!important;line-height:1.08!important;padding:2px 3px!important}.days-document.days-document th:first-child{width:24px!important;min-width:24px}}

.report-scan{border:1px solid var(--line);border-radius:12px;padding:18px;background:var(--bg);margin-bottom:24px;min-width:0}.report-scan h3{margin:0 0 14px}.report-scan p{font-size:14px;line-height:1.5;color:var(--muted)}.report-scan-photo{width:100%;max-height:300px;object-fit:contain;margin-top:12px;border-radius:8px}.report-scan-review{min-width:0}.report-scan-field{display:flex!important;align-items:flex-start!important;gap:12px;padding:14px 0;border-top:1px solid var(--line);min-width:0}.report-scan-field>input{width:20px!important;height:20px!important;min-height:20px!important;flex:0 0 20px;margin:2px 0}.report-scan-field>span{min-width:0;display:grid;gap:5px}.report-scan-value,.report-scan-current{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px}.report-scan-current{color:var(--muted)}.report-scan .portal-actions{flex-wrap:wrap}.report-scan [hidden]{display:none!important}@media(max-width:760px),(pointer:coarse) and (max-height:540px){.report-scan{padding:12px}.report-scan .btn{flex:1 1 120px;white-space:normal;min-height:44px}.report-scan-review>.btn{width:100%;margin-top:12px}}

.report-scan-images{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:12px;margin-top:14px}.report-scan-image{margin:0;min-width:0;padding:10px;border:1px solid var(--line);border-radius:10px}.report-scan-image .report-scan-photo{height:170px;margin:0}.report-scan-image figcaption{font-size:12px;overflow-wrap:anywhere;margin:8px 0}.report-scan-image .btn{width:100%}

.report-saved-photos details{border-top:1px solid var(--line);padding:12px 0}.report-saved-photos summary{cursor:pointer;overflow-wrap:anywhere}.report-saved-photos img{display:block;width:100%;height:auto;margin:12px 0}.report-saved-photos{min-width:0}

/* Approved sidebar proposal, integrated with existing forms and permissions. */
@media screen {
  :root{--workspace-muted:#99a5bb}
  .btn.btn-wa{background:#137c42;color:#fff;border-color:#137c42}.btn.btn-wa:hover{background:#106535;color:#fff;border-color:#106535}
  .totalbar .btn-primary{background:#fff;color:#172338;border-color:#fff}.totalbar .btn-primary:hover{background:#e5ecff;color:#172338;border-color:#e5ecff;filter:none}
  .quote-share{border:1px solid var(--line);padding:24px;box-sizing:border-box;max-width:calc(100vw - 32px)}.quote-share::backdrop{background:#15192366;backdrop-filter:blur(5px)}.quote-share textarea{width:100%;min-height:130px;box-sizing:border-box;padding:12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--ink);font:inherit;line-height:1.5;resize:vertical}.quote-share .quote-share-file{overflow-wrap:anywhere;font-weight:600;color:var(--ink)}.quote-share .actions{margin-top:16px;flex-wrap:wrap}
  .workspace-layout .app{display:block;padding-left:244px}
  .workspace-brand{display:flex;align-items:center;padding:0 10px 30px}.workspace-brand small{display:block;font-size:10px;letter-spacing:1.4px;text-transform:uppercase;color:var(--workspace-muted);margin-top:3px}
  .workspace-navigation{display:grid;gap:6px}
  .workspace-nav-item{display:flex;align-items:center;gap:13px;padding:13px 14px;border:0;background:transparent;text-align:left;font:inherit;font-size:13px;width:100%;min-height:46px}.workspace-nav-item[aria-current=page]{color:white;}.workspace-nav-item[aria-current=page]::after{content:"";width:5px;height:5px;margin-left:auto;border-radius:50%;background:white}.workspace-icon{display:inline-flex;flex-shrink:0}.workspace-icon svg{width:20px;height:20px}
  .workspace-profile{display:flex;align-items:center;gap:11px;margin-top:auto;padding:28px 10px 0}.workspace-profile strong{font-size:13px;font-weight:600}.workspace-profile small{display:block;font-size:11px;}.workspace-avatar{width:36px;height:36px;flex-shrink:0;border-radius:50%;display:grid;place-items:center;font-size:13px;font-weight:600;background:#32415d;color:#cbd9f6}
  .workspace-menu-toggle,.workspace-menu-close,.workspace-shade{display:none}
  .workspace-layout .topbar>.brand,.workspace-layout .topbar .user-chip{display:none}.workspace-layout .topbar{height:78px;min-height:78px;padding:0 40px;border-bottom:1px solid var(--line)}.workspace-layout .topbar-right{gap:12px}
  .workspace-layout #portal{padding:38px 40px 48px}.workspace-layout .main{padding:30px 40px}
  .workspace-layout #portal h2{font-size:31px;line-height:1.25}.workspace-layout .portal-home>.portal-head{margin-bottom:30px}.workspace-layout #portal .portal-head p{font-size:13px;margin-top:9px}.workspace-layout #portal .btn-primary{background:var(--workspace-blue);color:white;border-color:transparent;border-radius:9px;box-shadow:0 4px 9px #3567f619}.workspace-layout #portal .btn-primary:hover{background:#2555df}
  .workspace-layout #portal .portal-card{border-radius:14px;background:var(--surface);box-shadow:none}.workspace-layout #portal h3{font-size:16px;letter-spacing:-.3px}
  .workspace-layout #portal .portal-hours-metric h3{font-size:34px}
  
  
  
  
  /* Jorge's overview uses the existing LBL palette in both themes. */
  
  
  
  
  
  
  
  
  
  .portal select.portal-job-status{appearance:auto;width:auto;max-width:100%;min-height:40px;padding:8px 10px;border:1px solid color-mix(in srgb,var(--accent) 20%,var(--line));border-radius:9px;background:var(--accent-soft);color:var(--accent);font-size:12px;font-weight:600;cursor:pointer}.portal select.portal-job-status:disabled{opacity:.55;cursor:wait}.portal select.portal-job-status option{background:var(--surface);color:var(--ink)}
  
  
  
  .portal .workday-options{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:18px;margin-top:24px}.portal .workday-option{display:flex;align-items:center;gap:12px;border:1px solid var(--line);border-radius:12px;padding:18px;cursor:pointer;background:var(--surface);color:var(--ink);min-width:0}.portal .workday-option:has(input:checked){background:var(--accent-soft);border-color:var(--accent)}.portal .workday-option input{width:20px;height:20px;min-height:20px;flex-shrink:0;accent-color:var(--accent)}.workday-option strong{display:block;font-size:15px}.workday-option small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:4px}.legacy-hours>p{font-size:13px}
  @media(min-width:761px) and (min-height:541px),(min-width:761px) and (pointer:fine),(min-width:761px) and (pointer:none){body.workspace-layout.view-editor .panel-editor{left:244px;width:calc(100% - 244px)}body.workspace-layout.view-editor .totalbar{left:calc(50% + 122px);right:auto;transform:translateX(-50%);width:min(600px,calc(100vw - 292px))}}
  @media(max-width:1250px) and (min-width:761px) and (min-height:541px),(max-width:1250px) and (min-width:761px) and (pointer:fine){.workspace-layout #portal{padding:30px 28px}.workspace-layout .topbar{padding:0 28px}}
  @media(max-width:760px),(pointer:coarse) and (max-height:540px){
    .workspace-layout .app{padding-left:0}
    .workspace-layout .main{padding:24px 18px}
    .portal .workday-options{grid-template-columns:1fr;padding:14px}.portal .workday-option{padding:16px}
  }
  @media(max-width:760px),(pointer:coarse) and (max-height:540px){
    .workspace-layout .panel-list{min-width:0;padding-inline:0}
    .workspace-layout .panel-list .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
    .workspace-layout .panel-list .stat .v{font-size:24px}
    .workspace-layout .panel-list .stat.mnt{grid-column:1/-1}
    .workspace-layout .panel-list .row{grid-template-columns:32px minmax(0,1fr);grid-template-areas:"av name" "av meta" "total status";gap:8px 12px;padding:16px;min-width:0}
    .workspace-layout .panel-list .row .total{grid-column:1/-1;grid-row:3;padding-right:108px;overflow-wrap:anywhere;min-width:0}
    .workspace-layout .panel-list .row .status{grid-column:2;grid-row:3;max-width:108px}
  }
  @media(max-width:380px){.workspace-layout .panel-list .stats{grid-template-columns:minmax(0,1fr)}.workspace-layout .panel-list .stat{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 12px;align-items:center}.workspace-layout .panel-list .stat .v{font-size:22px;grid-column:1/-1;grid-row:2}.workspace-layout .panel-list .stat .s{font-size:11px}}
  @media(prefers-reduced-motion:reduce){.workspace-sidebar{transition:none}}
}

@media screen{button.workspace-profile{width:100%;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer;border-radius:10px;flex-shrink:0}button.workspace-profile:hover{background:#202d44}button.workspace-profile:focus-visible{outline:2px solid #99b6ff;outline-offset:3px}.workspace-avatar img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}.profile-photo-preview.workspace-avatar{width:112px;height:112px;font-size:38px;margin:0 auto 24px}.portal form:has(.profile-photo-preview){max-width:520px;margin-inline:auto}.portal form:has(.profile-photo-preview)>label{display:flex;flex-direction:column;gap:10px;margin-bottom:18px}.portal form:has(.profile-photo-preview) input{max-width:100%;box-sizing:border-box}}

@media screen{.quote-share>label{display:flex;flex-direction:column;gap:8px;margin:16px 0}.quote-share>label input{width:100%;min-width:0;box-sizing:border-box;padding:12px;font:inherit;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--ink)}}

/* Keep page names accessible while the breadcrumb identifies the current tab. */

.portal-job-state-row{display:flex;align-items:center;gap:12px;margin:0 0 12px;font-weight:600}
dialog.native-sheet .portal-job-status,.portal-job-state-row .portal-job-status{appearance:none;-webkit-appearance:none;height:34px;padding:0 30px 0 14px;border:0;border-radius:999px;font:inherit;font-size:13px;font-weight:700;background:#edf2ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23596579' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/14px;color:#2148c0;cursor:pointer}
dialog.native-sheet .portal-job-status[data-state="Em curso"],.portal-job-state-row .portal-job-status[data-state="Em curso"]{background-color:#fff4dc;color:#8a5a00}
dialog.native-sheet .portal-job-status[data-state="Concluída"],.portal-job-state-row .portal-job-status[data-state="Concluída"]{background-color:#e3f6ea;color:#11753a}

/* People, ordered by responsibility, with their actual weekly activity. */
.team-view{container-type:inline-size;--team-blue:#3567f6;display:grid;gap:30px;min-width:0}
.team-view *{box-sizing:border-box}
.team-view .team-group-heading{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.team-view .team-group-heading::after{content:"";height:1px;flex:1;background:var(--line);margin-left:6px}
.team-view .team-group-heading h3{font-size:15px;font-weight:650;letter-spacing:-.2px;margin:0;color:var(--ink)}
.team-group-count{display:inline-grid;place-items:center;min-width:24px;height:24px;border-radius:7px;background:var(--surface-2);color:var(--muted);font-size:11px;font-weight:650;padding:0 6px}
.team-group-leadership .team-group-count{background:color-mix(in srgb,var(--team-blue) 10%,var(--surface));color:var(--ink)}
.team-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:18px}
.team-person{min-width:0;display:flex;flex-direction:column;position:relative;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--surface);overflow:hidden}
.team-person-leader{border-top:3px solid var(--team-blue);padding-top:22px;background:linear-gradient(120deg,color-mix(in srgb,var(--team-blue) 5%,var(--surface)),var(--surface) 70%)}
.team-person-heading{display:flex;align-items:center;gap:16px;min-width:0;min-height:76px}
.team-portrait{display:grid;place-items:center;width:72px;height:72px;flex-shrink:0;border:3px solid var(--surface);outline:1px solid color-mix(in srgb,var(--team-blue) 18%,var(--line));border-radius:50%;background:color-mix(in srgb,var(--team-blue) 12%,var(--surface));color:var(--ink);font-size:23px;font-weight:650;letter-spacing:-1px;overflow:hidden}
.team-portrait img{display:block;width:100%;height:100%;object-fit:cover}
.team-identity{min-width:0}
.team-view .team-member-name{font-size:19px;font-weight:650;letter-spacing:-.5px;line-height:1.3;color:var(--ink);overflow-wrap:anywhere;margin:0;text-shadow:none}
.team-view .team-member-role{margin:6px 0 0;font-size:12px;line-height:1.55;color:var(--muted);overflow-wrap:anywhere}
.team-person-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:19px 0;margin:21px 0 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);gap:8px}
.team-stat{display:flex;flex-direction:column-reverse;gap:5px;padding-left:12px;border-left:1px solid var(--line);min-width:0}
.team-stat:first-child{padding-left:0;border-left:0}
.team-stat dt{font-size:11px;color:var(--muted);font-weight:500;margin:0;line-height:1.5}
.team-stat dd{font-size:25px;line-height:1.1;font-weight:600;letter-spacing:-.7px;color:var(--ink);margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.team-next-job{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;margin:14px 0 0;padding:12px;border-radius:10px;border:1px solid transparent;background:var(--surface-2);color:var(--ink);font:inherit;text-align:left;cursor:pointer;transition:background .15s,border-color .15s}
.team-next-content{display:grid;gap:4px;min-width:0}
.team-next-label{font-size:10px;line-height:1.4;color:var(--muted);font-weight:600}
.team-next-content strong{font-size:12px;font-weight:650;line-height:1.5;overflow-wrap:anywhere}
.team-next-date{font-size:11px;color:var(--muted);line-height:1.5}
.team-next-job>.team-icon{color:var(--muted)}
.team-person-actions{display:flex;gap:8px;margin-top:auto;padding-top:18px}
.team-action{display:flex;align-items:center;justify-content:center;gap:7px;flex:1;min-width:0;min-height:44px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);padding:9px 10px;font:inherit;font-size:12px;font-weight:600;line-height:1.4;cursor:pointer;transition:background .15s,border-color .15s}
.team-icon{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.team-icon svg{display:block;width:17px;height:17px}
.team-action .team-icon{color:var(--muted)}
.team-account{margin-top:16px;padding-top:15px;border-top:1px solid var(--line)}
.team-password-status{display:flex;align-items:baseline;justify-content:space-between;gap:6px 12px;flex-wrap:wrap;margin:0;line-height:1.5}
.team-password-status dt{margin:0;color:var(--muted);font-size:10px;font-weight:500}
.team-password-status dd{margin:0;color:var(--ink);font-size:11px;font-weight:550;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}
.team-reset-password{width:100%;margin-top:11px;background:var(--surface-2)}
.team-action:hover,.team-next-job:hover{background:color-mix(in srgb,var(--team-blue) 8%,var(--surface));border-color:color-mix(in srgb,var(--team-blue) 40%,var(--line));color:var(--ink)}
.team-action:hover .team-icon,.team-next-job:hover>.team-icon{color:var(--ink)}
.team-action:focus-visible,.team-next-job:focus-visible,.team-inactive summary:focus-visible{outline:2px solid var(--team-blue);outline-offset:3px}
.team-inactive{border-top:1px solid var(--line);padding-top:18px}
.team-inactive summary{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer;list-style:none;color:var(--muted);font-size:13px;font-weight:550;border-radius:8px}
.team-inactive summary::-webkit-details-marker{display:none}
.team-inactive summary>.team-icon{margin-left:auto;transition:transform .15s}
.team-inactive[open] summary>.team-icon{transform:rotate(90deg)}
.team-inactive[open]>.team-people{margin-top:14px}
.team-person-inactive{border-top-width:1px;border-top-color:var(--line);background:var(--surface);padding-top:24px}
.team-inactive-badge{display:inline-block;margin-top:6px;padding:2px 7px;border:1px solid var(--line);border-radius:5px;font-size:10px;color:var(--muted)}
.team-empty{display:flex;align-items:center;justify-content:center;gap:12px;padding:40px 20px;border:1px dashed var(--line);border-radius:14px;color:var(--muted)}
.team-empty p{margin:0;font-size:13px}
@container (min-width:700px){.team-group-leadership>.team-people{grid-template-columns:repeat(2,minmax(0,1fr))}.team-group-leadership .team-portrait{width:80px;height:80px}.team-group-leadership .team-member-name{font-size:22px}}
@container (min-width:1000px){.team-group:not(.team-group-leadership)>.team-people{grid-template-columns:repeat(3,minmax(0,1fr))}}
@container (max-width:360px){.team-person{padding:18px}.team-person-leader{padding-top:16px}.team-person-heading{gap:12px}.team-portrait{width:64px;height:64px;font-size:21px}.team-view .team-member-name{font-size:18px}.team-person-stats{margin-top:18px;padding:16px 0}.team-person-actions{gap:7px;padding-top:16px}.team-action{padding:9px 7px}.team-stat{padding-left:10px}.team-stat dd{font-size:23px}.team-view{gap:25px}}
@media(prefers-reduced-motion:reduce){.team-view *{transition:none!important}}

/* Where each person is today. */
.team-roster-state{flex:none;font-size:11px;font-weight:700;padding:3px 9px;border-radius:999px;background:#eef1f6;color:#44526a}
.team-roster-state[data-state="Em obra"]{background:#fff4dc;color:#8a5a00}
.team-roster-state[data-state="Dia registado"]{background:#e3f6ea;color:#11753a}
/* People list: beside the chosen person's card on wide computers; on the phone each name opens its card in a popup. */
.team-roster{display:none;min-width:0;flex-direction:column;gap:2px;padding:10px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.team-roster-label{margin:10px 8px 4px;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px}
.team-roster-label:first-child{margin-top:2px}
.team-roster-item{display:flex;align-items:center;gap:12px;width:100%;min-width:0;min-height:52px;padding:8px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.team-roster-item:hover{background:var(--surface-2)}
.team-roster-inactive{opacity:.65}
.team-roster-avatar{display:grid;place-items:center;width:36px;height:36px;flex:none;border-radius:999px;overflow:hidden;background:var(--surface-2);color:var(--muted);font-size:12px;font-weight:700}
.team-roster-avatar img{width:100%;height:100%;object-fit:cover}
.team-roster-text{display:flex;flex-direction:column;min-width:0;flex:1}
.team-roster-text strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.team-roster-text small{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (min-width:1200px) and (pointer:fine),(min-width:1200px) and (pointer:none){
/* The page: a full-height people list on the left, the chosen person on the right. */
html body.workspace-layout[data-workspace-view=equipa] #portal{max-width:none;margin:0;padding:0!important}
html body.workspace-layout[data-workspace-view=equipa] #portal-content{display:grid;grid-template-columns:380px minmax(0,1fr);grid-template-rows:auto 1fr;min-height:calc(100vh - 64px)}
html body.workspace-layout[data-workspace-view=equipa] #portal-content>.portal-head{grid-column:1;grid-row:1;margin:0;padding:24px 20px 10px;flex-wrap:wrap;gap:10px;background:var(--surface);border-right:1px solid var(--line)}
html body.workspace-layout[data-workspace-view=equipa] #portal-content>.portal-head h2{font-size:24px}
.team-view.team-split{display:contents}
.team-split .team-roster{display:flex;grid-column:1;grid-row:2;padding:0 0 24px;border:0;border-right:1px solid var(--line);border-radius:0;background:var(--surface)}
.team-split>:not(.team-roster){grid-column:2;grid-row:1/span 2;width:100%;max-width:860px;justify-self:center;box-sizing:border-box;padding:26px 32px 48px}
.team-roster-label{margin:14px 20px 6px;letter-spacing:.06em}
.team-roster-item{gap:12px;padding:12px 20px 12px 17px;border-radius:0;border-left:3px solid transparent}
.team-roster-item[aria-pressed=true]{background:#f3f6ff}
.team-roster-avatar{width:40px;height:40px;background:#e6ecfb;color:#2148c0;font-size:13px;font-weight:800}
.team-split .team-group:not(:has(.team-person.is-selected)),.team-split .team-inactive:not(:has(.team-person.is-selected)),.team-split .team-group-heading,.team-split .team-inactive>summary{display:none}
.team-split .team-inactive{border:0}
.team-split .team-people{display:block}
.team-split .team-person:not(.is-selected){display:none}
/* The chosen person: name and actions on top, the numbers as cards, the next job and the account below. */
.team-split .team-person.is-selected{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;padding:0;border:0;background:transparent;box-shadow:none}
.team-split .is-selected .team-person-heading{grid-column:1;grid-row:1;min-height:0;gap:14px}
.team-split .is-selected .team-portrait{width:64px;height:64px;border:0;outline:0;background:#e6ecfb;color:#2148c0;font-size:20px;font-weight:800}
.team-split .is-selected .team-member-name{font-size:24px;font-weight:800}
.team-split .is-selected .team-member-role{margin-top:2px;font-size:13px}
.team-split .is-selected .team-person-actions{grid-column:2;grid-row:1;align-self:center;margin:0;padding:0;gap:8px}
html body .team-split .is-selected .team-action{flex:none;width:44px;min-width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:999px;background:var(--surface)}
html body .team-split .is-selected .team-action>span:not(.team-icon){display:none}
.team-split .is-selected .team-action .team-icon{color:var(--ink)}
.team-split .is-selected .team-person-stats{grid-column:1/-1;margin:0;padding:0;border:0;gap:12px}
.team-split .is-selected .team-stat{padding:16px 18px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.team-split .is-selected .team-stat dd{font-size:24px;font-weight:800}
.team-split .is-selected .team-stat dt{font-size:12px;font-weight:600}
.team-split .is-selected .team-next-job{grid-column:1/-1;margin:0;padding:18px 22px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
.team-split .is-selected .team-account{grid-column:1/-1;margin:0;padding:18px 22px;border:1px solid var(--line);border-radius:18px;background:var(--surface)}
}
@media screen and (max-width:760px), screen and (pointer:coarse) and (max-height:540px){
.team-split .team-roster{display:flex;padding:6px}
.team-split>:not(.team-roster){display:none}
.team-roster-item::after{content:"";width:8px;height:8px;margin-right:6px;border-right:2px solid var(--muted);border-top:2px solid var(--muted);transform:rotate(45deg);flex:none}
}

/* Calendário: the month as a grid with the chosen day beside it (computer), or stacked with dots (phone). */
.lbl-calendar { min-width: 0; }
.lbl-calendar-toolbar { display: flex; align-items: center; gap: 6px; }
.lbl-calendar-toolbar .btn { min-width: 40px; min-height: 40px; }
.lbl-calendar-month-label { position: relative; display: flex; align-items: center; justify-content: center; min-width: 140px; font-size: 15px; font-weight: 700; cursor: pointer; }
.lbl-calendar-month-label > span::first-letter { text-transform: uppercase; }
@media (min-width: 901px) { .lbl-calendar-month-label > :not(span:first-child) { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; cursor: pointer; } }
/* Computer: the year with its twelve months instead of month arrows; the year opens the month picker.
   The year arrows and Hoje share the flat month look, not the app's grey pill. */
.lbl-calendar-toolbar.is-year { gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.lbl-calendar-year { position: relative; display: flex; align-items: center; padding: 0 6px; font-size: 15px; font-weight: 800; cursor: pointer; }
.lbl-calendar-year > :not(span:first-child) { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; cursor: pointer; }
.lbl-calendar-months { display: flex; flex-wrap: wrap; gap: 2px; margin: 0 4px; padding: 0 6px; border-inline: 1px solid var(--line); }
.lbl-calendar-month { appearance: none; min-height: 36px; padding: 0 9px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.lbl-calendar-month:hover { background: var(--surface-2); color: var(--ink); }
.lbl-calendar-month[aria-current=date] { color: var(--accent); }
.lbl-calendar-month[aria-pressed=true] { background: var(--accent); color: #fff; }
.lbl-calendar-month:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
/* Computer: the calendar takes the whole width under the top bar. */
@media (min-width: 761px) and (min-height: 541px), (min-width: 761px) and (pointer: fine), (min-width: 761px) and (pointer: none) {
  html body.workspace-layout[data-workspace-view=calendario] #portal { max-width: none; padding-inline: 32px; }
  html body.workspace-layout[data-workspace-view=calendario] #portal-content > .portal-head { margin-bottom: 16px; }
}
.lbl-calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }

/* The month. */
.lbl-calendar-board { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.lbl-calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.lbl-calendar-weekdays > span { padding: 12px 12px 10px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lbl-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: minmax(112px, auto); }
.lbl-calendar-day { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; padding: 8px; overflow: hidden; appearance: none; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.lbl-calendar-day:nth-child(7n) { border-right: 0; }
.lbl-calendar-day:hover { background: var(--surface-2); }
.lbl-calendar-day.selected { background: #f3f6ff; box-shadow: inset 0 0 0 2px var(--accent); }
.lbl-calendar-day:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; }
.lbl-calendar-date { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--ink); }
.lbl-calendar-day.adjacent .lbl-calendar-date { color: #b8c2d3; }
.lbl-calendar-day.today .lbl-calendar-date { background: var(--accent); color: #fff; }
.portal .lbl-calendar-day .calendar-weather-mini { position: absolute; top: 10px; right: 8px; display: flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.portal .lbl-calendar-day .calendar-weather-mini .calendar-weather-icon { width: 16px; height: 16px; }
.calendar-day-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; width: 100%; }
.portal .calendar-day-items > * { display: block; max-width: 100%; box-sizing: border-box; padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 600; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.portal .calendar-day-items .lbl-calendar-event { background: #edf2ff; color: #2148c0; }
.portal .calendar-day-items .lbl-calendar-event[data-state="Em curso"] { background: #fff4dc; color: #8a5a00; }
.portal .calendar-day-items .lbl-calendar-event[data-state="Concluída"] { background: #e3f6ea; color: #11753a; }
.portal .calendar-day-items .calendar-more { padding: 0 7px; font-weight: 700; color: var(--muted); }
.portal .calendar-day-items .calendar-mark { border-radius: 6px; }

/* Holidays, closures and leave. */
.calendar-mark { display: inline-flex; align-items: center; max-width: 100%; padding: 0 10px; height: 26px; box-sizing: border-box; border-radius: 999px; font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-mark[data-kind=holiday] { background: #fdecec; color: #b42318; }
.calendar-mark[data-kind=closure] { background: #eef1f6; color: #44526a; }
.calendar-mark[data-kind=leave] { background: #f1ebfa; color: #5b3a8c; }
.calendar-mark[data-kind=leave-pending] { background: var(--surface); color: #5b3a8c; box-shadow: inset 0 0 0 1px #a98bd6; }
.calendar-mark[data-kind=sick] { background: #fff1e0; color: #9a4b00; }
.portal .calendar-day-items .calendar-mark { height: auto; }
.portal .calendar-day-items .calendar-mark[data-kind=leave-pending] { box-shadow: none; border: 1px dashed #a98bd6; }
.calendar-marks { display: flex; flex-wrap: wrap; gap: 6px; }

/* The chosen day. */
.lbl-calendar-agenda { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.calendar-agenda-head small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.calendar-agenda-head small::first-letter { text-transform: uppercase; }
.portal .calendar-agenda-head h3 { margin: 2px 0 0; font-size: 20px; font-weight: 800; }
.lbl-calendar-agenda > .empty, .lbl-calendar-agenda > p { margin: 8px 0; color: var(--muted); font-size: 14px; }
.calendar-weather-panel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13px; color: #44526a; }
.calendar-weather-panel > strong { font-size: 13px; }
.calendar-weather-place { margin: 0; overflow-wrap: anywhere; }
.calendar-weather-place + .calendar-weather-place { padding: 0; border: 0; }
.calendar-weather-place p { margin: 0; font-weight: 600; font-size: 13px; }
.calendar-weather-place small, .calendar-weather-source, .calendar-weather-credit { font-size: 11px; color: var(--muted); }
.calendar-weather-source, .calendar-weather-credit { margin: 0; }
.calendar-weather-credit a { color: inherit; }
.portal .lbl-calendar-agenda .calendar-job { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: none; }
.calendar-job-top { display: flex; align-items: center; gap: 8px; }
.calendar-job-time { flex: 1 1 auto; font-size: 12px; font-weight: 700; color: var(--accent); }
.portal .calendar-job .portal-job-title { padding: 0; border: 0; background: transparent; font-size: 15px; font-weight: 800; text-align: left; color: var(--ink); }
.portal .calendar-job .calendar-job-location { margin: 0; font-size: 12px; color: var(--muted); }
.portal .calendar-job .calendar-job-actions { display: flex; gap: 6px; padding-top: 4px; }
.portal .calendar-job .calendar-job-actions .icon-only { width: 38px; height: 38px; min-width: 38px; min-height: 38px; }

/* Legend under the month. */
.calendar-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 20px; font-size: 12px; color: #44526a; }
.calendar-legend > span { display: flex; align-items: center; gap: 6px; }
.calendar-legend i { width: 12px; height: 12px; box-sizing: border-box; border-radius: 4px; }
.calendar-legend i[data-kind=holiday] { background: #fdecec; border: 1px solid #f3b8b8; }
.calendar-legend i[data-kind=leave] { background: #f1ebfa; border: 1px solid #cdb9ea; }
.calendar-legend i[data-kind=leave-pending] { background: var(--surface); border: 1px dashed #a98bd6; }
.calendar-legend i[data-kind=sick] { background: #fff1e0; border: 1px solid #f2c48c; }
.calendar-legend i[data-kind=job] { background: #edf2ff; border: 1px solid #c4d3fb; }
.calendar-legend small { flex: 1 1 auto; text-align: right; font-size: 12px; color: var(--muted); }

/* Owners can move existing jobs; touch handles also offer a date picker. */
@media screen {
  .lbl-calendar-event[draggable=true] { cursor: grab; }
  .lbl-calendar-event[draggable=true]:active { cursor: grabbing; }
  .lbl-calendar-day.drop-target { box-shadow: inset 0 0 0 3px var(--accent); background: var(--accent-soft); }
  .portal .calendar-move-handle { touch-action: none; cursor: grab; user-select: none; }
  .moving-job { user-select: none; }
}
/* Computer: the weeks fill the screen height, so each day shows its jobs in full. */
@media screen and (min-width: 901px) {
  .lbl-calendar-grid { grid-auto-rows: minmax(max(112px, calc(var(--calendar-height, 0px) / var(--calendar-rows, 6))), auto); }
  .portal .calendar-day-items > * { font-size: 12px; }
}
@media (min-width: 1500px) { .lbl-calendar-layout { grid-template-columns: minmax(0, 1fr) 380px; } }
@media (max-width: 1100px) { .lbl-calendar-layout { grid-template-columns: minmax(0, 1fr) 290px; } }
@media print { .calendar-weather-panel, .calendar-weather-source, .calendar-weather-credit, .calendar-weather-mini, .calendar-legend { display: none; } }

/* Narrow screens and the phone: one column, smaller days with coloured dots. */
@media (max-width: 900px) {
  .lbl-calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .lbl-calendar-board { padding: 6px; border-radius: 16px; }
  .lbl-calendar-toolbar { flex-wrap: wrap; justify-content: space-between; margin: 6px 6px 12px; }
  .lbl-calendar-toolbar > .portal-actions { display: flex; gap: 6px; }
  .lbl-calendar-weekdays { border: 0; }
  .lbl-calendar-weekdays > span { padding: 8px 0; text-align: center; }
  .lbl-calendar-grid { grid-auto-rows: minmax(64px, auto); gap: 2px; }
  .lbl-calendar-day { align-items: center; padding: 4px 2px; border: 0; border-radius: 10px; }
  .lbl-calendar-day.selected { box-shadow: inset 0 0 0 1.5px var(--accent); }
  .portal .lbl-calendar-day .calendar-weather-mini { position: static; justify-content: center; }
  .calendar-legend { display: none; }
}
@media screen and (max-width: 760px), screen and (pointer: coarse) and (max-height: 540px) {
  .calendar-day-items { flex-direction: row; justify-content: center; flex-wrap: wrap; gap: 3px; }
  .portal .calendar-day-items > * { width: 6px; height: 6px; padding: 0; border-radius: 50%; font-size: 0; }
  .portal .calendar-day-items .lbl-calendar-event { background: var(--accent); }
  .portal .calendar-day-items .calendar-more { display: none; }
}

@media screen {
  /* Service table laid out like the lines of a Moloni invoice. */
  .service-prices{min-width:0;color:var(--ink)}
  .service-prices-toolbar{display:flex;align-items:flex-end;gap:16px;margin-bottom:20px}
  .portal .service-prices-search{display:flex;flex-direction:column;gap:6px;flex:1;max-width:460px;font-size:12px;font-weight:650}
  .service-prices-search input{height:44px;margin:0;width:100%;min-width:0;box-sizing:border-box}
  .service-prices-meta{display:flex;align-items:center;gap:12px;height:44px;flex:1}
  .service-prices-meta>.muted{font-size:12px;margin-left:auto}
  .service-prices-groups{display:grid;gap:18px}
  .service-prices-group{min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:14px;overflow:hidden}
  .portal .service-prices-group h3{margin:0;padding:14px 18px;background:var(--surface-2);border-bottom:1px solid var(--line);font-size:14px}
  .service-prices-group ul{list-style:none;margin:0;padding:0}

  /* Columns: designation | unit | unit price | VAT | with VAT | edit */
  .service-line{display:grid;grid-template-columns:minmax(0,1fr) 64px 120px 52px 110px 72px;column-gap:14px;align-items:center;padding:12px 18px}
  .service-line-head{padding-top:9px;padding-bottom:9px;border-bottom:1px solid var(--line);font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.03em}
  .service-price-row{border-bottom:1px solid var(--line)}
  .service-price-row:last-child{border-bottom:0}
  .service-line-main{display:flex;flex-direction:column;gap:2px;min-width:0}
  .service-line-ref{font-size:11px;font-weight:700;color:var(--accent);letter-spacing:.02em;overflow-wrap:anywhere}
  .service-price-name{font-size:14px;line-height:1.4;overflow-wrap:anywhere}
  .service-line-desc{font-size:12px;line-height:1.4;color:var(--muted);overflow-wrap:anywhere}
  .service-line-unit,.service-line-vat{font-size:13px;color:var(--muted);text-align:center}
  .service-line-price,.service-line-total{font-size:14px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
  .service-line-total{color:var(--muted)}
  .service-line-head .service-line-price,.service-line-head .service-line-total{font-size:11px}
  .service-line-head::after{content:''}
  .service-price-row:not(:has(.service-price-edit))::after{content:''}
  .portal .service-price-edit{justify-self:end}
  .service-prices-note{font-size:12px;line-height:1.6;color:var(--muted);margin:16px 0 0}
}

/* Phone: designation on the left; price, VAT and price with VAT stacked on the right. */
@media screen and (max-width:760px),screen and (pointer:coarse) and (max-height:540px){
  .service-prices-toolbar{flex-direction:column;align-items:stretch;gap:8px;margin-bottom:14px}
  .portal .service-prices-search{max-width:none}
  .service-prices-meta{height:auto;justify-content:space-between}
  .service-line-head{display:none}
  .service-line{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main price" "main total";row-gap:2px;padding:12px 14px}
  .service-price-row:has(.service-price-edit){grid-template-columns:minmax(0,1fr) auto auto;grid-template-areas:"main price edit" "main total edit"}
  .service-line-main{grid-area:main}
  .service-line-price{grid-area:price;font-size:14px;font-weight:700}
  .service-line-total{grid-area:total;font-size:12px;text-align:right}
  .service-line-total::before{content:'c/ IVA '}
  .service-line-unit,.service-line-vat{display:none}
  .portal .service-price-edit{grid-area:edit;margin-left:4px}
  .portal .service-prices-group h3{padding:12px 14px;font-size:13px}
}
@media screen and (max-width:760px),screen and (pointer:coarse) and (max-height:540px){.service-price-row::after,.service-line-head::after{display:none}}
@media screen{.service-line-head>span{font-size:11px!important;color:var(--muted)!important;text-align:inherit}.service-line-head .service-line-unit,.service-line-head .service-line-vat{text-align:center}}
@media screen{.service-prices-tax{padding:7px 11px;background:var(--accent-soft);color:var(--accent);border-radius:9px;font-size:12px;font-weight:700;white-space:nowrap}}
@media screen and (min-width:761px) and (max-width:1100px){.service-line{grid-template-columns:minmax(0,1fr) 52px 104px 44px 72px;column-gap:10px;padding-left:14px;padding-right:14px}.service-line-total{display:none}}
@media screen{
  .service-prices-kinds{display:flex;gap:8px;margin:0 0 16px}
  .portal .service-prices-kind{min-height:36px;padding:0 16px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:13px;font-weight:600;cursor:pointer}
  .portal .service-prices-kind[aria-pressed="true"]{background:var(--accent);border-color:var(--accent);color:#fff}
  .service-prices-group h3{display:flex;align-items:baseline;gap:10px}
  .service-prices-group-kind{font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.04em}
}

@media screen {
 .app-settings-list{display:grid;border:1px solid var(--line);border-radius:16px;overflow:hidden;background:var(--surface)}
 .app-settings-row{display:flex;align-items:center;gap:16px;width:100%;padding:20px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--ink);text-align:left;font:inherit;cursor:pointer;min-height:76px}
 .app-settings-row:last-child{border-bottom:0}.app-settings-row:hover{background:var(--surface-2)}.app-settings-row:focus-visible{outline:2px solid var(--accent);outline-offset:-3px}
 .app-settings-row>.workspace-icon{width:23px;height:23px;color:var(--muted);flex:none}.app-settings-row>.workspace-icon:last-child{width:16px;margin-left:auto}.app-settings-row>span:not(.workspace-icon):not(.app-settings-toggle){display:grid;gap:4px}.app-settings-row strong{font-size:15px}.app-settings-row small{color:var(--muted);font-size:12px}
 .app-settings-toggle{margin-left:auto;flex:none;width:40px;height:24px;border-radius:20px;background:var(--surface-3);border:1px solid var(--line);position:relative}.app-settings-toggle:after{content:'';position:absolute;top:3px;left:3px;width:16px;height:16px;border-radius:50%;background:var(--muted)}.app-settings-row[aria-checked=true] .app-settings-toggle{background:var(--accent)}.app-settings-row[aria-checked=true] .app-settings-toggle:after{left:19px;background:var(--accent-ink)}
 .portal-form-section{min-width:0;padding:22px 0;border-top:1px solid var(--line)}
 .portal-form-section:first-of-type{border-top:0;padding-top:4px}
 .portal-form-section>h3{font-size:16px!important;margin:0 0 16px!important}
 .portal-form-section .portal-grid{gap:16px 20px}
 .portal-job-form>h3,.portal-day-form>h3{display:none}
 .portal-job-form .portal-crew{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;border:0;padding:0;margin:0}
 .portal-job-form .portal-check{padding:12px;background:var(--surface-2);border:1px solid var(--line);border-radius:9px;display:flex;align-items:center;gap:10px;margin:0}
 .portal-job-form .portal-check:has(:checked){background:var(--accent-soft);border-color:var(--accent)}
 .portal-gps-tools{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:14px}
 .portal-gps-tools output{font-size:13px;overflow-wrap:anywhere;color:var(--muted);flex:1;min-width:160px}
 .portal-gps-override{margin-top:18px}.portal-gps-override>summary{cursor:pointer;font-weight:600;font-size:13px}.portal-gps-override>label{margin-top:14px}
 .portal-popup-content form>.portal-actions{gap:10px}
 .workspace-report-issue{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:12px;border:1px solid #ffffff1c;border-radius:12px;color:#c4d1e3;font:inherit;font-size:12px;font-weight:600;text-align:left;cursor:pointer;transition:background .15s,border-color .15s,color .15s}
 .workspace-report-issue svg{width:19px;height:19px;flex:none;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
 .workspace-report-issue svg:last-child{width:14px;height:14px;margin-left:auto;color:#92a7c2}
 .workspace-report-issue:hover{color:#fff;border-color:#ffffff35}
 .workspace-report-issue:focus-visible{outline:2px solid #99b6ff;outline-offset:3px}
 .app-report-photo{margin-top:20px;display:grid;gap:12px}.app-report-photo img{max-width:100%;max-height:340px;object-fit:contain;border-radius:8px}.app-report-photo>button{justify-self:start}.app-report-photo>p:empty{display:none}
 .app-report-items{display:grid;gap:12px;margin-top:20px}.app-report-list>select{max-width:260px}
 .app-report-item{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 20px;padding:20px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);text-align:left;cursor:pointer;font:inherit}
 .app-report-item>strong{font-size:16px;overflow-wrap:anywhere}.app-report-item>span:nth-child(2){grid-column:1;font-size:13px;color:var(--muted);overflow-wrap:anywhere}.app-report-item>.portal-badge{grid-column:2;grid-row:1/3;align-self:center}.app-report-item:hover{border-color:var(--accent)}
 .app-report-detail-image{width:100%;max-height:75vh;object-fit:contain;margin-top:20px;border:1px solid var(--line);border-radius:8px}
 @media(max-width:760px),(pointer:coarse) and (max-height:540px){.portal-form-section{padding:20px 0}.portal-job-form .portal-grid{grid-template-columns:1fr 1fr}.portal-job-form .portal-grid>label:has([name=titulo], [name=cliente], [name=contacto], [name=endereco_rua], [name=endereco_localidade], textarea){grid-column:1/-1}.app-report-item{padding:16px;grid-template-columns:1fr}.app-report-item>.portal-badge{grid-row:auto;grid-column:1;justify-self:start}}
}

.draft-status:empty{display:none}

.topbar-right #btn-theme{display:none!important}

/* Grouped account and preferences page (O meu perfil on the phone, Definições on the computer). */
.app-settings-page{display:grid;gap:10px;max-width:640px}
#portal-popup .app-settings-group{margin:14px 4px 0;font-size:12px;line-height:16px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
#portal-popup .app-settings-page>.app-settings-group:first-child{margin-top:0}
#portal-popup .native-menu-page>.app-settings-group{margin:8px 4px -6px}
.native-menu-row .app-settings-toggle{margin-left:auto}
.native-menu-row[aria-checked=true] .app-settings-toggle{background:var(--accent)}
.native-menu-row[aria-checked=true] .app-settings-toggle:after{left:19px;background:var(--accent-ink)}
@media screen{
.holidays-toolbar{display:flex;align-items:end;gap:14px;flex-wrap:wrap;margin-bottom:24px}.holidays-toolbar>label{display:grid;gap:7px;font-size:12px}.holidays-toolbar input{width:110px}.holidays-toolbar select{max-width:250px}
.holidays-stats{display:grid;grid-template-columns:repeat(3,1fr);border:1px solid var(--line);border-radius:14px;background:var(--surface);overflow:hidden}.holidays-stats>div{padding:22px;display:grid;gap:7px;border-right:1px solid var(--line)}.holidays-stats>div:last-child{border:0}.holidays-stats span,.holidays-stats small{font-size:12px;color:var(--muted)}.holidays-stats strong{font-size:32px;line-height:1.1}.holidays-stats>div:first-child strong{color:var(--accent)}.holidays-annual{font-size:12px;color:var(--muted);margin:12px 0 28px}
.holidays-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(290px,380px);gap:30px}.holidays-layout h3{margin:0 0 16px;font-size:17px}.holidays-list{display:grid;}.holidays-request{display:grid;gap:9px;padding:18px 0;border-bottom:1px solid var(--line);font-size:14px;min-width:0}.holidays-request p{white-space:pre-wrap;overflow-wrap:anywhere;margin:3px 0}.holidays-request-top{display:flex;flex-wrap:wrap}.holidays-request .portal-actions{justify-content:flex-start;flex-wrap:wrap;gap:6px}.holidays-state{font-size:11px;padding:5px 8px;border-radius:6px;background:var(--surface-3);color:var(--muted)}.holidays-state[data-state=Aprovada]{color:var(--accent);background:var(--accent-soft)}.holidays-state[data-state=Pendente]{border:1px dashed var(--accent);background:transparent;color:var(--accent)}.holidays-review{margin-bottom:24px;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.holidays-review>summary{cursor:pointer;font-weight:600;font-size:14px;min-height:28px}.holidays-count{display:block;margin:16px 0;color:var(--accent);font-weight:600}.holidays-calendar{padding:18px!important;margin-bottom:26px}.holidays-month-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.holidays-month-head strong{text-transform:capitalize;font-size:14px}.holidays-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px;text-align:center;font-size:12px}.holidays-weekday{color:var(--muted);padding:8px 0}.holidays-day{display:grid;place-items:center;aspect-ratio:1;border-radius:7px}.holidays-day.is-nonworking{color:var(--muted);opacity:.55}.holidays-day.is-pending{border:1px dashed var(--accent);color:var(--accent)}@media(max-width:760px),(pointer:coarse) and (max-height:540px){.holidays-layout{grid-template-columns:1fr;gap:28px}}
}

@media screen{.holidays-closures{margin-bottom:26px}}

@media screen{.holidays-person-mark{display:inline-flex;align-items:center;justify-content:center;background:var(--person-color);color:#fff!important;border-radius:4px;font-size:10px!important;font-weight:600;min-width:22px;min-height:18px;padding:2px 3px;line-height:1.1}}

@media screen{
.workspace-layout #portal:has(.holidays-layout){max-width:1440px;margin:auto}
.holidays-list{grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));align-items:start;gap:14px}
.holidays-list .holidays-request{padding:18px;border:1px solid var(--line);border-radius:10px;background:var(--surface);align-content:start;gap:12px}
.holidays-request-person{display:flex;align-items:center;gap:9px;font-size:15px}
.holidays-request-top{justify-content:flex-start;gap:8px;align-items:center}.holidays-request-top>strong{font-size:13px}.holidays-request-top .holidays-state{margin-left:0}
.holidays-list .holidays-request>.muted{font-size:12px}.holidays-request .portal-actions{margin-top:3px}
@media(max-width:760px),(pointer:coarse) and (max-height:540px){.holidays-list{grid-template-columns:1fr}.holidays-list .holidays-request{padding:16px}}
}

/* Neutral period bands sit above their day numbers, split at each week. */
.holidays-band-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px 0;border-top:1px solid var(--line);padding:9px 0 5px;align-items:start}
.holidays-calendar-band{display:block;min-width:0;width:100%;box-sizing:border-box;border:1px solid var(--line);border-radius:5px;background:var(--surface-3);color:var(--ink);font:inherit;font-size:11px;font-weight:600;padding:7px 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;cursor:pointer;min-height:30px}
.holidays-calendar-band.is-pending{border-style:dashed;background:var(--surface)}.holidays-calendar-band.is-company{background:var(--surface-2);font-weight:400}
.holidays-calendar-bands .holidays-day{aspect-ratio:auto;min-height:30px;font-size:12px;background:none;border:0;color:var(--ink)}.holidays-calendar-bands .holidays-day.is-nonworking{color:var(--muted);opacity:1}
.holidays-band-legend{display:flex;gap:16px;margin-top:14px;color:var(--muted);font-size:11px}.holidays-band-legend span:before{content:'';display:inline-block;width:16px;height:8px;margin-right:5px;border:1px solid var(--line);border-radius:2px;background:var(--surface-3)}.holidays-band-legend .is-pending:before{border-style:dashed;background:var(--surface)}.holidays-calendar-detail{font-size:12px;line-height:1.5;margin:12px 0 0;color:var(--muted);overflow-wrap:anywhere}
@media(pointer:coarse){.holidays-calendar-band{min-height:44px}}

/* Panoramic calendar: day numbers are on top of the period backgrounds. */
.holidays-toolbar{align-items:flex-end}.holidays-toolbar .holidays-mark{margin-left:auto;align-self:flex-end;min-height:44px}.holidays-heading{margin:0!important}
.holidays-panorama .holidays-calendar{width:100%;max-width:none;margin-bottom:22px}.holidays-panorama .holidays-layout{display:flex;flex-direction:column;gap:24px}.holidays-panorama .holidays-management,.holidays-panorama .holidays-periods{width:100%;min-width:0}.holidays-management{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}.holidays-management .holidays-closures{background:var(--surface);border:1px solid var(--line);padding:20px;border-radius:12px}.holidays-management .holidays-review{margin:0}.holidays-management .holidays-closures:only-child{grid-column:1/-1}
.holidays-panorama .holidays-band-week{position:relative;isolation:isolate;border:0;gap:0;align-items:stretch;padding:0;margin:5px 0;min-height:62px;grid-auto-rows:minmax(62px,auto)}
.holidays-panorama .holidays-calendar-band{position:relative;z-index:1;border-radius:7px;padding:0;min-height:56px;margin:3px 1px;width:auto;text-align:left}.holidays-band-name{position:absolute;top:6px;left:8px;right:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.holidays-panorama .holidays-calendar-band.is-pending{border:1px dashed var(--muted);background:var(--surface)}.holidays-panorama .holidays-calendar-band.is-company{background:repeating-linear-gradient(135deg,var(--surface-2) 0px,var(--surface-2) 5px,var(--line) 5px,var(--line) 6px)}
.holidays-panorama .holidays-day{position:relative;z-index:2;pointer-events:none;padding-top:5px;background:transparent}.holidays-panorama .holidays-day.is-nonworking{opacity:1}.holidays-band-legend .is-company:before{background:var(--surface-2);border-style:dashed}
.holidays-panorama .holidays-periods>.holidays-list{display:grid;grid-template-columns:1fr;gap:0;border:1px solid var(--line);border-radius:12px;background:var(--surface);padding:0 18px}.holidays-panorama .holidays-periods>.holidays-list>.holidays-request{display:grid;grid-template-columns:minmax(90px,.6fr) minmax(210px,1.4fr) minmax(110px,.7fr) auto;gap:10px;align-items:center;border:0;border-bottom:1px solid var(--line);border-radius:0;padding:16px 0;box-shadow:none}.holidays-panorama .holidays-periods>.holidays-list>.holidays-request:last-child{border-bottom:0}.holidays-panorama .holidays-request-person .holidays-person-mark{display:none}.holidays-panorama .holidays-request p{grid-column:1/-1}.holidays-panorama .holidays-request .portal-actions{margin:0}
@media(max-width:900px){.holidays-panorama .holidays-periods>.holidays-list>.holidays-request{grid-template-columns:1fr 1fr}.holidays-panorama .holidays-request .portal-actions{justify-content:flex-end}}
@media(max-width:600px){.holidays-toolbar .holidays-mark{margin-left:0;flex:1}.holidays-management{grid-template-columns:1fr}.holidays-panorama .holidays-periods>.holidays-list>.holidays-request{grid-template-columns:1fr}.holidays-panorama .holidays-request .portal-actions{justify-content:flex-start}.holidays-panorama .holidays-calendar{padding:14px 10px!important}.holidays-band-name{left:4px}.holidays-panorama .holidays-band-week{min-height:60px;grid-auto-rows:minmax(60px,auto)}}

.holidays-management.is-personal{grid-template-columns:1fr}

.holidays-day-pick{pointer-events:auto;position:relative;display:grid;place-items:center;min-width:32px;min-height:32px;padding:4px;border:0;border-radius:6px;background:transparent;color:inherit;font:inherit;cursor:pointer}.holidays-day-pick:hover{background:var(--surface-2)}.holidays-day.is-holiday:after{content:'';position:absolute;bottom:2px;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:currentColor}.holidays-day.is-holiday .holidays-day-pick{font-weight:700}@media(pointer:coarse){.holidays-day-pick{min-width:38px;min-height:38px}}

/* All periods share one week row; extra labels never push dates off their bands. */
.holidays-panorama .holidays-band-week{grid-template-rows:calc(40px + 24px * var(--band-lanes,1));grid-auto-rows:auto}
.holidays-panorama .holidays-calendar-band{background:transparent!important;border:0!important;pointer-events:none;overflow:visible}
.holidays-panorama .holidays-band-name{pointer-events:auto;cursor:pointer}
.holidays-band-backdrop{z-index:0;margin:3px 1px;border-radius:7px;background:var(--surface-3);pointer-events:none;min-width:0}
.holidays-band-backdrop.is-pending{border:1px dashed var(--muted);background:transparent}
.holidays-band-backdrop.is-company{background:repeating-linear-gradient(135deg,transparent 0px,transparent 5px,var(--line) 5px,var(--line) 6px)}
/* Stable date position in every week; labels have their own space below. */
.holidays-panorama .holidays-band-week{grid-template-rows:calc(50px + 24px * var(--band-lanes,1))}
.holidays-panorama .holidays-day{align-self:start;height:44px;min-height:44px;padding:0;margin-top:3px}
.holidays-panorama .holidays-band-name{top:calc(44px + 24px * var(--band-lane,0));line-height:20px}
.holidays-period-form{max-width:800px;margin-inline:auto;width:100%;min-width:0}
.holidays-range-picker{min-width:0;margin:16px 0}.holidays-range-choices{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.holidays-range-choices>button{display:block;text-align:left;padding:12px 14px;min-width:0;background:var(--surface);border:1px solid var(--line);border-radius:10px;color:var(--ink)}
.holidays-range-choices small{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}.holidays-range-choices strong{font-size:15px;font-weight:600}
.holidays-range-choices>button[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft)}
.holidays-range-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:20px 0 10px}.holidays-range-nav>span{font-size:12px;color:var(--muted);text-align:center}.holidays-range-nav>button{min-width:44px;min-height:44px}
.holidays-range-months{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;touch-action:pan-y}.holidays-range-month{min-width:0}.holidays-range-month h4{text-align:center;text-transform:capitalize;font-size:15px;margin:8px 0 18px}
.holidays-range-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));row-gap:4px}.holidays-range-weekday{text-align:center;font-size:10px;color:var(--muted);padding-bottom:10px}
.holidays-range-day{position:relative;min-width:0;width:100%;height:44px;padding:0;border:0;border-radius:0;background:transparent;color:var(--ink);font:inherit;font-size:14px;cursor:pointer;box-shadow:none}
.holidays-range-day.is-weekend{color:var(--muted)}.holidays-range-day.in-range{background:var(--accent-soft);color:var(--ink)}
.holidays-range-day.is-start,.holidays-range-day.is-end{background:var(--accent);color:#fff;border-radius:8px}
.holidays-range-day.is-holiday:after{content:'•';position:absolute;bottom:0;left:0;right:0;text-align:center;font-size:10px}
.holidays-range-day:hover{outline:1px solid var(--accent);outline-offset:-1px}.holidays-range-day:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.holidays-range-picker .holidays-count{margin:18px 0 0;font-size:14px}
@media(max-width:600px){.holidays-range-months{grid-template-columns:1fr;gap:0}.holidays-range-month+.holidays-range-month{display:none}.holidays-range-choices{gap:8px}.holidays-range-choices>button{padding:10px}.holidays-range-picker{margin-top:10px}}

/* Sick leave (baixa): warm orange so it never reads as approved holidays. */
.holidays-state[data-state=Baixa]{color:#9a4b00;background:#fff1e0}
.holidays-calendar-band.is-sick,.holidays-band-backdrop.is-sick{background:#fff1e0}
.holidays-panorama .holidays-band-backdrop.is-sick{background:#fff1e0;border:1px solid #f2c48c}
.holidays-band-legend .is-sick:before{background:#fff1e0;border-color:#f2c48c}
.native-days-tag.is-sick{background:#fff1e0!important;color:#9a4b00!important}

/* Notes for jobs (job-notes.js): the Notas page, the note form, the job form section and the job card. */
.jn-list{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.jn-search{width:100%;border:1px solid var(--line);border-radius:999px;padding:10px 14px;background:var(--surface);color:var(--ink);font:inherit;font-size:14px}
.jn-page-search{margin:0 0 12px}
.jn-note{display:flex;gap:12px;align-items:flex-start;text-align:left;width:100%;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}
.jn-note:hover{background:var(--flat-hover,var(--surface-2))}
.jn-note-cover{width:64px;height:64px;flex:none;border-radius:12px;object-fit:cover;background:var(--surface-2)}
.jn-note-cover.is-empty{display:block;background:var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.6'%3E%3Cpath d='M6 3h11a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6zM10 8h6M10 12h6M10 16h3'/%3E%3C/svg%3E") center/26px no-repeat}
.jn-note-body{display:grid;gap:3px;min-width:0;flex:1}
.jn-note-top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.jn-note-top strong{font-size:15px;overflow-wrap:anywhere}
.jn-note-body small{color:var(--muted);font-size:13px;line-height:1.35;overflow-wrap:anywhere}
.jn-note-jobs{color:var(--accent)!important;font-weight:600}
.jn-tag{font-size:11px;font-weight:800;border-radius:999px;padding:3px 9px;white-space:nowrap;background:var(--tone-ok-bg,#ecfdf5);color:var(--tone-ok-ink,#047857)}
.jn-tag.is-off{background:var(--tone-warn-bg,#fff7ed);color:var(--tone-warn-ink,#b45309)}

.jn-form h4,.jn-equipment h4,.portal-job-form .portal-form-section h4{margin:14px 0 8px;font-size:14px}
.jn-form>label{margin-top:12px}
.jn-thumbs{display:flex;flex-wrap:wrap;gap:8px}
.jn-thumb{position:relative;margin:0;width:76px;height:76px;padding:0;border:0;border-radius:12px;overflow:hidden;background:var(--surface-2);cursor:pointer}
.jn-thumb-open{display:block;width:100%;height:100%;padding:0;border:0;background:none;cursor:zoom-in}
.jn-thumb-img{display:block;width:100%;height:100%;object-fit:cover}
.jn-thumb-img.is-broken{opacity:.3}
.jn-thumb-remove{position:absolute;top:4px;right:4px;width:24px;height:24px;border-radius:50%;border:0;background:#0f172acc;color:#fff;font-size:16px;line-height:1;cursor:pointer}
.jn-add{width:76px;height:76px;border-radius:12px;border:2px dashed var(--line);background:transparent;color:var(--muted);font-size:26px;display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.jn-add svg{width:28px;height:28px}
.jn-add:hover{border-color:var(--accent);color:var(--accent)}
.jn-status{margin:6px 0 0;color:var(--muted);font-size:13px}
.jn-status:empty{display:none}
.jn-moloni{font-size:10px;font-weight:800;color:var(--accent);background:var(--accent-soft);border-radius:6px;padding:2px 6px;vertical-align:2px}
.jn-equipment{margin-top:14px;padding:12px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.jn-equipment h4{margin-top:0}
.jn-results{display:grid;gap:4px;margin-top:6px}
.jn-results:empty{display:none}
.jn-result{display:grid;text-align:left;gap:2px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}
.jn-result:hover,.jn-result:focus-visible{border-color:var(--accent);background:var(--accent-soft)}
.jn-result strong{font-size:14px}.jn-result small{color:var(--muted);font-size:12px}
.jn-items{display:grid}
.jn-item{display:flex;gap:10px;align-items:center;padding:10px 0;border-top:1px solid var(--line)}
.jn-items .jn-item:first-child{border-top:0}
.jn-item-photo{width:56px;height:56px;flex:none;border-radius:10px;overflow:hidden;padding:0;border:0;background:var(--surface-2);cursor:pointer}
.jn-item-photo.jn-add{font-size:11px;font-weight:700}
.jn-item-photo.is-empty{display:block;cursor:default}
.jn-item-text{display:grid;gap:2px;min-width:0;flex:1}
.jn-item-text strong{font-size:14px;overflow-wrap:anywhere}
.jn-item-text small{color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.jn-item.is-editing{flex-wrap:wrap}
.jn-item-note{flex-basis:100%;padding:8px 12px;font-size:14px;min-height:0}
.jn-item-tools{display:flex;flex-wrap:wrap;gap:4px 12px;margin-top:2px}
.jn-link{border:0;background:none;color:var(--accent);font:inherit;font-size:12px;font-weight:700;padding:2px 0;cursor:pointer}
.jn-item-remove{width:28px;height:28px;flex:none;border-radius:50%;border:0;background:var(--surface-2);color:var(--muted);font-size:17px;line-height:1;cursor:pointer}
.jn-jobs{margin:14px 0 0;padding:12px;border:1px solid var(--line);border-radius:16px;display:grid;gap:4px;max-height:280px;overflow:auto}
.jn-jobs legend{font-weight:800;font-size:14px;padding:0 4px}
.jn-job{display:flex!important;gap:10px;align-items:flex-start;padding:6px 2px;font-weight:400!important}
.jn-job input{width:18px;height:18px;margin-top:2px;flex:none}
.jn-job span{display:grid;gap:1px}.jn-job strong{font-size:14px}.jn-job small{color:var(--muted);font-size:12px}
.jn-linked{display:grid;gap:8px;margin-bottom:8px}
.jn-linked-note{display:flex;gap:10px;align-items:center;padding:8px;border:2px solid var(--accent);background:var(--accent-soft);border-radius:14px}
.jn-linked-note>img,.jn-linked-note>.jn-note-cover{width:44px;height:44px;border-radius:10px;object-fit:cover;flex:none}
.jn-linked-note span{display:grid;gap:1px;flex:1;min-width:0}.jn-linked-note strong{font-size:14px}.jn-linked-note small{color:var(--muted);font-size:12px}
.jn-add-note{width:100%}

.jn-job-card{margin-top:12px;padding:14px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.jn-job-card h3{margin:0 0 10px;font-size:16px}
.jn-job-card h4{margin:12px 0 6px;font-size:14px}
.jn-job-card .jn-thumb{width:84px;height:84px}
.jn-job-note+.jn-job-note{margin-top:8px;padding-top:4px;border-top:1px solid var(--line)}
.jn-job-text{margin:8px 0 4px;font-size:14px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.native-sheet-card .jn-job-card{margin:12px 0 0}

.jn-viewer{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:0;border:0;background:#000;color:#fff}
.jn-viewer::backdrop{background:#000c}
.jn-viewer[open]{display:flex;flex-direction:column}
.jn-viewer-bar{display:flex;justify-content:space-between;align-items:center;padding:calc(10px + env(safe-area-inset-top)) 14px 10px}
.jn-viewer-count{font-weight:700;font-size:14px}
.jn-viewer-stage{flex:1;display:flex;align-items:center;justify-content:center;min-height:0;padding:0 8px}
.jn-viewer-img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px}
.jn-viewer-nav{display:flex;justify-content:center;gap:24px;padding:12px 0 calc(16px + env(safe-area-inset-bottom))}
.jn-viewer-nav .btn{min-width:64px;font-size:22px}
@media (max-width:700px){.jn-list{grid-template-columns:1fr}.jn-thumb,.jn-add{width:72px;height:72px}}

/* Dragging a photo onto an equipment row (or back to the photos above). */
.jn-thumb-open,.jn-item-photo{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.jn-ghost{position:fixed;left:0;top:0;z-index:2147483647;width:72px;height:72px;border-radius:12px;overflow:hidden;pointer-events:none;box-shadow:0 12px 28px #0f172a55;opacity:.92}
.jn-ghost img{width:100%;height:100%;object-fit:cover;display:block}
.jn-dragging .jn-drop{outline:2px dashed var(--accent);outline-offset:3px;border-radius:12px}
.jn-dragging .jn-drop.is-over{outline-style:solid;background:var(--accent-soft)}
.jn-dragging,.jn-dragging *{cursor:grabbing!important}
.jn-hint{margin:0 0 6px}
.jn-pick{flex-basis:100%;padding:4px 0}
.jn-pick .jn-thumb{width:60px;height:60px;border:2px solid transparent}
.jn-pick .jn-thumb:hover{border-color:var(--accent)}
.jn-delete svg{width:18px;height:18px;flex:none}
.jn-delete{display:inline-flex;align-items:center;gap:6px}

/* Phone: the save bar sits at the very bottom, one row: Guardar · Cancelar · bin. */
@media screen and (max-width:760px){
  body.workspace-layout #portal-popup:has(.jn-form){padding-bottom:0}
  body.workspace-layout #portal-popup:has(.jn-form) .portal-popup-content{padding-bottom:0!important}
  body.workspace-layout #portal-popup .jn-form>.portal-actions{flex-wrap:nowrap;margin-bottom:0;padding-bottom:max(12px,env(safe-area-inset-bottom))}
  body.workspace-layout #portal-popup .jn-form>.portal-actions:has(.jn-delete){grid-template-columns:minmax(0,1fr) minmax(0,1fr) 48px}
  body.workspace-layout #portal-popup .jn-form>.portal-actions .btn{flex:1 1 0;min-width:0}
  body.workspace-layout #portal-popup .jn-form>.portal-actions .jn-delete{flex:0 0 48px;width:48px;padding:0;justify-content:center}
  body.workspace-layout #portal-popup .jn-form>.portal-actions .jn-delete span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
}

/* Computer: the notes list on the left, the open note beside it, like the quotes. */
@media (min-width:1200px) and (pointer:fine), (min-width:1200px) and (pointer:none) {
  html body.workspace-layout[data-workspace-view=notas] #portal { width: 400px; max-width: none; margin: 0; min-height: calc(100vh - 64px); padding: 24px 0 40px !important; box-sizing: border-box; background: var(--surface); border-right: 1px solid var(--line); }
  html body.workspace-layout[data-workspace-view=notas] #portal-content > .portal-head { margin: 0 0 12px; padding: 0 20px; }
  html body.workspace-layout[data-workspace-view=notas] #portal .jn-page-search { margin: 0 20px 12px; width: calc(100% - 40px); }
  html body.workspace-layout[data-workspace-view=notas] #portal .jn-list { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--line); }
  html body.workspace-layout[data-workspace-view=notas] #portal .jn-note { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 14px 20px; }
  html body.workspace-layout.quote-docked-popup[data-workspace-view=notas] #portal .jn-note.is-current { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
  html body.workspace-layout[data-workspace-view=notas] #portal .portal-empty { padding: 0 20px; }
  html body.workspace-layout[data-workspace-view=notas]:not(.quote-docked-popup) .app::after { content: "Escolhe uma nota na lista para a abrir aqui."; position: fixed; inset: 64px 0 0 400px; display: grid; place-items: center; color: var(--muted); font-size: 14px; pointer-events: none; }
}

/* A saved note, opened to read. */
.jn-view{display:grid;gap:12px}
.jn-saved{margin:0;padding:10px 14px;border-radius:12px;background:var(--tone-ok-bg,#ecfdf5);color:var(--tone-ok-ink,#047857);font-weight:700;font-size:14px}
.jn-view .jn-thumb{width:96px;height:96px}
.jn-view-sent{margin:0;font-size:14px;color:var(--muted)}
.jn-view-sent strong{color:var(--ink)}
.portal-head .jn-edit-icon{margin-left:auto;width:44px;min-width:44px;height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:12px}
.jn-attach{margin-top:-4px}
.jn-view-actions{margin-top:4px}
.jn-result-own{border-style:dashed}
.jn-result-own strong{color:var(--accent)}
html body .qf .jn-quote-status{margin:8px 2px 0;font-size:13px;font-weight:600;color:var(--qf-label)}
html body .qf .jn-quote-status:empty{display:none}
.jn-quote-box .jn-results{margin-top:0}
.jn-photo-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.jn-icon-btn{width:42px;min-width:42px;height:42px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:12px}
.jn-view-photos{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:6px;padding:10px 12px;border:1px solid var(--line,#e2e8f0);border-radius:12px}
.jn-view-photos>span{font-weight:700;font-size:14px}

/* Contratos (contracts.js) and the client's signing page (assinar.html). The contract itself is always a white sheet. */
.ct-list{display:grid;gap:10px;grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
.ct-search,.ct-find{width:100%;border:1px solid var(--line,#e1e7f0);border-radius:999px;padding:10px 14px;background:var(--surface,#fff);color:var(--ink,#192840);font:inherit;font-size:14px;box-sizing:border-box}
.ct-search{margin:0 0 12px}
.ct-card{display:grid;gap:4px;text-align:left;width:100%;padding:13px 14px;border:1px solid var(--line,#e1e7f0);border-radius:16px;background:var(--surface,#fff);color:var(--ink,#192840);font:inherit;cursor:pointer}
.ct-card:hover{background:var(--flat-hover,var(--surface-2,#f7f9fd))}
.ct-card.is-current{border-color:var(--accent,#345de2)}
.ct-card-top{display:flex;justify-content:space-between;gap:8px;align-items:flex-start}
.ct-card-top strong{font-size:15px;overflow-wrap:anywhere}
.ct-card small{color:var(--muted,#61718a);font-size:13px;line-height:1.35}
.ct-tag{font-size:11px;font-weight:800;border-radius:999px;padding:3px 9px;white-space:nowrap}
.ct-tag.is-signed{background:var(--tone-ok-bg,#ecfdf5);color:var(--tone-ok-ink,#047857)}
.ct-tag.is-sent{background:var(--tone-warn-bg,#fff7ed);color:var(--tone-warn-ink,#b45309)}
.ct-tag.is-draft{background:var(--surface-3,#eaf0f8);color:var(--muted,#61718a)}
.ct-status{margin:6px 0 0;color:var(--muted,#61718a);font-size:13px}
.ct-status:empty{display:none}
.ct-status.is-error{color:#b42318;font-weight:600}
.ct-saved{margin:0 0 10px;padding:10px 12px;border-radius:12px;background:var(--tone-ok-bg,#ecfdf5);color:var(--tone-ok-ink,#047857);font-weight:600;font-size:14px}

/* Saved contract */
.ct-view{display:grid;gap:12px}
.ct-state{display:flex;flex-wrap:wrap;gap:8px;align-items:center;color:var(--muted,#61718a);font-size:14px}
.ct-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0}
.ct-actions .ct-send{display:inline-flex;align-items:center;gap:8px}
.ct-icon{display:inline-flex}
.ct-icon-btn{width:44px;min-width:44px;height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:12px}
.ct-icon-btn.ct-delete{color:#b42318}
.ct-link-again{justify-self:start;border:0;background:none;padding:0;color:var(--accent,#345de2);font:inherit;font-size:13px;text-decoration:underline;cursor:pointer}

/* The sheet */
.ct-paper{background:#fff;color:#212529;border:1px solid #e3e7ef;border-radius:6px;padding:28px 30px;font:14px/1.5 Arial,Helvetica,sans-serif;max-width:820px;box-sizing:border-box;width:100%;margin:0 auto;color-scheme:light}
.ct-paper p{margin:0 0 4px;color:#212529!important;font-size:inherit!important;line-height:1.5!important}
.ct-top{text-align:center;margin-bottom:12px}
.ct-logo{width:96px;height:auto;display:block;margin:0 auto 2px}
.ct-phone{display:block;font-size:16px;color:#212529}
.ct-paper h1{margin:14px 0 6px!important;color:#2f4b8f!important;font:700 21px/1.25 Arial,Helvetica,sans-serif!important;letter-spacing:.2px!important;text-transform:uppercase}
.ct-paper h2{margin:18px 0 6px!important;color:#2f4b8f!important;font:700 17px/1.3 Arial,Helvetica,sans-serif!important;letter-spacing:0!important}
.ct-paper strong{color:#212529;font-weight:700}
.ct-parties{margin:10px 0}
.ct-table-wrap{overflow-x:auto;margin:10px 0 4px}
.ct-paper .ct-table{width:100%;border-collapse:collapse;font-size:13px;background:#fff!important;border:0!important;border-radius:0!important;box-shadow:none!important}
.ct-paper .ct-table th{background:#2f4b8f!important;color:#fff!important;text-align:left;padding:9px 10px!important;font:700 13px/1.3 Arial,Helvetica,sans-serif!important;text-transform:none!important;letter-spacing:0!important;border:0!important}
.ct-paper .ct-table td{padding:9px 10px!important;border:1px solid #d5dbe8!important;color:#212529!important;background:#fff!important;font:13px/1.4 Arial,Helvetica,sans-serif!important}
.ct-paper .ct-table .ct-money{white-space:nowrap!important}
.ct-paper .ct-table .ct-total td{background:#eef2fa!important;font-weight:700!important}
.ct-signatures{margin-top:26px}
.ct-date{margin-bottom:14px!important}
.ct-sign-cols{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.ct-sign{display:grid;justify-items:center;text-align:center;gap:2px}
.ct-sign-box{width:100%;max-width:260px;height:86px;border-bottom:1px solid #212529;display:flex;align-items:flex-end;justify-content:center}
.ct-sign-box img{max-width:100%;max-height:84px}
.ct-paper .ct-sign-name{font-weight:400!important;color:#212529!important}
.ct-sign-note{color:#6e7480;font-size:11px}
.ct-hash{display:block;margin-top:14px;color:#6e7480;font-size:11px}

/* Form */
.ct-form .ct-form-section{margin-top:6px}
.ct-found{display:grid;gap:4px;margin:6px 0 4px}
.ct-found:empty{display:none}
.ct-found-item{display:grid;text-align:left;gap:2px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}
.ct-found-item:hover,.ct-found-item:focus-visible{border-color:var(--accent);background:var(--accent-soft)}
.ct-found-item small{color:var(--muted);font-size:12px}
.ct-end{margin:0 0 6px}
.ct-lines{display:grid;gap:10px}
.ct-line{display:grid;gap:8px;padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.ct-line-top{display:grid;grid-template-columns:minmax(150px,1.4fr) 76px 92px minmax(130px,1fr) 36px;gap:8px;align-items:end}
.ct-line select,.ct-line input{width:100%;box-sizing:border-box}
.ct-mini{display:grid;gap:3px;font-size:12px;color:var(--muted)}
.ct-line-remove{width:36px;height:40px;border:0;border-radius:10px;background:var(--surface-2);color:var(--muted);font-size:20px;cursor:pointer}
.ct-line-remove:hover{color:#b42318}
.ct-add-line{margin-top:10px}
.ct-vat{max-width:160px;margin-top:12px}
.ct-sum{display:flex;flex-wrap:wrap;gap:6px 18px;align-items:baseline;justify-content:flex-end;margin-top:12px;padding:10px 12px;border-radius:12px;background:var(--surface-2);font-size:14px}
.ct-sum strong{font-size:16px}
.ct-texts{margin-top:14px;padding:10px 12px;border:1px solid var(--line);border-radius:14px}
.ct-texts summary{cursor:pointer;font-weight:700;font-size:14px}
.ct-texts label{margin-top:10px}
.ct-stamp{margin-top:4px}
@media (max-width:640px){
  .ct-line-top{grid-template-columns:1fr 1fr;align-items:end}
  .ct-line-top select{grid-column:1/-1}
  .ct-line-top .ct-mini:nth-of-type(3){grid-column:1/2}
  .ct-line-remove{justify-self:end}
  .ct-paper{padding:18px 14px;font-size:13px}
  .ct-paper h1{font-size:17px}
  .ct-paper h2{font-size:15px}
  .ct-sign-cols{gap:12px}
}

/* Signing (link page and "Assinar aqui") */
.ct-signbox{display:grid;gap:10px;background:var(--surface,#fff);color:var(--ink,#192840);border:1px solid var(--line,#e1e7f0);border-radius:18px;padding:16px}
.ct-signbox h2{margin:0;font-size:18px}
.ct-signbox label{display:grid;gap:4px;font-size:14px;font-weight:600}
.ct-signbox input[type=text]{font:inherit;font-size:16px;padding:11px 12px;border:1px solid var(--line,#e1e7f0);border-radius:11px;background:var(--surface,#fff);color:var(--ink,#192840)}
.ct-pad-label{font-size:14px;font-weight:600}
.ct-pad-wrap{position:relative}
.ct-pad{display:block;width:100%;aspect-ratio:3/1;background:#fff;border:2px dashed #c3cbe0;border-radius:14px;cursor:crosshair}
.ct-clear{position:absolute;top:8px;right:8px;min-height:32px;padding:4px 12px;font-size:13px}
.ct-signbox .ct-accept{display:flex;gap:10px;align-items:center;font-weight:500}
.ct-accept input{width:22px;height:22px;flex:none}
.ct-sign-actions .btn{width:100%;min-height:48px;font-size:16px}
.ct-sign-dialog{border:0;border-radius:20px;padding:0;width:min(640px,calc(100vw - 24px));max-height:calc(100dvh - 24px);background:var(--surface,#fff);color:var(--ink,#192840)}
.ct-sign-dialog::backdrop{background:#0b1220aa}
.ct-sign-dialog-inner{position:relative;padding:18px;display:grid;gap:10px}
.ct-sign-dialog .ct-signbox{border:0;padding:0}
.ct-sign-intro{margin:0 40px 0 0;color:var(--muted,#61718a);font-size:14px}
.ct-sign-close{position:absolute;top:10px;right:10px;width:40px;height:40px;padding:0;font-size:22px;border-radius:12px}

/* assinar.html */
.ct-public{margin:0;background:#f3f6fb;color:#192840;font:15px/1.5 Arial,Helvetica,sans-serif}
.ct-public main{max-width:860px;margin:0 auto;padding:16px 16px 40px;display:grid;gap:14px}
.ct-public .btn{font:inherit;font-weight:700;border-radius:12px;border:1px solid #d5dbe8;background:#fff;color:#192840;padding:10px 16px;cursor:pointer;min-height:44px}
.ct-public .btn-primary{background:#345de2;border-color:#345de2;color:#fff}
.ct-public .btn:disabled{opacity:.5;cursor:default}
.ct-public-bar{display:flex;flex-wrap:wrap;gap:10px;align-items:center;justify-content:space-between;background:#fff;border:1px solid #e1e7f0;border-radius:18px;padding:12px 16px}
.ct-public-bar p{margin:0;font-size:14px;color:#61718a}
.ct-public-bar strong{display:block;color:#192840;font-size:16px}
.ct-public-done{background:#ecfdf5;border:1px solid #a7f3d0;color:#065f46;border-radius:18px;padding:14px 16px;font-weight:600}
.ct-public-error{background:#fff;border:1px solid #e1e7f0;border-radius:18px;padding:24px 16px;text-align:center}
.ct-public-error img{width:80px;display:block;margin:0 auto 8px}
/* On the phone, the sheet's buttons grow to fill the row; here the round icons keep their size. */
.ct-view{grid-template-columns:minmax(0,1fr)}
.ct-view>*{min-width:0}
body.workspace-layout #portal-popup .ct-view .ct-actions .btn.ct-icon-btn{flex:0 0 44px!important;width:44px!important;min-width:44px!important}
body.workspace-layout #portal-popup .ct-actions .ct-send,body.workspace-layout #portal-popup .ct-actions .ct-here,body.workspace-layout #portal-popup .ct-actions .ct-renew{flex:1 1 150px}
@media (max-width:640px){body.workspace-layout #portal-popup .ct-actions .ct-send{flex-basis:100%}}
.ct-paper .ct-table th,.ct-paper .ct-table td{white-space:normal!important;min-width:0!important}
@media (max-width:640px){.ct-paper .ct-table th,.ct-paper .ct-table td{padding:7px 6px!important;font-size:12px!important}}

@media screen{
 .lbl-notification-bell{position:relative;flex:none;width:36px;height:36px;color:var(--ink);border-radius:12px}
 .lbl-notification-bell svg{width:20px;height:20px}
 .lbl-notification-bell.needs-setup:after,.lbl-notification-bell[data-unread]:not([data-unread=""]):after{content:"";position:absolute;right:3px;top:3px;width:7px;height:7px;border-radius:50%;background:var(--accent,#3567f6);box-shadow:0 0 0 2px var(--surface,#fff)}
 .lbl-notification-bell[data-unread]:not([data-unread=""]):after{content:attr(data-unread);width:auto;min-width:15px;height:15px;padding:0 3px;font-size:9px;line-height:15px;color:var(--accent-ink,#fff)}
 .lbl-notification-dialog{color:var(--ink);background:var(--surface,#fff);border:0;border-left:1px solid var(--line,#dce3ef);border-radius:0;padding:0 0 20px;width:min(460px,100vw);height:100dvh;max-width:100vw;max-height:100dvh;margin:0 0 0 auto;box-sizing:border-box;overflow:auto;box-shadow:-12px 0 50px #0002}
 .lbl-notification-dialog::backdrop{background:#101c386e;backdrop-filter:blur(3px)}
 .lbl-notification-header{display:flex;align-items:center;gap:6px;position:sticky;top:0;z-index:6;background:var(--surface,#fff);padding:22px 18px 16px;border-bottom:1px solid var(--line,#edf0f5)}.lbl-notification-header h2{font-size:24px;line-height:1.2;font-weight:600;margin:0;flex:1;min-width:0}.lbl-notification-dialog .lbl-notification-header>.btn{font-size:24px;flex:none;width:44px;min-height:44px;padding:0;border:0;background:transparent;border-radius:10px}.lbl-notification-header>.btn svg{width:20px;height:20px}
 .lbl-notification-menu{position:relative;flex:none}.lbl-notification-menu>summary{width:44px;height:44px;display:grid;place-items:center;list-style:none;font-size:23px;font-weight:700;border-radius:10px;cursor:pointer}.lbl-notification-menu>summary::-webkit-details-marker{display:none}.lbl-notification-menu>summary:hover,.lbl-notification-menu[open]>summary{background:var(--surface-2,#f3f6fb)}
 .lbl-notification-menu-options{position:absolute;top:43px;right:0;z-index:5;width:205px;padding:6px;background:var(--surface,#fff);border:1px solid var(--line,#dce3ef);border-radius:12px;box-shadow:0 12px 32px #0002}.lbl-notification-menu-action{display:block;width:100%;padding:12px 10px;border:0;border-radius:7px;background:transparent;color:var(--ink);text-align:left;font:inherit;font-size:13px;cursor:pointer}.lbl-notification-menu-action:hover,.lbl-notification-menu-action:focus-visible{background:var(--surface-2,#f3f6fb)}.lbl-notification-menu-action:disabled{opacity:.45;cursor:default}
 .lbl-notification-device{margin:20px 18px;padding:18px;border-radius:14px;background:var(--surface-2,#f3f6fb)}.lbl-notification-device>p{font-size:13px;line-height:1.6;margin:8px 0 14px;color:var(--muted,#67758a)}
 .lbl-notification-device.is-connected{margin:16px 0 22px;padding:0;background:transparent;border-bottom:1px solid var(--line,#e2e8f0);border-radius:0}.lbl-notification-device.is-connected>summary{display:flex;align-items:center;gap:8px;padding:0 0 16px;cursor:pointer;list-style:none;font-size:12px;font-weight:600;color:var(--muted,#67758a)}.lbl-notification-device.is-connected>summary::-webkit-details-marker{display:none}.lbl-notification-device.is-connected>summary:before{content:"";width:6px;height:6px;flex:none;border-radius:50%;background:var(--accent,#3567f6)}.lbl-notification-device.is-connected>summary:after{content:"⌄";margin-left:2px}.lbl-notification-device.is-connected[open]>summary:after{transform:rotate(180deg)}.lbl-notification-device.is-connected>summary>small{font-size:11px;font-weight:400;margin-left:auto}.lbl-notification-device.is-connected .lbl-notification-actions{margin-bottom:16px}
 .lbl-notification-actions{display:flex;gap:8px;flex-wrap:wrap}.lbl-notification-dialog .btn{font:inherit;font-size:12px;min-height:38px;border:1px solid var(--line);background:var(--surface-2);color:var(--ink)}.lbl-notification-dialog .btn:hover{background:var(--surface-3)}.lbl-notification-dialog .btn-primary{background:var(--accent);border-color:transparent;color:var(--accent-ink)}.lbl-notification-dialog .btn-primary:hover{background:var(--accent-hover)}.lbl-notification-actions:empty{display:none}
 .lbl-notification-feedback{margin:16px 18px;padding:12px 14px;border-left:3px solid var(--accent,#3567f6);background:var(--surface-2,#f3f6fb);font-size:13px;line-height:1.5}
.lbl-notification-list{padding:0 10px}.lbl-notification-group>h3{margin:22px 12px 8px;font-size:12px;font-weight:600;color:var(--muted,#67758a)}
 .lbl-notification-entry{position:relative;min-width:0;overflow:hidden;border-radius:12px;background:var(--surface-2,#f3f6fb)}.lbl-notification-swipe-backdrop{position:absolute;inset:0;display:flex;align-items:center;justify-content:flex-end;padding:0 20px;font-size:12px;font-weight:600;color:var(--muted,#67758a);visibility:hidden}.is-swiping .lbl-notification-swipe-backdrop{visibility:visible}.swipe-right .lbl-notification-swipe-backdrop{justify-content:flex-start}.lbl-notification-entry.is-ready{background:var(--accent,#3567f6)}.lbl-notification-entry.is-ready .lbl-notification-swipe-backdrop{color:var(--accent-ink,#fff)}
 .lbl-notification-item{position:relative;width:100%;box-sizing:border-box;font:inherit;text-align:left;color:var(--ink);background:var(--surface,#fff);border:0;border-radius:0;padding:18px 12px;display:flex;align-items:flex-start;gap:13px;cursor:pointer;overflow-wrap:anywhere;touch-action:pan-y;transition:transform .28s cubic-bezier(.22,1,.36,1),background .16s ease;-webkit-tap-highlight-color:transparent;user-select:none;-webkit-user-select:none}.lbl-notification-item:after{content:'';position:absolute;bottom:0;left:59px;right:12px;border-bottom:1px solid var(--line,#edf0f5)}.is-swiping .lbl-notification-item{transition:none}
 .lbl-notification-remove{position:absolute;right:8px;top:9px;display:grid;place-items:center;width:30px;height:30px;padding:0;border:0;border-radius:8px;background:var(--surface-2,#f3f6fb);color:var(--muted,#67758a);font:inherit;font-size:21px;cursor:pointer;opacity:0;pointer-events:none}.lbl-notification-entry:focus-within .lbl-notification-remove{opacity:1;pointer-events:auto}.lbl-notification-remove:hover{color:var(--ink)}.lbl-notification-entry.is-swiping .lbl-notification-remove{opacity:0;pointer-events:none}
 .lbl-notification-dialog :focus-visible{outline:2px solid var(--accent,#3567f6);outline-offset:2px}.lbl-notification-item:focus-visible{outline-offset:-3px}
 .lbl-notification-undo{position:sticky;bottom:12px;margin:18px;display:flex;align-items:center;gap:12px;justify-content:space-between;background:var(--ink,#17253c);color:var(--surface,#fff);padding:10px 14px;border-radius:12px;font-size:12px;box-shadow:0 5px 20px #0002}.lbl-notification-undo-action{border:0;background:transparent;color:inherit;cursor:pointer;font:inherit;font-weight:700;padding:9px 5px;text-decoration:underline;text-underline-offset:3px}.lbl-notification-undo-action:disabled{opacity:.6}
 .lbl-notification-item:hover{background:var(--surface-2,#f3f6fb)}.lbl-notification-symbol{display:grid;place-items:center;flex:0 0 34px;height:36px;background:var(--surface-2,#f0f4ff);color:var(--accent,#3567f6);border-radius:11px}.lbl-notification-symbol svg{width:18px;height:18px}.lbl-notification-words{display:grid;gap:4px;flex:1;min-width:0;line-height:1.5}.lbl-notification-words>strong{font-size:14px;font-weight:600}.lbl-notification-words>span{font-size:13px;color:var(--muted,#64768a)}.lbl-notification-words>small,.lbl-notification-words>time{font-size:11px;color:var(--muted,#67758a)}.lbl-notification-dot{flex:none;width:6px;height:6px;border-radius:50%;background:var(--accent,#3567f6);margin-top:7px}.lbl-notification-empty{margin:28px 12px;font-size:13px;color:var(--muted,#67758a)}.lbl-notification-sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 @media(hover:hover){.lbl-notification-entry:hover .lbl-notification-remove{opacity:1;pointer-events:auto}}
 @media(prefers-reduced-motion:reduce){.lbl-notification-item{transition:none}}
 @media(max-width:600px){.lbl-notification-dialog{width:100vw;height:100dvh;border:0;padding:0 0 env(safe-area-inset-bottom,0px)}.lbl-notification-header{padding-top:max(18px,env(safe-area-inset-top,0px));padding-left:max(18px,env(safe-area-inset-left,0px));padding-right:max(12px,env(safe-area-inset-right,0px))}.lbl-notification-actions>.btn{flex:1}.lbl-notification-device{padding:14px}.lbl-notification-header h2{font-size:23px}.lbl-notification-device.is-connected>summary{gap:6px}.lbl-notification-device.is-connected>summary>small{display:none}.lbl-notification-remove{width:36px;height:36px;right:4px;top:4px}}
}
@media print{.lbl-notification-bell,.lbl-notification-dialog{display:none!important}}

.lbl-notification-entry{transition:background .16s ease;overflow-anchor:none}.lbl-notification-entry.is-dismissing{pointer-events:none;min-height:0}.is-swiping .lbl-notification-item,.is-dismissing .lbl-notification-item{will-change:transform}.is-dismissing .lbl-notification-remove{visibility:hidden}.is-dismissing .lbl-notification-swipe-backdrop{visibility:visible}
/* Bell-anchored cards: inbox only; device settings keep their own view. */
.lbl-notification-dialog.lbl-notification-popover{position:fixed;inset:auto;margin:0;height:auto;min-height:0;max-width:calc(100vw - 16px);padding:0;border:1px solid #e4e9f1;border-radius:22px;background:#f6f7fa;color:#1d2a3b;box-shadow:0 18px 45px #17243b25;overscroll-behavior:contain;scrollbar-width:thin;transform-origin:var(--bell-origin,90%) top;animation:lbl-bell-open .26s cubic-bezier(.2,.8,.2,1)}
.lbl-notification-popover::backdrop{background:#1b293b13;backdrop-filter:none}
@keyframes lbl-bell-open{from{opacity:0;transform:translateY(-14px) scale(.97)}to{opacity:1;transform:none}}
.lbl-notification-popover .lbl-notification-header{padding:12px 10px 10px 18px;background:#f6f7fa;border:0;border-radius:22px 22px 0 0;gap:8px}
.lbl-notification-popover .lbl-notification-heading{flex:1;min-width:0}
.lbl-notification-popover .lbl-notification-heading h2{font-size:17px;letter-spacing:-.35px;color:#1d2a3b}
.lbl-notification-popover .lbl-notification-heading small{display:block;margin-top:3px;font-size:12px;color:#6b7686}
body .lbl-notification-popover .lbl-notification-header>.btn{border:0!important;background:transparent!important;box-shadow:none!important}
.lbl-notification-popover .lbl-notification-list{padding:0 12px}
.lbl-notification-popover .lbl-notification-group>h3{font-size:11px;font-weight:500;margin:8px 3px 10px;color:#6b7686}
.lbl-notification-popover .lbl-notification-entry{border-radius:16px;margin-bottom:12px;box-shadow:0 2px 5px #17243b06;background:#edf2ff}
.lbl-notification-popover .lbl-notification-item{padding:14px 42px 14px 13px;gap:10px;border-radius:16px;background:#fff;color:#1d2a3b}
.lbl-notification-popover .lbl-notification-item:after{display:none}
.lbl-notification-popover .lbl-notification-symbol{flex-basis:30px;height:30px;border-radius:10px;background:#edf2ff;color:#3562ee}
.lbl-notification-popover .lbl-notification-symbol svg{width:16px;height:16px}
.lbl-notification-popover .lbl-notification-words{gap:4px}
.lbl-notification-popover .lbl-notification-words>strong{font-size:14px}
.lbl-notification-popover .lbl-notification-words>span{font-size:12px;color:#6b7686}
.lbl-notification-popover .lbl-notification-words>.lbl-notification-card-link{color:#3562ee;font-weight:600;padding-top:5px}
.lbl-notification-popover .lbl-notification-words>small,.lbl-notification-popover .lbl-notification-words>time{color:#6b7686}
.lbl-notification-popover .lbl-notification-dot{position:absolute;top:14px;left:7px;width:4px;height:4px;margin:0}
.lbl-notification-popover .lbl-notification-remove{opacity:1;pointer-events:auto;background:transparent;color:#6b7686;width:36px;height:36px;top:6px;right:3px;font-size:20px}
.lbl-notification-popover .lbl-notification-entry.is-swiping .lbl-notification-remove{opacity:0;pointer-events:none}
.lbl-notification-popover .lbl-notification-footer{position:sticky;bottom:0;z-index:4;display:flex;align-items:center;gap:8px;padding:10px 12px 10px 18px;background:#f6f7fa;border-top:1px solid #e9edf3;min-height:54px}
.lbl-notification-popover .lbl-notification-footer>span{font-size:11px;color:#6b7686;margin-right:auto}
.lbl-notification-popover .lbl-notification-menu>summary{width:32px;height:36px}
.lbl-notification-popover .lbl-notification-menu-options{top:auto;bottom:38px}
.lbl-notification-popover .lbl-notification-undo{bottom:6px;z-index:5;margin:8px 12px;background:#1d2a3b;color:white}
.lbl-notification-popover .lbl-notification-empty{margin:24px 8px 32px;color:#6b7686}
@media(prefers-reduced-motion:reduce){.lbl-notification-dialog.lbl-notification-popover{animation:none}}
/* Float outside the scroll area, without changing the inbox layout. */
.lbl-notification-popover .lbl-notification-menu-options{position:fixed;top:var(--notice-menu-top,0px);left:var(--notice-menu-left,0px);bottom:auto;right:auto;width:205px;max-width:calc(100vw - 16px);box-sizing:border-box}
.lbl-notification-popover .lbl-notification-footer:has(.lbl-notification-menu[open]){z-index:8}

/* Visual layer over the feature stylesheets: palette, spacing, controls, calendar and home polish.
   Merged on 2026-10-21 from modern, refined, drafts, contour, owner-overview, calendar-a and operational
   (in that order, which is the order they used to load in), so the cascade is unchanged. Printed documents are not styled here. */

/* ---- modern ---- */
/* Visual polish only: existing navigation, grids, forms and print layouts stay intact. */
@media screen {
  :root{--bg:#f3f6fb;--surface:#ffffff;--surface-2:#f7f9fd;--surface-3:#eaf0f8;--line:#e1e7f0;--ink:#192840;--muted:#61718a;--accent:#345de2;--accent-hover:#244acc;--accent-soft:#edf2ff;--workspace-nav:#132239;--workspace-blue:#3567f6;--ui-card-shadow:0 2px 3px #142b4c03,0 8px 28px #142b4c05;--ui-dialog-shadow:0 28px 90px #0a193d30;--r-card:18px;--r-input:11px}
  :root[data-theme=dark]{--bg:#101725;--surface:#182335;--surface-2:#1d2a3e;--surface-3:#293950;--line:#2d3c53;--ink:#ecf2fc;--muted:#a5b6cd;--accent:#a6bcff;--accent-hover:#c1d0ff;--accent-soft:#273959;--workspace-nav:#101b2d;--ui-card-shadow:0 4px 24px #02081225;--ui-dialog-shadow:0 28px 90px #0008}
  body{font-family:Manrope,"Segoe UI",Arial,sans-serif;letter-spacing:-.012em;background:var(--bg)}
  .workspace-layout .app{background:radial-gradient(ellipse at 95% 0%,color-mix(in srgb,var(--accent-soft) 65%,transparent),transparent 45%),var(--bg)}
  
  
  
  
  
  .workspace-profile strong{text-shadow:none;color:#f4f7ff}.workspace-profile small{color:#a8b8ce}
  .workspace-layout .topbar{background:var(--surface);border-bottom-color:var(--line);box-shadow:0 2px 12px #142b4c02}
  .topbar .btn-icon{border-radius:12px;box-shadow:none}
  .workspace-layout #portal h2{font-weight:700;letter-spacing:-1px}.workspace-layout #portal h3{font-weight:700}
  .workspace-layout #portal .portal-card:not(.portal-record-list),.portal .portal-card:not(.portal-record-list),.team-person{border-radius:18px;border-color:var(--line);box-shadow:var(--ui-card-shadow)}
  .workspace-layout #portal .portal-card:not(.portal-record-list){background:var(--surface)}
  .portal-hours-metric h3,.team-stat dd{font-variant-numeric:tabular-nums;letter-spacing:-1px}
  
  
  .portal .btn,.btn{border-radius:11px;font-weight:650;transition:background .16s,border-color .16s,box-shadow .16s}
  .btn.btn-danger-solid{background:#b42332;color:#fff;border-color:#b42332}
  .btn.btn-danger-solid:is(:hover,:focus-visible,:active){background:#931c28;color:#fff;border-color:#931c28;filter:none}
  .portal .btn-primary,.workspace-layout #portal .btn-primary{background:var(--workspace-blue);border-color:transparent;color:#fff;border-radius:11px;box-shadow:inset 0 1px #ffffff29,0 4px 10px #2857d51a}
  .portal .btn-primary:hover,.workspace-layout #portal .btn-primary:hover{background:#2856db;filter:none}
  .portal :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),select,textarea),.f :is(input:not([type=checkbox]):not([type=radio]),select,textarea){border-radius:11px;border-color:var(--line);background:var(--surface);color:var(--ink)}
  .portal :is(input,select,textarea):focus-visible,.btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px;box-shadow:0 0 0 4px var(--accent-soft)}
  .portal label,.f label{color:var(--ink);font-weight:600}.portal input::placeholder,.f input::placeholder{color:var(--muted);opacity:1}
  #portal-popup{border:1px solid var(--line);box-shadow:var(--ui-dialog-shadow);}
  #portal-popup::backdrop,.quote-share::backdrop{background:#0e1c3766;backdrop-filter:blur(5px)}.portal-popup-bar{border-bottom:1px solid var(--line);}
  .portal .portal-table-wrap{border-color:var(--line);border-radius:12px}.portal th{color:var(--muted);background:var(--surface-2);font-size:12px;font-weight:650}.portal td{font-size:13px}
  .portal .portal-job{border-radius:14px;background:var(--surface);border:1px solid var(--line);box-shadow:var(--ui-card-shadow)}
  .portal .portal-badge,.pill{border-radius:7px}.portal-brand-card,.portal-product-card{border-radius:16px;border-color:var(--line);box-shadow:var(--ui-card-shadow)}
  .team-person{background:var(--surface)}.team-person-leader{background:linear-gradient(130deg,var(--accent-soft),var(--surface) 60%)}
  .auth-card{border:1px solid var(--line);border-radius:24px;box-shadow:var(--ui-dialog-shadow);background:var(--surface)}.auth-brand h1{font-weight:750}.auth-card .btn-primary{background:var(--workspace-blue);color:#fff;border-color:transparent}.auth-card .btn-primary:hover{background:#2856db}
  @media(hover:hover){.portal-brand-card:hover,.team-next-job:hover{border-color:color-mix(in srgb,var(--accent) 35%,var(--line));box-shadow:0 5px 20px #234b8110}}
  @media(prefers-reduced-motion:reduce){.btn,.portal .btn,.workspace-nav-item{transition:none}}
}

@media screen {
  
  
  
  .overview-list{display:grid;gap:12px}.overview-entry{display:grid;gap:8px;width:100%;min-width:0;text-align:left;padding:20px;border:1px solid var(--line);border-radius:14px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer;overflow-wrap:anywhere}
  .overview-entry:hover{background:var(--accent-soft);border-color:var(--accent)}.overview-entry:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.overview-entry small{color:var(--muted)}.overview-entry strong{font-size:17px}.overview-entry-description{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.overview-entry-action{color:var(--accent);font-size:13px;font-weight:700}
}

@media screen{.app-brand{width:180px;max-width:100%;line-height:0}.app-brand img{width:100%;height:auto;display:block;background:transparent;box-shadow:none}.app-brand .app-logo-dark{display:none}:root[data-theme=dark] .app-brand .app-logo-light{display:none}:root[data-theme=dark] .app-brand .app-logo-dark{display:block}.workspace-brand img{object-fit:contain;background:transparent;}.auth-brand .app-brand{width:205px}.session-loading img{background:transparent;border-radius:0;box-shadow:none}}

@media screen{.app-brand,.auth-brand .app-brand{width:94px}.workspace-brand img{width:64px;height:64px;flex-shrink:0}.workspace-brand{gap:10px}.app-brand img,.workspace-brand img,.session-loading img{object-fit:contain}}

@media screen{.workspace-brand img,.app-brand,.session-loading img{background:transparent;padding:0;box-shadow:none}.workspace-brand img{border-radius:0}}


@media screen{
 .report-share .report-share-mobile{display:grid;gap:12px;margin:18px 0;padding:18px;border:1px solid var(--line,#dde2eb);border-radius:16px;background:var(--surface,#fff)}
 .report-share-mobile h3,.report-share-mobile p{margin:0}.report-share-mobile .btn{width:100%;min-height:46px;text-align:center;white-space:normal}
 .report-share-mobile p,.report-share details p{font-size:13px;line-height:1.6;color:var(--muted,#667085)}
 .report-share details{padding:14px 0;border-top:1px solid var(--line,#dde2eb)}.report-share summary{cursor:pointer;font-weight:600;font-size:14px}.report-share details .actions{flex-wrap:wrap}.report-share [role=status]{font-size:12px;color:var(--muted,#667085);overflow-wrap:anywhere}
}

@media screen{
 .report-share{box-sizing:border-box;width:min(520px,calc(100vw - 28px));border:1px solid var(--line);color:var(--ink)}
 .report-share>label{display:grid;gap:8px;margin-top:16px;font-size:14px;font-weight:600}.report-share input[type=tel]{box-sizing:border-box;width:100%;min-height:46px;border:1px solid var(--line);border-radius:11px;padding:10px 12px;background:var(--surface-2);color:var(--ink);font:inherit}
 .report-share-mobile .btn-wa{background:#147d49;color:white}.report-share-mobile .btn-wa:hover{background:#10643b;color:white}
}
@media screen{.report-share-mobile [aria-disabled=true]{opacity:.55;cursor:wait}}
@media screen{.report-share-preview{display:inline-flex;align-items:center;justify-content:center;min-height:40px;font-size:13px;font-weight:600;color:var(--ink);text-underline-offset:3px}.report-share-preview[hidden]{display:none}.report-share-preview:hover{color:var(--accent)}}

/* ---- refined ---- */
/* Approved layout refresh: live palette, calendar and print remain unchanged. */
@media screen {
.workspace-brand img{box-shadow:none}
.workspace-layout #portal:not(:has(.lbl-calendar)){padding:28px 32px 40px}
.workspace-layout #portal:not(:has(.lbl-calendar)) h2{font-size:28px;letter-spacing:-.8px}
.portal:not(:has(.lbl-calendar)) .portal-head{gap:18px;margin-bottom:25px}
.portal:not(:has(.lbl-calendar)) .btn{border-radius:8px;box-shadow:none}
.workspace-layout #portal:not(:has(.lbl-calendar)) .portal-card:not(.portal-record-list){border-radius:12px;box-shadow:none}


.portal:not(:has(.lbl-calendar)) th{background:var(--surface-2);font-size:12px;padding:14px 16px}
.portal:not(:has(.lbl-calendar)) td{font-size:14px;padding:18px 16px;line-height:1.6}
.portal-hours-summary{padding-bottom:22px;border-bottom:1px solid var(--line)}.portal-hours-summary+.portal-table-wrap{margin-top:22px}

.portal-brand-card,.portal-product-card,.team-person,.service-prices-group{box-shadow:none;border-radius:12px}
#portal-popup{background:var(--surface);border-radius:14px}.portal-popup-bar{background:var(--surface);padding:10px 20px}.portal-popup-content{padding:16px 28px 28px!important}
.portal-popup-content>form.portal-card{border:0!important;padding:0!important;background:transparent!important;box-shadow:none!important}
.portal-popup-content form>.portal-grid{gap:20px}
.portal-popup-content form :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-height:46px;border-radius:8px}
.portal-popup-content>form>.portal-actions{position:sticky;bottom:0;z-index:1;background:var(--surface);border-top:1px solid var(--line);padding:16px 0;margin-top:24px}
.portal-popup-content>form>.portal-actions .btn-primary{min-width:120px}






@media(max-width:760px),(pointer:coarse) and (max-height:540px){
.portal-popup-content .day-service{padding:18px 0 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent}.portal-popup-content .day-services{gap:24px}
}
}

@media screen and (max-width:1100px){
.workspace-layout #portal .portal-card.portal-hours-card{padding:0;border:0;background:transparent;box-shadow:none}.portal-hours-summary{background:var(--surface);padding:18px;border:1px solid var(--line);border-radius:12px}
.portal-hours-summary>.portal-actions{display:flex;gap:6px}.portal-hours-summary>.portal-actions>.btn{flex:1;padding:10px 8px;font-size:12px}.portal-hours-summary+.portal-table-wrap{margin-top:18px}
.portal:not(:has(.lbl-calendar)) .portal-table-wrap{background:transparent;border:0;border-radius:0}.portal:not(:has(.lbl-calendar)) .portal-table-wrap tbody tr{padding:18px;margin-bottom:12px;border-radius:12px;background:var(--surface);box-shadow:none}
.portal:not(:has(.lbl-calendar)) .portal-table-wrap td{font-size:14px}.portal:not(:has(.lbl-calendar)) .portal-table-wrap td:last-child{border-top:1px solid var(--line);padding-top:14px}.portal:not(:has(.lbl-calendar)) .portal-table-wrap td .btn{min-height:44px;flex:1;font-size:12px}
.portal-hours-card .portal-table-wrap tbody tr{grid-template-columns:1fr 1fr}.portal-hours-card .portal-table-wrap td:nth-child(1),.portal-hours-card .portal-table-wrap td:nth-child(2),.portal-hours-card .portal-table-wrap td:last-child{grid-column:1/-1}
}

/* ---- drafts ---- */
@media screen{.draft-status{font-size:12px;color:var(--muted);margin:16px 0 0}.draft-resume{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:14px 18px;margin:0 0 20px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}.draft-resume>strong{font-size:13px;margin-right:8px}}

/* ---- contour ---- */
/* Contorno: shared action controls. Screen-only, preserving document output. */
@media screen {
 /* Pointer use must not leave a keyboard focus ring on actions. Do not blur
    controls or remove selected states, input focus, or keyboard navigation. */
 html[data-input-modality=pointer] :is(button,a[href],[role=button],[role=tab],summary):focus{outline:none!important;--focus:none}
 html:not([data-input-modality=pointer]) :is(button,a[href],[role=button],[role=tab],summary):focus-visible{outline:2px solid var(--accent);outline-offset:2px}
 :is(button,a[href],[role=button],[role=tab],summary){-webkit-tap-highlight-color:transparent}
 body :is(button,a).btn,body .btn-icon,body .workspace-menu-toggle{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px!important;padding:10px 14px!important;
  border:1px solid var(--line)!important;border-radius:9px!important;background:var(--surface)!important;color:var(--ink)!important;
  font-size:13px!important;font-weight:600!important;line-height:1.35;text-decoration:none;box-shadow:none!important;filter:none;transition:background .15s,border-color .15s;color-scheme:inherit;
 }
 body :is(button,a).btn:hover:not(:disabled):not([aria-disabled=true]),body .btn-icon:hover,body .workspace-menu-toggle:hover{background:var(--surface-3)!important;border-color:color-mix(in srgb,var(--ink) 25%,var(--line))!important;color:var(--ink)!important;filter:none}
 body :is(button,a).btn.btn-primary,body :is(button,a).btn[aria-pressed=true],body :is(button,a).btn[aria-selected=true]{background:var(--workspace-blue)!important;color:#fff!important;border-color:var(--workspace-blue)!important}
 body :is(button,a).btn.btn-primary:hover:not(:disabled){background:#2856db!important;border-color:#2856db!important;color:#fff!important}
 body :is(button,a).btn.btn-danger{color:var(--danger,#b52d43)!important}
 body :is(button,a).btn.btn-danger:hover:not(:disabled){background:var(--danger-soft,#fff0f2)!important;border-color:var(--danger,#b52d43)!important;color:var(--danger,#b52d43)!important}
 body :is(button,a).btn.btn-danger-solid{background:#b42332!important;border-color:#b42332!important;color:#fff!important}
 body :is(button,a).btn.btn-danger-solid:hover:not(:disabled){background:#931c28!important;border-color:#931c28!important;color:#fff!important}
 body :is(button,a).btn:disabled,body :is(button,a).btn[aria-disabled=true]{opacity:.45;cursor:default;pointer-events:none}
 body :is(button,a).btn:focus-visible,body .btn-icon:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
 body .btn.ui-action-icon,body .topbar .btn-icon,body .workspace-menu-toggle{width:44px;height:44px;min-width:44px;padding:0!important;flex-shrink:0}
 body .btn.ui-action svg{width:18px;height:18px;flex:none}
 body .btn[hidden],body .btn-icon[hidden],body .workspace-menu-toggle[hidden]{display:none!important}
 .portal .portal-actions{gap:8px}
 
 
 
 .workspace-report-issue{border-color:transparent;background:transparent;box-shadow:none}
 .workspace-report-issue:hover{background:#ffffff10}
 
 
 
 
 
 
 
 .employee-today{padding:26px;background:var(--surface);border:1px solid var(--line);border-radius:14px;max-width:1100px}
 
 
 #portal .employee-today .employee-today-title{font-size:24px;margin:0;line-height:1.4}
 .employee-today>p{font-size:13px;margin:10px 0 0}
 
 
 
 .portal-employee .draft-resume{order:2;max-width:1100px;padding:20px 0;border:0;border-top:1px solid var(--line);border-radius:0;background:transparent;margin:24px 0 0}
 .portal-employee .draft-resume>strong{width:100%;font-size:16px}
 #lbl-updates{width:min(500px,calc(100% - 32px));max-height:calc(100dvh - 40px);padding:28px;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);box-shadow:var(--ui-dialog-shadow);overflow:auto}
 #lbl-updates::backdrop{background:#0e1c3766;backdrop-filter:blur(4px)}#lbl-updates h2{font-size:24px;margin:8px 0 24px}#lbl-updates>small{color:var(--muted)}#lbl-updates ul{padding-left:20px;margin:0 0 26px;display:grid;gap:16px}#lbl-updates li{line-height:1.6;font-size:14px}#lbl-updates li.lbl-updates-owner{list-style:none;margin-left:-20px;padding:12px 14px;border-radius:10px;background:var(--accent-soft)}#lbl-updates .btn{width:100%}
 @media(min-width:761px) and (min-height:541px),(min-width:761px) and (pointer:fine),(min-width:761px) and (pointer:none){body .workspace-menu-toggle{display:none}}
 @media(prefers-reduced-motion:reduce){body .btn{transition:none}}
}

/* ---- owner-overview ---- */
@media screen{
 
 
 
 
 
 
}

/* ---- calendar-a ---- */
/* Approved A composition. Scoped after shared styles to avoid legacy calendar rules. */


/* Job presentation B: equal actions and an inline date editor. */


.portal .calendar-date-edit h4{margin:0 0 16px;font-size:16px}
.portal .calendar-date-edit label{display:block;font-size:13px}
.portal .calendar-date-edit input{display:block;box-sizing:border-box;width:100%;min-width:0;max-width:100%;margin-top:8px;font-size:16px}
.portal .calendar-date-edit>.portal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}
.portal .calendar-date-edit>.portal-actions>.btn{flex:0 1 auto;width:auto;min-height:44px}

/* ---- operational ---- */
@media screen{











}

.lbl-date-field{position:relative;display:block;width:100%;min-width:0;max-width:100%;box-sizing:border-box}
.lbl-date-field>.lbl-date-native{position:absolute!important;width:1px!important;height:1px!important;min-width:0!important;max-width:1px!important;min-height:0!important;margin:0!important;padding:0!important;border:0!important;clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;overflow:hidden!important;opacity:0!important;pointer-events:none!important}
.lbl-date-field>.lbl-date-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0;max-width:100%;min-height:44px;box-sizing:border-box;padding:11px 12px;border:1px solid var(--line,#dfe3ec);border-radius:8px;background:var(--surface,#fff);color:var(--ink,#1f2937);font-family:inherit;font-size:14px;font-weight:400;line-height:1.4;text-align:left;cursor:pointer;box-shadow:none}
.lbl-date-value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lbl-date-icon{position:relative;flex:0 0 16px;width:16px;height:16px;border:1.6px solid currentColor;border-radius:3px;box-sizing:border-box;opacity:.65}
.lbl-date-icon:before{content:'';position:absolute;left:-1px;right:-1px;top:4px;border-top:1.6px solid currentColor}
.lbl-date-icon:after{content:'';position:absolute;top:-4px;left:3px;width:5px;height:4px;border-inline:1.6px solid currentColor}
.lbl-date-trigger.is-empty{color:var(--muted,#667085)}
.lbl-date-field.is-readonly .lbl-date-trigger{cursor:default}.lbl-date-field.is-readonly .lbl-date-icon{display:none}
.lbl-date-field.is-disabled{opacity:.6}.lbl-date-field.is-disabled .lbl-date-trigger{cursor:default}
.lbl-date-field.is-invalid>.lbl-date-trigger{border-color:#c34444}
.lbl-date-trigger:focus-visible{outline:2px solid var(--accent,#355fce);outline-offset:2px}
.portal-week-picker>.lbl-date-field{width:180px;flex:0 1 180px}.portal-month-picker>.lbl-date-field{min-width:0}
.lbl-calendar-month-label>.lbl-date-field{width:auto}.lbl-calendar-month-label:has(>.lbl-date-field)>span:not(.lbl-date-field){display:none}
.lbl-calendar-month-label>.lbl-date-field>.lbl-date-trigger{border:0;padding:0;background:transparent;min-height:40px;font:inherit;gap:10px}
.lbl-calendar-month-label>.lbl-date-field .lbl-date-value{display:block}.lbl-calendar-month-label>.lbl-date-field .lbl-date-icon{display:block}
.lbl-date-dialog{box-sizing:border-box;position:fixed;inset:0;width:min(380px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));margin:auto;padding:20px;border:1px solid var(--line,#dfe3ec);border-radius:16px;overflow:auto;overscroll-behavior:contain;background:var(--surface,#fff);color:var(--ink,#1f2937);font-family:inherit;box-shadow:0 20px 70px #0003}
.lbl-date-dialog::backdrop{background:rgb(10 20 40 / .35)}
.lbl-date-dialog *{box-sizing:border-box}
.lbl-date-top{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}
.lbl-date-dialog .lbl-date-heading{margin:0;font-family:inherit;font-size:17px;font-weight:650;line-height:1.4;overflow-wrap:anywhere}
.lbl-date-dialog button{appearance:none;touch-action:manipulation;min-width:0;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;box-shadow:none}
.lbl-date-dialog button:disabled{opacity:.32;cursor:default}
.lbl-date-dialog button:focus-visible,.lbl-date-dialog select:focus-visible,.lbl-date-dialog input:focus-visible{outline:2px solid var(--accent,#355fce);outline-offset:-2px}
.lbl-date-dialog .lbl-date-close{flex:0 0 36px;width:36px;height:36px;border-radius:8px;font-size:26px;line-height:1;padding:0;color:var(--muted,#667085)}
.lbl-date-nav{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;align-items:center;gap:4px;margin-bottom:20px}
.lbl-date-dialog .lbl-date-arrow{height:40px;border-radius:8px;padding:0;font-size:26px;line-height:1}
.lbl-date-period{display:flex;align-items:center;justify-content:center;gap:3px;min-width:0}
.lbl-date-period select,.lbl-date-period input{min-width:0;max-width:100%;height:40px;padding:5px 3px;border:0;border-radius:6px;background:var(--surface,#fff);color:var(--ink,#1f2937);font-family:inherit;font-size:15px;font-weight:600;text-align:center;box-shadow:none}
.lbl-date-period select{flex:1;width:120px}.lbl-date-period input{width:65px;flex:0 0 65px;appearance:textfield;-moz-appearance:textfield}
.lbl-date-period input::-webkit-inner-spin-button,.lbl-date-period input::-webkit-outer-spin-button{appearance:none;margin:0}
.lbl-date-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));row-gap:4px;min-width:0;touch-action:pan-y}
.lbl-date-weekday{text-align:center;font-size:10px;font-weight:500;color:var(--muted,#667085);padding-bottom:10px;line-height:16px}
.lbl-date-dialog .lbl-date-day{position:relative;width:100%;height:44px;border-radius:8px;padding:0;font-size:14px;font-weight:400;line-height:1}
.lbl-date-dialog .lbl-date-day.is-weekend{color:var(--muted,#667085)}
.lbl-date-dialog .lbl-date-day[aria-current=date]{font-weight:700;text-decoration:underline;text-underline-offset:5px}
.lbl-date-dialog .lbl-date-day.is-holiday:after{content:'•';position:absolute;bottom:1px;left:0;right:0;font-size:10px;text-align:center}
.lbl-date-dialog .lbl-date-day[aria-pressed=true],.lbl-date-dialog .lbl-date-month[aria-pressed=true]{background:var(--accent,#355fce);color:#fff}
.lbl-date-dialog .lbl-date-day:not(:disabled):hover,.lbl-date-dialog .lbl-date-month:not(:disabled):hover{outline:1px solid var(--accent,#355fce);outline-offset:-1px}
.lbl-date-dialog[data-date-kind=month] .lbl-date-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.lbl-date-dialog .lbl-date-month{min-height:52px;border-radius:8px;padding:8px 2px;font-size:13px}
.lbl-date-status{margin:16px 0 0;font-size:12px;line-height:1.5;color:var(--muted,#667085);min-height:18px;overflow-wrap:anywhere}
.lbl-date-footer{display:flex;justify-content:space-between;gap:12px;margin-top:12px;padding-top:12px;border-top:1px solid var(--line,#dfe3ec)}
.lbl-date-dialog .lbl-date-secondary{min-height:40px;padding:8px 10px;border-radius:8px;color:var(--accent,#355fce);font-size:13px;font-weight:600}
.lbl-date-dialog .lbl-date-close:hover,.lbl-date-dialog .lbl-date-arrow:not(:disabled):hover,.lbl-date-dialog .lbl-date-secondary:not(:disabled):hover{background:var(--accent-soft,#eef3ff)}
@media(max-width:600px){.lbl-date-field>.lbl-date-trigger{min-height:48px;font-size:16px;border-radius:10px}.lbl-date-dialog{padding:14px;width:min(360px,calc(100vw - 16px));max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px))}.lbl-date-nav{margin-bottom:16px}.portal-month-picker>.lbl-date-field{width:100%;max-width:100%}}
@media print{.lbl-date-dialog{display:none!important}.lbl-date-icon{display:none}}

#job-gps-dialog{box-sizing:border-box;width:min(620px,calc(100% - 24px));max-height:90dvh;overflow:auto;border:1px solid var(--line);border-radius:16px;background:var(--surface);color:var(--ink);padding:24px}#job-gps-dialog::backdrop{background:#101c3655}#job-gps-dialog .gps-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}#job-gps-dialog h2{font-size:21px;margin:0}#job-gps-dialog p{font-size:14px;overflow-wrap:anywhere}#job-gps-dialog .gps-search{display:flex;gap:10px;margin:20px 0}#job-gps-dialog input[type=text]{box-sizing:border-box;min-width:0;width:100%;min-height:44px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);padding:10px;font:inherit}#job-gps-dialog .gps-result{display:flex;flex-wrap:wrap;gap:12px;padding:20px 0;border-bottom:1px solid var(--line)}#job-gps-dialog .gps-result strong,#job-gps-dialog .gps-result small,#job-gps-dialog .gps-result label{width:100%;overflow-wrap:anywhere}#job-gps-dialog label{display:flex;align-items:center;gap:10px;font-size:13px}#job-gps-dialog input[type=checkbox]{width:20px;height:20px;flex:none}#job-gps-dialog small{display:block;color:var(--muted);font-size:12px}#job-gps-dialog .gps-manual{display:flex;flex-wrap:wrap;gap:12px;margin:22px 0}#job-gps-dialog button,#job-gps-dialog a{min-height:44px}@media(max-width:480px){#job-gps-dialog{padding:18px}#job-gps-dialog .gps-search{flex-wrap:wrap}}

@media screen{
 .moloni-form{display:flex;flex-direction:column;gap:16px;max-width:740px}
 .moloni-form>label{display:flex;flex-direction:column;gap:8px;min-width:0}
 .moloni-form select,.moloni-form input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font:inherit}
 .moloni-list,.moloni-form{min-width:0;overflow-wrap:anywhere}
 .moloni-form>.btn{align-self:flex-start}
}
@media screen {
 .mq-delivery{margin-top:20px;max-width:760px}.mq-delivery textarea{min-height:130px;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);font:inherit;resize:vertical;box-sizing:border-box;max-width:100%}
 .mq-delivery .portal-actions{margin-top:4px}.mq-delivery-review small{display:block;color:var(--muted)}.mq-delivery-review p{margin:6px 0 18px}.mq-message{white-space:pre-wrap}
 .mq-form .mq-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.mq-form label{display:flex;flex-direction:column;gap:8px;min-width:0}.mq-form input,.mq-form select{font:inherit;width:100%;padding:12px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);box-sizing:border-box;min-width:0}.mq-form .portal-actions{margin-top:20px}
 @media(max-width:700px){.mq-form .mq-grid{grid-template-columns:1fr}.mq-delivery .portal-actions>.btn{flex:1 1 150px}.mq-delivery-review{padding:16px}}
}
@media screen {
 .mq-panel{border:1px solid var(--line,#dfe5ef);border-radius:14px;background:var(--surface,#fff);padding:24px;margin:18px 0;min-width:0}
 .mq-info{display:grid;grid-template-columns:2fr 1fr 1fr;gap:22px}.mq-info small,.mq-info strong{display:block}.mq-info strong{margin-top:7px}.mq-muted,.mq-info small{color:var(--muted,#708198)}
 .mq-badge{display:inline-block;padding:6px 10px;border-radius:6px;background:var(--bg,#f5f7fb);font-size:12px}
 .mq-table-wrap{overflow-x:auto;max-width:100%;margin-top:18px}.mq-table{width:100%;border-collapse:collapse;font-size:14px}.mq-table th{background:var(--bg,#f7f9fc);font-weight:500;color:var(--muted,#708198);font-size:12px}.mq-table td,.mq-table th{padding:14px 10px;text-align:right;border-bottom:1px solid var(--line,#e5eaf1);vertical-align:top;white-space:nowrap}.mq-table td:first-child,.mq-table th:first-child{text-align:left;white-space:normal;min-width:180px}.mq-table td small{display:block;margin-top:6px;white-space:pre-wrap;color:var(--muted,#708198)}
 .mq-lower{display:grid;grid-template-columns:1.4fr 1fr;gap:36px;margin-top:24px}.mq-lower h3{font-size:14px}.mq-lower p{white-space:pre-wrap}.mq-totals p{display:flex;justify-content:space-between;gap:18px;margin:0;padding:9px 0}.mq-totals p:last-child{border-top:1px solid var(--line,#e5eaf1);font-size:20px;margin-top:8px;padding-top:15px}
.mq-editor{max-width:none}.mq-fields,.mq-line-editor{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.mq-fields[hidden]{display:none}.mq-fields>label,.mq-line-editor>label,.mq-tax-row label{display:flex;flex-direction:column;gap:8px;min-width:0}.mq-fields>p,.mq-fields>.mq-lines,.mq-line-editor>h3,.mq-tax-list{grid-column:1/-1}.mq-lines{display:grid;gap:20px}.mq-line-editor{padding:20px;border:1px solid var(--line,#e5eaf1);border-radius:12px}.mq-line-editor h3{margin:0;font-size:15px}.mq-editor textarea{font:inherit;border:1px solid var(--line,#dfe5ef);border-radius:8px;padding:12px;min-height:95px;background:var(--surface,#fff);color:var(--ink);resize:vertical}.mq-tax-list{display:grid;gap:12px}.mq-tax-row{display:flex;gap:12px;align-items:end}.mq-tax-row label{flex:1}.mq-success{color:var(--ink);padding:12px;background:var(--surface);border:1px solid var(--line);border-radius:8px}
 @media(max-width:700px){.mq-panel{padding:16px}.mq-info,.mq-lower,.mq-fields,.mq-line-editor{grid-template-columns:1fr;gap:16px}.mq-table td,.mq-table th{padding:11px 8px;font-size:12px}.mq-line-editor{padding:14px}.mq-info{grid-template-columns:1fr 1fr}.mq-info>div:first-child{grid-column:1/-1}.mq-tax-row{align-items:stretch;flex-direction:column}}
}

/* Quote workspace: aligned forms and actions within the existing white palette. */
@media screen {
 .mq-workspace,.mq-workspace .mq-body{min-width:0;max-width:100%}
 .mq-workspace .mq-body>.portal-head{display:flex;align-items:center;justify-content:space-between;gap:16px}
 .mq-workspace .mq-body:has(.mq-editor)>.portal-head{max-width:960px;margin-inline:auto}
 .mq-workspace .mq-body>.portal-head>h2{min-width:0;font-size:26px;line-height:1.3}
 .mq-workspace .mq-body>.portal-head>.portal-actions{width:auto;flex:none;margin:0}
 .mq-workspace .mq-editor,.mq-workspace .mq-editor-actions{width:100%;max-width:960px;margin-inline:auto}
 .mq-workspace .mq-editor-actions .btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
 .mq-workspace .mq-fields{align-items:start;gap:20px}
 .mq-workspace .mq-fields>label,.mq-workspace .mq-line-editor>label,.mq-workspace .mq-tax-row label{gap:7px;font-size:13px;font-weight:600}
 .mq-workspace .mq-editor :is(input,select,textarea){min-width:0;max-width:100%;min-height:46px;border-radius:8px;background:var(--surface);line-height:1.45}
 .mq-workspace .mq-editor textarea{width:100%;min-height:108px}
 .mq-workspace .mq-editor :is(input,select,textarea):focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-color:var(--accent);box-shadow:none}
 .mq-workspace .mq-lines{gap:16px}
 .mq-workspace .mq-line-editor{gap:16px;padding:20px;background:var(--surface);border-radius:12px}
 .mq-workspace .mq-line-editor>h3{padding-bottom:12px;border-bottom:1px solid var(--line);font-size:14px}
 .mq-workspace .mq-line-editor>.btn,.mq-workspace .mq-fields>.btn{justify-self:start;max-width:100%;white-space:normal;text-align:center}
 .mq-workspace .mq-tax-list{gap:12px;padding-top:4px}
 .mq-workspace .mq-tax-row{gap:10px;min-width:0}
 .mq-workspace .mq-tax-row>.btn{flex-shrink:0;white-space:normal}
 .mq-workspace .mq-editor-actions{display:flex;align-items:stretch;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:24px;padding-top:18px;border-top:1px solid var(--line)}
 .mq-workspace .mq-editor-actions>.btn{min-width:0;max-width:100%;white-space:normal;text-align:center}
 .mq-workspace .mq-panel{margin-block:20px;padding:24px;background:var(--surface);border-radius:12px}
 .mq-workspace .mq-info{gap:18px}
 .mq-workspace .mq-info>div{min-width:0;overflow-wrap:anywhere}
 .mq-workspace .mq-info strong{line-height:1.5}
 .mq-workspace .mq-badge{border:1px solid var(--line);background:var(--surface-2)}
 .mq-workspace .mq-table-wrap{margin-top:20px;border:1px solid var(--line);border-radius:10px}
 .mq-workspace .mq-table{margin:0;font-variant-numeric:tabular-nums}
 .mq-workspace .mq-table th{padding:12px;background:var(--surface-2);font-size:11px;font-weight:600;line-height:1.5}
 .mq-workspace .mq-table td{padding:15px 12px;font-size:13px;line-height:1.6}
 .mq-workspace .mq-table td:first-child{overflow-wrap:anywhere}
 .mq-workspace .mq-table tbody tr:last-child td{border-bottom:0}
 .mq-workspace .mq-lower{gap:28px;margin-top:24px}
 .mq-workspace .mq-lower>div{min-width:0;overflow-wrap:anywhere}
 .mq-workspace .mq-lower h3{font-size:13px}
 .mq-workspace .mq-lower p{font-size:13px;line-height:1.65}
 .mq-workspace .mq-totals p{gap:16px}
 .mq-workspace .mq-totals strong{white-space:nowrap;font-variant-numeric:tabular-nums}
 .mq-workspace .mq-totals p:last-child{font-size:19px}
}
@media screen and (max-width:700px) {
 .mq-workspace .mq-body>.portal-head{flex-wrap:nowrap;gap:12px}
 .mq-workspace .mq-body>.portal-head>h2{font-size:20px}
 .mq-workspace .mq-fields{grid-template-columns:minmax(0,1fr);gap:18px}
 .mq-workspace .mq-editor :is(input,select,textarea){font-size:16px;min-height:46px}
 .mq-workspace .mq-line-editor{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 12px;padding:16px}
 .mq-workspace .mq-line-editor>*{grid-column:1/-1;min-width:0}
 .mq-workspace .mq-line-editor>label:has(>input[type=number]){grid-column:auto}
 .mq-workspace .mq-line-editor>.btn{justify-self:stretch}
 .mq-workspace .mq-tax-row{align-items:stretch;flex-direction:column;gap:8px}
 .mq-workspace .mq-tax-row>.btn{align-self:flex-start}
 .mq-workspace .mq-editor-actions{display:grid;grid-template-columns:minmax(0,1fr);margin-top:20px;padding-top:16px}
 
 
 .mq-workspace .mq-panel{padding:16px;margin-block:16px}
 .mq-workspace .mq-info{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .mq-workspace .mq-info>div:first-child{grid-column:1/-1}
 .mq-workspace .mq-info small{font-size:11px}
 .mq-workspace .mq-info strong{font-size:14px;margin-top:4px}
 .mq-workspace .mq-table-wrap{overflow:visible;margin-top:16px;border:0;border-radius:0}
 .mq-workspace .mq-table{display:block;width:100%;min-width:0}
 .mq-workspace .mq-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);clip-path:inset(50%);white-space:nowrap;border:0}
 .mq-workspace .mq-table tbody{display:grid;gap:12px;min-width:0}
 .mq-workspace .mq-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;padding:16px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
 .mq-workspace .mq-table td{display:block;min-width:0;padding:0;border:0;white-space:normal;text-align:left;font-size:13px;overflow-wrap:anywhere}
 .mq-workspace .mq-table td::before{content:attr(data-label);display:block;margin-bottom:4px;color:var(--muted);font-size:11px;font-weight:500;line-height:1.4}
 .mq-workspace .mq-table td:first-child{grid-column:1/-1;min-width:0;padding-bottom:12px;border-bottom:1px solid var(--line)}
 .mq-workspace .mq-table td:first-child small{margin-top:5px;font-size:12px;line-height:1.6}
 .mq-workspace .mq-table td:last-child{grid-column:1/-1;display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding-top:12px;border-top:1px solid var(--line);font-size:15px;font-weight:600}
 .mq-workspace .mq-table td:last-child::before{margin:0;flex-shrink:0}
 .mq-workspace .mq-table tbody tr:last-child td:first-child{border-bottom:1px solid var(--line)}
 .mq-workspace .mq-lower{grid-template-columns:minmax(0,1fr);gap:20px;margin-top:22px}
 .mq-workspace .mq-lower p{margin-block:8px 0}
 .mq-workspace .mq-totals{border-top:1px solid var(--line);padding-top:10px}
 .mq-workspace .mq-totals p{margin:0}
}
.mq-workspace .mq-search-wrap{position:relative}
.mq-workspace .mq-picker-list{position:absolute;left:0;right:0;top:100%;z-index:10;box-shadow:0 8px 24px #17243b20;max-height:min(240px,35dvh);overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--line);border-radius:10px;background:var(--surface);padding:5px;margin-top:4px;font-size:14px;font-weight:400}
.mq-workspace .mq-picker-list[hidden]{display:none}
.mq-workspace .mq-picker-option{padding:11px 12px;border-radius:7px;cursor:pointer;overflow-wrap:anywhere}
.mq-workspace .mq-picker-option:hover,.mq-workspace .mq-picker-option.is-active{background:var(--accent-soft)}
.mq-workspace .mq-picker-option[aria-selected=true]{color:var(--accent);font-weight:600}
.mq-workspace .mq-picker-list>small{display:block;padding:10px 12px}
@media screen and (max-width:359px) {
 .mq-workspace .mq-line-editor{padding:12px;gap:14px 10px}
 
 .mq-workspace .mq-table tbody tr{padding:12px;gap:12px}
}
/* Documento vivo: match the approved third concept, including field treatment and density. */
.mq-workspace .mq-document-view{--paper-line:#e2e7ef;--paper-muted:#66758a;--paper-blue:#3564f5;max-width:960px;margin:auto;border:1px solid var(--paper-line);border-radius:16px;background:#fff;color:#1b293b;font:14px/1.5 Arial,sans-serif}
.mq-workspace .mq-document-view *{box-sizing:border-box}
.mq-workspace .mq-document-view>.portal-head{padding:22px;margin:0;border-bottom:1px solid var(--paper-line)}
.mq-workspace .mq-document-view h2{font:600 24px/1.2 Arial,sans-serif;letter-spacing:-.8px;margin:0}
.mq-workspace .mq-eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:1.3px;color:var(--paper-muted);margin-bottom:6px}
.mq-workspace .mq-draft-chip{font-size:12px;background:#f5f7fb;padding:5px 10px;border-radius:20px;white-space:nowrap}
.mq-workspace .mq-paper-shell{background:#f1f3f7;padding:20px}
.mq-workspace .mq-live-document{background:#fff;border:1px solid var(--paper-line);border-radius:0;padding:28px;box-shadow:0 3px 10px #1b293b07;gap:0}
.mq-workspace .mq-paper-mast{display:flex;justify-content:space-between;gap:12px;margin-bottom:25px;border:0;padding:0}
.mq-workspace .mq-paper-mast>div{display:flex;flex-direction:column;gap:3px;min-width:0}
.mq-workspace .mq-paper-mast>div:last-child{text-align:right;align-items:flex-end}
.mq-workspace .mq-paper-brand{font-size:29px;font-weight:700;letter-spacing:-2px}
.mq-workspace .mq-paper-mast>div:last-child>strong{font-size:18px;font-weight:500}
.mq-workspace .mq-paper-mast small{font-size:12px;color:var(--paper-muted)}
.mq-workspace .mq-series-host{width:140px}
.mq-workspace .mq-series-host>label{display:flex;align-items:center;gap:6px;font-size:12px;color:var(--paper-muted);font-weight:400}
.mq-workspace .mq-series-host input{width:100%;text-align:right}
.mq-workspace .mq-paper-top{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:24px}
.mq-workspace .mq-paper-top>.mq-fields{display:contents}
.mq-workspace .mq-paper-top [data-section=Cliente]>.mq-search-wrap{grid-column:1;grid-row:1}
.mq-workspace .mq-paper-top [data-field=date]{grid-column:2;grid-row:1}
.mq-workspace .mq-paper-top [data-field=email]{grid-column:1;grid-row:2}
.mq-workspace .mq-paper-top [data-field=expiration_date]{grid-column:2;grid-row:2}
.mq-workspace .mq-paper-top .mq-muted:empty{display:none}
.mq-workspace .mq-paper-top .mq-muted{grid-column:1/-1;font-size:12px;margin:0}
.mq-workspace .mq-document-view .mq-doc-button{font:600 13px/1.3 Arial,sans-serif;min-height:42px;padding:10px 14px;border:1px solid var(--paper-line);border-radius:9px;background:#fff;color:#1b293b;box-shadow:none}
.mq-workspace .mq-document-view .mq-doc-primary{background:var(--paper-blue);border-color:var(--paper-blue);color:#fff}
.mq-workspace .mq-paper-top .mq-doc-button{justify-self:start;min-height:30px;padding:4px 0;border:0;color:var(--paper-blue);font-size:12px}
.mq-workspace .mq-paper-top [data-section=Cliente]>div:not(.mq-search-wrap):empty{display:none}
.mq-workspace .mq-live-document label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:400;color:var(--paper-muted);min-width:0}
.mq-workspace .mq-live-document :is(input,select,textarea),.mq-workspace .mq-live-document .lbl-date-trigger,.mq-workspace .mq-live-document .mq-iva-shortcut>.mq-doc-button{font:14px/1.4 Arial,sans-serif;background:#f8faff;border:0;border-bottom:1px solid #dce5f4;border-radius:3px;padding:8px;min-height:37px;width:100%;color:#1b293b;box-shadow:none}
.mq-workspace .mq-live-document textarea{min-height:74px}
.mq-workspace .mq-paper-articles{border-top:2px solid #1b293b;padding-top:13px;min-width:0}
.mq-workspace .mq-paper-articles>h3{display:none}
.mq-workspace .mq-paper-articles>.mq-fields{display:block}
.mq-workspace .mq-live-document .mq-lines{gap:0}
.mq-workspace .mq-live-document .mq-line-editor{background:#fff;border:0;border-radius:0;padding:0;margin:12px 0 16px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 10px}
.mq-workspace .mq-live-document .mq-line-editor>h3{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:13px;padding:0;margin:0;border:0;grid-column:1/-1}
.mq-workspace .mq-live-document .mq-line-editor>h3>.mq-doc-button{min-height:30px;padding:4px 8px;font-size:18px;font-weight:400}
.mq-workspace .mq-live-document .mq-line-editor>.mq-search-wrap{grid-column:1/-1}
.mq-workspace .mq-live-document .mq-line-editor>[data-field=qty],.mq-workspace .mq-live-document .mq-line-editor>[data-field=price],.mq-workspace .mq-live-document .mq-iva-shortcut{grid-column:auto}
.mq-workspace .mq-live-document .mq-iva-shortcut>.mq-doc-button{text-align:left;justify-content:flex-start;font-weight:400}
.mq-workspace .mq-live-document .mq-line-details{grid-column:1/-1;border:0;margin:0;padding:0}
.mq-workspace .mq-live-document .mq-line-details summary{font-size:11px;color:var(--paper-muted);padding:4px 0;cursor:pointer}
.mq-workspace .mq-line-details>label,.mq-workspace .mq-line-details>.mq-tax-list{margin-block:12px}
.mq-workspace .mq-line-details>label>input,.mq-workspace .mq-line-details>label>textarea{display:block;width:100%}
.mq-workspace .mq-paper-articles>.mq-fields>.mq-doc-button{background:transparent;color:var(--paper-blue);padding-inline:0;border:0;font-weight:600}
.mq-workspace .mq-paper-totals{border-top:1px solid var(--paper-line);padding-top:12px;display:flex;flex-direction:column;align-items:flex-end;margin-top:4px}
.mq-workspace .mq-paper-totals p{display:flex;justify-content:space-between;gap:10px;font-size:12px;margin:6px 0;width:230px;max-width:100%;padding:0}
.mq-workspace .mq-paper-totals p strong{font-weight:400;text-align:right}
.mq-workspace .mq-paper-totals p:nth-child(3){border-top:1px solid var(--paper-line);padding-top:16px;margin-top:10px;align-items:center;font-size:14px}
.mq-workspace .mq-paper-totals p:nth-child(3) strong{font-size:21px;font-weight:600;letter-spacing:-.5px}
.mq-workspace .mq-paper-totals small{font-size:10px;color:var(--paper-muted);max-width:230px;margin-top:4px;text-align:right}
.mq-workspace .mq-paper-conditions{border-top:1px solid var(--paper-line);padding-top:16px;margin-top:20px}
.mq-workspace .mq-paper-conditions summary{font-weight:600;font-size:13px;cursor:pointer}
.mq-workspace .mq-paper-conditions .mq-fields{padding-top:15px;gap:14px}
.mq-workspace .mq-paper-conditions [data-field=notes]{grid-column:1/-1}
.mq-workspace .mq-document-view>.mq-editor-actions{padding:18px 22px;margin:0;display:flex;align-items:center;gap:8px;border-top:1px solid var(--paper-line);max-width:none}
.mq-workspace .mq-footer-note{margin-right:auto;font-size:11px;color:var(--paper-muted);max-width:200px}
@media(max-width:540px){
 .mq-workspace .mq-document-view>.portal-head{padding:16px;gap:12px}
 .mq-workspace .mq-document-view h2{font-size:22px}
 .mq-workspace .mq-paper-shell{padding:10px}
 .mq-workspace .mq-live-document{padding:16px}
 .mq-workspace .mq-paper-mast{margin-bottom:18px}
 .mq-workspace .mq-paper-top{grid-template-columns:minmax(0,1fr)}
 .mq-workspace .mq-paper-top [data-section=Cliente]>.mq-search-wrap,.mq-workspace .mq-paper-top [data-field=date],.mq-workspace .mq-paper-top [data-field=email],.mq-workspace .mq-paper-top [data-field=expiration_date]{grid-column:1;grid-row:auto}
 .mq-workspace .mq-live-document :is(input,select,textarea),.mq-workspace .mq-live-document .lbl-date-trigger{font-size:16px}
 .mq-workspace .mq-live-document .mq-line-editor{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 7px}
 .mq-workspace .mq-live-document .mq-line-editor input{padding-inline:6px}
 .mq-workspace .mq-document-view>.mq-editor-actions{padding:18px 16px;flex-wrap:wrap}
 .mq-workspace .mq-footer-note{width:100%;max-width:none}
 .mq-workspace .mq-document-view>.mq-editor-actions>.mq-doc-button{flex:1;min-height:46px}
 .mq-workspace .mq-paper-conditions .mq-fields{grid-template-columns:minmax(0,1fr)}
}

.mq-workspace .mq-live-document .mq-series-host>label{flex-direction:row;align-items:center;gap:6px}
.mq-workspace .mq-live-document .mq-series-host input{background:transparent;min-height:26px;padding:2px 0;border-bottom:1px solid transparent;font-size:12px;color:var(--paper-muted)}
.mq-workspace .mq-live-document .mq-series-host input:hover{border-bottom-color:#dce5f4}
body.workspace-layout #portal-popup .mq-document-view .mq-live-document .lbl-date-trigger{border-radius:3px;min-height:37px;background:#f8faff;border:0;border-bottom:1px solid #dce5f4;padding:8px;font:14px/1.4 Arial,sans-serif}
@media(max-width:540px){body.workspace-layout #portal-popup .mq-document-view .mq-live-document .lbl-date-trigger{font-size:16px}}
body.workspace-layout #portal-popup .mq-document-view .mq-live-document :is(input,select,textarea){border-radius:3px!important;min-height:37px!important;border:0!important;border-bottom:1px solid #dce5f4!important;background:#f8faff!important;padding:8px!important}
body.workspace-layout #portal-popup .mq-document-view .mq-live-document .mq-series-host input{min-height:26px!important;background:transparent!important;border-color:transparent!important;padding:2px 0!important}
.mq-workspace .mq-live-document .mq-series-host>label{white-space:nowrap;overflow-wrap:normal}
.mq-workspace .mq-live-document .mq-series-host input{flex:1;width:0;min-width:0}
/* Faturas e recibos: kind tabs, search and one row per document with Email / WhatsApp. */
.mq-workspace .mq-doc-kinds{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 12px}
.mq-workspace .mq-doc-kind{min-height:38px;padding:8px 14px;border-radius:999px}
.mq-workspace .mq-doc-search{width:100%;min-height:46px;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit;font-size:15px}
.mq-workspace .mq-doc-status{margin:10px 2px}
.mq-workspace .mq-doc-list{display:grid;gap:8px}
.mq-workspace .mq-doc-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:14px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.mq-workspace .mq-doc-info{display:grid;gap:2px;min-width:0}
.mq-workspace .mq-doc-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mq-workspace .mq-doc-info span{color:var(--muted);font-size:13px}
.mq-workspace .mq-doc-total{font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap}
.mq-workspace .mq-doc-actions{display:flex;gap:8px}
/* Email and WhatsApp weigh the same: two equal round buttons; only the WhatsApp mark is green. */
body .mq-workspace .mq-doc-actions .btn.mq-icon-button,body.workspace-layout #portal-popup .mq-workspace .mq-doc-actions .btn.mq-icon-button{display:inline-grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:999px!important;background:var(--surface)!important;color:var(--ink)!important}
body .mq-workspace .mq-doc-actions .btn.mq-icon-whatsapp,body.workspace-layout #portal-popup .mq-workspace .mq-doc-actions .btn.mq-icon-whatsapp{color:#1fae55!important}
.mq-workspace .mq-icon-button svg{width:21px;height:21px}

.mq-workspace .mq-doc-years{margin-top:14px}
@media(max-width:640px){
 .mq-workspace .mq-doc-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'info total' 'info actions';gap:8px 10px}
 .mq-workspace .mq-doc-info{grid-area:info}.mq-workspace .mq-doc-total{grid-area:total;justify-self:end}.mq-workspace .mq-doc-actions{grid-area:actions;justify-self:end}
}
/* Quote detail (proposal C): icons, state and Agendar obra above the document. */
html body .mq-workspace .mq-body>.mq-quick{display:grid!important;grid-template-columns:minmax(0,1fr)!important;grid-template-areas:none!important;gap:12px;margin:0 0 16px;width:100%}
.mq-workspace .mq-quick>*{min-width:0}html body .mq-workspace .mq-quick>.mq-quick-icons{grid-area:auto!important;justify-self:stretch!important;justify-content:flex-start!important;margin:0!important;width:auto!important}.mq-workspace .mq-quick .mq-quick-icons{display:flex;flex-wrap:wrap;gap:10px}
.mq-workspace .mq-quick .mq-quick-main{width:100%;min-height:48px}
body .mq-workspace .mq-doc-actions .btn.mq-icon-trash,body.workspace-layout #portal-popup .mq-workspace .mq-doc-actions .btn.mq-icon-trash{color:#c62f3d!important}
html body .mq-workspace .mq-quick .mq-states{width:100%;box-sizing:border-box;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:4px;border-radius:12px;background:var(--surface-3,#e9edf4);max-width:520px}
html body .mq-workspace .mq-quick .mq-states .btn.mq-state.mq-state,html body.workspace-layout #portal-popup .mq-workspace .mq-quick .mq-states .btn.mq-state.mq-state{min-height:38px!important;padding:6px 8px!important;border:0!important;border-radius:9px!important;background:transparent!important;color:var(--muted)!important;font-size:13px;font-weight:600;box-shadow:none!important}
html body .mq-workspace .mq-quick .mq-states .btn.mq-state.mq-state[aria-pressed=true],html body.workspace-layout #portal-popup .mq-workspace .mq-quick .mq-states .btn.mq-state.mq-state[aria-pressed=true]{background:var(--surface)!important;color:var(--ink)!important;box-shadow:0 1px 2px rgba(19,34,57,.12)!important}
.mq-workspace .mq-schedule:empty{display:none}
html body .mq-workspace .mq-quick .mq-schedule{flex-wrap:wrap;display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:12px;background:color-mix(in srgb,#16a34a 14%,var(--surface,#fff));color:#11753a}
.mq-workspace .mq-schedule strong{flex:1 1 auto;font-size:14px}
html body .mq-workspace .mq-quick .mq-schedule .btn.mq-schedule-go.mq-schedule-go,html body.workspace-layout #portal-popup .mq-workspace .mq-quick .mq-schedule .btn.mq-schedule-go.mq-schedule-go{min-height:40px!important;border:0!important;border-radius:999px!important;background:#11753a!important;color:#fff!important;padding:0 16px!important}


.quote-selection-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:14px;background:#fff;border:1px solid #dce3ee;border-radius:12px;margin-bottom:10px}
.quote-selection-bar>.muted{flex-basis:100%}




.quote-delete-list{list-style:none;margin:20px 0;padding:0;display:grid;gap:10px}
.quote-delete-list li{padding:14px;border:1px solid #dce3ee;border-radius:10px;background:#fff;overflow-wrap:anywhere}
.quote-delete-list p{margin:6px 0 0}.quote-delete-blocked{color:#6d4850}
@media(max-width:520px){.quote-selection-bar>.btn{flex:1 1 140px}.quote-selection-bar>strong{flex-basis:100%}}

body.selecting-quotes #btn-new-fab{display:none}

/* Quotes workspace: screen only; document output and other areas keep their layout. */
@media screen {
 .workspace-layout .quotes-workspace{max-width:1320px;width:100%;margin-inline:auto;min-width:0}
 .quotes-workspace .list-head{gap:24px;padding:0 0 20px}
 .workspace-layout .quotes-workspace .stats{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
 .workspace-layout .quotes-workspace .stat{display:flex;flex-direction:column;align-items:flex-start;gap:8px;padding:20px 22px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:none;min-width:0;grid-column:auto;text-align:left}
 .quotes-workspace .stat .k{font-size:13px;letter-spacing:0;text-transform:none;color:var(--muted);font-weight:600}
 .workspace-layout .quotes-workspace .stat .v{font-size:27px;font-weight:700;line-height:1.25;color:var(--ink);letter-spacing:-.7px;overflow-wrap:anywhere}
 .quotes-workspace .stat .s{font-size:12px}
 .quotes-workspace .stat:hover{border-color:var(--accent);background:var(--surface-2)}
 .quotes-workspace .stat[aria-pressed=true]{border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);background:var(--accent-soft)}
 .quotes-workspace .stat:focus-visible,.quotes-workspace .row:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
 .quotes-toolbar{display:grid;grid-template-columns:minmax(180px,1fr) minmax(180px,230px) auto;gap:12px;align-items:center}
 .quotes-toolbar .search{margin:0;min-height:46px;border-radius:9px;padding:0 14px;background:var(--surface);min-width:0;box-shadow:none}
 .quotes-toolbar .search input{padding:12px 0;font-size:13px;min-width:0;width:100%}
 .quotes-toolbar select{width:100%;min-width:0;min-height:46px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);padding:10px 12px;font:inherit;font-size:13px}
 .quotes-toolbar .portal-actions{display:flex;flex-wrap:nowrap;gap:8px;margin:0}
 .quotes-list-summary{display:flex;justify-content:space-between;gap:12px;padding:0 2px 12px;color:var(--muted);font-size:12px}
 .quotes-list-summary #quote-results{color:var(--ink);font-weight:650}
 .quotes-refresh{display:inline-flex;align-items:center;gap:5px;margin-left:auto;padding:2px 4px;border:0;background:none;color:var(--accent,#1d6fd6);font:inherit;font-weight:650;cursor:pointer;white-space:nowrap}
 .quotes-refresh[hidden]{display:none}
 .quotes-refresh svg{width:14px;height:14px;flex:none}
 .quotes-refresh:disabled{color:var(--muted);cursor:default}
 .quotes-refresh:disabled svg{animation:quotes-refresh-spin 1s linear infinite}
 @media(max-width:600px){.quotes-refresh:not([hidden])+span{display:none}}
 @keyframes quotes-refresh-spin{to{transform:rotate(360deg)}}
 @media(prefers-reduced-motion:reduce){.quotes-refresh:disabled svg{animation:none}}
 .workspace-layout .quotes-workspace .list{padding:0;gap:0;overflow:visible;border:1px solid var(--line);border-radius:12px;background:var(--surface);flex:none}
 .quotes-workspace .list>li{min-width:0}
 .quotes-workspace .list>li+li{border-top:1px solid var(--line)}
 .workspace-layout .quotes-workspace .row{display:grid;grid-template-columns:38px minmax(0,1fr) 132px minmax(120px,160px) 16px;grid-template-areas:'av name status total arrow' 'av meta status total arrow';gap:7px 16px;padding:20px 22px;border:0;border-radius:0;box-shadow:none;background:transparent;min-width:0;transform:none;text-align:left}
 .quotes-workspace .list>li:first-child .row{border-radius:11px 11px 0 0}.quotes-workspace .list>li:last-child .row{border-radius:0 0 11px 11px}
 .quotes-workspace .row:hover{background:var(--surface-2)}
 .workspace-layout .quotes-workspace .row .av{width:38px;height:38px;border-radius:10px;background:var(--surface-3);color:var(--muted);font-size:12px;font-weight:650}
 .workspace-layout .quotes-workspace .row .name{font-size:14px;font-weight:650;white-space:normal;overflow-wrap:anywhere;line-height:1.5}
 .workspace-layout .quotes-workspace .row .meta{font-size:12px;white-space:normal;overflow-wrap:anywhere;line-height:1.5}
 .workspace-layout .quotes-workspace .row .total{grid-area:total;padding:0;text-align:right;font-size:15px;font-weight:700;overflow-wrap:anywhere;min-width:0}
 .workspace-layout .quotes-workspace .row .quote-total-pending{font-size:12px;font-weight:500;color:var(--muted)}
 .workspace-layout .quotes-workspace .row .status{grid-area:status;justify-self:start;max-width:none;min-width:0}
 .quotes-workspace .row .pill{font-size:11px;border-radius:6px;padding:5px 9px;white-space:normal;line-height:1.5}
 .quotes-workspace .quote-open{grid-area:arrow;color:var(--muted);font-size:23px;text-align:right}
 .quotes-workspace .list>li>p{margin:0;padding:16px 22px}
 .quotes-workspace .quote-selection-bar{margin:0;border:0;border-radius:12px 12px 0 0;background:var(--surface-2);padding:16px}
 
 
 
 
 @media(max-width:1100px){
  .quotes-toolbar{grid-template-columns:minmax(0,1fr) auto}.quotes-toolbar .search{grid-column:1/-1}
  .workspace-layout .quotes-workspace .row{grid-template-columns:32px minmax(0,1fr) 115px 112px 12px;gap:6px 12px;padding:18px}
 }
 @media(max-width:760px),(pointer:coarse) and (max-height:540px){
  .quotes-toolbar{gap:10px;grid-template-columns:minmax(0,1fr) auto}
 }
 @media(max-width:370px){.quotes-toolbar{grid-template-columns:minmax(0,1fr)}.quotes-toolbar .portal-actions{justify-content:flex-end}.quotes-list-summary>span:last-child{font-size:10px}}
}

@media screen{
 .admin-preview-banner{position:fixed;inset:0 0 auto;z-index:1000;min-height:58px;box-sizing:border-box;display:flex;align-items:center;gap:14px;padding:8px 24px;background:var(--surface);color:var(--ink);border-bottom:2px solid var(--accent);font-size:14px}
 .admin-preview-banner>span{color:var(--muted);font-size:12px}.admin-preview-banner>.btn{margin-left:auto}
 a.app-settings-row{color:var(--ink);text-decoration:none}
 body.admin-preview-active{padding-top:var(--preview-height,62px)}.admin-preview-active .workspace-sidebar{top:var(--preview-height,62px);height:calc(100dvh - var(--preview-height,62px))}
 .admin-preview-active .topbar{top:var(--preview-height,62px)}
 @media(max-width:600px){.admin-preview-banner{padding:8px 12px;gap:8px;font-size:12px}.admin-preview-banner>span{display:none}.admin-preview-banner>.btn{font-size:12px;padding:8px;white-space:nowrap;flex-shrink:0}}
}

/* Native mobile presentation for the existing workspace. Loaded after feature styles. */
/* Phone rules that used to live in the feature stylesheets (same load order as before). */
/* from workspace.css */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  .workspace-menu-open .workspace-sidebar{transform:translateX(0);visibility:visible}
  .workspace-menu-open .workspace-shade{display:block;position:fixed;inset:0;border:0;background:#111c3580;backdrop-filter:blur(2px);z-index:44}
  .workspace-menu-open{overflow:hidden}
  .workspace-layout #portal{padding:28px 18px 40px}
  .workspace-layout #portal .portal-head p{font-size:12px}
  .workspace-layout .portal-home>.portal-head{margin-bottom:24px}
  .workspace-layout .portal-home>.portal-head>.portal-actions{width:auto}
  .workspace-layout .panel-list .stat{min-width:0;padding:16px;overflow-wrap:anywhere}
  .workspace-layout .panel-list .list,.workspace-layout .panel-list .list>li{min-width:0;max-width:100%}
  .workspace-layout .panel-list .row .av{width:32px;height:32px}
}
/* from holidays.css */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  .holidays-stats>div{padding:16px 12px}
  .holidays-stats strong{font-size:28px}
  .holidays-toolbar{gap:12px}
  .holidays-toolbar>label:has(select){flex:1;min-width:150px}
  .holidays-toolbar select{max-width:100%;width:100%}
  .holidays-calendar{max-width:430px}
  .holidays-request-top{align-items:start}
  .holidays-request-top strong{font-size:13px}
  .portal .holidays-heading .portal-actions{display:flex!important;flex-direction:row!important;flex-wrap:nowrap!important;width:100%;gap:8px}
  .portal .holidays-heading .portal-actions>.btn-primary{flex:1;width:auto!important}
  .portal .holidays-heading .portal-actions>.ui-action-icon{flex:0 0 44px!important;width:44px!important}
}
/* from theme.css */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  .workspace-layout #portal h2{font-size:26px;letter-spacing:-.8px}
  .workspace-layout #portal .portal-card:not(.portal-record-list){border-radius:16px}
  
  .portal .portal-table-wrap{border:0;border-radius:0}
  .portal .portal-table-wrap tbody tr{border-radius:14px;border-color:var(--line)}
  .portal .btn{min-height:44px}
  .workspace-layout #portal:not(:has(.lbl-calendar)){padding:22px 16px 32px}
  .workspace-layout #portal:not(:has(.lbl-calendar)) h2{font-size:25px}
  .portal:not(:has(.lbl-calendar)) .portal-head{align-items:flex-start;gap:16px;margin-bottom:22px}
  .portal:not(:has(.lbl-calendar)) .portal-head>.portal-actions{gap:8px}
  .portal:not(:has(.lbl-calendar)) .portal-head>.portal-actions>.btn-primary{order:-1;flex-basis:100%}
  .portal:not(:has(.lbl-calendar)) .portal-head>.portal-actions>.btn{flex-grow:1}
  .portal:not(:has(.lbl-calendar)) .portal-week-picker{width:100%;justify-content:space-between}
  #portal-popup{width:100%;max-width:100%;height:100dvh;max-height:100dvh;border-radius:0;border:0;margin:0;scroll-padding-bottom:calc(32px + env(safe-area-inset-bottom))}
  .portal-popup-bar{border-radius:0;padding:8px 16px}
  .portal-popup-content{padding:22px 18px calc(32px + env(safe-area-inset-bottom))!important}
  .portal-popup-content>form>.portal-actions{margin-inline:-18px;padding:14px 18px calc(14px + env(safe-area-inset-bottom));gap:8px}
  .portal-popup-content>form>.portal-actions>.btn-primary{flex:1}
  .portal-popup-content form :is(input:not([type=checkbox]):not([type=radio]),select,textarea){font-size:16px;min-height:48px}
  .employee-today .portal-actions>.btn-primary{width:100%;flex-basis:100%}
  #lbl-updates{padding:22px}
}
/* from quotes-ui.css */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  .quotes-workspace .list-head{gap:18px;padding-bottom:18px}
  .workspace-layout .quotes-workspace .stats{gap:8px;grid-template-columns:repeat(2,minmax(0,1fr))}
  .workspace-layout .quotes-workspace .stat{padding:15px;gap:7px}
  .workspace-layout .quotes-workspace .stat .v{font-size:21px;letter-spacing:-.5px}
  .quotes-workspace .stat .k,.quotes-workspace .stat .s{font-size:11px}
  .workspace-layout .quotes-workspace .stat.mnt{grid-column:1/-1;display:grid;grid-template-columns:1fr auto;column-gap:12px;row-gap:2px;align-items:center;padding:12px 15px}
  .quotes-workspace .stat.mnt .k{grid-column:1;grid-row:1}
  .quotes-workspace .stat.mnt .s{grid-column:1;grid-row:2}
  .workspace-layout .quotes-workspace .stat.mnt .v{grid-column:2;grid-row:1/3}
  .quotes-toolbar .portal-actions{gap:6px}
  .quotes-toolbar .portal-actions .btn{padding:10px!important;font-size:12px!important}
  .quotes-toolbar select{font-size:12px;padding-inline:8px}
  .quotes-list-summary{font-size:11px;padding-bottom:10px}
  .workspace-layout .quotes-workspace .list{border:0;background:transparent;gap:10px}
  .quotes-workspace .list>li+li{border:0}
  .workspace-layout .quotes-workspace .row{grid-template-columns:minmax(0,1fr) auto 12px;grid-template-areas:'name name arrow' 'meta meta arrow' 'status total total';gap:7px 8px;padding:17px 16px;border:1px solid var(--line);border-radius:11px!important;background:var(--surface)}
  .workspace-layout .quotes-workspace .row .av{display:none}
  .workspace-layout .quotes-workspace .row .name{font-size:14px;padding-right:2px}
  .workspace-layout .quotes-workspace .row .meta{font-size:11px}
  .workspace-layout .quotes-workspace .row .status,.workspace-layout .quotes-workspace .row .total{margin-top:9px}
  .workspace-layout .quotes-workspace .row .status{max-width:140px}
  .workspace-layout .quotes-workspace .row .total{font-size:15px;max-width:100%;white-space:normal}
  .workspace-layout .quotes-workspace .row .quote-total-pending{font-size:12px}
  .quotes-workspace .quote-selection-bar{border:1px solid var(--line);border-radius:11px}
}
@media screen {
  body.workspace-layout .workspace-bottom-nav,
  body.workspace-layout .workspace-mobile-brand,
  body.workspace-layout .workspace-mobile-profile,
  body.workspace-layout .native-mobile-only{ display: none; }
}
@media print {
  body.workspace-layout .workspace-bottom-nav,
  body.workspace-layout .workspace-mobile-brand,
  body.workspace-layout .workspace-mobile-profile,
  body.workspace-layout .native-mobile-only { display: none !important; }
}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.native-more-open { overflow: hidden; }
  /* The offscreen opening position must not become a focus-scroll container. */
  #native-more-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: clip; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; }
  #native-more-dialog::backdrop { background: #1c283833; }
  #native-more-dialog .native-more-card { position: absolute; inset: auto 0 var(--more-nav-height, 64px); display: flex; flex-direction: column; max-height: calc(100dvh - var(--more-nav-height, 64px) - env(safe-area-inset-top) - 20px); padding: 0 17px 18px; border-radius: 24px 24px 0 0; background: var(--surface); box-shadow: 0 -6px 28px #1c28380b; transform: translateY(calc(100% + 90px)); transition: transform .22s cubic-bezier(.22,.8,.22,1); }
  #native-more-dialog.is-open .native-more-card { transform: translateY(0); }
  #native-more-dialog .native-more-card.is-dragging { transition: none; }
  #native-more-dialog .native-more-grip { display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 100%; height: 28px; padding: 0; border: 0; background: transparent; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
  #native-more-dialog .native-more-grip::before { content: ''; width: 34px; height: 4px; border-radius: 4px; background: var(--line); }
  #native-more-dialog .native-more-heading { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; margin-bottom: 9px; }
  #native-more-dialog .native-more-heading h2 { margin: 0; font-size: 20px; font-weight: 650; }
  #native-more-dialog .native-more-heading h2:focus { outline: none; box-shadow: none; }
  #native-more-dialog .native-more-heading .btn { width: 44px; height: 44px; border: 0 !important; background: transparent !important; box-shadow: none !important; }
  #native-more-dialog .native-more-items { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
  #native-more-dialog .native-menu-page { gap: 0; }
  #native-more-dialog .native-menu-heading { display: none; }
  #native-more-dialog .native-menu-group { border-radius: 0; overflow: visible; }
  #native-more-dialog .native-menu-group + .native-menu-heading + .native-menu-group { border-top: 1px solid var(--line); }
  #native-more-dialog .native-menu-row { min-height: 48px; padding: 11px 4px; font-family: inherit; }
  #native-more-dialog .native-menu-icon { width: 21px; height: 21px; flex-basis: 21px; border-radius: 0; background: transparent; color: var(--ink); }
  #native-more-dialog .native-menu-icon svg { width: 21px; height: 21px; }
  #native-more-dialog .native-menu-row strong { font-weight: 400; }
  @media(prefers-reduced-motion:reduce) { #native-more-dialog .native-more-card { transition: none; } }
  body.workspace-layout {
    --workspace-native-blue: #2c60e9;
    color: var(--ink);
  }
  html[data-theme="light"] body.workspace-layout {
    --workspace-native-blue: #2c60e9;
    --workspace-native-canvas: #f5f6f8;
    --workspace-native-card: #fff;
    --workspace-native-line: #e7ecf2;
    --ink: #1c2838;
    --muted: #687788;
    --line: #e7ecf2;
    --bg: #f5f6f8;
    --surface: #fff;
    --surface-2: #f5f6f8;
    --accent: #2c60e9;
    --accent-hover: #214fca;
    --accent-soft: #edf2ff;
    --accent-ink: #fff;
    background: var(--workspace-native-canvas);
    color: var(--ink);
  }
  html[data-theme="dark"] body.workspace-layout {
    --workspace-native-canvas: var(--bg);
    --workspace-native-card: var(--surface);
    --workspace-native-line: var(--line);
    background: var(--workspace-native-canvas);
  }

  body.workspace-layout,
  body.workspace-layout #portal,
  body.workspace-layout #portal * { box-sizing: border-box; }

  body.workspace-layout .app { display: block; padding: 0; min-width: 0; }
  body.workspace-layout .app { padding-top: env(safe-area-inset-top); }
  body.workspace-layout .main { padding-bottom: calc(158px + env(safe-area-inset-bottom)); }
  body.workspace-layout #btn-new-fab { bottom: calc(82px + env(safe-area-inset-bottom)); width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 13px; background: transparent; color: var(--ink); box-shadow: none; }
  body.workspace-layout #btn-new-fab svg { width: 20px; height: 20px; stroke-width: 1.7; }
  body.workspace-layout .workspace-sidebar { display: none; }
  body.workspace-layout .topbar { display: none !important; }
  body.workspace-layout.view-editor .panel-editor {
    inset: 0;
    padding: max(12px, env(safe-area-inset-top)) 10px max(60px, env(safe-area-inset-bottom));
    scroll-padding-top: 16px;
  }
  body.workspace-layout.view-editor .panel-editor :is(#btn-back, #btn-back-detail) { scroll-margin-top: 16px; }
  body.workspace-layout .topbar-right { gap: 6px; }
  body.workspace-layout .workspace-mobile-brand { display: flex; align-items: center; gap: 8px; margin-right: auto; min-width: 0; }
  body.workspace-layout .workspace-mobile-brand img { width: 30px; height: 30px; object-fit: contain; }
  body.workspace-layout .workspace-mobile-brand strong { color: var(--ink); font-size: 16px; letter-spacing: -.4px; }
  body.workspace-layout .workspace-mobile-profile { align-items: center; justify-content: center; width: 44px; min-width: 44px; height: 44px; padding: 4px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); }
  body.workspace-layout .workspace-mobile-profile img,
  body.workspace-layout .workspace-mobile-profile .workspace-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
  body.workspace-layout .workspace-mobile-profile > .workspace-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--surface-2); color: var(--muted); }
  body.workspace-layout #btn-settings,
  body.workspace-layout #btn-logout { display: none !important; }
  body.workspace-layout .workspace-menu-toggle,
  body.workspace-layout .workspace-menu-close,
  body.workspace-layout .topbar button.btn-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; min-width: 44px; height: 44px; border: 0; border-radius: 12px;
    padding: 10px; background: transparent !important; color: var(--ink); box-shadow: none !important;
  }
  body.workspace-layout .workspace-shade,
  body.workspace-layout .workspace-sidebar { display: none !important; }

  body.workspace-layout #portal {
    width: 100%; max-width: none; min-width: 0; margin: 0;
    padding: 17px 16px calc(88px + env(safe-area-inset-bottom));
    background: transparent;
  }
  body.workspace-layout #portal h1,
  body.workspace-layout #portal h2 { font-size: 25px; line-height: 1.2; letter-spacing: -.65px; font-weight: 700; }
  body.workspace-layout #portal h3 { font-size: 15px; line-height: 1.35; letter-spacing: -.15px; }
  body.workspace-layout #portal p { line-height: 1.5; }
  body.workspace-layout .portal-head { align-items: flex-start; gap: 10px; margin-bottom: 17px; }
  body.workspace-layout .portal-head > :first-child { min-width: 0; }
  body.workspace-layout .portal-head p { margin-top: 5px; font-size: 12px; }
  body.workspace-layout #portal .portal-card,
  body.workspace-layout #portal .portal-brand-card,
  body.workspace-layout #portal .portal-product-card {
    min-width: 0; border: 0; border-radius: 16px; background: var(--workspace-native-card);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--ink) 5%, transparent);
  }
  body.workspace-layout #portal .portal-card { padding: 16px; }
  body.workspace-layout #portal .portal-card + .portal-card { margin-top: 12px; }
  body.workspace-layout #portal .portal-grid,
  body.workspace-layout #portal .portal-week,
  body.workspace-layout #portal .portal-brand-grid,
  body.workspace-layout #portal .portal-product-grid { gap: 10px; }
  body.workspace-layout #portal .portal-grid { grid-template-columns: minmax(0, 1fr); }
  body.workspace-layout #portal .portal-actions { gap: 8px; }
  body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .topbar) button { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; touch-action: manipulation; }
  body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .topbar, #totalbar, .quote-share, #lbl-updates) .btn-primary {
    min-height: 46px !important; padding: 12px 15px !important; border: 0 !important; border-radius: 12px !important;
    background: #2c60e9 !important; background-image: none !important; color: #fff !important;
    box-shadow: none !important; font-size: 13px; font-weight: 600;
  }
  body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .topbar, #totalbar, .quote-share, #lbl-updates) .btn:not(.btn-primary):not(.btn-icon):not(.ui-action-icon):not(.workspace-menu-toggle):not(.workspace-menu-close, .service-price-edit, .native-days-today-actions > *) {
    min-height: 46px !important; padding: 12px 15px !important; border: 1px solid #e1e7f0 !important; border-radius: 12px !important;
    background: var(--surface) !important; background-image: none !important; color: var(--ink);
    box-shadow: none !important; font-size: 13px; font-weight: 600;
  }
  body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .topbar, #totalbar, .quote-share, #lbl-updates) :is(.btn-icon, .ui-action-icon, .native-icon-button) {
    min-width: 44px; min-height: 44px !important; padding: 10px !important; border: 0 !important; border-radius: 13px !important;
    background: transparent !important; background-image: none !important; color: var(--ink); box-shadow: none !important;
  }
  /* Override the legacy Contorno !important rules, including selected and destructive actions. */
  body.workspace-layout :is(#portal, #portal-popup, .main) .btn:is([aria-pressed="true"], [aria-selected="true"]) {
    background: var(--accent-soft) !important; color: var(--accent) !important; border-color: var(--accent) !important;
  }
  body.workspace-layout :is(#portal, #portal-popup, .main) .btn.btn-danger-solid {
    background: #b42332 !important; color: #fff !important; border-color: #b42332 !important;
  }
  body.workspace-layout :is(#portal, #portal-popup, .main) .btn.btn-danger-solid:hover:not(:disabled) { background: #931c28 !important; }
  body.workspace-layout #portal .btn-primary:hover,
  body.workspace-layout #portal-popup .btn-primary:hover { background: #2454d7 !important; }
  body.workspace-layout #portal input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body.workspace-layout #portal select,
  body.workspace-layout #portal textarea,
  body.workspace-layout #portal-popup input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body.workspace-layout #portal-popup select,
  body.workspace-layout #portal-popup textarea {
    min-height: 44px; min-width: 0; max-width: 100%; border-radius: 11px; font-size: 16px;
  }
  body.workspace-layout #portal textarea,
  body.workspace-layout #portal-popup textarea { min-height: 96px; }

  /* Home and agenda */
  
  
  

  /* Tables become scrollable only when they are not already rendered as mobile records. */
  body.workspace-layout .portal-table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
  
  
  body.workspace-layout .portal-hours-summary { align-items: flex-start; gap: 12px; }
  body.workspace-layout .portal-hours-summary > .portal-actions { flex-wrap: wrap; }
  body.workspace-layout .portal-hours-metric h3 { font-size: 30px; }

  /* Keep the native month grid intact and use its existing overflow rules. */
  body.workspace-layout .lbl-calendar { min-width: 0; }
  body.workspace-layout .lbl-calendar-toolbar { flex-wrap: wrap; gap: 8px; }
  body.workspace-layout .lbl-calendar-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  body.workspace-layout .lbl-calendar-board { min-width: 0; }
  body.workspace-layout .lbl-calendar-grid,
  body.workspace-layout .lbl-calendar-weekdays { min-width: 0; }
  body.workspace-layout .lbl-calendar-day { min-height: 48px; }
  body.workspace-layout .lbl-calendar-agenda { min-width: 0; }
  body.workspace-layout .calendar-job-actions { flex-wrap: wrap; }

  /* Portal forms and details are full-height mobile sheets; PDF/print keeps its own layout. */
  body.workspace-layout #portal-popup {
    position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: 100dvh;
    margin: 0; padding: env(safe-area-inset-top) 0 max(40px, env(safe-area-inset-bottom)); border: 0; border-radius: 0;
    background: var(--bg); overflow: auto; overscroll-behavior: contain;
  }
  body.workspace-layout .portal-popup-bar { position: sticky; top: 0; padding: max(4px, env(safe-area-inset-top)) 12px 4px; }
  body.workspace-layout .portal-popup-bar .btn { min-width: 44px; min-height: 44px; }
  body.workspace-layout .portal-popup-content { padding: 17px 16px max(40px, env(safe-area-inset-bottom)) !important; }
  body.workspace-layout .portal-popup-content .portal-head { align-items: flex-start; }
  body.workspace-layout .portal-popup-content .portal-head h2 { font-size: 23px; }
  body.workspace-layout .portal-popup-content .portal-card { padding: 16px; border-radius: 16px; }
  body.workspace-layout .portal-form-section { min-width: 0; }
  body.workspace-layout .portal-form-section + .portal-form-section { margin-top: 14px; }
  body.workspace-layout .portal-form-section .portal-grid { grid-template-columns: minmax(0, 1fr); }
  body.workspace-layout .portal-form-section .portal-check { min-height: 44px; }
  body.workspace-layout #portal-popup .portal-actions { flex-wrap: wrap; }
  body.workspace-layout #portal-popup .portal-actions .btn { flex: 1 1 130px; }

  /* Every popup scrolls only up and down. The sticky save bar from refined.css spans
     -18px, wider than the 16px mobile gutters, which let the whole form slide sideways. */
  body.workspace-layout #portal-popup {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y pinch-zoom;
  }
  body.workspace-layout #portal-popup .portal-popup-content > form > .portal-actions {
    margin-inline: -16px;
    padding-inline: 16px;
  }

  /* Keep the scheduling actions at the viewport edge, with fields above them. */
  body.workspace-layout #portal-popup:has(.portal-job-form) {
    padding: 0;
    /* Contain diagonal touch gestures without disabling vertical scroll or zoom. */
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y pinch-zoom;
    scroll-padding-top: calc(64px + env(safe-area-inset-top));
    scroll-padding-bottom: calc(84px + env(safe-area-inset-bottom));
  }
  body.workspace-layout #portal-popup:has(.portal-job-form) .portal-popup-content { padding-bottom: 0 !important; }
  /* The quote's total bar ends the page: no empty strip under it once scrolled to the end. */
  body.workspace-layout #portal-popup:has(.qf-bar) { padding-bottom: 0; }
  body.workspace-layout #portal-popup:has(.qf-bar) .portal-popup-content { padding-bottom: 0 !important; }
  body.workspace-layout #portal-popup .qf { padding-bottom: calc(8px + env(safe-area-inset-bottom)); }
  body.workspace-layout #portal-popup .portal-job-form { display: flex; flex-direction: column; min-width: 0; }
  body.workspace-layout #portal-popup .portal-job-form .portal-check { min-width: 0; overflow-wrap: anywhere; }
  body.workspace-layout #portal-popup .portal-job-form .portal-check input { flex-shrink: 0; }
  body.workspace-layout #portal-popup .portal-job-form > .portal-actions {
    order: 2; flex-shrink: 0; margin: 16px -16px 0;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  }
  body.workspace-layout .days-document { max-width: 100%; overflow-x: auto; }
  body.workspace-layout .quote-share { width: calc(100vw - 24px); max-width: 480px; max-height: calc(100dvh - 24px); overflow: auto; padding: 18px; border-radius: 18px; }

  body.workspace-layout #portal-popup.native-menu-sheet {
    position: fixed; inset: auto 0 0; width: 100%; height: auto; max-width: none; max-height: calc(100dvh - 24px);
    margin: 0; padding: 0 0 max(24px, env(safe-area-inset-bottom)); border: 0; border-radius: 24px 24px 0 0; color: var(--ink); overflow: auto; overscroll-behavior: contain;
    box-shadow: 0 -16px 44px #1620391c;
  }
  body.workspace-layout #portal-popup.native-menu-sheet .portal-popup-bar { position: sticky; top: 0; z-index: 2; padding: 8px 14px; border-radius: 24px 24px 0 0; }
  body.workspace-layout #portal-popup.native-menu-sheet .portal-popup-content { padding: 14px 16px 22px !important; }

  /* The old quote editor's total bar stays above the mobile navigation. */
  body.workspace-layout.view-editor #totalbar,
  body.workspace-layout #totalbar:not([hidden]) {
    position: fixed; left: 10px; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom));
    z-index: 35; width: auto; max-width: none; transform: none; border-radius: 15px;
  }
  body.workspace-layout.view-editor #portal,
  body.workspace-layout.view-editor .main { padding-bottom: 170px; }
  body.workspace-layout.portal-popup-open .workspace-bottom-nav,
  body.workspace-layout.view-editor .workspace-bottom-nav,
  body.workspace-layout:has(#portal-popup[open]) .workspace-bottom-nav { display: none; }
  body.workspace-layout.portal-popup-open #totalbar,
  body.workspace-layout:has(#portal-popup[open]) #totalbar { display: none !important; }

  body.workspace-layout .workspace-bottom-nav {
    position: fixed; z-index: 50; inset: auto 0 0; min-height: calc(64px + env(safe-area-inset-bottom));
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: stretch; gap: 0;
    padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line); background: var(--surface);
    box-shadow: 0 -4px 18px color-mix(in srgb, var(--ink) 5%, transparent);
  }
  body.workspace-layout .workspace-bottom-item {
    min-width: 0; min-height: 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 4px 2px; border: 0; border-radius: 12px; background: transparent; color: var(--muted); font: inherit; touch-action: manipulation;
  }
  body.workspace-layout .workspace-bottom-item svg { width: 20px; height: 20px; flex: 0 0 auto; }
  body.workspace-layout .workspace-bottom-label { max-width: 100%; overflow: visible; text-overflow: clip; white-space: normal; font-size: 11px; line-height: 1.15; text-align: center; }
  body.workspace-layout .workspace-bottom-label > span { display: block; }
  body.workspace-layout .workspace-bottom-item[data-view="dias"],
  body.workspace-layout .workspace-bottom-item[data-view="banco"] { white-space: normal; }
  body.workspace-layout .native-mobile-only { display: block; }
  body.workspace-layout .workspace-mobile-profile { display: inline-flex; }
  body.workspace-layout .native-desktop-only { display: none !important; }
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  body.workspace-layout .workspace-bottom-label { overflow-wrap: anywhere; }
  body.workspace-layout .workspace-bottom-item.active { color: var(--workspace-native-blue); }
  body.workspace-layout[data-theme="dark"] .workspace-bottom-item.active,
  html[data-theme="dark"] body.workspace-layout .workspace-bottom-item.active { color: var(--accent); }

  body.workspace-layout .totalbar .btn { min-height: 44px; }

  /* Full-page More menu, grouped like native settings rows. */
  body.workspace-layout .native-menu-page { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  body.workspace-layout .native-menu-heading { display: flex; align-items: center; gap: 10px; min-height: 44px; }
  body.workspace-layout .native-menu-heading h2,
  body.workspace-layout .native-menu-heading h3 { margin: 0; font-size: 15px; }
  body.workspace-layout .native-menu-profile { display: flex; align-items: center; gap: 11px; width: 100%; min-width: 0; min-height: 60px; padding: 12px 15px; border: 0; border-radius: 16px; background: var(--workspace-native-card); color: var(--ink); text-align: left; font: inherit; box-shadow: none; }
  body.workspace-layout .native-menu-profile img,
  body.workspace-layout .native-menu-profile .workspace-avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
  body.workspace-layout .native-menu-profile strong { display: block; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
  body.workspace-layout .native-menu-profile small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
  body.workspace-layout .native-menu-profile > .workspace-icon { flex: 0 0 16px; width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
  body.workspace-layout .native-menu-group { min-width: 0; overflow: hidden; border-radius: 16px; background: var(--workspace-native-card); }
  body.workspace-layout .native-menu-row {
    display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 60px;
    padding: 10px 15px; border: 0; border-radius: 0; background: var(--workspace-native-card) !important;
    color: var(--ink); text-align: left; font: inherit; font-size: 14px; box-shadow: none !important; white-space: normal;
  }
  body.workspace-layout .native-menu-row + .native-menu-row { border-top: 1px solid var(--workspace-native-line); }
  body.workspace-layout .native-menu-icon { display: inline-grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; border-radius: 9px; background: #edf2ff; color: #2c60e9; }
  body.workspace-layout .native-menu-row > :not(.native-menu-icon):not(.native-menu-chevron) { min-width: 0; }
  body.workspace-layout .native-menu-chevron { flex: 0 0 auto; width: 16px; height: 16px; margin-left: auto; color: var(--muted); }
  body.workspace-layout .native-menu-row strong { display: block; font-size: 14px; font-weight: 600; }
  body.workspace-layout .native-menu-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

  /* Owner activity is a compact segmented control with text labels only. */

  /* Mobile owner overview: two lead metrics and a compact grouped agenda. */
  
  
  
  
  
  
  
  

  /* Employee home uses a separate card below its heading and status. */
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

  /* Compact work details: two equal contact actions, management, then optional extras. */
  body.workspace-layout .native-job-contact-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; min-width: 0; }
  body.workspace-layout .native-job-contact-actions > .btn { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 0; min-height: 46px !important; padding: 10px 8px; text-align: center; white-space: normal; }
  body.workspace-layout .native-job-detail-actions > .native-menu-group { margin-top: 15px; }
  body.workspace-layout .native-job-more { margin-top: 14px; border-top: 1px solid var(--workspace-native-line); color: var(--muted); }
  body.workspace-layout .native-job-more > summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 8px 2px; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; list-style: none; }
  body.workspace-layout .native-job-more > summary::-webkit-details-marker { display: none; }
  body.workspace-layout .native-job-more > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s ease; }
  body.workspace-layout .native-job-more[open] > summary::after { transform: rotate(225deg); }
  body.workspace-layout .native-job-more .portal-actions { display: grid; grid-template-columns: 1fr; gap: 8px; padding-bottom: 12px; }
  body.workspace-layout .native-job-more .portal-actions > .btn { min-height: 46px; }

  /* Final alignment with the approved native preview. */
  html[data-theme="light"] body.workspace-layout,
  html[data-theme="light"] body.workspace-layout .app,
  html[data-theme="light"] body.workspace-layout .main,
  html[data-theme="light"] body.workspace-layout #portal {
    background: #f5f6f8 !important;
    background-image: none !important;
  }
  body.workspace-layout .app,
  body.workspace-layout .main,
  body.workspace-layout #portal,
  body.workspace-layout #portal-popup,
  body.workspace-layout .topbar,
  body.workspace-layout .editor,
  body.workspace-layout #editor {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  }
  /* Keep the document preview typography inherited from the desktop theme. */
  body.workspace-layout #portal-print { font-family: "Manrope", "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
  body.workspace-layout .topbar .workspace-menu-toggle {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.workspace-layout .topbar .workspace-menu-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  body.workspace-layout #portal-popup.native-menu-sheet .native-job-contact-actions > .btn {
    min-height: 46px !important;
  }
  body.workspace-layout .native-menu-page { gap: 12px; }
  body.workspace-layout h3.native-menu-heading {
    display: block;
    min-height: 0;
    margin: 4px 0 0;
    font-size: 15px;
    line-height: 1.3;
  }
  body.workspace-layout #portal-popup.native-menu-sheet {
    background: var(--workspace-native-canvas, var(--bg));
  }
  body.workspace-layout #portal-popup.native-menu-sheet::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 999px;
    background: var(--workspace-native-line, var(--line));
  }
  body.workspace-layout #portal-popup.native-menu-sheet .portal-popup-bar {
    background: var(--workspace-native-canvas, var(--bg));
  }
  body.workspace-layout #portal-popup.native-menu-sheet .portal-popup-content {
    background: transparent;
  }
  body.workspace-layout #portal-popup .native-job-detail.portal-detail {
    display: block;
    padding: 4px 14px;
  }
  body.workspace-layout #portal-popup .native-job-detail > .portal-detail-item {
    display: grid;
    grid-template-columns: 90px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
    min-width: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--workspace-native-line);
  }
  body.workspace-layout #portal-popup .native-job-detail > .portal-detail-item:nth-child(-n + 2) { display: none; }
  body.workspace-layout #portal-popup .native-job-detail > .portal-detail-item h3 {
    min-width: 0;
    margin: 0 !important;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: anywhere;
  }
  body.workspace-layout #portal-popup .native-job-detail > .portal-detail-item p {
    min-width: 0;
    margin: 0 !important;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.4;
    text-align: right;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  /* Page tools replace the mobile top bar and live in each page heading. */
  body.workspace-layout .native-page-tools.native-mobile-only {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 96px;
    min-width: 96px;
    min-height: 44px;
    margin: 0;
    padding: 0;
    background: transparent;
  }
  body.workspace-layout .portal-head:has(> .native-page-tools.native-mobile-only) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: start;
    gap: 8px;
    margin-bottom: 17px;
  }
  body.workspace-layout .portal-head:has(> .native-page-tools.native-mobile-only) > :first-child {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }
  body.workspace-layout .portal-head:has(> .native-page-tools.native-mobile-only) > .portal-actions {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }
  body.workspace-layout .portal-head > .portal-actions:empty { display: none; }
  body.workspace-layout .native-page-tools .workspace-mobile-profile {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 4px;
    border: 0;
    border-radius: 50%;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.workspace-layout .native-page-tools .workspace-mobile-profile [data-profile-avatar],
  body.workspace-layout .native-page-tools .workspace-mobile-profile .workspace-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    object-fit: cover;
  }
  body.workspace-layout .native-page-tools [data-profile-avatar] img { display: block; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; }
  body.workspace-layout .native-page-tools .lbl-notification-bell {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 12px;
    border: 0 !important;
    border-radius: 12px;
    background: transparent !important;
    color: var(--ink);
    box-shadow: none !important;
  }
  body.workspace-layout .native-page-tools .lbl-notification-bell svg { width: 20px; height: 20px; stroke-width: 1.7; }
  body.workspace-layout .native-quotes-heading.native-mobile-only {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: start;
    gap: 8px;
    margin: 0 0 17px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  body.workspace-layout .native-quotes-heading > h2 { grid-column: 1; grid-row: 1; min-width: 0; margin: 0; }
  body.workspace-layout .native-quotes-heading .native-page-tools { grid-column: 2; grid-row: 1; }
  body.workspace-layout #portal-content.portal-home > .portal-head > .portal-actions { display: none !important; }
  
  
  
  

  /* One frame for every mobile area, including the separate quotes workspace. */
  body.workspace-layout { --native-page-top: 20px; --native-page-gutter: 16px; --native-page-gap: 20px; }
  body.workspace-layout #portal.portal { padding: var(--native-page-top) var(--native-page-gutter) calc(88px + env(safe-area-inset-bottom)); }
  body.workspace-layout .main { padding-top: var(--native-page-top); padding-inline: var(--native-page-gutter); }
  body.workspace-layout .panel-list.quotes-workspace { padding-top: 0; }
  body.workspace-layout .native-page-heading {
    display: grid; grid-template-columns: minmax(0, 1fr) 96px; align-items: start;
    gap: 12px 8px !important; min-height: 44px !important;
    margin: 0 0 var(--native-page-gap) !important; padding: 0 !important;
  }
  body.workspace-layout .native-page-heading > .native-page-title {
    display: block !important; grid-column: 1; grid-row: 1; min-width: 0;
  }
  body.workspace-layout :is(#portal, .quotes-workspace) .native-page-heading > .native-page-title > h2 {
    display: flex !important; align-items: center; min-height: 44px; margin: 0 !important;
    font-size: 25px; line-height: 30px; font-weight: 700; letter-spacing: -.65px; overflow-wrap: anywhere;
  }
  body.workspace-layout #portal .native-page-heading > .native-page-title > p { margin: 6px 0 0; font-size: 12px; line-height: 18px; }
  body.workspace-layout .native-page-heading > .native-page-tools { grid-column: 2; grid-row: 1; align-self: start; }
  body.workspace-layout .native-page-heading > .portal-actions { grid-column: 1 / -1; grid-row: 2; margin: 0; width: 100%; }
  body.workspace-layout .native-page-heading > .portal-actions:empty { display: none !important; }
  
  @media(max-width:370px) {
    body.workspace-layout :is(#portal, .quotes-workspace) .native-page-heading > .native-page-title > h2 { font-size: 22px; line-height: 28px; }
  }
}

/* Owner phone home: "Precisa de ti" chips and the week row (option 3, chosen 2026-10-21). */

/* Owner phone home, closer to the chosen mock-up: today card, pill alerts, plain job rows, no tabs below. */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  body.workspace-layout .native-week-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
  body.workspace-layout .native-week-text strong { font-size: 14px; font-weight: 700; }
  body.workspace-layout .native-week-text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  
  body.workspace-layout .native-week-empty { margin: 0; padding: 18px 0; color: var(--muted); font-size: 13px; text-align: center; }
}
/* Phone home weather as a small weather-app card; tinted by the forecast, one quiet line when unavailable. */

/* Registo de dias on the phone (option 3, "Hoje primeiro"). */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal .native-days-today { display: grid; gap: 4px; margin: 4px 0 14px; padding: 16px 18px; border-radius: 22px; background: var(--accent); color: #fff; }
  body.workspace-layout #portal .native-days-today small { font-size: 12px; opacity: .85; }
  body.workspace-layout #portal .native-days-today strong { font-size: 20px; font-weight: 800; }
  body.workspace-layout #portal .native-days-today-actions { display: flex; gap: 8px; margin-top: 10px; }
  body.workspace-layout #portal .native-days-today-actions .btn { flex: 1; min-height: 48px !important; }
  body.workspace-layout #portal .native-days-today-actions .btn.btn-primary { background: #fff !important; color: var(--accent) !important; }
  body.workspace-layout #portal .native-days-today-actions > .btn:not(.btn-primary) { min-height: 46px !important; padding-block: 12px !important; font-size: 13px; font-weight: 600; background: rgba(255,255,255,.2) !important; color: #fff !important; }
  body.workspace-layout #portal .native-days-summary { display: flex; align-items: center; gap: 8px; margin: 2px 4px 10px; font-size: 13px; color: var(--muted); }
  body.workspace-layout #portal .native-days-summary strong { color: var(--ink); font-size: 15px; font-weight: 800; }
  body.workspace-layout #portal .native-days-list { display: grid; padding: 4px 14px; border-radius: 18px; background: var(--surface); }
  body.workspace-layout #portal .native-days-row {
    display: flex !important; align-items: center; gap: 12px; width: 100%; min-height: 60px !important; padding: 10px 0 !important;
    border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; background: transparent !important; color: var(--ink); text-align: left; font: inherit; box-shadow: none !important; opacity: 1 !important;
  }
  body.workspace-layout #portal .native-days-row:first-child { border-top: 0 !important; }
  body.workspace-layout #portal .native-days-date { display: grid; flex: 0 0 38px; text-align: center; }
  body.workspace-layout #portal .native-days-date small { font-size: 10px; font-weight: 700; color: var(--muted); }
  body.workspace-layout #portal .native-days-date strong { font-size: 17px; font-weight: 800; }
  body.workspace-layout #portal .native-days-tag { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; white-space: nowrap; }
  body.workspace-layout #portal .native-days-tag.is-half { background: color-mix(in srgb, #f5b300 22%, var(--surface)); color: #8a5a00; }
}
/* Registo de dias on the phone: the month switcher as one light line, "‹ Outubro 2026 ›". */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout[data-workspace-view="horas"] #portal .portal-month-picker { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; box-shadow: none; }
  body.workspace-layout[data-workspace-view="horas"] #portal .portal-month-picker > .btn { min-width: 40px; min-height: 40px !important; padding: 0 12px !important; }
  body.workspace-layout[data-workspace-view="horas"] #portal .portal-month-picker :is(.lbl-date-trigger, input[type="month"]) { flex: 1; width: auto !important; min-height: 40px; border: 0 !important; background: transparent !important; box-shadow: none !important; justify-content: center; font-size: 16px; font-weight: 800; }
  body.workspace-layout[data-workspace-view="horas"] #portal .portal-month-picker .lbl-date-trigger svg { display: none; }
}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout[data-workspace-view="horas"] #portal .portal-month-picker > .btn:last-child { display: none !important; }
  body.workspace-layout[data-workspace-view="horas"] #portal .portal-month-picker > .btn { width: 40px; min-width: 40px; height: 40px; min-height: 40px !important; padding: 0 !important; border-radius: 999px !important; }
}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal .native-days-summary > .native-days-add { margin-left: auto; width: 40px; min-width: 40px; height: 40px; min-height: 40px !important; padding: 0 !important; border-radius: 999px !important; background: var(--accent-soft) !important; color: var(--accent) !important; }
  body.workspace-layout #portal .native-days-summary > .native-days-add[hidden] { display: none !important; }
  body.workspace-layout #portal .native-days-add .workspace-icon { width: 20px; height: 20px; }
}
/* Bottom sheets (day record, month exports). */
@media screen {
  dialog.native-sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 560px; max-height: 88vh; margin: 0 auto; padding: 0; border: 0; background: transparent; overflow: visible; color: var(--ink); }
  dialog.native-sheet::backdrop { background: rgba(14, 22, 38, .42); animation: native-sheet-fade .2s ease; }
  .native-sheet-card { display: grid; gap: 14px; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: var(--surface); font-family: inherit; animation: native-sheet-up .24s cubic-bezier(.2,.8,.2,1); }
  dialog.native-sheet.is-closing .native-sheet-card { animation: native-sheet-down .2s ease forwards; }
  dialog.native-sheet.is-closing::backdrop { opacity: 0; transition: opacity .2s; }
  .native-sheet-grip { justify-self: center; width: 42px; height: 5px; margin: 4px 0 2px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 18%, transparent); touch-action: none; cursor: grab; }
  .native-sheet-head { display: flex; align-items: flex-start; gap: 12px; }
  .native-sheet-head > div { display: grid; gap: 2px; flex: 1; min-width: 0; }
  .native-sheet-head small { font-size: 12px; font-weight: 700; color: var(--muted); }
  .native-sheet-head h2, .native-sheet-title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
  .native-sheet-head h2::first-letter { text-transform: uppercase; }
  .native-sheet-head .native-days-tag { margin: 4px 0 0; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
  .native-sheet-head .native-days-tag.is-half { background: color-mix(in srgb, #f5b300 22%, var(--surface)); color: #8a5a00; }
  .native-sheet-jobs { display: grid; gap: 8px; }
  .native-sheet-job { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--pill, var(--surface-2)); }
  .native-sheet-job .workspace-icon { width: 20px; height: 20px; color: var(--accent); flex: none; }
  .native-sheet-job span { display: grid; gap: 2px; min-width: 0; }
  .native-sheet-job strong { font-size: 15px; font-weight: 700; }
  .native-sheet-job small { font-size: 12px; color: var(--muted); }
  .native-sheet-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0; }
  .native-sheet-facts > div { padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); }
  .native-sheet-facts dt { font-size: 11px; font-weight: 700; color: var(--muted); }
  .native-sheet-facts dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; }
  .native-sheet-notes small { font-size: 11px; font-weight: 700; color: var(--muted); }
  .native-sheet-notes p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
  .native-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .native-sheet-actions > .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .native-sheet-actions > .btn { min-height: 48px; }
  .native-sheet-options { display: grid; gap: 4px; }
  .native-sheet-option { display: flex !important; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 0 14px !important; border: 0 !important; border-radius: 16px !important; background: transparent !important; color: var(--ink) !important; font: inherit; font-size: 15px; font-weight: 650; text-align: left; box-shadow: none !important; }
  .native-sheet-option:active { background: var(--pill, var(--surface-2)) !important; }
  .native-sheet-option .workspace-icon { width: 22px; height: 22px; padding: 9px; box-sizing: content-box; border-radius: 12px; background: var(--accent-soft); color: var(--accent); flex: none; }
  .native-sheet-cancel { min-height: 48px; }
  @keyframes native-sheet-up { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes native-sheet-down { to { transform: translateY(100%); } }
  @keyframes native-sheet-fade { from { opacity: 0; } }
  @media (prefers-reduced-motion: reduce) { .native-sheet-card, dialog.native-sheet::backdrop, dialog.native-sheet.is-closing .native-sheet-card { animation: none !important; } }
  body.workspace-layout #portal .native-days-summary > .native-days-more { width: 40px; min-width: 40px; height: 40px; min-height: 40px !important; padding: 0 !important; border-radius: 999px !important; position: static; display: inline-flex; align-items: center; justify-content: center; }
}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal .native-days-summary > :is(.native-days-add, .native-days-more) { border: 0 !important; box-shadow: none !important; color: var(--accent); }
  body.workspace-layout #portal .native-days-summary > .native-days-more { background: var(--pill, var(--surface-2)) !important; color: var(--ink); }
}
/* Phone: every week/month switcher as one light line "‹ date ›" (the jump-to-today lives in the date dialog). */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal .portal-head .portal-week-picker { display: flex; align-items: center; gap: 6px; padding: 0; border: 0; background: transparent; box-shadow: none; flex-wrap: nowrap; }
  body.workspace-layout #portal .portal-head .portal-week-picker > .btn:last-child { display: none !important; }
  body.workspace-layout #portal .portal-head .portal-week-picker > .btn { width: 40px; min-width: 40px; height: 40px; min-height: 40px !important; padding: 0 !important; border-radius: 999px !important; flex: none; }
  body.workspace-layout #portal .portal-head .portal-week-picker :is(.lbl-date-trigger, input[type="date"], input[type="month"]) { flex: 1; width: auto !important; min-height: 40px; border: 0 !important; background: transparent !important; box-shadow: none !important; justify-content: center; font-size: 16px; font-weight: 800; }
  body.workspace-layout #portal .portal-head .portal-week-picker .lbl-date-trigger svg { display: none; }
}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) { body.workspace-layout #portal .native-days-today .native-days-today-note { font-size: 13px; opacity: .85; } }

/* Férias on the phone: the balance numbers in the blue card, requests as plain rows. */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal .holidays-stats { background: var(--accent) !important; color: #fff !important; border: 0 !important; border-radius: 22px !important; box-shadow: none !important; }
  body.workspace-layout #portal .holidays-stats * { color: inherit !important; border-color: rgba(255,255,255,.25) !important; background: transparent !important; }
  body.workspace-layout #portal .holidays-stats :is(span, small, p) { opacity: .85; }
  body.workspace-layout #portal .holidays-stats strong { opacity: 1; font-weight: 800; }
  body.workspace-layout #portal .holidays-request { border: 0 !important; border-radius: 18px !important; box-shadow: none !important; background: var(--surface) !important; }
  body.workspace-layout #portal .holidays-request .holidays-state { border-radius: 999px; padding: 4px 10px; font-size: 11px; font-weight: 700; }
}
/* Employee phone home: today's job in the same blue card as the owners' "Hoje". */


/* Tabela de serviços: a small "Editar" next to each item. */
@media screen {
  /* Not shaped by the generic button rules (native-mobile .btn, buttons.css); its whole look is here. */
  body.workspace-layout #portal .btn.service-price-edit {
    width: auto !important; height: 30px; min-height: 30px !important; flex: none !important; align-self: center; grid-row: auto !important; grid-column: auto !important;
    padding: 0 18px !important; border: 0 !important; border-radius: 999px !important; box-shadow: none !important; background-image: none !important;
    font-size: 11px !important; font-weight: 700;
  }
}
/* Férias on the phone (option 1, "Saldo e lista"): blue balance card with the year bar, named request rows, floating +. */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal .holidays-panorama:not(.is-team) :is(.holidays-stats, .holidays-annual, .holidays-calendar) { display: none !important; }
  body.workspace-layout #portal .holidays-hero { display: grid; gap: 2px; margin: 4px 0 16px; padding: 16px 18px; border-radius: 22px; background: var(--accent); color: #fff; }
  body.workspace-layout #portal .holidays-hero small { font-size: 12px; opacity: .85; }
  body.workspace-layout #portal .holidays-hero strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
  body.workspace-layout #portal .holidays-hero-bar { display: flex; height: 8px; margin-top: 12px; border-radius: 999px; background: rgba(255,255,255,.25); overflow: hidden; }
  body.workspace-layout #portal .holidays-hero-bar i { display: block; height: 100%; }
  body.workspace-layout #portal .holidays-hero :is(.holidays-hero-bar .is-marked) { background: #fff; }
  body.workspace-layout #portal .holidays-hero :is(.holidays-hero-bar .is-pending) { background: #ffd166; }
  body.workspace-layout #portal .holidays-hero-legend { display: flex; gap: 14px; margin-top: 8px; font-size: 12px; }
  body.workspace-layout #portal .holidays-hero-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #fff; }
  body.workspace-layout #portal .holidays-hero-legend .is-pending::before { background: #ffd166; }
  body.workspace-layout #portal .holidays-request-person { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  body.workspace-layout #portal .holidays-request-person strong { font-size: 15px; font-weight: 800; }
}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal .holidays-layout { display: flex !important; flex-direction: column; gap: 14px; }
  body.workspace-layout #portal .holidays-management { display: contents !important; }
  body.workspace-layout #portal .holidays-layout details.holidays-review { order: -2; }
  body.workspace-layout #portal .holidays-layout .holidays-periods { order: -1; }
  body.workspace-layout #portal .holidays-layout section.holidays-review { display: none !important; }
}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  /* Room below the last item so the floating + never covers it. */
  body.workspace-layout #portal #portal-content { padding-bottom: 88px; }
  /* Owners on "Toda a equipa": the team calendar first, the lists after it. */
  body.workspace-layout #portal .holidays-panorama.is-team .holidays-calendar { display: block; margin-bottom: 14px; }
}
/* Férias, phone layout drawn by holidays.js (drawPhone). */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal .holidays-phone > .holidays-toolbar > :not(.holidays-mark) { display: none !important; }
  body.workspace-layout #portal .holidays-phone > .holidays-toolbar { margin: 0; padding: 0; border: 0; background: none; }
  body.workspace-layout #portal .holidays-phone-year { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; }
  body.workspace-layout #portal .holidays-phone-year strong { flex: 1; text-align: center; font-size: 17px; font-weight: 800; }
  body.workspace-layout #portal .holidays-phone-year > .btn { width: 40px; min-width: 40px; height: 40px; min-height: 40px !important; padding: 0 !important; border-radius: 999px !important; flex: none; font-size: 18px; }
  body.workspace-layout #portal .holidays-phone-people { display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px 2px; scrollbar-width: none; }
  body.workspace-layout #portal .holidays-phone-people::-webkit-scrollbar { display: none; }
  body.workspace-layout #portal .btn.holidays-chip { flex: none; min-height: 36px !important; height: 36px; padding: 0 14px !important; font-size: 13px; font-weight: 700; }
  body.workspace-layout #portal .btn.holidays-chip[aria-pressed="true"] { background: var(--accent) !important; color: #fff !important; }
  body.workspace-layout #portal .holidays-phone-label { margin: 18px 4px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  body.workspace-layout #portal .holidays-phone .holidays-hero { margin: 0 0 4px; }
  body.workspace-layout #portal .native-days-tag.is-off { background: var(--pill, var(--surface-2)); color: var(--muted); }
  body.workspace-layout #portal .holidays-phone .holidays-calendar { margin-top: 2px; }
}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal button.holidays-chip, body.workspace-layout #portal button.holidays-phone-more {
    flex: none; display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 14px; border: 0; border-radius: 999px;
    background: var(--pill, var(--surface-2)); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: none;
  }
  body.workspace-layout #portal button.holidays-chip[aria-pressed="true"] { background: var(--accent); color: #fff; }
  body.workspace-layout #portal button.holidays-phone-more { width: 40px; height: 40px; padding: 0; font-size: 18px; }
}
/* Tabela de Preços on the phone (option 2, brand cards). */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal .prices-phone-search { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 0 6px 0 16px; height: 50px; border-radius: 999px; background: var(--surface); }
  body.workspace-layout #portal .prices-phone-search > .workspace-icon { width: 18px; height: 18px; color: var(--muted); flex: none; }
  body.workspace-layout #portal .prices-phone-search input { flex: 1; min-width: 0; height: 100%; border: 0 !important; background: transparent !important; box-shadow: none !important; font: inherit; font-size: 16px; color: var(--ink); outline: none; padding: 0; }
  body.workspace-layout #portal button.prices-phone-more { flex: none; width: 40px; height: 40px; border: 0; border-radius: 999px; background: var(--pill, var(--surface-2)); color: var(--ink); font: inherit; font-size: 18px; font-weight: 700; }
  body.workspace-layout #portal .prices-phone-brands { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 6px; }
  body.workspace-layout #portal button.prices-phone-brand { display: grid; justify-items: start; align-content: start; gap: 8px; min-height: 128px; padding: 14px; border: 0; border-radius: 20px; background: var(--surface); color: var(--ink); text-align: left; font: inherit; box-shadow: none; cursor: pointer; }
  body.workspace-layout #portal button.prices-phone-brand[aria-pressed="true"] { outline: 2px solid var(--accent); outline-offset: -2px; }
  body.workspace-layout #portal .prices-phone-brand .portal-brand-logo { display: flex; align-items: center; height: 40px; max-width: 100%; }
  body.workspace-layout #portal .prices-phone-count { font-size: 12px; font-weight: 600; color: var(--muted); }
  body.workspace-layout #portal .prices-phone-pdf { display: inline-flex; align-items: center; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; }
  body.workspace-layout #portal .native-days-tag.is-price { background: transparent; color: var(--ink); font-size: 14px; font-weight: 800; padding: 0; }
  body.workspace-layout #portal .prices-phone-more-results { width: 100%; margin-top: 10px; }
}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) { body.workspace-layout #portal .prices-phone-brand .portal-brand-logo { width: 100%; } body.workspace-layout #portal .prices-phone-brand .portal-brand-logo img { width: 100%; max-width: 140px; height: 40px; max-height: 40px; object-fit: contain; object-position: left center; } }

/* Phone: each page's main action is one round blue + floating above the bottom bar; its label stays for
   screen readers. Pages opt in with the phone-fab class (fab() in portal.js); Orçamentos has #btn-new-fab. */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal .btn.phone-fab,
  body.workspace-layout[data-workspace-view="orcamentos"] #btn-new-fab {
    position: fixed; z-index: 30; right: 18px; bottom: calc(82px + env(safe-area-inset-bottom));
    display: inline-flex !important; align-items: center; justify-content: center; gap: 0 !important;
    width: 44px; min-width: 44px; height: 44px; min-height: 44px !important; padding: 0 !important; border-radius: 999px !important;
    font-size: 0 !important; color: transparent !important; text-indent: 0;
  }
  body.workspace-layout[data-workspace-view="orcamentos"] #btn-new-fab { border: 0; background: #2c60e9; box-shadow: 0 10px 24px rgba(44, 96, 233, .35); }
  body.workspace-layout #portal .btn.phone-fab > *,
  body.workspace-layout[data-workspace-view="orcamentos"] #btn-new-fab > svg { display: none !important; }
  body.workspace-layout #portal .btn.phone-fab::after,
  body.workspace-layout[data-workspace-view="orcamentos"] #btn-new-fab::after {
    content: ""; flex: none; width: 20px; height: 20px; margin: 0; background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
  }
  body.workspace-layout #portal .portal-actions:has(> .phone-fab:only-child) { display: contents; }
}

@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) { body.workspace-layout:not([data-workspace-view="orcamentos"]) button.fab#btn-new-fab.fab { display: none !important; } }

/* Registar dia on the phone (option 1, "Tudo num ecrã"). */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout #portal-popup .day-form-phone .day-form-label { margin: 18px 2px 8px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  body.workspace-layout #portal-popup .day-form-chips { display: flex; gap: 8px; margin: 4px 0 10px; }
  body.workspace-layout #portal-popup button.day-form-chip { height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--pill, var(--surface-2)); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; }
  body.workspace-layout #portal-popup button.day-form-chip[aria-pressed="true"] { background: var(--accent); color: #fff; }
  body.workspace-layout #portal-popup .day-form-phone .workday-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 0; padding: 0; border: 0; }
  body.workspace-layout #portal-popup .day-form-phone .workday-options > legend { grid-column: 1 / -1; margin: 0 2px 8px; padding: 0; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  body.workspace-layout #portal-popup .day-form-phone label.workday-option { position: relative; display: flex; align-items: center; justify-content: center; min-height: 58px; padding: 10px; border: 2px solid transparent; border-radius: 18px; background: var(--surface); text-align: center; cursor: pointer; }
  body.workspace-layout #portal-popup .day-form-phone label.workday-option input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
  body.workspace-layout #portal-popup .day-form-phone label.workday-option strong { font-size: 15px; font-weight: 800; }
  body.workspace-layout #portal-popup .day-form-phone label.workday-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
  body.workspace-layout #portal-popup .day-form-phone label.workday-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
  body.workspace-layout #portal-popup .day-form-job-list { display: grid; gap: 8px; }
  body.workspace-layout #portal-popup button.day-form-job { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 2px solid transparent; border-radius: 18px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
  body.workspace-layout #portal-popup button.day-form-job[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
  body.workspace-layout #portal-popup .day-form-time { flex: 0 0 44px; color: var(--accent); font-size: 13px; font-weight: 800; }
  body.workspace-layout #portal-popup button.day-form-job > span:nth-child(2) { display: grid; gap: 2px; flex: 1; min-width: 0; }
  body.workspace-layout #portal-popup button.day-form-job strong { font-size: 14px; font-weight: 700; }
  body.workspace-layout #portal-popup button.day-form-job small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.workspace-layout #portal-popup .day-form-check { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border: 2px solid var(--line); border-radius: 50%; color: transparent; font-size: 13px; font-weight: 800; }
  body.workspace-layout #portal-popup button.day-form-job[aria-pressed="true"] .day-form-check { border-color: var(--accent); background: var(--accent); color: #fff; }
  body.workspace-layout #portal-popup .day-form-empty { margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--surface); color: var(--muted); font-size: 13px; }
  body.workspace-layout #portal-popup .day-form-stepper { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding: 10px 12px 10px 16px; border-radius: 18px; background: var(--surface); font-size: 15px; font-weight: 700; }
  body.workspace-layout #portal-popup .day-form-stepper > div { display: flex; align-items: center; gap: 10px; }
  body.workspace-layout #portal-popup .day-form-stepper strong { min-width: 84px; text-align: center; font-size: 15px; }
  body.workspace-layout #portal-popup .day-form-stepper .btn { width: 40px; min-width: 40px; height: 40px; min-height: 40px !important; padding: 0 !important; border-radius: 999px !important; font-size: 20px; }
  body.workspace-layout #portal-popup .day-form-stepper + * { display: none !important; }
  body.workspace-layout #portal-popup .day-form-summary { flex: 1 1 100%; margin: 0 0 4px; text-align: center; font-size: 12px; font-weight: 600; color: var(--muted); }
}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) { body.workspace-layout #portal-popup .day-form-phone > .portal-actions { flex-wrap: wrap !important; } body.workspace-layout #portal-popup .day-form-phone > .portal-actions > .day-form-summary { flex: 0 0 100% !important; width: 100%; order: -1; } body.workspace-layout #portal-popup .day-form-phone > .portal-actions > .btn { flex: 1 1 0 !important; } }

@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) { body.workspace-layout #portal-popup .day-form-phone > .portal-actions > .day-form-summary { grid-column: 1 / -1 !important; } }

/* PDF reader (pdf-reader.js): search on top, pages one after another, floating page/zoom bar. */
@media screen {
  .pdf-viewer { display: grid; gap: 10px; }
  .pdf-viewer .pdf-top { display: flex; align-items: center; gap: 8px; }
  .pdf-viewer .pdf-search { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; height: 46px; padding: 0 4px 0 16px; border-radius: 999px; background: var(--surface); }
  .pdf-viewer .pdf-search input { flex: 1; min-width: 0; height: 100%; border: 0 !important; background: transparent !important; box-shadow: none !important; outline: none; padding: 0 !important; font: inherit; font-size: 16px; color: var(--ink); min-height: 0 !important; }
  .pdf-viewer .pdf-search .btn, .pdf-viewer .pdf-download { flex: none; min-height: 38px !important; height: 38px; padding: 0 14px !important; font-size: 13px; }
  .pdf-viewer .pdf-icon-btn { width: 38px; padding: 0 !important; display: inline-grid; place-items: center; border-radius: 999px; }
  .pdf-viewer .pdf-icon-btn svg { width: 18px; height: 18px; }
  .pdf-viewer .pdf-results { display: grid; gap: 8px; padding: 12px; border-radius: 18px; background: var(--surface); }
  .pdf-viewer .pdf-results[hidden] { display: none; }
  .pdf-viewer .pdf-results-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
  .pdf-viewer .pdf-results-head .btn { min-height: 34px !important; height: 34px; padding: 0 12px !important; font-size: 12px; }
  .pdf-viewer .pdf-results-list { display: grid; gap: 6px; max-height: 40vh; overflow-y: auto; }
  .pdf-viewer button.pdf-result { display: grid; gap: 2px; width: 100%; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--pill, var(--surface-2)); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
  .pdf-viewer button.pdf-result strong { font-size: 12px; color: var(--accent); }
  .pdf-viewer button.pdf-result span { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
  .pdf-viewer .pdf-stage { display: grid; gap: 10px; justify-content: start; max-height: none !important; overflow-x: auto; overflow-y: hidden; padding: 8px !important; border-radius: 18px; background: var(--surface-3); touch-action: pan-x pan-y pinch-zoom; overscroll-behavior-x: contain; }
  .pdf-viewer .pdf-page { position: relative; margin: 0 auto; background: #fff; border-radius: 6px; box-shadow: 0 1px 3px rgba(15,23,32,.12); overflow: hidden; }
  .pdf-viewer .pdf-page canvas { display: block; }
  .pdf-viewer .pdf-page[data-error]::after { content: attr(data-error); position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
  .pdf-viewer .pdf-bar { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 5; justify-self: center; display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 999px; background: rgba(20, 28, 42, .92); color: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
  .pdf-viewer .pdf-status { margin: 0 6px; padding: 0 !important; font-size: 13px; font-weight: 700; white-space: nowrap; color: #fff; }
  .pdf-viewer button.pdf-nav, .pdf-viewer .pdf-bar .btn.pdf-nav { width: 36px; min-width: 36px; height: 36px; min-height: 36px !important; padding: 0 !important; border: 0 !important; border-radius: 999px !important; background: rgba(255,255,255,.12) !important; color: #fff !important; font: inherit; font-size: 18px; font-weight: 700; box-shadow: none !important; }
  .pdf-viewer button.pdf-nav:disabled { opacity: .35; }
}
@media screen and (max-width: 420px) { .pdf-viewer .pdf-bar .pdf-nav[aria-label="Ajustar à largura"] { display: none; } }
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) { body.workspace-layout #portal-popup .day-form-phone .day-form-manual[hidden] { display: none !important; } body.workspace-layout #portal-popup button.day-form-manual-toggle { margin-top: 8px; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--pill, var(--surface-2)); color: var(--ink); font: inherit; font-size: 13px; font-weight: 700; } body.workspace-layout #portal-popup button.day-form-manual-toggle[hidden] { display: none; } }

@media screen { .pdf-viewer .pdf-page:not(.is-ready):not([data-error])::before { content: 'A carregar página…'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; font-weight: 600; } }

@media screen { .pdf-viewer .pdf-light-tag { flex: none; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11px; font-weight: 700; white-space: nowrap; } }

/* While a sheet or window is open the page behind it stays still; only the sheet scrolls. */
html:has(dialog[open]:modal),html:has(dialog[open]:modal) body{overflow:hidden!important;overscroll-behavior:none}
body.report-sheet-open #portal-popup:has(.report-section.is-sheet){overflow:hidden!important}
dialog.native-sheet,#native-more-dialog,.report-sheet-backdrop{cursor:pointer;touch-action:none}
dialog.native-sheet .native-sheet-card,#native-more-dialog .native-more-card,.report-form .report-section.is-sheet{cursor:auto;touch-action:pan-y;overscroll-behavior:contain}

/* Sheets sit above the on-screen keyboard (see keyboardAware in portal.js) */
html body dialog.native-sheet{bottom:var(--kb,0px);transition:bottom .15s ease-out}
dialog.native-sheet .native-sheet-card{max-height:min(88vh,calc(var(--vvh,100dvh) - 16px))}
dialog.native-sheet .native-sheet-card:focus{outline:none}
html body .report-form .report-section.is-sheet{bottom:var(--kb,0px);max-height:min(88dvh,calc(var(--vvh,100dvh) - 16px));transition:bottom .15s ease-out}
html.keyboard-open .report-form .report-section.is-sheet,html.keyboard-open dialog.native-sheet .native-sheet-card{border-radius:16px 16px 0 0;padding-bottom:12px}

/* Report on the phone: main action across, two side by side, the rest under Mais ações. */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout .report-detail-actions { display: grid; gap: 10px; margin: 0 0 16px; }
  body.workspace-layout .report-detail-actions > .report-detail-main { width: 100%; min-height: 50px; font-size: 16px; }
  body.workspace-layout .report-detail-icons { display: flex; gap: 12px; flex-wrap: wrap; }
  body.workspace-layout #portal-popup .report-detail-icons > .btn.report-detail-icon { width: 50px; height: 50px; min-width: 50px; min-height: 50px !important; padding: 0 !important; display: grid; place-items: center; border: 1px solid var(--line) !important; border-radius: 999px !important; background: var(--surface) !important; color: var(--ink) !important; }
  body.workspace-layout #portal-popup .report-detail-icons > .btn.report-detail-icon .workspace-icon { width: 22px; height: 22px; }
  body.workspace-layout #portal-popup .report-detail-icons > .btn.report-detail-icon.is-whatsapp { color: #1fae55 !important; }
  body.workspace-layout #portal-popup .report-detail-icons > .btn.report-detail-icon.is-danger { color: #c62f3d !important; }
}

/* Stamp state of a report: a small pill beside its title, in lists on the phone and the computer. */
.native-row-title{display:inline-flex;align-items:center;gap:8px;min-width:0;max-width:100%}
.native-row-title>strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.stamp-badge{flex:none;display:inline-block;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;line-height:1.5;white-space:nowrap}
.stamp-badge.is-pending{background:color-mix(in srgb,#f59e0b 20%,var(--surface,#fff));color:#9a5b00}
.stamp-badge.is-stamped{background:color-mix(in srgb,#16a34a 16%,var(--surface,#fff));color:#11753a}


/* Pílula: one button shape for the whole app, chosen by the user on 2026-10-21.
   Fully rounded, no outlines; blue for the main action, soft grey for the rest,
   red text for destructive actions. Loaded last so it wins over the older layers
   (contour.css, native-mobile.css, ui.css, dashboard.css...), which use !important. */
@media screen {
  body.workspace-layout {
    --pill: color-mix(in srgb, var(--ink) 7%, var(--surface));
    --pill-hover: color-mix(in srgb, var(--ink) 12%, var(--surface));
  }

  /* Shape of every text button (the week-day picker on the home agenda keeps its own look). */
  html body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .topbar, #totalbar, .quote-share, #lbl-updates, dialog.native-sheet) .btn:not(.native-sheet-option):not(.native-month-metrics *):not(.btn-icon, .service-price-edit):not(.ui-action-icon):not(.native-icon-button):not(.workspace-menu-toggle):not(.workspace-menu-close):not(.workspace-days > .btn),
  html body.workspace-layout .lbl-notification-dialog .btn:not(.lbl-notification-header > .btn) {
    border: 0 !important;
    border-radius: 999px !important;
    padding-inline: 18px !important;
    box-shadow: none !important;
    background-image: none !important;
  }

  /* Secondary: soft grey fill instead of a white box with an outline. */
  html body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .quote-share, #lbl-updates, dialog.native-sheet) .btn:not(.native-sheet-option):not(.native-month-metrics *):not(.btn-primary):not(.btn-icon):not(.ui-action-icon):not(.native-icon-button):not(.btn-danger-solid):not(.btn-wa):not([aria-pressed="true"]):not([aria-selected="true"]):not(.workspace-days > .btn):not(.native-days-today-actions > .btn),
  html body.workspace-layout .lbl-notification-dialog .btn:not(.btn-primary):not(.lbl-notification-header > .btn) {
    background: var(--pill) !important;
  }
  html body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .quote-share, #lbl-updates, dialog.native-sheet) .btn:not(.native-sheet-option):not(.native-month-metrics *):not(.btn-primary):not(.btn-icon):not(.ui-action-icon):not(.native-icon-button):not(.btn-danger-solid):not(.btn-wa):not([aria-pressed="true"]):not([aria-selected="true"]):not(.workspace-days > .btn):hover:not(:disabled),
  html body.workspace-layout .lbl-notification-dialog .btn:not(.btn-primary):not(.lbl-notification-header > .btn):hover {
    background: var(--pill-hover) !important;
  }

  /* Destructive: same grey pill, red text. */
  html body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, dialog.native-sheet) .btn.btn-danger:not(.btn-danger-solid) {
    color: var(--danger, #c63b3b) !important;
  }

  /* Selected toggles keep their soft blue, without the outline. */
  html body.workspace-layout :is(#portal, #portal-popup, .main) .btn:is([aria-pressed="true"], [aria-selected="true"]):not(.btn-primary):not(.workspace-days > .btn) {
    background: var(--accent-soft) !important;
    color: var(--accent) !important;
  }

  /* Icon buttons (close, bell, add): round, still without a box until pressed. */
  html body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .topbar, #totalbar, .quote-share, #lbl-updates) :is(.btn-icon, .ui-action-icon, .native-icon-button) {
    border-radius: 999px !important;
  }
  html body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .topbar, #totalbar, .quote-share, #lbl-updates) :is(.btn-icon, .ui-action-icon, .native-icon-button):is(:hover, :active):not(:disabled):not(.btn-primary) {
    background: var(--pill) !important;
  }

  /* Buttons that are not .btn but looked different: team card actions,
     date picker actions and the saved choices in reports. */
  html body.workspace-layout .team-action {
    border: 0;
    border-radius: 999px;
    background: var(--pill);
  }
  html body.workspace-layout .team-action:hover { background: var(--pill-hover); border: 0; }
  html body.workspace-layout .lbl-date-dialog :is(.lbl-date-secondary, .lbl-date-arrow, .lbl-date-close) { border-radius: 999px; }
  html body.workspace-layout .lbl-date-dialog .lbl-date-secondary { background: var(--pill); padding-inline: 16px; }
  
}
/* Round icon-only actions (iconOnly() in portal.js): the label stays for screen readers and tooltips. */
html body.workspace-layout :is(#portal,#portal-popup,dialog.native-sheet) :is(.btn,a.btn).icon-only.icon-only:not(#_a):not(#_b){display:inline-flex!important;align-items:center;justify-content:center;flex:none;width:44px!important;min-width:44px!important;height:44px;min-height:44px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:999px!important;background:var(--surface)!important;color:var(--ink)!important;font-size:0!important;line-height:0;gap:0!important;box-shadow:none!important}
html body.workspace-layout :is(#portal,#portal-popup,dialog.native-sheet) :is(.btn,a.btn).icon-only.icon-only>:not(.workspace-icon):not(svg){display:none!important}
html body.workspace-layout :is(#portal,#portal-popup,dialog.native-sheet) .icon-only .workspace-icon,html body.workspace-layout :is(#portal,#portal-popup,dialog.native-sheet) .icon-only .workspace-icon svg{display:block!important;width:20px!important;height:20px!important;margin:0!important}
html body.workspace-layout :is(#portal,#portal-popup,dialog.native-sheet) :is(.btn,a.btn).icon-only.portal-delete:not(#_a):not(#_b){color:#c62f3d!important}
html body.workspace-layout .portal .lbl-calendar-agenda .portal-job>.calendar-job-actions{display:flex!important;flex-wrap:wrap;align-items:center;gap:8px 6px}
html body.workspace-layout .portal .lbl-calendar-agenda .calendar-job-actions>:is(select,.portal-badge){flex:1 1 auto;min-width:0;margin-right:auto}
html body.workspace-layout .portal .lbl-calendar-agenda .calendar-job-actions>select{flex:1 1 100%;max-width:none;width:100%}
html body.workspace-layout .portal .lbl-calendar-agenda .calendar-job-actions:has(>select)>.icon-only:first-of-type{margin-left:0}
/* Phone: team card actions become round icons (label kept as aria-label/title). */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  html body.workspace-layout .team-person-actions{justify-content:flex-start;gap:8px}
  html body.workspace-layout :is(.team-person-actions .team-action,.team-action.team-reset-password){flex:none;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:1px solid var(--line);border-radius:999px;background:var(--surface);gap:0}
  html body.workspace-layout :is(.team-person-actions .team-action,.team-action.team-reset-password)>span:not(.team-icon){display:none}
  html body.workspace-layout :is(.team-person-actions .team-action,.team-action.team-reset-password) .team-icon{color:var(--ink)}
}
html body.workspace-layout dialog.native-sheet .native-sheet-actions.native-sheet-icons{display:flex!important;flex-wrap:wrap;gap:10px}

/* Quotes list: filter chips, icon tools, a round check per quote and a floating selection bar. Loaded last. */
.quotes-workspace .quote-chips{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:2px 0;margin:-4px 0 0}
.quotes-workspace .quote-chips::-webkit-scrollbar{display:none}
html body .quotes-workspace .quote-chips .quote-chip{flex:none;display:inline-flex;align-items:center;gap:6px;height:36px;min-height:36px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--muted);font:inherit;font-size:13px;font-weight:600;box-shadow:none;cursor:pointer}
html body .quotes-workspace .quote-chips .quote-chip[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.quotes-workspace .quote-chip .quote-chip-n{font-variant-numeric:tabular-nums;opacity:.7}
html body .quotes-workspace .quotes-toolbar{grid-template-columns:minmax(0,1fr) auto}
html body.workspace-layout .quotes-workspace .quotes-toolbar .btn.quotes-tool.quotes-tool{display:inline-flex;align-items:center;gap:8px;min-height:46px!important;padding:0 16px!important;border:1px solid var(--line)!important;border-radius:12px!important;background:var(--surface)!important;color:var(--ink)!important;font-size:13px;font-weight:600}
.quotes-workspace .quotes-tool svg{width:19px;height:19px;flex:none}
.quotes-workspace .quote-item{display:flex;align-items:center;min-width:0}
.quotes-workspace .quote-item>.row{flex:1 1 auto;min-width:0}
html body .quotes-workspace .quote-item>.quote-pick{flex:none;display:grid;place-items:center;width:26px;height:26px;min-width:26px;min-height:26px;margin:0 0 0 18px;padding:0;border:2px solid #b8c2d3;border-radius:999px;background:var(--surface);color:transparent;box-shadow:none;cursor:pointer}
.quotes-workspace .quote-pick svg{width:13px;height:13px}
html body .quotes-workspace .quote-item>.quote-pick[aria-checked=true]{border-color:var(--accent);background:var(--accent);color:#fff}
html body .quotes-workspace .quote-item>.quote-pick:disabled{opacity:.35;cursor:not-allowed;background:var(--surface-3)}
.quotes-workspace .quote-item:has(.quote-pick[aria-checked=true]){background:var(--accent-soft)}
html body .quote-selection-bar.quote-selection-bar{position:fixed!important;z-index:60;right:32px;bottom:24px;left:auto;display:flex;align-items:center;gap:8px;margin:0;padding:10px 10px 10px 18px;border:0!important;border-radius:16px!important;background:#132239!important;color:#fff!important;box-shadow:0 12px 30px rgba(19,34,57,.3)}
html body.workspace-layout.selecting-quotes[data-workspace-view] #btn-new-fab{display:none!important}
html body .quote-selection-bar.quote-selection-bar[hidden]{display:none!important}
.quote-selection-bar strong{margin-right:8px;font-size:14px}
html body .quote-selection-bar .quote-bar-icon.quote-bar-icon{display:grid;place-items:center;width:40px;height:40px;min-height:40px!important;padding:0!important;border:0!important;border-radius:11px!important;background:rgba(255,255,255,.12)!important;color:#fff!important;cursor:pointer;box-shadow:none}
.quote-selection-bar .quote-bar-icon svg{width:19px;height:19px}
html body .quote-selection-bar .quote-bar-icon.quote-bar-icon.quote-bar-danger{background:#c62f3d!important}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  html body.workspace-layout .quotes-workspace .stats{display:none}
  html body .quotes-workspace .list-head{gap:12px;padding-bottom:12px}
  html body.workspace-layout .quotes-workspace .quotes-toolbar{grid-template-columns:minmax(0,1fr) auto;gap:8px}
  html body.workspace-layout .quotes-workspace .quotes-toolbar .search{grid-column:auto}
  html body.workspace-layout .quotes-workspace .quotes-toolbar .portal-actions{gap:8px}
  html body.workspace-layout .quotes-workspace .quotes-toolbar .btn.quotes-tool.quotes-tool{width:46px;padding:0!important;justify-content:center}
  .quotes-workspace .quotes-tool-label{display:none}
  html body.workspace-layout .quotes-workspace .list{gap:0;border:0;border-radius:16px;background:var(--surface);overflow:hidden}
  html body.workspace-layout .quotes-workspace .list>li+li{border-top:1px solid var(--line)}
  html body.workspace-layout .quotes-workspace .list>li:not(.quote-item)>*{padding:14px 16px}
  html body .quotes-workspace .quote-item>.quote-pick{margin-left:14px}
  html body.workspace-layout .quotes-workspace .row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:'name total' 'meta status';gap:4px 12px;padding:14px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
  html body.workspace-layout .quotes-workspace .row .total{margin:0;text-align:right;font-size:14px;white-space:nowrap}
  html body.workspace-layout .quotes-workspace .row .status{margin:0;justify-self:end}
  html body.workspace-layout .quotes-workspace .row .name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  html body.workspace-layout .quotes-workspace .row .quote-open{display:none}
  html body .quotes-workspace .row .pill{padding:2px 8px;border-radius:999px;font-size:11px}
  html body .quote-selection-bar.quote-selection-bar{left:12px;right:12px;bottom:calc(env(safe-area-inset-bottom,0px) + 92px)}
  .quote-selection-bar strong{flex:1 1 auto}
}
body.selecting-quotes .quotes-workspace .list{margin-bottom:96px}
/* App quote detail: same pattern as the Moloni one (× top right, round icons, state switch, schedule shortcut). */
html body #detail .editor-head .top{display:flex;align-items:center;gap:10px}
html body #detail .quote-quick.quote-quick{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 0;padding:0;border:0;background:none;box-shadow:none;position:static}
html body #detail .quote-quick .btn.quote-quick-icon.quote-quick-icon{display:inline-grid;place-items:center;flex:none;width:44px;min-width:44px;height:44px;min-height:44px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:999px!important;background:var(--surface)!important;color:var(--ink)!important;box-shadow:none!important;text-decoration:none}
html body #detail .quote-quick .btn.quote-quick-icon.quote-quick-icon:hover{background:var(--surface-2)!important}
html body #detail .quote-quick .btn.quote-quick-icon.quote-quick-wa{color:#1fae55!important}
html body #detail .quote-quick .btn.quote-quick-icon.quote-quick-danger{color:#c62f3d!important}
html body #detail .quote-quick .btn.quote-quick-icon[hidden]{display:none!important}
#detail .quote-quick-icon svg{width:19px;height:19px}
html body #detail .btn.quote-close.quote-close{width:44px;min-width:44px;height:44px;min-height:44px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:999px!important;background:var(--surface)!important;color:var(--ink)!important;display:inline-grid;place-items:center}
html body #detail .seg#d-estado{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-top:14px;padding:4px;border:0;border-radius:12px;background:var(--surface-3,#e9edf4);max-width:520px}
html body #detail .seg#d-estado button{min-height:38px;padding:6px 8px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:13px;font-weight:600;box-shadow:none}
html body #detail .seg#d-estado button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:0 1px 2px rgba(19,34,57,.12)}
html body #detail .quote-schedule{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:12px;padding:12px 14px;border-radius:12px;background:color-mix(in srgb,#16a34a 14%,var(--surface,#fff));color:#11753a}
html body #detail .quote-schedule[hidden]{display:none}
#detail .quote-schedule strong{flex:1 1 auto;font-size:14px}
html body #detail .quote-schedule .btn.quote-schedule-go.quote-schedule-go{min-height:40px!important;padding:0 16px!important;border:0!important;border-radius:999px!important;background:#11753a!important;color:#fff!important;box-shadow:none!important}
body.view-editor .quote-selection-bar{display:none!important}
html body.workspace-layout.view-editor[data-workspace-view] #btn-new-fab{display:none!important}
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  html body #detail .quote-quick.quote-quick{display:grid!important;grid-template-columns:repeat(7,minmax(0,44px))!important;justify-content:space-between!important;gap:4px!important}
  html body #detail .quote-quick .btn.quote-quick-icon.quote-quick-icon{width:100%!important;min-width:0!important;height:auto!important;aspect-ratio:1;min-height:0!important;flex:none!important}
}
/* Round icon buttons: centre the glyph explicitly (WebKit does not reliably centre inline svg inside grid buttons). */
html body :is(.mq-workspace .mq-doc-actions .btn.mq-icon-button,#detail .quote-quick .quote-quick-icon,.quote-selection-bar .quote-bar-icon){display:inline-flex!important;align-items:center!important;justify-content:center!important;line-height:0!important}
html body :is(.mq-workspace .mq-doc-actions .btn.mq-icon-button,#detail .quote-quick .quote-quick-icon,.quote-selection-bar .quote-bar-icon) svg{display:block!important;flex:none!important;margin:0!important;vertical-align:0!important}
html body :is(.mq-workspace .mq-doc-actions .btn.mq-icon-whatsapp,#detail .quote-quick .quote-quick-wa) svg{width:20px!important;height:20px!important}
/* Desktop (proposal C): narrow list column on the left, the open quote fills the rest. Moloni quotes open in the
   docked popup (portal.js dockPopup), app quotes in .panel-editor; both sit in the same right-hand area. */
@media (min-width:1200px) and (pointer:fine), (min-width:1200px) and (pointer:none) {
  html body.workspace-layout:not(.portal-active) .main{display:block!important;padding:0!important}
  html body.workspace-layout:not(.portal-active) .main>.panel-list.quotes-workspace{position:fixed;top:64px;left:0;bottom:0;width:400px;min-height:0;height:auto;margin:0;padding:20px 18px 40px!important;overflow:auto;overscroll-behavior:contain;background:var(--surface);border-right:1px solid var(--line);box-sizing:border-box}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .stats{display:none}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .list-head{gap:12px;padding-bottom:12px}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .quotes-toolbar{grid-template-columns:minmax(0,1fr) auto;gap:8px}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .quotes-toolbar .search{background:var(--surface-2)}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .quotes-toolbar .btn.quotes-tool.quotes-tool{width:46px;padding:0!important;justify-content:center}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .quotes-tool-label{display:none}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .quote-chips{flex-wrap:wrap}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .quote-chips .quote-chip{height:32px;min-height:32px;padding:0 12px;font-size:12px}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .quotes-list-summary>span:last-child{display:none}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .list{gap:0;border:0;border-radius:0;background:transparent;box-shadow:none;margin:0 -18px}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .list>li{border:0;border-bottom:1px solid var(--line)}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .list>li:not(.quote-item)>*{padding:12px 18px}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .quote-item>.quote-pick{margin-left:14px}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .row{grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:'name total' 'meta status'!important;gap:4px 12px;padding:14px 18px 14px 14px!important;border:0!important;border-left:3px solid transparent!important;border-radius:0!important;background:transparent!important;box-shadow:none!important}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .quote-item:has(.row[aria-current=true]){background:color-mix(in srgb,var(--accent) 7%,var(--surface))}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .row[aria-current=true]{outline:0}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .quote-item:has(.row[aria-current=true]) .row{background:transparent!important}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .row :is(.av,.quote-open){display:none!important}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .row .name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .row .total{text-align:right;font-size:14px;white-space:nowrap}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .row .status{justify-self:end}
  html body.workspace-layout:not(.portal-active) .quotes-workspace .row .pill{padding:2px 8px;border-radius:999px;font-size:11px}
  html body.workspace-layout:not(.portal-active) .main>.panel-editor{position:fixed!important;inset:64px 0 0 400px!important;width:auto!important;height:auto!important;display:block!important;padding:24px 28px 40px!important;overflow:auto;overscroll-behavior:contain;background:var(--bg)!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;z-index:5}
  html body.workspace-layout:not(.portal-active) .main>.panel-editor :is(.editor,.detail){width:100%;max-width:980px;margin:0 auto;padding:0 0 120px;border-radius:0;box-shadow:none;background:transparent}
  html body.workspace-layout:not(.portal-active) .main>.panel-editor .editor-blank{display:grid!important;place-items:center;min-height:60vh;text-align:center;color:var(--muted)}
  html body.workspace-layout.view-editor:not(.portal-active) .main>.panel-editor .editor-blank{display:none!important}
  html body.workspace-layout.view-editor:not(.portal-active){overflow:auto}
  html body.workspace-layout:not(.portal-active) .totalbar{left:calc(400px + (100vw - 400px) / 2)!important;transform:translateX(-50%)!important;width:min(600px,calc(100vw - 428px))!important}
  html body #portal-popup.popup-docked{position:fixed;z-index:40;inset:64px 0 0 400px;width:auto;max-width:none;height:auto;max-height:none;margin:0;border:0;border-radius:0;box-shadow:none;background:var(--bg)}
  html body #portal-popup.popup-docked::backdrop{background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
  html body #portal-popup.popup-docked .portal-popup-content{max-width:900px;margin:0 auto}
  html body.view-editor .quote-selection-bar.quote-selection-bar:not([hidden]){display:flex!important}
  html body .quote-selection-bar.quote-selection-bar{left:18px;right:auto;bottom:20px;width:344px;box-sizing:border-box}
}
/* Every round icon button: pin the glyph to the exact centre. Safari offsets inline svg inside buttons, so the
   icon is positioned absolutely instead of relying on flex/grid centring. */
html body :is(.mq-icon-button,.quote-quick-icon,.quote-bar-icon,.icon-only,.report-detail-icon,.quote-close){position:relative!important}
html body :is(.mq-icon-button,.quote-quick-icon,.quote-bar-icon,.report-detail-icon,.quote-close)>svg,
html body :is(.icon-only,.report-detail-icon)>.workspace-icon{position:absolute!important;top:50%!important;left:50%!important;margin:0!important;transform:translate(-50%,-50%)!important}
html body :is(.icon-only,.report-detail-icon)>.workspace-icon>svg{display:block!important;width:100%!important;height:100%!important}

/* Orçamentos as in the design: list title with a round +, filters, rows; the quote opens as the document the client sees. */
.quotes-workspace .list-title-row { display: none; }
.quote-customer { margin: 2px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.quote-doc { display: flex; flex-direction: column; gap: 20px; padding: 30px 34px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 1px 2px rgba(19, 34, 57, .04); color: var(--ink); }
.quote-doc-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.quote-doc-head > div { display: flex; flex-direction: column; gap: 4px; }
.quote-doc-brand { font-size: 19px; font-weight: 800; color: #6a4c93; }
.quote-doc-head span { font-size: 12px; color: var(--muted); }
.quote-doc-ref { text-align: right; }
.quote-doc-ref strong { font-size: 16px; }
.quote-doc-client, .quote-doc-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.quote-doc-notes { background: transparent; padding: 0; }
.quote-doc-client > span, .quote-doc-notes > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.quote-doc .k { color: var(--muted); }
.quote-doc-lines { display: grid; grid-template-columns: minmax(0, 1fr) 64px 110px 110px; font-size: 13px; }
.quote-doc-lines > span { padding: 11px 0; border-bottom: 1px solid var(--line); text-align: right; }
.quote-doc-lines > span:nth-child(4n+1) { text-align: left; display: flex; flex-direction: column; gap: 2px; padding-right: 12px; }
.quote-doc-lines > span[role=columnheader] { padding: 8px 0; color: var(--muted); font-weight: 700; }
.quote-doc-lines small { font-size: 12px; color: var(--muted); }
.quote-doc-totals { align-self: flex-end; display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; width: 300px; max-width: 100%; font-size: 14px; }
.quote-doc-totals > span:nth-child(odd) { color: var(--muted); }
.quote-doc-totals > span:nth-child(even) { text-align: right; }
.quote-doc-totals > strong { padding-top: 8px; border-top: 1px solid var(--line); font-size: 19px; font-weight: 800; }
.quote-doc-totals > strong:last-child { text-align: right; }
.quote-doc-empty { margin: 0; color: var(--muted); }
#d-body { display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 760px) {
  .quote-doc { padding: 18px; }
  .quote-doc-client { grid-template-columns: minmax(0, 1fr); }
  .quote-doc-lines { grid-template-columns: minmax(0, 1fr) 40px 90px; }
  .quote-doc-lines > span:nth-child(4n+3) { display: none; }
  .quote-doc-lines > span:nth-child(4n+1) { grid-column: 1; }
}
@media (min-width:761px) and (min-height:541px), (min-width:761px) and (pointer:fine), (min-width:761px) and (pointer:none) {
  html body.workspace-layout #btn-new, html body.workspace-layout .topbar .sync.on { display: none !important; }
  html body.workspace-layout .quotes-workspace .list-title-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
  html body.workspace-layout .quotes-workspace .list-title-row h2 { flex: 1 1 auto; margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
  html body.workspace-layout .quotes-workspace .list-new { width: 40px; height: 40px; min-width: 40px; min-height: 0; padding: 0; border-radius: 999px; display: grid; place-items: center; }
  html body.workspace-layout .quotes-workspace .list-new svg { width: 18px; height: 18px; }
  html body.workspace-layout .quotes-workspace .list-head > .stats { display: none; }
  html body.workspace-layout .quotes-workspace .row .av { display: none; }
  /* Detail header: number and date, the client as title, round actions on the right, the state below. */
  html body.workspace-layout #detail > .editor-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 0 0 16px; border: 0; background: transparent; box-shadow: none; }
  html body.workspace-layout #detail > .editor-head > .top { grid-column: 1; grid-row: 1; min-height: 0; gap: 6px; font-size: 13px; color: var(--muted); }
  html body.workspace-layout #detail > .editor-head > .top .numero { font-size: 13px; font-weight: 600; color: var(--muted); }
  html body.workspace-layout #detail > .editor-head > .quote-customer { grid-column: 1; grid-row: 2; }
  html body.workspace-layout #detail > .editor-head > .quote-quick { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  html body.workspace-layout #detail > .editor-head > :is(.seg, .quote-schedule) { grid-column: 1 / -1; justify-self: start; margin-top: 12px; }
  html body.workspace-layout #detail > .editor-head > .quote-schedule { justify-self: stretch; }
}

/* List panes scroll without a visible scrollbar line beside them. */
html body.workspace-layout .main > .panel-list.quotes-workspace, html body.workspace-layout[data-workspace-view=relatorios] #portal { scrollbar-width: none; }
html body.workspace-layout .main > .panel-list.quotes-workspace::-webkit-scrollbar, html body.workspace-layout[data-workspace-view=relatorios] #portal::-webkit-scrollbar { display: none; }

/* WhatsApp buttons: the button paints the glyph itself, centred on its own box, so no browser can snap it
   off centre (the tight viewBox makes the 18px logo land on whole pixels). */
html body :is(#detail .quote-quick #btn-wa,.btn.mq-icon-whatsapp,.btn.report-detail-icon.is-whatsapp)>:is(svg,.workspace-icon){display:none!important}
html body :is(.btn.mq-icon-whatsapp,#btn-wa,.btn.report-detail-icon.is-whatsapp)::before{content:"";position:absolute;inset:0;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='2 2 20 20' fill='%231fae55'%3E%3Cpath d='M12 2a10 10 0 0 0-8.6 15.1L2 22l5-1.3A10 10 0 1 0 12 2zm0 18.2a8.2 8.2 0 0 1-4.2-1.2l-.3-.2-3 .8.8-2.9-.2-.3A8.2 8.2 0 1 1 12 20.2z'/%3E%3Cpath transform='translate(.18 -.13)' d='M16.5 14.1c-.2-.1-1.5-.7-1.7-.8-.2-.1-.4-.1-.6.1-.2.2-.6.8-.8 1-.1.2-.3.2-.5.1-.7-.3-1.4-.7-2-1.2-.5-.5-1-1.1-1.3-1.7-.1-.2 0-.4.1-.5l.4-.5.3-.4v-.5l-.8-1.8c-.2-.5-.4-.4-.6-.4h-.5c-.2 0-.5.1-.7.3-.6.6-.9 1.3-.9 2.1.1.9.4 1.8 1 2.5 1.1 1.6 2.5 2.9 4.2 3.7.5.2.9.4 1.4.5.5.2 1 .2 1.5.1.6-.1 1.1-.5 1.5-1 .2-.4.3-.8.2-1.2l-.4-.3z'/%3E%3C/svg%3E") center/18px 18px no-repeat;pointer-events:none}

/* Selection: the circles show only after the "Selecionar" button beside the search. */
html body .quotes-workspace .quotes-tools .list-select[aria-pressed=true]{border-color:var(--accent);background:var(--accent-soft);color:var(--accent)}
.quotes-workspace .quote-select-hint{margin:0 18px 10px;font-size:12px;color:var(--muted)}

/* Computer layout: one top bar (brand, tabs, "Mais" menu, profile) over full-width pages.
   The phone keeps its own bottom navigation (native-mobile.css). */
@media (min-width:761px) and (min-height:541px), (min-width:761px) and (pointer:fine), (min-width:761px) and (pointer:none) {
  html body.workspace-layout .app { padding-left: 0; }

  /* The bar itself: the sidebar element laid out as a row on top of the header. */
  html body.workspace-layout #workspace-sidebar {
    position: fixed; inset: 0 auto auto max(0px, calc(50% - 800px)); z-index: 46; width: auto; max-width: calc(100% - 180px); height: 64px;
    padding: 0 0 0 28px; display: flex; flex-direction: row; align-items: stretch; gap: 22px; overflow: visible;
    background: transparent; color: var(--ink); border: 0; box-shadow: none;
  }
  html body.workspace-layout.admin-preview-active #workspace-sidebar, html.admin-preview-active body.workspace-layout #workspace-sidebar { top: var(--preview-height, 62px); height: 64px; }
  html body.workspace-layout #workspace-sidebar .workspace-menu-close { display: none; }
  html body.workspace-layout #workspace-sidebar .workspace-brand { display: flex; align-items: center; gap: 10px; margin: 0; padding: 0; flex: none; }
  html body.workspace-layout #workspace-sidebar .workspace-brand img { width: 44px; height: 44px; }
  html body.workspace-layout #workspace-sidebar .workspace-brand .brand-on-dark, :root[data-theme=dark] body.workspace-layout #workspace-sidebar .workspace-brand .brand-on-light { display: none; }
  :root[data-theme=dark] body.workspace-layout #workspace-sidebar .workspace-brand .brand-on-dark { display: block; }
  html body.workspace-layout #workspace-sidebar .workspace-navigation { display: flex; flex-direction: row; align-items: stretch; gap: 2px; margin: 0; padding: 0; min-width: 0; }
  html body.workspace-layout #workspace-sidebar .workspace-nav-item,
  html body.workspace-layout #workspace-sidebar .workspace-more-toggle {
    display: inline-flex; align-items: center; gap: 8px; width: auto; height: 100%; min-height: 0; margin: 0; padding: 0 12px;
    border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted);
    font: inherit; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: none; cursor: pointer;
  }
  html body.workspace-layout #workspace-sidebar .workspace-nav-item:hover,
  html body.workspace-layout #workspace-sidebar .workspace-more-toggle:hover { color: var(--ink); background: transparent; }
  html body.workspace-layout #workspace-sidebar .workspace-nav-item[aria-current=page],
  html body.workspace-layout #workspace-sidebar .workspace-more-toggle.is-current { color: var(--accent); border-bottom-color: var(--accent); font-weight: 800; background: transparent; }
  html body.workspace-layout #workspace-sidebar .workspace-nav-item::after { display: none; }
  html body.workspace-layout #workspace-sidebar .workspace-icon,
  html body.workspace-layout #workspace-sidebar .workspace-icon svg { width: 17px; height: 17px; flex: none; }
  html body.workspace-layout #workspace-sidebar .workspace-more-toggle .workspace-icon,
  html body.workspace-layout #workspace-sidebar .workspace-more-toggle .workspace-icon svg { width: 14px; height: 14px; }

  /* "Mais": a small menu anchored under its own button. */
  html body.workspace-layout #workspace-sidebar .workspace-more { position: relative; display: flex; }
  html body.workspace-layout :is(#workspace-sidebar, .topbar) .workspace-more-menu {
    position: absolute; top: calc(100% + 6px); left: 0; z-index: 2; width: 260px; padding: 8px;
    display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: 0 18px 40px rgba(19, 34, 57, .14); animation: lbl-pop-in .16s ease;
  }
  html body.workspace-layout :is(#workspace-sidebar, .topbar) .workspace-more-menu[hidden] { display: none; }
  html body.workspace-layout #workspace-sidebar .workspace-more-menu .workspace-nav-item {
    display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 12px; border: 0; border-radius: 10px;
    background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer;
  }
  html body.workspace-layout #workspace-sidebar .workspace-more-menu .workspace-nav-item:hover { background: var(--surface-2); }
  html body.workspace-layout #workspace-sidebar .workspace-more-menu .workspace-nav-item[aria-current=page] { background: var(--accent-soft); color: var(--accent); border: 0; }

  /* The header becomes the bar's background and keeps the tools on the right. */
  html body.workspace-layout .topbar { position: sticky; top: 0; z-index: 45; height: 64px; min-height: 64px; padding: 0 max(24px, calc(50% - 772px)) 0 24px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: none; }
  html body.workspace-layout .topbar :is(.workspace-menu-toggle, .workspace-mobile-brand) { display: none; }
  html body.workspace-layout .topbar .topbar-right { margin-left: auto; }
  html body.workspace-layout .topbar .topbar-right { gap: 8px; }
  html body.workspace-layout .topbar .topbar-right > .btn-icon { width: 40px; height: 40px; min-height: 0; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); display: grid; place-items: center; box-shadow: none; }
  html body.workspace-layout .topbar .topbar-right > .btn-icon svg { width: 18px; height: 18px; }
  /* The bar's right side: the bell and the avatar; settings and sign out live in the avatar's menu. */
  html body.workspace-layout .topbar :is(#btn-settings, #btn-logout) { display: none; }
  html body.workspace-layout .topbar .workspace-account { position: relative; display: flex; }
  html body.workspace-layout .topbar #workspace-account-menu { left: auto; right: 0; z-index: 50; width: 220px; }
  html body.workspace-layout .topbar .workspace-account-menu .workspace-account-item { display: flex; align-items: center; gap: 12px; width: 100%; height: 42px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
  html body.workspace-layout .topbar .workspace-account-menu .workspace-account-item:hover { background: var(--surface-2); }
  html body.workspace-layout .topbar .workspace-account-menu .workspace-icon, html body.workspace-layout .topbar .workspace-account-menu .workspace-icon svg { width: 18px; height: 18px; color: #44526a; }
  html body.workspace-layout .topbar .workspace-account-menu .workspace-account-item:last-child { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
  html body.workspace-layout .topbar .workspace-profile .workspace-avatar:not(:has(img)) { display: grid; place-items: center; background: #e6ecfb; color: #2148c0; font-size: 14px; font-weight: 800; }
  /* Counts on the tabs (reports to stamp, pending quotes, leave to approve). */
  html body.workspace-layout #workspace-sidebar .workspace-nav-item[data-badge]::after { content: attr(data-badge); display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 999px; background: #2c60e9; color: #fff; font-size: 10px; font-weight: 800; }
  html body.workspace-layout #workspace-sidebar .workspace-more-menu .workspace-nav-item[data-badge]::after { margin-left: auto; }
  html body.workspace-layout .topbar .workspace-profile { display: grid; place-items: center; width: 40px; height: 40px; margin: 0 0 0 4px; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; }
  html body.workspace-layout .topbar .workspace-profile > * { width: 40px; height: 40px; border-radius: 999px; }

  /* Pages use the full width under the bar. */
  html body.workspace-layout #portal { max-width: 1260px; margin: 0 auto; padding: 28px 40px 48px; box-sizing: border-box; }
  html body.workspace-layout .portal-head .ov-new-job { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; }
  html body.workspace-layout .portal-head .ov-new-job .workspace-icon, html body.workspace-layout .portal-head .ov-new-job svg { width: 17px; height: 17px; }
  html body.workspace-layout #portal > .portal-head h2 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
  html body.workspace-layout.view-editor:not(:has(.panel-list.quotes-workspace)) .panel-editor { left: 0; width: 100%; }
}
/* Narrow computers: when the main areas do not fit with their names, the tabs keep only their icons (portal.js). */
html body.workspace-layout #workspace-sidebar > .workspace-navigation.is-compact > .workspace-nav-item > span:not(.workspace-icon) { display: none; }

/* Relatórios: filters, then one row per report; on wide screens the list stays on the left and the report opens beside it. */
.report-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.report-filter { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: #44526a; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.report-filter small { font-size: 12px; opacity: .65; }
.report-filter[aria-pressed=true] { border-color: #2c60e9; background: #edf2ff; color: #2148c0; }
.report-rows { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.report-rows > .empty, .report-rows > p { margin: 0; padding: 24px 20px; }
.report-row { display: flex; align-items: center; border-top: 1px solid var(--line); }
.report-row:first-child { border-top: 0; }
.report-row.is-current { background: #f3f6ff; }
.report-row-open { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 14px 20px 14px 17px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.report-row-avatar { width: 36px; height: 36px; flex: none; border-radius: 999px; background: #eef2f8; color: #44526a; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.report-row-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.report-row-text strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-row-text small { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.report-row .stamp-badge { flex: none; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #fff4dc; color: #8a5a00; }
.report-row .stamp-badge.is-stamped { background: #e3f6ea; color: #11753a; }
/* List panes (Relatórios, Equipa): title and a round + on one line, the week and the filter below. */
@media (min-width:1200px) and (pointer:fine), (min-width:1200px) and (pointer:none) {
  html body.workspace-layout:is([data-workspace-view=relatorios], [data-workspace-view=equipa]) #portal-content > .portal-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 8px; }
  html body.workspace-layout:is([data-workspace-view=relatorios], [data-workspace-view=equipa]) #portal-content > .portal-head .native-page-title { flex: 1 1 auto; }
  html body.workspace-layout:is([data-workspace-view=relatorios], [data-workspace-view=equipa]) #portal-content > .portal-head h2 { font-size: 24px; }
  html body.workspace-layout:is([data-workspace-view=relatorios], [data-workspace-view=equipa]) #portal-content > .portal-head > .portal-actions { display: contents; }
  html body.workspace-layout:is([data-workspace-view=relatorios], [data-workspace-view=equipa]) #portal-content > .portal-head .btn-primary.icon-only { order: 1; width: 40px; height: 40px; min-width: 40px; min-height: 0; padding: 0; border-radius: 999px; }
  html body.workspace-layout:is([data-workspace-view=relatorios], [data-workspace-view=equipa]) #portal-content > .portal-head :is(.portal-week-picker, .staff-filter) { order: 2; flex: 1 1 100%; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
  html body.workspace-layout:is([data-workspace-view=relatorios], [data-workspace-view=equipa]) #portal-content > .portal-head .staff-filter { order: 3; height: 40px; padding: 0 6px 0 14px; border: 1px solid var(--line); background: var(--surface); }
  html body.workspace-layout:is([data-workspace-view=relatorios], [data-workspace-view=equipa]) #portal-content > .portal-head .portal-week-picker { display: flex; align-items: center; }
  html body.workspace-layout:is([data-workspace-view=relatorios], [data-workspace-view=equipa]) #portal-content > .portal-head .portal-week-label { flex: 1 1 auto; }
  html body.workspace-layout:is([data-workspace-view=relatorios], [data-workspace-view=equipa]) #portal-content > .portal-head .portal-week-picker > .btn:not([aria-label]) { display: none; }
}
/* The week as text with arrows; the date field sits invisibly over the text. */
.portal-week-label { position: relative; display: flex; align-items: center; justify-content: center; min-width: 120px; padding: 0 6px; font-size: 14px; font-weight: 700; cursor: pointer; }
html body .portal-week-label > :not(:first-child) { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; overflow: hidden; cursor: pointer; }
/* Titles with a small line above them (report opened, overview). */
.portal-head.head-eyebrow .native-page-title { display: flex; flex-direction: column-reverse; gap: 2px; }
.portal-head.head-eyebrow .native-page-title p { margin: 0; font-size: 13px; color: var(--muted); }
@media (min-width:1200px) and (pointer:fine), (min-width:1200px) and (pointer:none) {
  html body.workspace-layout[data-workspace-view=relatorios] #portal { width: 400px; max-width: none; margin: 0; min-height: calc(100vh - 64px); padding: 24px 0 40px !important; box-sizing: border-box; background: var(--surface); border-right: 1px solid var(--line); }
  html body.workspace-layout[data-workspace-view=relatorios] #portal-content > .portal-head { margin: 0 0 12px; padding: 0 20px; }
  html body.workspace-layout[data-workspace-view=relatorios] #portal .report-filters { padding: 0 20px; }
  html body.workspace-layout[data-workspace-view=relatorios] #portal .report-rows { border: 0; border-top: 1px solid var(--line); border-radius: 0; }
  html body.workspace-layout[data-workspace-view=relatorios]:not(.quote-docked-popup) .app::after { content: "Escolhe um relatório na lista para o abrir aqui."; position: fixed; inset: 64px 0 0 400px; display: grid; place-items: center; color: var(--muted); font-size: 14px; pointer-events: none; }
}

/* Computer pages share one header: title on the left; filters, the period and the main action on the right. */
@media (min-width:761px) and (min-height:541px), (min-width:761px) and (pointer:fine), (min-width:761px) and (pointer:none) {
  html body.workspace-layout #portal > #portal-content > .portal-head { align-items: center; gap: 12px; margin-bottom: 20px; }
  html body.workspace-layout #portal > #portal-content > .portal-head .portal-actions { align-items: center; gap: 8px; flex-wrap: wrap; }
  html body.workspace-layout .portal-head .staff-filter { display: flex; align-items: center; gap: 8px; height: 40px; margin: 0; padding: 0 6px 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: none; }
  html body.workspace-layout .portal-head .staff-filter label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); }
  html body.workspace-layout .portal-head .staff-filter select { height: 36px; min-height: 0; width: auto; padding: 0 28px 0 4px; border: 0; background-color: transparent; font-weight: 700; font-size: 13px; color: var(--ink); box-shadow: none; }
  html body.workspace-layout .portal-head :is(.portal-week-picker, .portal-month-picker) { gap: 6px; }
  html body.workspace-layout .portal-head :is(.portal-week-picker, .portal-month-picker) > .btn { height: 40px; min-height: 0; min-width: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 13px; font-weight: 600; box-shadow: none; }
  html body.workspace-layout .portal-head :is(.portal-week-picker, .portal-month-picker) > .btn[aria-label] { width: 40px; padding: 0; font-size: 16px; }
  html body.workspace-layout .portal-head :is(.portal-week-picker, .portal-month-picker) input { height: 40px; min-height: 0; border: 0; background-color: transparent; box-shadow: none; text-align: center; font-size: 15px; font-weight: 700; color: var(--ink); }

  /* Registo de dias: four numbers, then the table. */
  .days-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
  .days-kpi { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
  .days-kpi > span { font-size: 13px; font-weight: 600; color: var(--muted); }
  html body.workspace-layout #portal .days-kpi > :is(h3, strong) { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
  .days-kpi > small { font-size: 12px; color: var(--muted); }
  .days-table { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
  .days-table-head { display: flex; align-items: center; gap: 8px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
  html body.workspace-layout #portal .days-table-head h3 { flex: 1 1 auto; margin: 0; font-size: 17px; font-weight: 800; }
  .days-table > .empty, .days-table > p { margin: 0; padding: 32px 20px; }
  .days-table .portal-table-wrap { border: 0; border-radius: 0; margin: 0; }
  .days-table table { font-size: 13px; }
  .days-table th { padding: 10px 12px; background: #f8f9fc; color: var(--muted); font-weight: 700; }
  .days-table td { padding: 12px; border-top: 1px solid var(--line); }
  .days-table :is(th, td):first-child { padding-left: 20px; font-weight: 700; }
  .days-type { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #eef1f6; color: #44526a; white-space: nowrap; }
  .days-type[data-fraction="1"] { background: #e3f6ea; color: #11753a; }
  .days-type[data-fraction="0.5"] { background: #fff4dc; color: #8a5a00; }
}

/* Visão geral: summary panel, agenda and activity (computer and phone). */
.portal-home > .portal-head { align-items: flex-end; }
.portal-home > .portal-head .native-page-title { display: flex; flex-direction: column-reverse; gap: 4px; }
.portal-home > .portal-head .native-page-title p { margin: 0; font-size: 13px; color: var(--muted); }
.portal-home > .portal-head .native-page-title p::first-letter { text-transform: uppercase; }
.portal-home > .portal-head h2 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.portal-home .ov-panel { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1fr); margin: 0 0 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.ov-kicker { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ov-empty { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* Blue card: today on site / my job today. */
.ov-today { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 22px 24px; color: #fff; background: linear-gradient(160deg, #2c60e9, #2148c0); }
.ov-today .ov-kicker { color: rgba(255, 255, 255, .82); }
.ov-weather { font-size: 13px; color: rgba(255, 255, 255, .9); }
.ov-weather:empty { display: none; }
html body .ov-weather .native-home-weather-strip.native-home-weather-strip { display: flex; box-shadow: none; border-radius: 0; min-height: 0; width: auto; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; background: none; color: inherit; font-size: 13px; }
/* One line under the title: icon, place, temperatures, the sky, then the forecast's source in small print. */
html body .ov-weather .native-home-weather-strip[data-state=unavailable] { display: none !important; }
/* The forecast only: the source is credited in the Calendário. */
.ov-weather .native-home-weather-credit { display: none; }
.ov-weather .native-home-weather-details { display: contents; }
.ov-weather .native-home-weather-details > :first-child { order: 0; }
html body .ov-weather .native-home-weather-place { order: 1; display: inline; color: inherit; font-size: 13px; font-weight: 400; }
.ov-weather .native-home-weather-temperatures { order: 2; }
.ov-weather .native-home-weather-message { order: 3; }
.ov-weather :is(.native-home-weather-message, .native-home-weather-temperatures) { color: inherit; font-size: 13px; font-weight: 400; }
.ov-weather :is(.native-home-weather-place, .native-home-weather-temperatures)::after { content: " ·"; }
.ov-weather .native-home-weather-message::first-letter { text-transform: lowercase; }
html body .ov-weather svg.calendar-weather-icon, .ov-weather svg { width: 18px; height: 18px; flex: none; }
.ov-today-title { font-size: 26px; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.ov-today-top { display: flex; align-items: center; gap: 10px; }
.ov-today-top .ov-kicker { flex: 1 1 auto; }
.ov-today-state { padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); font-size: 11px; font-weight: 800; }
.ov-today-meta { font-size: 13px; color: rgba(255, 255, 255, .9); }
.ov-crew { display: flex; gap: 6px; margin-top: auto; }
.ov-crew > * { display: grid; place-items: center; width: 34px; height: 34px; box-sizing: border-box; overflow: hidden; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .18); color: #fff; font-size: 12px; font-weight: 800; }
.ov-crew img { width: 100%; height: 100%; object-fit: cover; }
.ov-today-crew { display: flex; align-items: center; gap: 8px; }
.ov-today-crew .ov-crew { margin: 0; gap: 0; flex: none; }
.ov-today-crew .ov-crew > * { width: 28px; height: 28px; margin-left: -6px; font-size: 10px; border-width: 1.5px; }
.ov-today-crew .ov-crew > :first-child { margin-left: 0; }
.ov-today-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
html body.workspace-layout #portal .ov-today-actions :is(.btn, a.btn).icon-only.icon-only:not(#_a):not(#_b) { background: rgba(255, 255, 255, .16) !important; border: 0 !important; color: #fff !important; }

/* Por tratar / Por fazer. */
.ov-todo { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 20px 22px; border-right: 1px solid var(--line); }
.ov-todo-list { display: flex; flex-direction: column; margin-top: 6px; }
.ov-todo-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ov-todo-row:last-child { border-bottom: 0; }
.ov-todo-row > .workspace-icon { width: 14px; height: 14px; color: var(--muted); flex: none; }
.ov-count { min-width: 26px; height: 26px; padding: 0 7px; box-sizing: border-box; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; background: #2c60e9; flex: none; }
.ov-todo-row[data-tone=stamp] .ov-count { background: #b45309; }
.ov-todo-row[data-tone=leave] .ov-count { background: #6a4c93; }
.ov-todo-row[data-tone=hours] .ov-count { background: #0f766e; }
.ov-task-icon { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; color: #2c60e9; background: #edf2ff; }
.ov-task-icon .workspace-icon, .ov-task-icon svg { width: 17px; height: 17px; }
.ov-todo-row[data-tone=stamp] .ov-task-icon { color: #b45309; background: #fff4dc; }
.ov-todo-row[data-tone=leave] .ov-task-icon { color: #6a4c93; background: #f1ebfa; }
.ov-todo-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.ov-todo-text strong { font-size: 14px; }
.ov-todo-text small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The month. */
.ov-month { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 20px 22px; }
.ov-stats { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ov-stat { display: flex; flex-direction: column; gap: 0; min-width: 0; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; }
button.ov-stat { cursor: pointer; }
button.ov-stat:hover strong { color: var(--accent); }
.ov-stat strong { font-size: 24px; font-weight: 800; letter-spacing: -.01em; overflow-wrap: anywhere; }
.ov-stat span { font-size: 12px; color: var(--muted); }
.ov-stat small { font-size: 11px; color: var(--muted); }
.ov-team-days { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
/* Employees: days, holidays and hours as rows (label left, value right). */
.employee-today ~ .ov-month .ov-stats { flex-direction: column; flex-wrap: nowrap; gap: 0; }
.employee-today ~ .ov-month .ov-stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.employee-today ~ .ov-month .ov-stat:first-child { border-top: 0; padding-top: 0; }
.employee-today ~ .ov-month .ov-stat strong { grid-column: 2; grid-row: 1; font-size: 20px; }
.employee-today ~ .ov-month .ov-stat .ov-stat-label { grid-column: 1; grid-row: 1; font-size: 13px; font-weight: 700; color: var(--ink); }
.employee-today ~ .ov-month .ov-stat small { grid-column: 1 / -1; font-size: 12px; }
.employee-today ~ .ov-month .ov-stat strong .ov-stat-of { display: inline; font-size: 13px; font-weight: 400; color: #44526a; }
.employee-today ~ .ov-month .ov-stat .ov-leave-bar ~ small { grid-row: 3; }
.employee-today ~ .ov-month .ov-stat .ov-leave-bar { grid-row: 2; grid-column: 1 / -1; display: flex; height: 8px; margin: 4px 0 2px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ov-leave-bar > span { background: #6a4c93; }
.ov-leave-bar > .is-waiting { background: #cdb9ea; }
.ov-subtitle { font-size: 12px; font-weight: 600; color: var(--muted); }
.ov-team-row { display: grid; grid-template-columns: 74px minmax(0, 1fr) 28px; gap: 10px; align-items: center; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.ov-team-row > span:first-child { font-weight: 600; color: var(--muted); }
.ov-team-row strong { text-align: right; }
.ov-bar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.ov-bar > span { display: block; height: 100%; border-radius: inherit; background: #2c60e9; }

/* Agenda and activity. */
.portal-home .ov-columns { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.ov-agenda { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; min-width: 0; }
.ov-section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ov-section-head > div { flex: 1 1 auto; }
.ov-section-head h3 { margin: 0; font-size: 17px; font-weight: 800; }
.ov-section-head small { font-size: 12px; color: var(--muted); }
.ov-link { border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 6px 0; }
.ov-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.ov-week > button { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 10px 4px; border: 0; border-radius: 12px; background: var(--surface-2); color: var(--ink); font: inherit; cursor: pointer; }
.ov-week > button > span:first-child { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .75; }
.ov-week > button > strong { font-size: 20px; font-weight: 800; }
.ov-week > button > small { font-size: 11px; opacity: .8; }
.ov-week > button.is-today { box-shadow: inset 0 0 0 1px #c4d3fb; }
.ov-week > button[aria-pressed=true] { background: #2c60e9; color: #fff; box-shadow: none; }
.ov-day-jobs { display: flex; flex-direction: column; gap: 12px; }
.ov-day-jobs .ov-lane { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.ov-day-jobs .ov-lane h4 { margin: 0; font-size: 13px; color: var(--muted); }
.ov-day-jobs .ov-lane-job { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.ov-day-jobs .ov-lane-open { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 2px 14px; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.ov-day-jobs .ov-lane-time { grid-row: span 2; align-self: center; font-size: 13px; font-weight: 700; color: var(--accent); }
.ov-day-jobs .ov-lane-open strong { font-size: 14px; }
.ov-day-jobs .ov-lane-open .muted, .ov-day-jobs .ov-lane-open small { font-size: 12px; }
/* The job state as a small coloured pill (owners can still change it). */
html body :is(#portal, #portal-popup) .portal-job-status[data-state] { appearance: none; -webkit-appearance: none; width: auto; min-width: 0; height: 24px; min-height: 0; padding: 0 9px; border: 0; border-radius: 999px; font-size: 11px; font-weight: 700; text-align: center; background-color: #edf2ff; background-image: none; color: #2148c0; box-shadow: none; cursor: pointer; }
html body :is(#portal, #portal-popup) .portal-job-status[data-state="Em curso"] { background-color: #fff4dc; color: #8a5a00; }
html body :is(#portal, #portal-popup) .portal-job-status[data-state="Concluída"] { background-color: #e3f6ea; color: #11753a; }
html body :is(#portal, #portal-popup) .portal-job-status[data-state="Cancelada"] { background-color: #eef1f6; color: #44526a; }
/* Company activity: pill tabs and one row per item. */

@media (min-width:761px) and (min-height:541px), (min-width:761px) and (pointer:fine), (min-width:761px) and (pointer:none) {
  /* Employee week: day name and number on one line, the jobs below. */
  .ov-my-week .ov-week > button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; }
  .ov-my-week .ov-week > button > span:first-child { align-self: center; }
  .ov-my-week .ov-week > button > strong { font-size: 18px; }
  .ov-my-week .ov-week-jobs { grid-column: 1 / -1; }
}

/* Employee week: days with their jobs, and the chosen day below. */
.ov-my-week .ov-week > button { align-items: stretch; text-align: left; gap: 6px; padding: 10px; min-height: 92px; }

.ov-week-jobs { display: flex; flex-direction: column; gap: 4px; }
.ov-week-jobs small { padding: 4px 7px; border-radius: 7px; font-size: 11px; font-weight: 700; line-height: 1.3; background: var(--surface); color: #2148c0; border: 1px solid #dbe4fb; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-week-jobs small.is-free { background: transparent; border: 0; color: var(--muted); padding: 4px 0; font-weight: 500; }
.ov-my-week .ov-week > button[aria-pressed=true] { background: #edf2ff; color: var(--ink); box-shadow: inset 0 0 0 2px #2c60e9; }
.ov-day-detail { display: flex; flex-direction: column; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.ov-day-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ov-day-head h4 { margin: 0; flex: 1 1 auto; font-size: 16px; font-weight: 800; }
.ov-day-head h4::first-letter { text-transform: uppercase; }
.ov-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.ov-pill[data-state="Dia completo"] { background: #e3f6ea; color: #11753a; }
.ov-pill[data-state="Meio dia"], .ov-pill[data-state="Por registar"] { background: #fff4dc; color: #8a5a00; }
.ov-pill[data-state="Férias"], .ov-pill[data-state="Feriado"] { background: #e8f1ff; color: #1d4fb8; }
.ov-job { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; }
.ov-job-open { display: flex; flex-direction: column; gap: 4px; padding: 0; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.ov-job-top { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--accent); }
.ov-job-title { font-size: 16px; }
.ov-job-open .muted { font-size: 13px; }
.ov-job-notes { font-size: 12px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.ov-job-tools { display: flex; gap: 8px; }

/* Phone: everything stacks; Por tratar becomes a swipeable row of chips. */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  .portal-home .ov-panel { grid-template-columns: minmax(0, 1fr); border: 0; background: transparent; overflow: visible; gap: 14px; }
  .ov-today { border-radius: 20px; padding: 16px 18px; }
  .ov-today-title { font-size: 20px; }
  .ov-todo { border: 0; padding: 0; }
  .ov-todo > .ov-kicker { display: none; }
  .ov-month { padding: 16px; background: var(--surface); border-radius: 18px; }
  .portal-home .ov-columns { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .ov-agenda, .ov-feed { padding: 16px; border: 0; }
  .ov-week { gap: 4px; }
  .ov-week > button { padding: 8px 2px; }
  .ov-week > button > strong { font-size: 17px; }
  .ov-week > button > small { display: none; }
  .ov-my-week .ov-week > button { min-height: 0; padding: 8px 4px; align-items: center; text-align: center; }
  .ov-my-week .ov-week > button > span:first-child { justify-content: center; }
  .ov-week-jobs { display: none; }
  .ov-day-jobs .ov-lane-job { grid-template-columns: minmax(0, 1fr); }
  .ov-day-jobs .ov-lane-open { grid-template-columns: minmax(0, 1fr); }
  .ov-day-jobs .ov-lane-time { grid-row: auto; }
  .ov-job { grid-template-columns: minmax(0, 1fr); }
}
/* Owners on the phone: Por tratar as chips. */
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  .portal-home .ov-panel > .ov-todo .ov-todo-list { flex-direction: row; gap: 8px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scrollbar-width: none; }
  .portal-home .ov-panel > .ov-todo .ov-todo-list::-webkit-scrollbar { display: none; }
  .portal-home .ov-panel > .ov-todo .ov-todo-row { flex: none; width: auto; height: 44px; padding: 0 14px 0 8px; gap: 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
  .portal-home .ov-panel > .ov-todo .ov-todo-row small, .portal-home .ov-panel > .ov-todo .ov-todo-row > .workspace-icon { display: none; }
  .portal-home .ov-panel > .ov-todo .ov-todo-row strong { font-size: 13px; white-space: nowrap; }
  .portal-home .ov-panel > .ov-todo .ov-empty { display: none; }
  /* Employees keep Por fazer as a list (each row is a task). */
  .portal-home .ov-panel > :is(.employee-today ~ .ov-todo, .ov-todo-tasks) .ov-todo-list { flex-direction: column; overflow: visible; margin: 0; padding: 4px 16px; background: var(--surface); border-radius: 18px; }
  .portal-home .ov-panel > :is(.employee-today ~ .ov-todo, .ov-todo-tasks) .ov-todo-row { height: auto; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
  .portal-home .ov-panel > :is(.employee-today ~ .ov-todo, .ov-todo-tasks) .ov-todo-row small, .portal-home .ov-panel > :is(.employee-today ~ .ov-todo, .ov-todo-tasks) .ov-todo-row > .workspace-icon { display: block; }
  .portal-home .ov-panel > :is(.employee-today ~ .ov-todo, .ov-todo-tasks) .ov-empty { display: block; padding: 12px 16px; background: var(--surface); border-radius: 18px; margin: 0; }
}
/* Long names and addresses wrap instead of widening the page. */
.portal-home :is(.ov-panel, .ov-columns, .ov-my-week) :is(strong, span, small, h3, h4, p) { overflow-wrap: anywhere; min-width: 0; }
.portal-home :is(.ov-columns, .ov-my-week) { min-width: 0; max-width: 100%; }

/* Phone, as in the design: date above the greeting, the month inside the blue card, short chips,
   dots under days with jobs, the chosen day as a title and simple job cards. */
.ov-todo-short, .ov-stat-short, .ov-range-short, .ov-day-title, .ov-lane-where { display: none; }
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  body.workspace-layout .portal-home > .native-page-heading > .native-page-title { display: flex !important; flex-direction: column-reverse; }
  body.workspace-layout #portal.portal-home > .native-page-heading > .native-page-title > p { margin: 0 0 2px; }
  .ov-today { position: relative; }
  .ov-today:has(> .ov-crew) .ov-today-title { padding-right: 84px; }
  .ov-today > .ov-crew { position: absolute; top: 16px; right: 16px; margin: 0; gap: 0; }
  .ov-today > .ov-crew > * { width: 26px; height: 26px; margin-left: -6px; font-size: 9px; border-width: 1.5px; }
  .ov-today .ov-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 4px; }
  .ov-today .ov-stat { padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .14); color: #fff; }
  .ov-today .ov-stat strong { font-size: 18px; }
  .ov-today .ov-stat span { font-size: 11px; color: rgba(255, 255, 255, .8); }
  .portal-home .ov-panel > .ov-todo .ov-todo-row strong { display: none; }
  .portal-home .ov-panel > .ov-todo .ov-todo-short { display: inline; font-style: normal; font-size: 13px; font-weight: 700; white-space: nowrap; }
  .portal-home .ov-panel > :is(.employee-today ~ .ov-todo, .ov-todo-tasks) .ov-todo-row strong { display: block; }
  .portal-home .ov-panel > :is(.employee-today ~ .ov-todo, .ov-todo-tasks) .ov-todo-short { display: none; }
  .ov-section-head > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
  .ov-section-head > div > small, .ov-section-head > .ov-link { display: none; }
  .ov-range-short { display: inline; font-size: 12px; color: var(--muted); white-space: nowrap; }
  .ov-week > button { position: relative; padding-bottom: 12px; }
  .ov-week > button[data-jobs]:not([data-jobs="0"])::after { content: ""; position: absolute; left: 50%; bottom: 5px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: #2c60e9; }
  .ov-week > button[aria-pressed=true]::after { background: #fff; }
  .ov-my-week .ov-week > button[aria-pressed=true]::after { background: #2c60e9; }
  .ov-day-title { display: block; margin: 4px 0 0; font-size: 14px; font-weight: 800; }
  .ov-day-jobs .ov-lane { padding: 0; border: 0; }
  .ov-day-jobs .ov-lane h4, .ov-day-jobs .ov-lane-open .muted { display: none; }
  .ov-day-jobs .ov-lane-job { position: relative; display: block; padding: 12px 14px; border-radius: 14px; }
  .ov-day-jobs .ov-lane-open { display: flex; flex-direction: column; gap: 2px; width: 100%; padding-right: 0; }
  .ov-day-jobs .ov-lane-time { align-self: flex-start; min-height: 24px; display: flex; align-items: center; font-size: 12px; }
  .ov-day-jobs .ov-lane-open strong { font-size: 15px; font-weight: 800; }
  .ov-lane-where { display: block; font-size: 12px; color: var(--muted); }
  .ov-day-jobs .ov-lane-job .portal-job-status { position: absolute; top: 10px; right: 12px; }
  /* Employees: days, holidays and hours as three tiles. */
  .employee-today ~ .ov-month .ov-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .employee-today ~ .ov-month .ov-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px; border: 0; border-radius: 12px; background: var(--surface-2); }
  .employee-today ~ .ov-month .ov-stat:first-child { padding-top: 10px; }
  .employee-today ~ .ov-month .ov-stat strong { font-size: 15px; white-space: nowrap; }
  .employee-today ~ .ov-month .ov-stat :is(small, .ov-leave-bar, .ov-stat-label), .employee-today ~ .ov-month .ov-stat strong .ov-stat-of { display: none; }
  .employee-today ~ .ov-month .ov-stat .ov-stat-short { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
  .employee-today ~ .ov-month .ov-stat:last-child small { display: block; font-size: 10px; }
  .ov-my-week .ov-job-notes, .ov-my-week .ov-job-tools { display: none; }
}

/* Phone, owners: "Últimas novidades", leave and reports of the last week as a timeline. */
.ov-feed { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.portal .ov-feed h3 { margin: 0 0 4px; font-size: 17px; font-weight: 800; }
.ov-feed-legend { display: flex; gap: 14px; margin-bottom: 4px; font-size: 12px; color: #44526a; }
.ov-feed-legend span { display: flex; align-items: center; gap: 6px; }
.ov-feed-legend i { width: 10px; height: 10px; border-radius: 3px; background: #2c60e9; }
.ov-feed-legend i[data-kind=leave] { background: #6a4c93; }
.ov-feed-group { padding: 10px 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
html body .portal .ov-feed-item { display: flex; align-items: stretch; gap: 12px; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: var(--ink); font: inherit; text-align: left; }
.ov-feed-dot { position: relative; display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 999px; background: #edf2ff; color: #2c60e9; }
.ov-feed-item[data-kind=leave] .ov-feed-dot { background: #f1ebfa; color: #6a4c93; }
.ov-feed-dot .workspace-icon, .ov-feed-dot svg { width: 15px; height: 15px; }
.ov-feed-dot::after { content: ""; position: absolute; top: 34px; left: 15px; width: 2px; height: 18px; background: #eef1f6; }
.ov-feed-item:last-child .ov-feed-dot::after, .ov-feed-item:has(+ .ov-feed-group) .ov-feed-dot::after { display: none; }
.ov-feed-text { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; padding: 4px 0 14px; }
.ov-feed-text strong { font-size: 14px; font-weight: 700; }
.ov-feed-text small { font-size: 12px; color: var(--muted); }
.ov-feed-state { align-self: flex-start; margin-top: 6px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; font-style: normal; white-space: nowrap; background: #fff4dc; color: #8a5a00; }
.ov-feed-state[data-tone=done] { background: #e3f6ea; color: #11753a; }
.ov-feed-state[data-tone=leave] { background: #f1ebfa; color: #5b3a8c; }

/* The blue card opens the job (or today's jobs). */
.ov-today.is-openable { cursor: pointer; }
.ov-today.is-openable:focus-visible { outline: 3px solid #9db7ff; outline-offset: 3px; }
/* Today's job: slide to start or finish it, and how long the team has been there. */
.ov-today-clock { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; font-weight: 700; color: #fff; }
.ov-today-clock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .3); }
.ov-today-clock[hidden] { display: none; }
.ov-slide { position: relative; display: flex; align-items: center; justify-content: center; height: 56px; margin-top: 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.ov-slide.is-finish { background: #16a34a; border-color: #16a34a; }
.ov-slide-label { padding-left: 44px; font-size: 15px; font-weight: 800; color: #fff; opacity: calc(1 - var(--slide, 0) * 1.6); transition: opacity .2s; }
html body #portal .ov-slide > .ov-slide-knob.ov-slide-knob { position: absolute; left: 3px; top: 3px; width: 48px; height: 48px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #1d4ed8; display: grid; place-items: center; box-shadow: 0 2px 8px rgba(0, 0, 0, .18); cursor: grab; touch-action: none; transition: transform .25s ease; }
html body #portal .ov-slide.is-finish > .ov-slide-knob.ov-slide-knob { color: #16a34a; }
html body #portal .ov-slide.is-dragging > .ov-slide-knob.ov-slide-knob { transition: none; cursor: grabbing; }
.ov-slide.is-dragging .ov-slide-label { transition: none; }
.ov-slide.is-done .ov-slide-label { opacity: 0; }
.ov-slide-knob .workspace-icon svg { width: 22px; height: 22px; stroke-width: 2.2; }

/* Quote editor (Moloni draft) in the LBL design: cards, one-tap chips, equipment rows, totals bar. */
.qf{--qf-bg:#f4f6fa;--qf-card:#fff;--qf-line:#e6eaf1;--qf-field:#dfe5ee;--qf-ink:#1b2638;--qf-label:#44526a;--qf-muted:#5b6880;--qf-blue:#2c60e9;--qf-blue-ink:#2148c0;--qf-blue-soft:#edf2ff;--qf-open:#fbfcff;--qf-ok:#11753a;--qf-ok-soft:#e3f6ea;--qf-danger:#b42318;--qf-bar:#1b2638;
  display:flex;flex-direction:column;gap:16px;box-sizing:border-box;width:100%;max-width:1040px;margin:0;padding:0 0 12px;font-family:Manrope,system-ui,sans-serif;color:var(--qf-ink)}
:root[data-theme="dark"] .qf{--qf-bg:#0b1118;--qf-card:#141c25;--qf-line:#223040;--qf-field:#2a3a4d;--qf-ink:#eaf0f6;--qf-label:#b4c1d0;--qf-muted:#8e9daf;--qf-blue:#6f98ff;--qf-blue-ink:#a9c1ff;--qf-blue-soft:#1b2a4a;--qf-open:#17202b;--qf-ok:#7bd4a2;--qf-ok-soft:#163a28;--qf-danger:#f08080;--qf-bar:#0f1620}
@media (prefers-color-scheme:dark){:root:not([data-theme="light"]) .qf{--qf-bg:#0b1118;--qf-card:#141c25;--qf-line:#223040;--qf-field:#2a3a4d;--qf-ink:#eaf0f6;--qf-label:#b4c1d0;--qf-muted:#8e9daf;--qf-blue:#6f98ff;--qf-blue-ink:#a9c1ff;--qf-blue-soft:#1b2a4a;--qf-open:#17202b;--qf-ok:#7bd4a2;--qf-ok-soft:#163a28;--qf-danger:#f08080;--qf-bar:#0f1620}}
html body .qf .qf-card{display:flex;flex-direction:column;gap:14px;margin:0;padding:20px 22px;border:1px solid var(--qf-line);border-radius:18px;background:var(--qf-card);box-shadow:none}
html body .qf .qf-card-head{display:flex;align-items:center;gap:10px}
html body .qf .qf-card h2{margin:0;font-size:17px;font-weight:800;letter-spacing:0;color:var(--qf-ink)}
html body .qf .qf-count{font-size:13px;font-weight:600;color:var(--qf-muted)}
/* Head */
html body .qf .qf-head{padding:18px 22px}
.qf-head-row{display:flex;align-items:center;gap:12px}
.qf-title{flex:1 1 auto;display:flex;flex-direction:column;min-width:0}
.qf-title strong{font-size:22px;font-weight:800;line-height:1.2}
.qf-title span{font-size:12px;color:var(--qf-muted)}
.qf-saved{flex:none;padding:6px 12px;border-radius:999px;background:var(--qf-blue-soft);color:var(--qf-muted);font-size:12px;font-weight:700}
.qf-saved.is-saved{background:var(--qf-ok-soft);color:var(--qf-ok)}
.qf-saved.is-saved::before{content:"✓ "}
html body .qf .qf-round{flex:none;display:grid;place-items:center;width:40px;height:40px;min-height:40px;padding:0;border:1px solid var(--qf-line);border-radius:999px;background:var(--qf-card);color:var(--qf-ink);box-shadow:none}
html body .qf .qf-round.qf-danger{color:var(--qf-danger)}
.qf-states{display:flex;gap:8px}
html body .qf .qf-state{flex:1 1 0;height:40px;min-height:40px;padding:0 8px;border:1px solid var(--qf-field);border-radius:999px;background:var(--qf-card);color:var(--qf-label);font-size:13px;font-weight:700;box-shadow:none}
html body .qf .qf-state[aria-pressed="true"]{border-color:var(--qf-blue);background:var(--qf-blue);color:#fff}
/* Fields */
.qf-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 14px}
.qf-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.qf-wide,.qf-grid .is-wide{grid-column:1/-1}
html body .qf label{display:flex;flex-direction:column;gap:6px;margin:0;font-size:12px;font-weight:700;color:var(--qf-label);min-width:0}
html body .qf .qf-label{font-size:12px;font-weight:700;color:var(--qf-label)}
html body .qf input:not([type=checkbox]):not([type=radio]),html body .qf textarea{box-sizing:border-box;width:100%;height:46px;min-height:46px;padding:0 14px;border:1px solid var(--qf-field);border-radius:12px;background:var(--qf-card);color:var(--qf-ink);font:500 15px/1.3 Manrope,system-ui,sans-serif;box-shadow:none}
html body .qf textarea{height:auto;min-height:72px;padding:12px 14px;resize:vertical}
html body .qf input:focus,html body .qf textarea:focus{outline:none;border-color:var(--qf-blue);box-shadow:0 0 0 3px color-mix(in srgb,var(--qf-blue) 22%,transparent)}
.qf .mq-search-wrap{position:relative}
.qf .mq-muted{font-size:12px;font-weight:500;color:var(--qf-muted)}
/* Cliente */
.qf-customer-row{display:flex;align-items:flex-end;gap:12px}
.qf-customer-row>label{flex:1 1 auto}
.qf-customer{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px 14px;padding:14px 16px;border-radius:14px;background:var(--qf-blue-soft)}
.qf-customer[hidden]{display:none}
.qf-customer div{display:flex;flex-direction:column;gap:2px;min-width:0}
.qf-customer span{font-size:12px;font-weight:700;color:var(--qf-label)}
.qf-customer strong{font-size:15px;font-weight:700;overflow-wrap:anywhere}
.qf-customer .is-wide{grid-column:span 2}
html body .qf .qf-ghost{flex:none;height:46px;min-height:46px;padding:0 16px;border:1px solid var(--qf-field);border-radius:999px;background:var(--qf-card);color:var(--qf-blue);font-size:14px;font-weight:800;box-shadow:none}
.qf-more>summary{display:flex;align-items:center;gap:6px;width:max-content;font-size:13px;font-weight:700;color:var(--qf-blue);cursor:pointer;list-style:none}
.qf-more>summary::-webkit-details-marker{display:none}
.qf-more>summary::before{content:"";width:7px;height:7px;margin:0 3px 3px 2px;border-right:2.4px solid currentColor;border-bottom:2.4px solid currentColor;transform:rotate(45deg);transition:transform .15s}
.qf-more[open]>summary::before{transform:rotate(225deg);margin-bottom:-3px}
.qf-more[open]>summary{margin-bottom:12px}
@media (min-width:761px){.qf-contact>summary{display:none}.qf-contact[open]>summary{margin:0}}
/* Chips */
.qf-chip-field{display:flex;flex-direction:column;gap:8px}
.qf-chips{display:flex;flex-wrap:wrap;gap:6px}
html body .qf .qf-chip{flex:none;height:40px;min-height:40px;padding:0 14px;border:1px solid var(--qf-field);border-radius:999px;background:var(--qf-card);color:var(--qf-label);font-size:13px;font-weight:700;white-space:nowrap;box-shadow:none}
html body .qf .qf-chip[aria-pressed="true"]{border:1.5px solid var(--qf-blue);background:var(--qf-blue-soft);color:var(--qf-blue-ink)}
.qf-btu-other{max-width:220px}
.qf-btu-other[hidden],.qf-exempt[hidden]{display:none}
/* Equipamentos */
.qf-eqs{display:flex;flex-direction:column;gap:12px}
html body .qf .qf-eq-row{display:flex;align-items:center;gap:14px;width:100%;min-height:64px;padding:14px 16px;border:1px solid var(--qf-line);border-radius:14px;background:var(--qf-card);color:var(--qf-ink);text-align:left;box-shadow:none}
.qf-eq-row>svg{flex:none;color:var(--qf-muted)}
.qf-eq-pair{display:flex;align-items:center;gap:8px}.qf-eq-pair>.qf-eq-row{flex:1;min-width:0}
.qf-idx{display:grid;place-items:center;flex:none;width:32px;height:32px;border-radius:10px;background:var(--qf-blue-soft);color:var(--qf-blue);font-size:13px;font-weight:800}
.qf-idx.is-open{background:var(--qf-blue);color:#fff}
.qf-eq-text{flex:1 1 auto;display:flex;flex-direction:column;min-width:0}
.qf-eq-text strong,.qf-eq-amount strong{font-size:15px;font-weight:800}
.qf-eq-text strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qf-eq-text small,.qf-eq-amount small{font-size:12px;font-weight:500;color:var(--qf-muted)}
.qf-eq-amount{flex:none;display:flex;flex-direction:column;align-items:flex-end;white-space:nowrap;font-variant-numeric:tabular-nums}
.qf-eq{display:flex;flex-direction:column;gap:16px;padding:16px;border:1.5px solid var(--qf-blue);border-radius:14px;background:var(--qf-open)}
.qf-eq-head{display:flex;align-items:center;gap:12px}
/* Arrastar para mudar a ordem (moloni-ui.js sortable) */
.qf-sort{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}
.qf-eq-head.qf-sort{cursor:grab}
.qf-eqs>.is-lifted{position:relative;z-index:5;transition:none}
html body .qf .qf-eqs>.is-lifted.qf-eq-row,html body .qf .qf-eqs>.is-lifted>.qf-eq-row,.qf-eqs>.qf-eq.is-lifted{box-shadow:0 14px 32px #0f172a33;border-color:var(--qf-blue)}
.qf-eqs.is-sorting,.qf-eqs.is-sorting *{cursor:grabbing!important}
.qf-eq-title{flex:1 1 auto;min-width:0;font-size:15px;font-weight:800;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.qf-eq-total{flex:none;font-size:15px;font-weight:800;white-space:nowrap;font-variant-numeric:tabular-nums}
.qf-money{align-items:end}
.qf-stepper{display:flex;align-items:center;height:46px;border:1px solid var(--qf-field);border-radius:12px;background:var(--qf-card);overflow:hidden}
html body .qf .qf-step{flex:none;width:46px;height:46px;min-height:46px;padding:0;border:0;border-radius:0;background:var(--qf-bg);color:var(--qf-ink);font-size:20px;font-weight:700;box-shadow:none}
html body .qf .qf-stepper input{flex:1 1 auto;min-width:0;height:44px;min-height:44px;padding:0 4px;border:0;border-radius:0;text-align:center;font-size:16px;font-weight:800;box-shadow:none;-moz-appearance:textfield}
.qf-stepper input::-webkit-inner-spin-button,.qf-stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.qf-qty{display:flex;flex-direction:column;gap:6px}
.qf-line-total{display:flex;flex-direction:column;align-items:flex-end;gap:2px;padding-bottom:6px}
.qf-line-total span{font-size:12px;color:var(--qf-muted)}
.qf-line-total strong{font-size:20px;font-weight:800;font-variant-numeric:tabular-nums}
.qf .mq-tax-list{display:flex;flex-direction:column;gap:8px}
.qf .mq-tax-row{display:flex;align-items:flex-end;gap:8px}
.qf .mq-tax-row>label{flex:1 1 auto}
html body .qf .qf-add{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;height:52px;min-height:52px;border:1.5px dashed #b8c6e6;border-radius:14px;background:var(--qf-blue-soft);color:var(--qf-blue);font-size:14px;font-weight:800;box-shadow:none}
/* Condições */
.qf-iva .qf-chips{flex-wrap:nowrap}
.qf-conditions{align-items:end}
.qf-document{padding-top:4px}
/* Bottom bar: the totals and Concluir, always in view */
.qf-bar{position:sticky;bottom:12px;z-index:5;display:flex;align-items:center;gap:24px;margin:4px 0 0;padding:14px 16px 14px 24px;border-radius:18px;background:#1b2638;color:#fff;box-shadow:0 12px 30px rgba(19,34,57,.25);font-family:Manrope,system-ui,sans-serif}
.qf-bar>span{display:flex;flex-direction:column;font-size:12px;color:#c4cede}
.qf-bar>span>strong{font-size:15px;color:#fff;font-variant-numeric:tabular-nums}
.qf-bar .qf-bar-total{flex:1 1 auto;align-items:flex-end}
.qf-bar .qf-bar-total strong{font-size:24px;font-weight:800}
html body .qf-bar .qf-bar-save{height:48px;min-height:48px;padding:0 16px;border:1px solid rgba(255,255,255,.25);border-radius:999px;background:transparent;color:#fff;font-size:14px;font-weight:700;box-shadow:none}
html body .qf-bar .qf-bar-done{height:48px;min-height:48px;padding:0 24px;border:0;border-radius:999px;background:#2c60e9;color:#fff;font-size:15px;font-weight:800;box-shadow:none}
@media (max-width:1100px) and (min-width:761px){.qf-bar .qf-bar-tax{display:none}}
/* Phone */
@media (max-width:760px){
  .qf{gap:12px}
  html body .qf .qf-card{padding:16px;border:0}
  html body .qf .qf-head{padding:14px 16px}
  .qf-title strong{font-size:19px}
  .qf-states{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;padding:4px;border-radius:999px;background:var(--qf-bg)}
  html body .qf .qf-state{height:36px;min-height:36px;padding:0 2px;border:0;background:transparent;color:var(--qf-muted);font-size:12px}
  html body .qf .qf-state[aria-pressed="true"]{background:var(--qf-card);color:var(--qf-blue-ink);box-shadow:0 1px 3px rgba(19,34,57,.12)}
  .qf-grid,.qf-grid-3{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .qf-customer{grid-template-columns:repeat(2,minmax(0,1fr))}
  .qf-customer-row{flex-wrap:wrap}.qf-customer-row>label{flex-basis:100%}
  html body .qf input:not([type=checkbox]):not([type=radio]),html body .qf textarea{font-size:16px;padding:0 12px}
  .qf-chips{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px;scrollbar-width:none}
  .qf-chips::-webkit-scrollbar{display:none}
  html body .qf .qf-eq-row{gap:12px;padding:12px}
  .qf-eq-row>svg,.qf-eq-amount small{display:none}
  .qf-eq{padding:14px 12px;gap:14px}
  .qf-eq-head{gap:8px}.qf-eq-head .qf-eq-total{display:none}
  .qf-money .qf-line-total{grid-column:1/-1;flex-direction:row;justify-content:space-between;align-items:baseline;padding:0}
  .qf-conditions .qf-iva{grid-column:1/-1}
  .qf-bar{bottom:calc(8px + env(safe-area-inset-bottom));gap:12px;padding:12px 12px 12px 18px}
  .qf-bar .qf-bar-net,.qf-bar .qf-bar-tax,html body .qf-bar .qf-bar-save{display:none}
  .qf-bar .qf-bar-total{align-items:flex-start;font-size:11px}
  .qf-bar .qf-bar-total strong{font-size:21px}
  html body .qf-bar .qf-bar-done{height:46px;min-height:46px;padding:0 20px}
}

/* Assistente de orçamentos dentro do cartão Equipamentos (quote-assist.js); usa as cores do formulário (.qf). */
html body .qf .qa-box{border:1px solid var(--qf-blue);border-radius:14px;background:var(--qf-blue-soft);padding:0}
html body .qf .qa-box>summary{padding:14px 16px;font-size:14px;font-weight:800;color:var(--qf-blue-ink);cursor:pointer;list-style-position:inside}
html body .qf .qa-inner{display:flex;flex-direction:column;gap:12px;padding:0 16px 16px}
html body .qf .qa-help{margin:0;font-size:13px;color:var(--qf-muted)}
html body .qf .qa-inner textarea{height:auto;min-height:110px;padding:12px 14px;line-height:1.45;resize:vertical}
html body .qf .qa-go,html body .qf .qa-add{align-self:flex-start;min-height:44px;padding:0 20px;border:0;border-radius:999px;background:var(--qf-blue);color:#fff;font-weight:800;font-size:14px;cursor:pointer}
html body .qf .qa-go:disabled,html body .qf .qa-add:disabled{opacity:.55;cursor:default}
html body .qf .qa-status{margin:0;font-size:13px;font-weight:600;color:var(--qf-label)}
html body .qf .qa-status:empty{display:none}
.qa-results{display:flex;flex-direction:column;gap:10px}
.qa-results:empty{display:none}
.qa-lines{list-style:none;margin:0;padding:0;border:1px solid var(--qf-line);border-radius:12px;background:var(--qf-card);overflow:hidden}
.qa-lines li+li{border-top:1px solid var(--qf-line)}
html body .qf .qa-lines label{flex-direction:row;align-items:center;gap:12px;padding:12px 14px;cursor:pointer;color:var(--qf-ink)}
.qa-lines input{flex:none;width:18px;height:18px;accent-color:var(--qf-blue)}
.qa-line-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.qa-line-text strong{font-size:14px;font-weight:700}
.qa-line-text small,.qa-line-amount small{font-size:12px;font-weight:500;color:var(--qf-muted)}
.qa-line-amount{flex:none;display:flex;flex-direction:column;align-items:flex-end;gap:2px;text-align:right}
.qa-line-amount strong{font-size:14px}
.qa-warn{margin:0;padding:10px 14px 10px 30px;border-radius:12px;background:#fff6e0;color:#6b4b00;font-size:13px;line-height:1.4}
:root[data-theme="dark"] .qa-warn{background:#3a2e10;color:#f3d48a}
.qa-total{margin:0;font-size:13px;font-weight:700;color:var(--qf-label)}
.qa-done{margin:0;padding:10px 14px;border-radius:12px;background:var(--qf-ok-soft);color:var(--qf-ok);font-size:13px;font-weight:700}
@media (max-width:560px){html body .qf .qa-go,html body .qf .qa-add{align-self:stretch}}
.qa-actions{display:flex;flex-wrap:wrap;gap:10px}
html body .qf .qa-mic{min-height:44px;padding:0 20px;border:1px solid var(--qf-blue);border-radius:999px;background:var(--qf-card);color:var(--qf-blue-ink);font-weight:800;font-size:14px;cursor:pointer}
html body .qf .qa-mic::before{content:"";display:inline-block;width:10px;height:10px;margin-right:8px;border-radius:50%;background:var(--qf-blue);vertical-align:0}
html body .qf .qa-mic.is-on{border-color:#c62828;background:#fdecec;color:#a11c1c}
html body .qf .qa-mic.is-on::before{background:#c62828;animation:qa-pulse 1s ease-in-out infinite}
@keyframes qa-pulse{50%{opacity:.3}}
@media (max-width:560px){.qa-actions>button{flex:1}}
@media (prefers-reduced-motion:reduce){html body .qf .qa-mic.is-on::before{animation:none}}

/* Motion layer: short enter animations for pages, popups and panels, press feedback, and
   horizontal strips without a visible scrollbar (swipe on touch, drag with the mouse; motion.js). */
@keyframes lbl-page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lbl-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes lbl-pop-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes lbl-sheet-in { from { opacity: .4; transform: translateY(48px); } to { opacity: 1; transform: none; } }
@keyframes lbl-slide-left { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }

/* A page that was just opened: its blocks rise in one after the other. */
body.lbl-page-enter #portal-content > *,
body.lbl-page-enter .main > .quotes-workspace { animation: lbl-page-in .26s cubic-bezier(.2, .8, .2, 1) both; }
/* The header only fades: a moving header would carry the fixed round + (phone) with it until the animation ends. */
body.lbl-page-enter #portal-content > .portal-head { animation-name: lbl-fade-in; }
body.lbl-page-enter #portal-content > :nth-child(2) { animation-delay: .03s; }
body.lbl-page-enter #portal-content > :nth-child(3) { animation-delay: .06s; }
body.lbl-page-enter #portal-content > :nth-child(n+4) { animation-delay: .09s; }

/* Popups: a soft pop on the computer, a sheet that slides up on the phone. */
#portal-popup[open] { animation: lbl-pop-in .22s cubic-bezier(.2, .8, .2, 1); }
#portal-popup[open]::backdrop { animation: lbl-fade-in .2s ease; }
#portal-popup.popup-docked[open] { animation: lbl-slide-left .24s cubic-bezier(.2, .8, .2, 1); }
@media screen and (max-width: 760px), screen and (pointer:coarse) and (max-height:540px) {
  #portal-popup[open] { animation: lbl-sheet-in .28s cubic-bezier(.2, .8, .2, 1); }
  /* Opening a quote on the phone slides it in from the side, like a new page. */
  body.view-editor .panel-editor > :is(.detail, .editor):not([hidden]) { animation: lbl-slide-left .26s cubic-bezier(.2, .8, .2, 1); }
}
/* Computer: the quote opened in the right-hand column fades in. */
@media (min-width: 1200px) {
  body.view-editor .panel-editor > .detail:not([hidden]) { animation: lbl-fade-in .2s ease; }
}

/* Press feedback on buttons and rows. */
@media (hover: none) {
  .btn, .row, .quote-chip, .workspace-bottom-item, .native-menu-row, .mq-doc-row, .icon-only { transition: transform .12s ease, background-color .15s ease; }
  .btn:active:not(:disabled), .row:active, .quote-chip:active, .workspace-bottom-item:active, .native-menu-row:active, .icon-only:active { transform: scale(.97); }
}
.quote-chip, .mq-state, .seg button, .quote-pick { transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease; }

/* Horizontal strips: no scrollbar, swipe or drag them instead. */
.lbl-drag-scroll { scrollbar-width: none; -ms-overflow-style: none; overscroll-behavior-x: contain; }
.lbl-drag-scroll::-webkit-scrollbar { display: none; }
.lbl-drag-scroll.lbl-dragging { cursor: grabbing; user-select: none; scroll-behavior: auto; }
.lbl-drag-scroll.lbl-dragging * { pointer-events: none; }

/* Reduced motion, and automated browsers (motion.js), which measure layout right after it changes. */
@media (prefers-reduced-motion: reduce) {
  body.lbl-page-enter #portal-content > *, body.lbl-page-enter .main > .quotes-workspace,
  #portal-popup[open], #portal-popup[open]::backdrop, body.view-editor .panel-editor > *, .btn, .row { animation: none !important; transition: none !important; }
}
html.lbl-no-motion body.lbl-page-enter #portal-content > *, html.lbl-no-motion body.lbl-page-enter .main > .quotes-workspace,
html.lbl-no-motion #portal-popup[open], html.lbl-no-motion #portal-popup[open]::backdrop, html.lbl-no-motion body.view-editor .panel-editor > * { animation: none !important; }

/* Clean look on the computer, after the calendar mock-up the user picked on 2026-10-26:
   pages use the whole screen, secondary buttons are flat text (no grey pill), icon buttons
   have no circle, filters are a flat row where the chosen one is solid blue, and spacing is
   a little tighter. The main action keeps its blue pill. The phone is unchanged. Loaded last. */
@media (min-width:761px) and (min-height:541px), (min-width:761px) and (pointer:fine), (min-width:761px) and (pointer:none) {
  body.workspace-layout { --flat-hover: color-mix(in srgb, var(--ink) 6%, transparent); --flat-ink: color-mix(in srgb, var(--ink) 78%, var(--muted)); }

  /* Whole width, with the top bar lined up on the same 32px edges as the page. */
  html body.workspace-layout #workspace-sidebar { left: 0; padding-left: 32px; max-width: calc(100% - 150px); }
  html body.workspace-layout .topbar { padding-right: 32px; }
  html body.workspace-layout #portal { max-width: none; padding: 24px 32px 40px; }
  html body.workspace-layout #portal > .portal-head { margin-bottom: 16px; }

  /* Secondary text buttons and the ‹ › arrows: flat, dark text, a light square-ish hover. */
  html body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .quote-share, #lbl-updates) .btn:not(.btn-primary):not(.btn-danger-solid):not(.btn-wa):not(.icon-only):not(.btn-icon):not(.ui-action-icon):not(.native-icon-button):not([aria-pressed="true"]):not([aria-selected="true"]):not(#_a):not(#_b),
  html body.workspace-layout .lbl-notification-dialog .btn:not(.btn-primary):not(.lbl-notification-header > .btn):not(#_a):not(#_b) {
    background: transparent !important;
    color: var(--flat-ink) !important;
    border-radius: 8px !important;
    padding-inline: 12px !important;
  }
  html body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor, .quote-share, #lbl-updates) .btn:not(.btn-primary):not(.btn-danger-solid):not(.btn-wa):not(.icon-only):not(.btn-icon):not(.ui-action-icon):not(.native-icon-button):not([aria-pressed="true"]):not([aria-selected="true"]):not(#_a):not(#_b):hover:not(:disabled),
  html body.workspace-layout .lbl-notification-dialog .btn:not(.btn-primary):not(.lbl-notification-header > .btn):not(#_a):not(#_b):hover {
    background: var(--flat-hover) !important;
    color: var(--ink) !important;
  }
  /* One shape for every button: a rectangle with rounded corners, the main blue one and the icon buttons included. */
  html body.workspace-layout :is(.btn, a.btn, .btn-icon, .ui-action-icon, .native-icon-button, .team-action, .lbl-date-secondary, .lbl-date-arrow, .lbl-date-close, .ov-new-job):not(#_a):not(#_b):not(#_c):not(#_d) { border-radius: 10px !important; }

  /* The "Escolher ficheiro" part of file inputs gets the same outlined button. */
  html body.workspace-layout input[type=file]::file-selector-button { margin-right: 10px; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
  html body.workspace-layout input[type=file]::file-selector-button:hover { background: var(--flat-hover); }

  /* Inside cards and windows a thin outline keeps them recognisable as buttons; page headers and the ‹ › arrows stay bare. */
  html body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor) .btn:not(.btn-primary):not(.btn-danger-solid):not(.btn-wa):not(.icon-only):not(.btn-icon):not(.ui-action-icon):not(.native-icon-button):not([aria-pressed="true"]):not([aria-selected="true"]):not([aria-label*="anterior"]):not([aria-label*="seguinte"]):not(.portal-head *):not(.lbl-calendar-toolbar *):not(#_a):not(#_b) {
    box-shadow: inset 0 0 0 1px var(--line) !important;
  }
  html body.workspace-layout :is(#portal, #portal-popup, .main, .editor, #editor) .btn.btn-danger:not(.btn-danger-solid):not(#_a):not(#_b) { color: var(--danger, #c63b3b) !important; }
  html body.workspace-layout :is(#portal, #portal-popup, .main) .btn:is([aria-pressed="true"], [aria-selected="true"]):not(.btn-primary):not(#_a):not(#_b) { border-radius: 8px !important; }

  /* Icon buttons (download, print, edit...): no circle and no outline, just the icon. */
  html body.workspace-layout :is(#portal, #portal-popup, dialog.native-sheet) :is(.btn, a.btn).icon-only.icon-only:not(.btn-primary):not(#_a):not(#_b):not(#_c) {
    width: 40px !important; min-width: 40px !important; height: 40px; min-height: 40px !important;
    border: 0 !important; border-radius: 10px !important; background: transparent !important; color: var(--flat-ink) !important;
  }
  html body.workspace-layout :is(#portal, #portal-popup, dialog.native-sheet) :is(.btn, a.btn).icon-only.icon-only:not(.btn-primary):not(#_a):not(#_b):not(#_c):hover { background: var(--flat-hover) !important; color: var(--ink) !important; }
  html body.workspace-layout :is(#portal, #portal-popup, dialog.native-sheet) :is(.btn, a.btn).icon-only.portal-delete:not(#_a):not(#_b):not(#_c) { color: #c62f3d !important; }
  /* On the blue job card they keep a light background so they stand out; rounded rectangles like every computer button. */
  html body.workspace-layout #portal .ov-today-actions :is(.btn, a.btn).icon-only.icon-only:not(.btn-primary):not(#_a):not(#_b):not(#_c):not(#_d) { border-radius: 10px !important; background: rgba(255, 255, 255, .18) !important; color: #fff !important; }
  html body.workspace-layout #portal .ov-today-actions :is(.btn, a.btn).icon-only.icon-only:not(.btn-primary):not(#_a):not(#_b):not(#_c):not(#_d):hover { background: rgba(255, 255, 255, .3) !important; color: #fff !important; }
  html body.workspace-layout :is(#portal, #portal-popup, dialog.native-sheet) .icon-only .workspace-icon svg { width: 19px !important; height: 19px !important; }

  /* Team card actions and the quote list tools. */
  html body.workspace-layout .team-action, html body.workspace-layout .team-split .is-selected .team-action { border: 0; border-radius: 10px; background: transparent; }
  html body.workspace-layout .team-action:hover, html body.workspace-layout .team-split .is-selected .team-action:hover { background: var(--flat-hover); }

  /* Pages that kept their own narrower width: Férias and the person open in Equipa. */
  html body.workspace-layout #portal:has(.holidays-layout) { max-width: none; }
  html body.workspace-layout .team-split > :not(.team-roster) { max-width: none; justify-self: stretch; padding: 24px 32px 40px; }
  html body.workspace-layout .quotes-workspace .quotes-toolbar .btn.quotes-tool.quotes-tool:not(#_a) { min-height: 42px !important; padding: 0 10px !important; border: 0 !important; border-radius: 10px !important; background: transparent !important; color: var(--flat-ink) !important; }
  html body.workspace-layout .quotes-workspace .quotes-toolbar .btn.quotes-tool.quotes-tool:not(#_a):hover { background: var(--flat-hover) !important; color: var(--ink) !important; }

  /* Filters (quotes, reports, services): a flat row, the chosen one solid blue like the calendar months. */
  html body.workspace-layout :is(.quotes-workspace .quote-chips .quote-chip, .report-filter, .portal .service-prices-kind) {
    height: 32px; min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600;
  }
  html body.workspace-layout :is(.quotes-workspace .quote-chips .quote-chip, .report-filter, .portal .service-prices-kind):hover { background: var(--flat-hover); color: var(--ink); }
  html body.workspace-layout :is(.quotes-workspace .quote-chips .quote-chip, .report-filter, .portal .service-prices-kind)[aria-pressed=true] { border: 0; background: var(--accent); color: #fff; }
  html body.workspace-layout .quotes-workspace .quote-chips { gap: 2px; flex-wrap: wrap; }
  html body.workspace-layout .report-filters, html body.workspace-layout .service-prices-kinds { gap: 2px; }

  /* Employee week: light outlined days; the weekday small above a big number on the left, the jobs beside it as plain lines with a blue dot. */
  html body.workspace-layout .ov-my-week .ov-week { gap: 6px; }
  html body.workspace-layout .ov-my-week .ov-week > button { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 14px; align-items: start; align-content: center; text-align: left; min-height: 72px; padding: 10px 12px; background: transparent; box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; }
  html body.workspace-layout .ov-my-week .ov-week > button:hover { background: var(--flat-hover); }
  html body.workspace-layout .ov-my-week .ov-week > button > span:first-child { grid-column: 1; grid-row: 1; align-self: end; font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--muted); opacity: 1; }
  html body.workspace-layout .ov-my-week .ov-week > button > strong { grid-column: 1; grid-row: 2; font-size: 22px; font-weight: 700; line-height: 1.2; }
  html body.workspace-layout .ov-my-week .ov-week > button.is-today > strong { color: #2c60e9; }
  html body.workspace-layout .ov-my-week .ov-week > button[aria-pressed=true] { background: color-mix(in srgb, #2c60e9 7%, transparent); box-shadow: inset 0 0 0 1.5px #2c60e9; }
  html body.workspace-layout .ov-my-week .ov-week-jobs { grid-column: 2; grid-row: 1 / 3; align-self: center; min-width: 0; margin: 0; gap: 3px; }
  html body.workspace-layout .ov-my-week .ov-week-jobs small { display: block; padding: 0 0 0 12px; border: 0; border-radius: 0; background: transparent; color: var(--ink); font-size: 12px; font-weight: 500; position: relative; }
  html body.workspace-layout .ov-my-week .ov-week-jobs small::before { content: ""; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #2c60e9; }
  html body.workspace-layout .ov-my-week .ov-week-jobs small.is-free { padding: 0; color: var(--muted); }
  html body.workspace-layout .ov-my-week .ov-week-jobs small:is(.is-free, .is-more)::before { content: none; }
  html body.workspace-layout .ov-my-week .ov-week-jobs small.is-more { padding-left: 12px; color: var(--muted); }
  :root[data-theme=dark] body.workspace-layout .ov-my-week .ov-week > button.is-today > strong { color: #93b2ff; }
  :root[data-theme=dark] body.workspace-layout .ov-my-week .ov-week-jobs small:not(.is-free)::before { background: #93b2ff; }
  :root[data-theme=dark] body.workspace-layout .ov-my-week .ov-week > button[aria-pressed=true] { background: color-mix(in srgb, #93b2ff 12%, transparent); box-shadow: inset 0 0 0 1.5px #93b2ff; }
}
/* Computer with the quote list beside the quote: the × only went back to that list, which is already on the left, so it goes. */
@media (min-width:1200px) and (pointer:fine), (min-width:1200px) and (pointer:none) {
  html body.workspace-layout:not(.portal-active) #detail .btn.quote-close.quote-close { display: none !important; }
}
/* Definições on the computer: the menu on the left of the window, the chosen screen on the right (portal.js settings()). */
@media (min-width:761px) and (min-height:541px), (min-width:761px) and (pointer:fine), (min-width:761px) and (pointer:none) {
  html body.workspace-layout #portal-popup.has-settings-menu[open] { display: grid; grid-template-columns: 270px minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-content: start; min-height: min(760px, 90vh); }
  html body.workspace-layout #portal-popup.has-settings-menu > .portal-popup-bar { grid-column: 1 / -1; }
  html body.workspace-layout #portal-popup.has-settings-menu > :not(.portal-popup-bar):not(.app-settings-menu) { grid-column: 2; min-width: 0; }
  html body.workspace-layout #portal-popup.has-settings-menu > .portal-popup-content { padding-left: 32px; }
  #portal-popup .app-settings-menu { grid-column: 1; grid-row: 2 / 4; position: sticky; top: 0; align-self: stretch; display: flex; flex-direction: column; gap: 2px; padding: 20px 16px 20px 20px; border-right: 1px solid var(--line); box-sizing: border-box; }
  #portal-popup .app-settings-menu > h2 { margin: 0 10px 10px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
  #portal-popup .app-settings-menu > .app-settings-group { margin: 14px 10px 4px; }
  #portal-popup .app-settings-menu > .app-settings-list { display: flex; flex-direction: column; gap: 2px; border: 0; border-radius: 0; background: transparent; overflow: visible; }
  #portal-popup .app-settings-menu > .app-settings-list:last-child { margin-top: auto; padding-top: 14px; }
  html body.workspace-layout #portal-popup .app-settings-item.app-settings-item:not(#_a):not(#_b):not(#_c):not(#_d) { display: flex; align-items: center; gap: 12px; width: 100%; height: 40px; min-height: 40px !important; padding: 0 10px !important; border: 0 !important; border-radius: 10px !important; background: transparent !important; box-shadow: none !important; color: var(--ink) !important; font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; }
  html body.workspace-layout #portal-popup .app-settings-item.app-settings-item:not(#_a):not(#_b):not(#_c):not(#_d):hover { background: var(--flat-hover) !important; }
  html body.workspace-layout #portal-popup .app-settings-item.app-settings-item[aria-current=page]:not(#_a):not(#_b):not(#_c):not(#_d) { background: var(--accent) !important; color: #fff !important; }
  html body.workspace-layout #portal-popup .app-settings-item.app-settings-logout:not(#_a):not(#_b):not(#_c):not(#_d) { color: var(--danger, #c63b3b) !important; }
  #portal-popup .app-settings-item > .workspace-icon { width: 18px; height: 18px; flex: none; color: var(--muted); }
  #portal-popup .app-settings-item[aria-current=page] > .workspace-icon, #portal-popup .app-settings-logout > .workspace-icon { color: inherit; }
  #portal-popup .app-settings-item > .app-settings-toggle { margin-left: auto; }
  #portal-popup .app-settings-item[aria-checked=true] > .app-settings-toggle { background: var(--accent); }
  #portal-popup .app-settings-item[aria-checked=true] > .app-settings-toggle::after { left: 19px; background: var(--accent-ink, #fff); }
}
@media (min-width:761px) and (min-height:541px), (min-width:761px) and (pointer:fine), (min-width:761px) and (pointer:none) {
  html body.workspace-layout #portal-popup .app-settings-item.app-settings-me:not(#_a):not(#_b):not(#_c):not(#_d) { height: 60px; min-height: 60px !important; margin-bottom: 4px; }
  #portal-popup .app-settings-me > .workspace-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 999px; overflow: hidden; background: #e6ecfb; color: #2148c0; font-size: 15px; font-weight: 800; }
  #portal-popup .app-settings-me > .workspace-avatar img { width: 100%; height: 100%; object-fit: cover; }
  #portal-popup .app-settings-me > span:last-child { display: grid; gap: 1px; min-width: 0; }
  #portal-popup .app-settings-me strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #portal-popup .app-settings-me small { font-size: 12px; font-weight: 500; opacity: .75; }
  html body.workspace-layout #portal-popup .app-settings-item.app-settings-item[aria-current=page]:not(#_a):not(#_b):not(#_c):not(#_d) { color: var(--accent-ink, #fff) !important; }
}
/* Quote editor on the computer (2026-10-27): beside the list when there is room (portal.js mountMoloni docks it),
   otherwise a sheet on the right, full height, with the × beside the title. The other forms keep their window. */
@media (min-width:761px) and (min-height:541px), (min-width:761px) and (pointer:fine), (min-width:761px) and (pointer:none) {
  html body.workspace-layout #portal-popup:not(.popup-docked):not(.has-settings-menu):has(form.qf) {
    position: fixed; inset: 0 0 0 auto; width: min(780px, calc(100vw - 120px)); max-width: none; height: 100dvh; max-height: none; margin: 0;
    border: 0; border-left: 1px solid var(--line); border-radius: 0; background: var(--surface); box-shadow: -24px 0 70px rgba(13, 22, 40, .18);
    animation: lbl-slide-left .24s cubic-bezier(.2, .8, .2, 1);
  }
  html body.workspace-layout #portal-popup:not(.has-settings-menu):has(form.qf) > .portal-popup-bar {
    position: sticky; top: 0; height: 0; padding: 0; border: 0; background: transparent; overflow: visible; z-index: 6;
  }
  html body.workspace-layout #portal-popup:not(.has-settings-menu):has(form.qf) > .portal-popup-bar > .btn { position: absolute; top: 18px; right: 22px; }

  /* Quote editor: sections instead of cards, a flat state bar, square-ish buttons and a light footer with the totals. */
  html body.workspace-layout #portal-popup:has(form.qf) { background: var(--surface); }
  html body.workspace-layout #portal-popup:has(form.qf) > .portal-popup-content { padding: 22px 32px 0 !important; }
  html body.workspace-layout .qf { gap: 0; max-width: 900px; padding: 0; }
  html body.workspace-layout .qf .qf-card { gap: 14px; padding: 24px 0; border: 0; border-top: 1px solid var(--qf-line); border-radius: 0; background: transparent; }
  html body.workspace-layout .qf .qf-card.qf-head { padding: 0 0 22px; border-top: 0; }
  html body.workspace-layout #portal-popup:not(.popup-docked) .qf .qf-head-row { padding-right: 56px; }
  html body.workspace-layout .qf .qf-card h2 { font-size: 16px; }
  html body.workspace-layout .qf .qf-title strong { font-size: 24px; letter-spacing: -.02em; }
  html body.workspace-layout .qf .qf-round { width: 36px; height: 36px; min-height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--qf-muted); }
  html body.workspace-layout .qf .qf-round:hover { background: var(--flat-hover); color: var(--qf-ink); }
  html body.workspace-layout .qf .qf-round.qf-danger { color: var(--qf-danger); }
  html body.workspace-layout .qf .qf-saved { border-radius: 8px; }
  html body.workspace-layout .qf .qf-states { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--qf-line); }
  html body.workspace-layout .qf .qf-state { flex: none; height: 34px; min-height: 34px; padding: 0 18px; border: 0; border-radius: 8px; background: transparent; color: var(--qf-muted); }
  html body.workspace-layout .qf .qf-state:hover { background: var(--flat-hover); color: var(--qf-ink); }
  html body.workspace-layout .qf .qf-state[aria-pressed="true"] { background: var(--qf-blue); color: #fff; }
  html body.workspace-layout .qf input:not([type=checkbox]):not([type=radio]), html body.workspace-layout .qf textarea { height: 42px; min-height: 42px; border-radius: 10px; font-size: 14px; }
  html body.workspace-layout .qf textarea { height: auto; min-height: 72px; }
  html body.workspace-layout .qf .qf-ghost { height: 42px; min-height: 42px; border: 0; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px var(--qf-field); }
  html body.workspace-layout .qf .qf-ghost:hover { background: var(--qf-blue-soft); }
  /* Criar cliente stays level with the search box, also while "A carregar…" shows under it. */
  html body.workspace-layout .qf .qf-customer-row { align-items: flex-start; }
  html body.workspace-layout .qf .qf-customer-row > .qf-ghost { margin-top: 24px; }
  html body.workspace-layout .qf .qf-chip { height: 34px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; box-shadow: inset 0 0 0 1px var(--qf-field); color: var(--qf-label); }
  html body.workspace-layout .qf .qf-chip:hover { background: var(--flat-hover); }
  html body.workspace-layout .qf .qf-chip[aria-pressed="true"] { border: 0; background: var(--qf-blue); box-shadow: none; color: #fff; }
  html body.workspace-layout .qf .qf-customer { border-radius: 10px; }
  html body.workspace-layout .qf .qf-eq-row { min-height: 60px; padding: 12px 14px; border-radius: 10px; }
  html body.workspace-layout .qf .qf-eq-row:hover { background: var(--flat-hover); }
  html body.workspace-layout .qf .qf-eq { border-width: 1px; border-radius: 10px; }
  html body.workspace-layout .qf .qf-idx { border-radius: 8px; }
  html body.workspace-layout .qf .qf-stepper { height: 42px; border-radius: 10px; }
  html body.workspace-layout .qf .qf-step { width: 42px; height: 42px; min-height: 42px; background: transparent; }
  html body.workspace-layout .qf .qf-stepper input { height: 40px; min-height: 40px; }
  html body.workspace-layout .qf .qf-add { justify-content: flex-start; width: auto; align-self: flex-start; height: 40px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px var(--qf-field); color: var(--qf-blue); }
  html body.workspace-layout .qf .qf-add:hover { background: var(--qf-blue-soft); }
  html body.workspace-layout .qf .qa-box { border: 1px dashed var(--qf-field); border-radius: 10px; background: transparent; }
  html body.workspace-layout .qf .qa-box > summary { padding: 12px 14px; font-size: 13px; color: var(--qf-blue); }
  html body.workspace-layout .qf :is(.qa-go, .qa-add) { min-height: 40px; border-radius: 10px; }
  /* "Novo cliente Moloni" inside the quote: a section under the search, not a box inside the box. */
  html body.workspace-layout .qf .mq-panel { margin: 4px 0 0; padding: 18px 0 0; border: 0; border-top: 1px dashed var(--qf-line); border-radius: 0; background: transparent; }
  html body.workspace-layout .qf .mq-panel > h3 { margin: 0 0 14px; font-size: 15px; font-weight: 800; }
  html body.workspace-layout .qf .mq-panel .portal-actions { margin-top: 18px; padding-top: 0; border-top: 0; }
  /* Totals: a light footer pinned to the bottom of the sheet, so it never sits on top of the fields. */
  html body.workspace-layout .qf .qf-bar {
    bottom: 0; z-index: 4; gap: 28px; margin: 0 -32px; padding: 14px 32px; border-radius: 0; border-top: 1px solid var(--qf-line);
    background: var(--surface); color: var(--qf-ink); box-shadow: none;
  }
  html body.workspace-layout #portal-popup.popup-docked .qf .qf-bar { margin: 0; padding-inline: 4px; }
  html body.workspace-layout .qf .qf-bar > span { color: var(--qf-muted); }
  html body.workspace-layout .qf .qf-bar > span > strong { color: var(--qf-ink); }
  html body.workspace-layout .qf .qf-bar .qf-bar-total strong { font-size: 22px; }
  html body.workspace-layout .qf .qf-bar .qf-bar-save { height: 42px; min-height: 42px; border: 0; border-radius: 10px; background: transparent; box-shadow: inset 0 0 0 1px var(--qf-field); color: var(--qf-ink); }
  html body.workspace-layout .qf .qf-bar .qf-bar-save:hover { background: var(--flat-hover); }
  html body.workspace-layout .qf .qf-bar .qf-bar-done { height: 42px; min-height: 42px; border-radius: 10px; background: var(--accent); color: var(--accent-ink, #fff); }
}
/* The quote beside the list already has its ‹ back button, so the window's × is not needed there. */
@media (min-width:1200px) and (pointer:fine), (min-width:1200px) and (pointer:none) {
  html body.workspace-layout #portal-popup.popup-docked:has(form.qf) > .portal-popup-bar { display: none; }
  /* A note or a report beside the list: the same plain white page as the quote, no card on grey,
     and the × floats at the top right instead of taking a bar of its own. */
  html body.workspace-layout #portal-popup.popup-docked:not(:has(form.qf)) { background: var(--surface); }
  html body.workspace-layout #portal-popup.popup-docked:not(:has(form.qf)) > .portal-popup-bar {
    position: sticky; top: 0; height: 0; padding: 0; border: 0; background: transparent; overflow: visible; z-index: 6;
  }
  html body.workspace-layout #portal-popup.popup-docked:not(:has(form.qf)) > .portal-popup-bar > .btn { position: absolute; top: 18px; right: 22px; }
  html body.workspace-layout #portal-popup.popup-docked:not(:has(form.qf)) > .portal-popup-content { padding: 22px 32px 40px !important; }
  html body.workspace-layout #portal-popup.popup-docked:not(:has(form.qf)) > .portal-popup-content > .portal-head { padding-right: 56px; }
  html body.workspace-layout #portal-popup.popup-docked .portal-popup-content > .portal-card.jn-view {
    margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none;
  }
  html body.workspace-layout #portal-popup.popup-docked .report-document { box-shadow: none; }
}
/* Agendar obra is a long form: Guardar/Cancelar stay visible at the bottom of its window while scrolling. */
@media (min-width:761px) and (min-height:541px), (min-width:761px) and (pointer:fine), (min-width:761px) and (pointer:none) {
  html body.workspace-layout #portal-popup .portal-popup-content > form.portal-job-form > .portal-actions {
    position: sticky; bottom: 0; z-index: 4; margin: 24px -28px -28px; padding: 14px 28px 16px; border-top: 1px solid var(--line); background: var(--surface);
  }
}

/* Areas are links (so they can open in a new tab); they keep the look of the buttons. */
:where(a.workspace-nav-item,a.workspace-bottom-item,a.native-menu-row){color:inherit;text-decoration:none;letter-spacing:normal;word-spacing:normal;cursor:pointer;-webkit-tap-highlight-color:transparent}

/* Dark theme ("Grafite", chosen 2026-10-26): neutral graphite surfaces instead of navy, plus dark versions of the
   chips, badges and selections that the feature stylesheets hard-code in light pastels. Loaded last so it wins the cascade.
   The --tone-* pairs are translucent backgrounds with light text, so they sit well on any of the surfaces. */
@media screen {
  :root[data-theme=dark] {
    --bg: #121316; --surface: #1b1d21; --surface-2: #23252a; --surface-3: #2e3036; --line: #2f3238;
    --ink: #eceef1; --muted: #a3a8b2;
    --accent: #93b2ff; --accent-hover: #b3c8ff; --accent-ink: #0f1730; --accent-soft: #232f48;
    --workspace-nav: #16171a; --ui-card-shadow: 0 1px 2px #0006;
    --tone-info-bg: #3a6bff2e;   --tone-info-ink: #b4c8ff;
    --tone-warn-bg: #f5b5402b;   --tone-warn-ink: #f4cc7a;
    --tone-ok-bg: #3cc8862b;     --tone-ok-ink: #86ddb0;
    --tone-danger-bg: #f0606030; --tone-danger-ink: #ffa4a4;
    --tone-leave-bg: #a77cf030;  --tone-leave-ink: #cfb8fa;
  }
  :root[data-theme=dark] .qf { --qf-bg: #121316; --qf-card: #1b1d21; --qf-line: #2f3238; --qf-field: #2e3036; --qf-open: #202226; --qf-bar: #16171a; --qf-blue-soft: #232f48; }
  :root[data-theme=dark] .workspace-layout .app { background: var(--bg); }
}

@media screen {
  :root[data-theme=dark] .lbl-calendar-day.selected { background: var(--accent-soft); }
  :root[data-theme=dark] :is(.lbl-calendar-day.today .lbl-calendar-date, .lbl-calendar-month[aria-pressed=true]) { color: var(--accent-ink); }
  :root[data-theme=dark] .portal .calendar-day-items .lbl-calendar-event,
  :root[data-theme=dark] .calendar-legend i[data-kind=job] { background: var(--tone-info-bg); color: var(--tone-info-ink); border-color: transparent; }
  :root[data-theme=dark] .portal .calendar-day-items .lbl-calendar-event[data-state="Em curso"] { background: var(--tone-warn-bg); color: var(--tone-warn-ink); }
  :root[data-theme=dark] .portal .calendar-day-items .lbl-calendar-event[data-state="Concluída"] { background: var(--tone-ok-bg); color: var(--tone-ok-ink); }
  :root[data-theme=dark] :is(.calendar-weather-panel, .calendar-legend) { color: var(--muted); }
  :root[data-theme=dark] .calendar-mark[data-kind=closure] { background: var(--surface-3); color: var(--muted); }
  :root[data-theme=dark] .calendar-mark[data-kind=holiday],
  :root[data-theme=dark] .calendar-legend i[data-kind=holiday] { background: var(--tone-danger-bg); color: var(--tone-danger-ink); border-color: transparent; }
  :root[data-theme=dark] .calendar-mark[data-kind=leave],
  :root[data-theme=dark] .calendar-legend i[data-kind=leave] { background: var(--tone-leave-bg); color: var(--tone-leave-ink); border-color: transparent; }

  :root[data-theme=dark] body :is(#portal, #portal-popup) .portal-job-status[data-state] { background-color: var(--tone-info-bg); color: var(--tone-info-ink); }
  :root[data-theme=dark] body :is(#portal, #portal-popup) .portal-job-status[data-state="Em curso"] { background-color: var(--tone-warn-bg); color: var(--tone-warn-ink); }
  :root[data-theme=dark] .ov-task-icon,
  :root[data-theme=dark] .ov-feed-dot { background: var(--tone-info-bg); color: var(--tone-info-ink); }
  :root[data-theme=dark] .ov-todo-row[data-tone=stamp] .ov-task-icon,
  :root[data-theme=dark] .ov-pill:is([data-state="Meio dia"], [data-state="Por registar"]),
  :root[data-theme=dark] .ov-feed-state,
  :root[data-theme=dark] .team-roster-state[data-state="Em obra"],
  :root[data-theme=dark] .report-row .stamp-badge,
  :root[data-theme=dark] .days-type[data-fraction="0.5"] { background: var(--tone-warn-bg); color: var(--tone-warn-ink); }
  :root[data-theme=dark] .ov-todo-row[data-tone=leave] .ov-task-icon,
  :root[data-theme=dark] .ov-feed-item[data-kind=leave] .ov-feed-dot,
  :root[data-theme=dark] .ov-feed-state[data-tone=leave] { background: var(--tone-leave-bg); color: var(--tone-leave-ink); }
  :root[data-theme=dark] .ov-my-week .ov-week > button[aria-pressed=true] { background: var(--accent-soft); }

  :root[data-theme=dark] .team-roster-item[aria-pressed=true],
  :root[data-theme=dark] .report-row.is-current { background: var(--accent-soft); }
  :root[data-theme=dark] .report-filter[aria-pressed=true] { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
  :root[data-theme=dark] .team-roster-avatar,
  :root[data-theme=dark] .team-split .is-selected .team-portrait,
  :root[data-theme=dark] body.workspace-layout .topbar .workspace-profile .workspace-avatar:not(:has(img)) { background: var(--accent-soft); color: var(--accent); }

  :root[data-theme=dark] .lbl-notification-popover .lbl-notification-entry { background: var(--surface-2); box-shadow: none; }
  :root[data-theme=dark] .lbl-notification-popover .lbl-notification-item { background: var(--surface); color: var(--ink); }
  :root[data-theme=dark] .lbl-notification-popover .lbl-notification-symbol { background: var(--tone-info-bg); color: var(--tone-info-ink); }
  :root[data-theme=dark] .qf .qa-mic.is-on { background: var(--tone-danger-bg); }
}
@media screen and (max-width: 760px), screen and (pointer: coarse) and (max-height: 540px) {
  :root[data-theme=dark] .portal .calendar-day-items .lbl-calendar-event { background: var(--tone-info-ink); }
  :root[data-theme=dark] .portal .calendar-day-items .lbl-calendar-event[data-state="Em curso"] { background: var(--tone-warn-ink); }
  :root[data-theme=dark] .portal .calendar-day-items .lbl-calendar-event[data-state="Concluída"] { background: var(--tone-ok-ink); }
  :root[data-theme=dark] .portal .calendar-day-items .calendar-mark[data-kind=holiday] { background: var(--tone-danger-ink); }
  :root[data-theme=dark] .portal .calendar-day-items .calendar-mark[data-kind=leave] { background: var(--tone-leave-ink); }
  :root[data-theme=dark] .portal .calendar-day-items .calendar-mark[data-kind=sick] { background: var(--tone-warn-ink) !important; }
}

@media screen {
  :root[data-theme=dark] .calendar-mark[data-kind=sick],
  :root[data-theme=dark] .calendar-legend i[data-kind=sick],
  :root[data-theme=dark] .holidays-state[data-state=Baixa],
  :root[data-theme=dark] .native-days-tag.is-sick,
  :root[data-theme=dark] .holidays-band-legend .is-sick:before { background: var(--tone-warn-bg) !important; color: var(--tone-warn-ink) !important; border-color: transparent; }
  :root[data-theme=dark] .holidays-band-backdrop.is-sick { background: var(--tone-warn-bg) !important; border-color: transparent; }
}
