/* Shared mobile density: public website, client portal and Studio. */
@media(max-width:700px){
 #app-view .workspace{padding:18px 14px;min-height:0}
 #app-view .workspace>header{padding:16px;margin-bottom:16px;gap:10px}
 #app-view .workspace h1{font-size:28px;line-height:1.15}
 #app-view .workspace h2{font-size:23px;line-height:1.25}
 #app-view .workspace h3{font-size:19px;line-height:1.3}
 #app-view :is(.projects-grid,.summary-grid){gap:10px;margin-top:16px;margin-bottom:16px}
 #app-view .summary-card{min-height:0;padding:16px;gap:10px}
 #app-view .summary-card h3{font-size:20px}
 #app-view .summary-card .number{font-size:27px}
 #app-view .summary-counts{gap:6px}
 #app-view .summary-counts span{padding:5px 8px;font-size:11px}
 #app-view .project-card{padding:16px;gap:10px;min-height:0}
 #app-view .home-welcome{padding:4px 0 16px}
 #app-view .home-welcome h2{margin:8px 0;font-size:26px}
 #app-view .home-priority-section{margin-bottom:18px;padding-top:14px}
 #app-view .home-section-heading{margin-bottom:10px}
 #app-view .home-priority-row.pending-item{padding:12px;gap:10px}
 #app-view .home-row-copy{gap:4px}
 #app-view :is(.home-clear,.followup-panel,.finance-project,.finance-context,.team-contact-card,.client-row){padding:14px;gap:10px}
 #app-view .finance-metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:14px 0}
 #app-view .finance-metric{padding:12px 10px;gap:7px;min-height:0}
 #app-view .finance-metric strong{font-size:22px;white-space:normal;overflow-wrap:anywhere}
 #app-view .finance-metric>span,#app-view .finance-metric small{font-size:11px;line-height:1.4}
 #app-view .finance-project-list{gap:10px}
 #app-view .finance-values{gap:10px}
 #app-view .finance-values dd{font-size:19px}
 #app-view .project-heading{padding:16px;gap:12px}
 #app-view .project-details{gap:12px 10px}
 #app-view .upload-panel{padding:14px;gap:12px}
 #app-view .upload-panel label{margin:10px 0;gap:5px}
 #app-view :is(.notes-section,.notes-list,.pending-list){margin-top:14px}
 #app-view :is(.note,.note-row,.task-row,.meeting-step-card){padding:12px;gap:10px}
 #app-view .calendar-controls{margin:12px 0 10px;gap:6px}
 #app-view .calendar-range{margin-bottom:10px}
 #app-view .calendar-week>.calendar-day{min-height:96px;padding:10px 8px}
 #app-view .calendar-week .calendar-day-heading{gap:4px;margin-bottom:8px}
 #app-view .workspace-copyright{padding-top:18px}
 #login-view>.brand-panel{min-height:220px;padding:22px;gap:18px}
 #login-view>.brand-panel img{width:175px}
 #login-view>.brand-panel h1{font-size:28px;margin:10px 0}
 #login-view>.brand-panel p{margin-top:10px;line-height:1.5}
 #login-view>.login-panel{min-height:0;padding:22px;gap:22px;grid-template-rows:auto auto auto}
 #login-view .login-panel h2{font-size:28px;margin:12px 0}
 #login-view .login-panel form>p{margin-bottom:16px}
 #login-view .login-panel label{margin:14px 0;gap:6px}
 #login-view .login-panel form>.primary{margin-top:16px;min-height:44px;padding:11px 16px}
 #manager-login .manager-brand-panel{min-height:220px;padding:22px;gap:18px}
 #manager-login .manager-brand-panel img{width:175px}
 #manager-login .manager-brand-panel h1{font-size:28px;margin:10px 0}
 #manager-login .manager-login-panel{min-height:0;padding:22px;gap:22px;grid-template-rows:auto auto auto}
 #manager-login #remote-login h2{font-size:28px;margin:12px 0}
 #manager-login #remote-login p.manager-login-muted{margin-bottom:16px}
 #manager-login #remote-login label{margin:14px 0;gap:6px}
 #manager-main{padding:18px 14px}
 #manager-main .heading{margin:0 0 16px}
 #manager-main h1{font-size:25px;margin:8px 0}
 #manager-main .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:16px}
 #manager-main .stats article{padding:12px}
 #manager-main .stats strong{font-size:25px;margin:7px 0 5px}
 #manager-main .tools{padding:10px;gap:8px}
 #manager-main .sectionline{padding:12px}
 body:has(>.slideshow) .identity{gap:12px}
 body>main:has(>.slideshow) .intro{margin-bottom:16px}
 body>main:has(>.slideshow) .contacts{gap:14px}
 body>main:has(>.slideshow) .socials{margin-top:16px}
 body>main:has(>.slideshow) .brand-slider{margin-top:24px}
}
#app-view .calendar-week-arrows{display:flex;align-items:center;justify-content:center;gap:6px;margin-top:auto}
#app-view .calendar-week-arrows>button{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-height:36px;padding:0;border:1px solid #cdd2c4;border-radius:4px;background:#fff;color:#35402e;font-size:20px;line-height:1}
#app-view .calendar-week-arrows>button:hover{background:#e2e8da}
@media(max-width:900px){#app-view .calendar-week-arrows{margin-top:0;margin-left:auto}}
/* Project list separators preserve the existing state-colored left edge. */
#app-view :is(#projects-grid,#admin-home-projects) .project-card{border-top:1px solid #d5d9cd;border-bottom:1px solid #d5d9cd;border-right:0;border-radius:0;box-shadow:none}
#app-view .project-service-price>.project-value-actions{display:flex;align-items:stretch;gap:8px;width:100%;margin-top:8px;min-width:0}
#app-view .project-value-actions>.project-payment-badge{display:flex;align-items:center;flex:1 1 0;min-width:0;margin:0;padding:7px 9px;font-size:11px;line-height:1.4}
#app-view .project-value-actions>.project-service-edit{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:36px;margin:0;padding:7px 10px;border:1px solid #cbd0c2;border-radius:4px;background:#eceee7;color:#30362d;font-size:11px;line-height:1.4;white-space:normal;text-align:center}
#app-view .project-value-actions>.project-service-edit:hover{background:#dfe5d8}
/* Recent activity is one section with edge-to-edge heading and dividers. */
#app-view .workspace .recent-activity{padding:0;gap:0;overflow:hidden;background:#fff}
#app-view .workspace .recent-activity>.section-heading{width:100%;box-sizing:border-box;margin:0;border-radius:0}
#app-view .workspace .recent-activity>.recent-item{width:100%;box-sizing:border-box;margin:0;padding:16px 18px;border:0;border-bottom:1px solid #d5d9cd;border-radius:0;box-shadow:none;background:#fff}
#app-view .workspace .recent-activity>.recent-item:last-child{border-bottom:0}
#app-view .workspace .recent-activity>.recent-item:hover{background:#f7f8f3;box-shadow:none}
#app-view .workspace .recent-activity>p.muted{margin:0;padding:16px 18px}
@media(max-width:700px){#app-view .workspace .recent-activity{padding:0;gap:0}#app-view .workspace .recent-activity>.recent-item{padding:14px 16px;gap:12px}}
/* Continuous sections across the client and administration areas. */
#app-view .workspace :is(.home-priority-section,.followup-panel,#project-files-panel,#billing-documents-panel,#quote-documents-panel,.finance-services-panel,.studio-final-panel){padding:0;overflow:hidden}
#app-view .workspace :is(.home-priority-section,.followup-panel,#project-files-panel,#billing-documents-panel,#quote-documents-panel,.finance-services-panel,.studio-final-panel)>:is(.section-heading,.home-section-heading){width:100%;box-sizing:border-box;margin:0;border-radius:0}
#app-view .workspace :is(#files-list,#billing-list,#quote-list,.home-priority-list,.client-current-project-grid,.finance-project-list,.studio-final-grid){padding:0;margin-left:0;margin-right:0;gap:0}
#app-view .workspace :is(.files-list,.home-priority-list,.client-current-project-grid,.finance-project-list,.studio-final-grid)>:is(.file-row,.home-priority-row,.quote-pending-action-row,.client-current-project-card,.finance-project,.studio-final-card){margin:0;border-top:0;border-right:0;border-bottom:1px solid #d5d9cd;border-radius:0;box-shadow:none;padding:16px 18px}
#app-view .workspace :is(.client-date-card,.meeting-step-card,.client-document-card,.published-quote-card,.home-action-row){margin:0;border-top:0;border-right:0;border-bottom:1px solid #d5d9cd;border-radius:0;box-shadow:none;padding:16px 18px}
#app-view .workspace .client-current-project-grid{grid-template-columns:minmax(0,1fr)}
#app-view .workspace .studio-final-body{padding:0}
#app-view .workspace .studio-final-body>p{padding:14px 18px;margin:0}
#app-view .workspace .studio-final-grid{border:0;border-radius:0}
#app-view #home-view .pending-decisions-panel :is([data-attention-state=pending],[data-attention-state=overdue]){border-radius:0!important;border-top:0!important;border-right:0!important}
#app-view #project-browser-panel.is-framed>.project-browser-body{padding:0}
#app-view #project-browser-panel.is-framed .project-browser-body>:is(.portal-toolbar,#area-intro,.project-view-switch){margin:14px 18px}
#app-view #project-browser-panel.is-framed #projects-grid{padding:0;gap:0;margin:0}
#app-view #project-browser-panel.is-framed #projects-grid>.project-card{margin:0;border-top:0;border-radius:0}
#app-view .workspace :is(.home-priority-list,.files-list,.finance-project-list)>:last-child{border-bottom:0}
@media(max-width:700px){
 #app-view .workspace :is(.home-priority-section,.followup-panel,#project-files-panel,#billing-documents-panel,#quote-documents-panel,.finance-services-panel,.studio-final-panel){padding:0}
 #app-view .workspace :is(.home-priority-list,.files-list,.client-current-project-grid,.finance-project-list){padding:0;gap:0}
 #app-view .workspace :is(.client-date-card,.meeting-step-card,.client-document-card,.published-quote-card,.home-action-row){padding:14px 16px}
 #app-view .workspace .summary-grid{gap:0;border:1px solid #d5d9cd;border-radius:8px;overflow:hidden}
 #app-view .workspace .summary-grid>.summary-card{margin:0;border:0;border-bottom:1px solid #d5d9cd;border-radius:0;box-shadow:none}
 #app-view .workspace .summary-grid>.summary-card:last-child{border-bottom:0}
}
/* Rounded section perimeter; square internal dividers. */
#app-view .workspace :is(.home-priority-section,.followup-panel,#project-files-panel,#billing-documents-panel,#quote-documents-panel,.finance-services-panel,.studio-final-panel,#project-browser-panel.is-framed,#clients-search-panel,.invoice-register-panel,.project-service-summary,#quote-admin-tools,#shared-quotes-tools){border-radius:8px;overflow:hidden}
#app-view .workspace :is(.home-priority-section,.followup-panel,#project-files-panel,#billing-documents-panel,#quote-documents-panel,.finance-services-panel,.studio-final-panel,#project-browser-panel.is-framed,#clients-search-panel,.invoice-register-panel,.project-service-summary,#quote-admin-tools,#shared-quotes-tools)>:is(.section-heading,.home-section-heading):first-child{border-radius:7px 7px 0 0}
#app-view .workspace :is(.files-list,.home-priority-list,.client-current-project-grid,.finance-project-list,.studio-final-grid,.recent-activity)>:is(.file-row,.home-priority-row,.quote-pending-action-row,.client-current-project-card,.finance-project,.studio-final-card,.recent-item){border-radius:0}
#app-view .workspace :is(.files-list,.home-priority-list,.client-current-project-grid,.finance-project-list,.studio-final-grid,.recent-activity)>:is(.file-row,.home-priority-row,.quote-pending-action-row,.client-current-project-card,.finance-project,.studio-final-card,.recent-item):last-child{border-radius:0 0 7px 7px}
#app-view .workspace :is(.home-priority-section,.followup-panel)>:is(.client-date-card,.meeting-step-card,.client-document-card,.home-action-row){border-radius:0}
#app-view .workspace :is(.home-priority-section,.followup-panel)>:is(.client-date-card,.meeting-step-card,.client-document-card,.home-action-row):last-child{border-radius:0 0 7px 7px}
#app-view #home-view .pending-decisions-panel [data-attention-state]{border-radius:0!important}
#app-view #home-view .pending-decisions-panel .home-priority-list>:last-child [data-attention-state],#app-view #home-view .pending-decisions-panel .home-priority-list>[data-attention-state]:last-child{border-radius:0 0 7px 7px!important}
#app-view #project-browser-panel.is-framed #projects-grid>.project-card:last-child{border-radius:0 0 7px 7px}
#app-view .workspace .summary-grid>.summary-card{border-radius:0}
#app-view .workspace .summary-grid>.summary-card:last-child{border-radius:0 0 7px 7px}
/* Follow-up has a full-width heading with inset controls and flat pending rows. */
#app-view .workspace #project-followup{padding:0;overflow:hidden}
#app-view .workspace #project-followup>.followup-heading{margin:0;padding:18px 20px;width:100%;box-sizing:border-box;border-radius:7px 7px 0 0}
#app-view .workspace #project-followup>.project-stages{margin:16px 18px 10px;gap:6px}
#app-view .workspace #project-followup>.stage-order-status{margin:0;padding:0 18px 16px;font-size:12px;line-height:1.5}
#app-view .workspace #project-followup>details{margin:0;padding:14px 18px;border-top:1px solid #d5d9cd}
#app-view .workspace #project-followup>details summary{min-height:32px;display:list-item;align-content:center}
#app-view .workspace #project-followup>details .plan-form{margin-top:12px}
#app-view .workspace #project-followup>#project-tasks{margin:0;padding:0;border:0;border-top:1px solid #d5d9cd;border-radius:0;box-shadow:none;background:#fff}
#app-view .workspace #project-followup>#project-tasks>h2{margin:0;padding:16px 18px;font-size:23px}
#app-view .workspace #project-followup>#project-tasks>:is(.next-step,.task-row,.meeting-step-card){margin:0;padding-top:16px;padding-right:18px;padding-bottom:16px;border-top:1px solid #d5d9cd;border-right:0;border-bottom:0;border-radius:0;box-shadow:none}
#app-view .workspace #project-followup>#project-tasks>:is(p,.followup-quote-decisions){margin:0;padding:14px 18px}
#app-view .workspace #project-followup>#project-tasks>:last-child{border-radius:0 0 7px 7px}
@media(max-width:700px){#app-view .workspace #project-followup>.followup-heading{padding:16px}#app-view .workspace #project-followup>.project-stages{margin:14px 16px 10px}#app-view .workspace #project-followup>.stage-order-status{padding:0 16px 14px}#app-view .workspace #project-followup>details{padding:12px 16px}#app-view .workspace #project-followup>#project-tasks>h2{padding:14px 16px}}
/* Keep all pending content flat, including rules from legacy state styles. */
#app-view .workspace #project-followup>#project-tasks>.next-step{border-radius:0!important;margin:0!important;min-height:0;box-shadow:none}
#app-view .workspace #project-followup>#project-tasks>details{margin:0;padding:14px 18px;border-top:1px solid #d5d9cd;border-radius:0}
#app-view .workspace #project-followup>#project-tasks>details>summary{min-height:32px;align-content:center;cursor:pointer}
#app-view .workspace #project-followup>#project-tasks{min-height:0;gap:0}
#app-view .workspace #project-followup>#project-tasks>p{padding:14px 18px;margin:0}
#app-view .workspace #project-followup>#project-tasks>.next-step:last-child{border-radius:0 0 7px 7px!important}
@media(max-width:700px){
 #app-view .workspace #project-overview.summary-grid{border-radius:8px;overflow:hidden;gap:0}
 #app-view .workspace #project-overview.summary-grid>.summary-card{border-radius:0!important;box-shadow:none;border-top:0;border-left:0;border-right:0;margin:0}
 #app-view .workspace #project-overview.summary-grid>.summary-card:first-child{border-radius:7px 7px 0 0!important}
 #app-view .workspace #project-overview.summary-grid>.summary-card:last-child{border-radius:0 0 7px 7px!important}
}

/* Desktop project balances follow their content instead of stretching. */
@media(min-width:901px){
 #app-view .project-service-price>.project-value-actions{display:inline-flex;align-items:center;flex-wrap:wrap;width:auto;max-width:100%;gap:6px;margin:0 0 0 8px;vertical-align:middle}
 #app-view .project-value-actions>.project-payment-badge{flex:0 1 auto;width:auto;max-width:100%;min-height:28px;margin:0;padding:5px 8px;line-height:1.4}
 #app-view .project-value-actions>.project-service-edit{flex:0 0 auto;min-height:28px;margin:0;padding:5px 9px;line-height:1.4;white-space:nowrap}
}
/* Space below the calendar grid matches its horizontal inset. */
#app-view .workspace :is(#home-calendar,#client-home-calendar):has(>.calendar-week){padding-bottom:20px}
#app-view .workspace :is(#home-calendar,#client-home-calendar)>.calendar-empty{margin-bottom:0;padding:12px 20px 0}
@media(max-width:700px){#app-view .workspace :is(#home-calendar,#client-home-calendar):has(>.calendar-week){padding-bottom:16px}#app-view .workspace :is(#home-calendar,#client-home-calendar)>.calendar-empty{padding-left:16px;padding-right:16px}}
/* Consistent space between neighboring actions in the portal and Studio. */
#app-view :is(.file-actions,.task-actions,.meeting-actions,.client-actions,.billing-heading-actions,.calendar-controls,.project-card-actions,.client-current-project-actions,.client-current-project-actions,.delete-client-actions,.studio-final-actions){gap:8px}
#app-view :is(.meeting-actions,.client-actions,.billing-heading-actions,.client-current-project-actions,.delete-client-actions){display:flex;flex-wrap:wrap;align-items:center}
#app-view :is(.plan-form,.task-form,.meeting-form)>button+button,#app-view :is(.plan-form,.task-form,.meeting-form)>button+a{margin-top:8px}
#app-view .workspace :is(.section-heading,.home-section-heading){column-gap:12px;row-gap:8px}
#app-view .workspace :is(.file-actions,.task-actions,.meeting-actions,.studio-final-actions)>:is(button,a){margin-right:0}
#manager-main :is(.job-controls,.worker-controls,.tools,.calendar-controls,.actions),.render-preview-dialog .preview-toolbar{gap:8px}
#manager-main .actions{white-space:normal}
#manager-main .actions>button{margin:4px 6px 4px 0}
#manager-main :is(.job-controls,.worker-controls){display:flex;flex-wrap:wrap;align-items:center}
#manager-main .job-controls:has(.preview-job){display:grid;gap:8px}
@media(max-width:700px){#app-view .workspace :is(.file-actions,.task-actions,.meeting-actions){row-gap:8px;column-gap:8px}#manager-main .tools{row-gap:10px}}
/* Client views use the same continuous section on every screen size. */
#app-view .workspace #admin-home-views{padding:0;overflow:hidden;border-radius:8px}
#app-view .workspace #admin-home-views>.home-section-heading{margin:0;width:100%;box-sizing:border-box;border-radius:7px 7px 0 0}
#app-view .workspace .view-log-list{gap:0;row-gap:0;margin:0;padding:0}
#app-view .workspace .view-log-list>.view-log-card{box-sizing:border-box;width:100%;max-width:none;margin:0;padding:16px 18px;border:0;border-bottom:1px solid #d5d9cd;border-radius:0;box-shadow:none;transform:none;background:#fff}
#app-view .workspace .view-log-list>.view-log-card:hover{box-shadow:none;transform:none;background:#f7f8f3}
#app-view .workspace #admin-home-views>.secondary{display:block;width:fit-content;max-width:calc(100% - 36px);margin:16px auto;padding:10px 16px;text-align:center}
#app-view .workspace .view-log-controls{display:flex;flex-wrap:wrap;gap:8px;padding:16px 18px;margin:0}
@media(max-width:700px){#app-view .workspace .view-log-list>.view-log-card{padding:14px 16px}}
/* Ongoing projects: full-width continuous rows, inset section actions. */
#app-view .workspace .admin-current-project-section{padding:0;overflow:hidden;border-radius:8px}
#app-view .workspace .admin-current-project-section>.home-section-heading{margin:0}
#app-view .workspace .admin-current-project-section .project-view-switch{margin:0;padding:12px 18px;gap:8px}
#app-view .workspace #admin-home-projects.projects-list{display:grid;grid-template-columns:minmax(0,1fr);gap:0;margin:0;padding:0}
#app-view .workspace #admin-home-projects.projects-list>.project-card{margin:0;border-top:0;border-right:0;border-bottom:1px solid #d5d9cd;border-radius:0;box-shadow:none}
#app-view .workspace #admin-home-projects.projects-list>.project-card:hover{box-shadow:none;transform:none}
#app-view .workspace .admin-current-project-section>.home-all-projects{display:flex;width:fit-content;max-width:calc(100% - 36px);margin:14px 18px 14px auto;padding:10px 14px}
#app-view .workspace #admin-home-projects:not(.projects-list){padding:14px 18px;gap:12px;margin:0}
@media(max-width:700px){#app-view .workspace .admin-current-project-section .project-view-switch{padding:10px 16px}#app-view .workspace .admin-current-project-section>.home-all-projects{margin:14px 16px;max-width:calc(100% - 32px)}}

/* Close the right edge of project rows while preserving the state on the left. */
#app-view .workspace :is(#projects-grid,#admin-home-projects) .project-card{border-right:1px solid #d5d9cd}
#app-view .workspace #admin-home-projects.projects-list>.project-card{border-right:1px solid #d5d9cd}
/* A section heading starts at the top edge of its containing panel. */
#app-view .workspace :is(section,article,div):has(>.section-heading:first-child)> .section-heading:first-child,
#app-view .workspace :is(section,article,div):has(>.home-section-heading:first-child)> .home-section-heading:first-child{margin-top:0}
#app-view .workspace :is(.invoice-register-panel,.client-account-panel,.finance-services-panel,.project-service-summary,.home-priority-section,.followup-panel,#project-files-panel,#billing-documents-panel,#quote-documents-panel,#quote-admin-tools,#shared-quotes-tools,#admin-recent-quotes,#clients-search-panel,#project-browser-panel.is-framed):has(>:is(.section-heading,.home-section-heading):first-child){padding-top:0}
#app-view .workspace .invoice-register-panel>.section-heading:first-child{margin:0;width:100%;box-sizing:border-box;border-radius:7px 7px 0 0}

/* Project group subtitles are internal dividers with square top corners. */
#app-view .workspace #projects-grid>details,#app-view .workspace #projects-grid>details>summary,#app-view .workspace #projects-grid>.project-group-title{border-top-left-radius:0;border-top-right-radius:0}

/* Clients form one continuous list inside the section. */
#app-view .workspace #clients-list{margin:0;padding:0;gap:0;row-gap:0}
#app-view .workspace #clients-list>.client-row{margin:0;padding:16px 18px;border-top:0;border-right:0;border-left:0;border-bottom:1px solid #d5d9cd;border-radius:0;box-shadow:none;transform:none}
#app-view .workspace #clients-list>.client-row:last-child{border-bottom:0;border-radius:0 0 7px 7px}
#app-view .workspace #clients-list>.client-row:hover{box-shadow:none;transform:none}
@media(max-width:700px){#app-view .workspace #clients-list>.client-row{padding:14px 16px}}
/* Separate independent panels; keep project group subtitles square and state-colored. */
#app-view .workspace #projects-view>#admin-recent-quotes{margin-top:24px;margin-bottom:24px}
#app-view .workspace #admin-recent-quotes{margin-top:24px}
#app-view .workspace #projects-grid>.project-status-group{margin-top:0;border-radius:0}
#app-view .workspace #projects-grid>.project-status-group>summary,#app-view .workspace #projects-grid>.project-status-group:not([open])>summary{border-radius:0}
#app-view .workspace #projects-grid>.project-status-group[data-status=active]>summary{background:#dcebdc;color:#285c38;border-left:3px solid #347448}
#app-view .workspace #projects-grid>.project-status-group[data-status=standby]>summary{background:#fff3cc;color:#765913;border-left:3px solid #d2aa27}
#app-view .workspace #projects-grid>.project-status-group[data-status=completed]>summary{background:#e4e4e1;color:#454640;border-left:3px solid #85877f}
#app-view .workspace #projects-grid>.project-status-group>.completed-project-list{border-radius:0}
/* The browser panel owns the perimeter; project groups only divide its contents. */
#app-view .workspace #project-browser-panel.is-framed #projects-grid{gap:0;row-gap:0}
#app-view .workspace #project-browser-panel.is-framed #projects-grid>.project-status-group{margin:0;border:0;border-radius:0;box-shadow:none}
#app-view .workspace #project-browser-panel.is-framed #projects-grid>.project-status-group>summary{margin:0;border-top:1px solid #d5d9cd;border-right:0;border-bottom:0;border-radius:0}
#app-view .workspace #project-browser-panel.is-framed #projects-grid>.project-status-group[open]>summary{border-bottom:1px solid #d5d9cd}
#app-view .workspace #project-browser-panel.is-framed .completed-project-list{margin:0;border:0}
#app-view .workspace #project-browser-panel.is-framed #projects-grid>.project-status-group .project-card{border-right:0;border-top:0}
#app-view .workspace #project-browser-panel.is-framed #projects-grid>.project-status-group .project-card:last-child{border-bottom:0}

/* Latest shared documents are continuous from edge to edge. */
#app-view .workspace #admin-recent-quotes{padding-bottom:0;overflow:hidden}
#app-view .workspace #admin-recent-quotes>.files-list{display:flex;flex-direction:column;gap:0;row-gap:0;margin:0;padding:0}
#app-view .workspace #admin-recent-quotes>.files-list>.file-row{box-sizing:border-box;width:100%;margin:0;padding:16px 18px;border:0;border-bottom:1px solid #d5d9cd;border-radius:0;box-shadow:none;transform:none}
#app-view .workspace #admin-recent-quotes>.files-list>.file-row:last-child{border-bottom:0;border-radius:0 0 7px 7px}
@media(max-width:700px){#app-view .workspace #admin-recent-quotes>.files-list>.file-row{padding:14px 16px}}

/* Each project card has a complete outline; its state-colored left border is preserved. */
#app-view .workspace :is(#projects-grid,#admin-home-projects) .project-card{border-top:1px solid #d5d9cd!important;border-right:1px solid #d5d9cd!important;border-bottom:1px solid #d5d9cd!important}
#app-view .workspace :is(#projects-grid,#admin-home-projects).projects-list>.project-card+ .project-card,#app-view .workspace #projects-grid .completed-project-list.projects-list>.project-card+ .project-card{margin-top:10px}


/* Compact project card separation, without adding margins to the grid gap. */
#app-view .workspace :is(#projects-grid,#admin-home-projects).projects-list,#app-view .workspace #projects-grid .completed-project-list.projects-list{gap:6px;row-gap:6px}
#app-view .workspace :is(#projects-grid,#admin-home-projects).projects-list>.project-card,#app-view .workspace #projects-grid .completed-project-list.projects-list>.project-card{margin-top:0;margin-bottom:0}
#app-view .workspace :is(#projects-grid,#admin-home-projects).projects-list>.project-card+ .project-card,#app-view .workspace #projects-grid .completed-project-list.projects-list>.project-card+ .project-card{margin-top:0}


/* Home ongoing projects are continuous; project browser cards keep their own layout. */
#app-view .workspace .admin-current-project-section #admin-home-projects.projects-list{gap:0;row-gap:0}
#app-view .workspace .admin-current-project-section #admin-home-projects.projects-list>.project-card{margin:0;border-top:0!important;border-right:0!important;border-bottom:1px solid #d5d9cd!important;border-radius:0;box-shadow:none}
#app-view .workspace .admin-current-project-section #admin-home-projects.projects-list>.project-card:first-child{border-top:1px solid #d5d9cd!important}


/* Empty news uses the same inset as the neighboring attention section. */
#app-view .workspace .home-news-section>.home-empty{margin:0;padding:20px 24px;box-sizing:border-box;width:100%;line-height:1.6}
@media(max-width:700px){#app-view .workspace .home-news-section>.home-empty{padding:14px}}
/* Desktop Studio tabs use the same vertical divisions as mobile. */
@media(min-width:701px){
 body:has(#manager-main)>nav[aria-label="Áreas"]>button[data-tab]{position:relative}
 body:has(#manager-main)>nav[aria-label="Áreas"]>button[data-tab]+button[data-tab]::before{content:'';position:absolute;left:-15px;top:50%;height:22px;width:1px;background:#c9ccbf;transform:translateY(-50%);pointer-events:none}
}
/* Visible desktop tab dividers, using actual borders rather than pseudo-elements. */
@media(min-width:701px){
 body>nav[aria-label="Áreas"]{gap:0}
 body>nav[aria-label="Áreas"]>button[data-tab]{padding-left:18px;padding-right:18px;border-right:1px solid #bfc4b5}
 body>nav[aria-label="Áreas"]>button[data-tab]:first-child{padding-left:0}
 body>nav[aria-label="Áreas"]>button[data-tab]::before{display:none!important}
}
/* On mobile the grouped list owns one outline, with one divider per project. */
@media(max-width:700px){
 #app-view .workspace #projects-grid>.project-status-group{border:0;box-shadow:none}
 #app-view .workspace #projects-grid>.project-status-group>.completed-project-list.projects-list{border:1px solid #d5d9cd;border-top:0;padding:0;gap:0;row-gap:0;margin:0}
 #app-view .workspace #projects-grid>.project-status-group>.completed-project-list.projects-list>.project-card{margin:0;border-top:0!important;border-right:0!important;border-bottom:1px solid #d5d9cd!important;border-left:0;box-shadow:none;border-radius:0}
 #app-view .workspace #projects-grid>.project-status-group>.completed-project-list.projects-list>.project-card:last-child{border-bottom:0!important}
 #app-view .workspace #projects-grid>.project-status-group[open]>summary{border-bottom:1px solid #d5d9cd}
}
/* Smaller mobile project search labels and status group titles. */
@media(max-width:700px){
 #app-view .workspace #projects-view .portal-toolbar>label{font-size:11px;line-height:1.3;gap:4px}
 #app-view .workspace #projects-view .portal-toolbar label>input:not([type=checkbox]),#app-view .workspace #projects-view .portal-toolbar label>select{font-size:16px;line-height:1.2;padding:6px 8px;height:38px;min-height:38px;letter-spacing:-.2px}
 #app-view .workspace #projects-view .portal-toolbar input::placeholder{font-size:14px;letter-spacing:0}
 #app-view .workspace #projects-grid>.project-status-group>summary{padding:12px 14px;gap:8px}
 #app-view .workspace #projects-grid .completed-project-title{font-size:16px;line-height:1.3}
 #app-view .workspace #projects-grid .completed-project-toggle{font-size:10px;line-height:1.3}
 #app-view .workspace #projects-view .project-view-switch button{font-size:12px;padding:8px 12px;min-height:36px}
}
#app-view .workspace .project-search-collapse{margin:14px 18px;border:1px solid #d5d9cd;background:#f8f8f4;border-radius:4px;min-width:0}
#app-view .workspace .project-search-collapse>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none;cursor:pointer;padding:12px 14px;font-size:13px}
#app-view .workspace .project-search-collapse>summary::-webkit-details-marker{display:none}
#app-view .workspace .project-search-collapse>summary::after{content:'+';font-size:20px;line-height:1}
#app-view .workspace .project-search-collapse[open]>summary::after{content:'−'}
#app-view .workspace .project-search-collapse[open]>summary{border-bottom:1px solid #d5d9cd}
#app-view .workspace .project-search-collapse>.portal-toolbar{margin:0;padding:12px;gap:10px}
#app-view .workspace .project-search-collapse:not([open])>.portal-toolbar{display:none}
#app-view .workspace #projects-view .project-search-collapse #project-filter-status,#app-view .workspace #projects-view .project-search-collapse #project-filter-client{font-size:14px;height:36px;min-height:36px;padding:6px 8px}
@media(max-width:700px){#app-view .workspace .project-search-collapse{margin:10px 16px}#app-view .workspace .project-search-collapse>summary{padding:10px 12px;font-size:12px}}

/* Separate project search and view controls from the results. */
#app-view .workspace #projects-view .project-search-collapse{margin-bottom:14px}
#app-view .workspace #projects-view .project-search-collapse+.project-view-switch{margin-top:0;margin-bottom:18px;padding-bottom:16px;border-bottom:1px solid #cfd2ca}
@media(max-width:700px){#app-view .workspace #projects-view .project-search-collapse{margin-top:14px;margin-bottom:14px}#app-view .workspace #projects-view .project-search-collapse+.project-view-switch{margin-top:0;margin-bottom:18px;padding-bottom:14px;border-bottom:1px solid #cfd2ca}}

/* Full-width horizontal divider below the project search controls. */
#app-view .workspace #projects-view .project-search-collapse+.project-view-switch{position:relative;border-bottom:0;overflow:visible}
#app-view .workspace #projects-view .project-search-collapse+.project-view-switch::after{content:'';position:absolute;bottom:0;left:-18px;right:-18px;height:1px;background:#cfd2ca;pointer-events:none}
@media(max-width:700px){#app-view .workspace #projects-view .project-search-collapse+.project-view-switch::after{left:-16px;right:-16px}}

/* Projects always use list view; preserve the search/results separator. */
#app-view .workspace .project-view-switch>button{display:none!important}
#app-view .workspace .project-view-switch{min-height:0;height:0;padding:0!important;margin-top:0!important;margin-bottom:16px!important}
#app-view .workspace .admin-current-project-section .project-view-switch{display:none!important}


#app-view .workspace .file-actions>:is(button,a),#app-view .workspace .file-toolbar>button{display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1.35}
#pdf-related-documents{width:auto;max-width:100%;font-size:16px;padding:7px 10px;margin:0 8px 0 0}@media(max-width:700px){.pdf-toolbar:has(#pdf-related-documents:not([hidden])){flex-wrap:wrap}#pdf-related-documents:not([hidden]){flex:1 0 100%;width:100%;margin:0 0 8px}}

#app-view .workspace .file-info>.finance-proof-associated,#app-view .workspace .finance-document-info>.finance-proof-associated{display:inline-flex;align-items:center;justify-content:space-between;gap:12px;align-self:flex-start;max-width:100%;box-sizing:border-box;padding:6px 9px;border:1px solid #a7c3a5;border-radius:4px;background:#e2efdf;color:#28633b;font-size:11px;line-height:1.4}#app-view .finance-proof-associated .finance-proof-check{color:#28733e;font-size:15px;font-weight:700;flex:none;margin-left:auto}

#app-view .workspace .file-info>.finance-receipt-only,#app-view .workspace .finance-document-info>.finance-receipt-only{display:inline-flex;align-items:center;gap:12px;align-self:flex-start;max-width:100%;box-sizing:border-box;padding:6px 9px;border:1px solid #ddbc58;border-radius:4px;background:#fff3cc;color:#765913;font-size:11px;line-height:1.4}

#app-view .status-hidden{background:#e8e5ed;border-color:#9c93a8;color:#574e63}#app-view .workspace #projects-grid>.project-status-group[data-status=hidden]>summary{background:#eeeaf2;color:#574e63;border-left:3px solid #9c93a8}#app-view .project-hide-action{justify-content:center;text-align:center;font-size:11px;margin-top:6px}

#app-view .workspace :is(#projects-grid,#admin-home-projects) .project-card-actions>.project-hide-action{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;box-sizing:border-box;min-height:28px;height:28px;margin:0;padding:6px 8px;border:1px solid #d5d9cd;border-radius:4px;background:#f3f4ef;color:#35402e;font-size:10px;font-weight:500;line-height:14px;letter-spacing:.35px;text-transform:uppercase}#app-view .project-visibility-icon{display:inline-block;width:14px;height:14px;flex:0 0 14px;vertical-align:middle}#app-view .card-status.status-hidden{display:inline-flex;align-items:center;justify-content:center;gap:8px}#app-view .card-status.status-hidden::after{content:none!important}#app-view .project-hide-action:hover{background:#e4e9dc}@media(max-width:640px){#app-view .workspace :is(#projects-grid,#admin-home-projects) .project-card-actions>.project-hide-action{min-height:32px;height:32px}}

#app-view .workspace .project-title-with-visibility>.project-hide-action{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;width:26px;height:26px;min-height:26px;margin:0 0 0 8px;padding:4px;border:0;border-radius:0;background:transparent;color:#68745e;box-shadow:none;line-height:1;cursor:pointer;text-transform:none}#app-view .workspace .project-title-with-visibility>.project-hide-action:hover{background:transparent;color:#30382f}#app-view .workspace .project-title-with-visibility>.project-hide-action:focus-visible{outline:2px solid #82916e;outline-offset:2px}#app-view .workspace .project-title-with-visibility .project-visibility-icon{width:16px;height:16px;flex-basis:16px}

/* Align the visibility icon with the vertical center of the project title. */
#app-view .workspace .project-title-with-visibility{display:flex;align-items:center;gap:8px}#app-view .workspace .project-title-with-visibility>.project-hide-action{align-self:center;flex:0 0 26px;margin:0;vertical-align:initial}
