/* Shared responsive layout: phone, tablet portrait and landscape. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
.crm-shell .workspace,.crm-shell main,.project-detail>*,.columns>*,.page-heading>*{min-width:0}
.crm-shell .sidebar{overflow-y:auto;overscroll-behavior:contain;max-height:100dvh;scrollbar-width:thin}
.crm-shell .sidebar nav,.crm-shell .sidebar-bottom,.crm-shell .brand{flex-shrink:0}
.crm-shell .sidebar-bottom{padding-top:16px}
.page-heading h1,.mail-row h3,.task-title,.document-reference,.notice,.preserve{overflow-wrap:anywhere}
.modal{max-height:calc(100dvh - 24px);overscroll-behavior:contain}
.pdf-preview{height:92dvh;max-height:92dvh}
.pipeline-board,.time-calendar,.calendar-scroll,.project-table-wrap,.bank-table-wrap{max-width:100%;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.tabs{max-width:100%;overflow-x:auto;flex-shrink:0}.tabs a{white-space:nowrap;flex-shrink:0}
@media(max-width:1100px){
 .crm-shell main{padding:22px 20px}.crm-shell .topbar{padding:0 18px;gap:12px}.topdate{display:none}
 .top-search{width:min(380px,48vw);min-width:0}.topbar-title{min-width:0}.topbar-title strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .page-heading{flex-wrap:wrap;gap:16px}.page-heading>.actions{max-width:100%}
 .project-detail{grid-template-columns:1fr}.client-panel{order:0}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr))}.columns{grid-template-columns:1fr}
 .pipeline-toolbar{flex-wrap:wrap;gap:12px}.pipeline-toolbar>.actions{flex-wrap:wrap;min-width:0}.pipeline-filter{flex-wrap:wrap;max-width:100%}
 .pipeline-board{grid-template-columns:repeat(5,minmax(270px,1fr));scroll-snap-type:x proximity}.pipeline-column{scroll-snap-align:start}
 .calendar-toolbar{flex-wrap:wrap;gap:12px}.calendar-toolbar .actions{flex-wrap:wrap}
 .estimate-line{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.estimate-line>label:first-child{grid-column:1/-1}
 .contact-grid{grid-template-columns:repeat(auto-fit,minmax(min(290px,100%),1fr))}
 .task-planner>form{grid-template-columns:1fr;height:auto}.planner-editor{overflow:visible}.planner-agenda{height:360px;border-left:0;border-top:1px solid var(--line)}
 .planner-dates{grid-template-columns:repeat(2,minmax(0,1fr))}.planner-dates>span{display:none}
 .planner-footer{position:static;flex-wrap:wrap}.planner-footer label{width:100%}
}
@media(pointer:coarse),(max-width:767px){
 .crm-shell .button,.text-button,.mail-link summary,.tabs a,.view-switch a,.stage-menu>summary{min-height:44px;display:inline-flex;align-items:center}
 .icon-button{min-width:44px;min-height:44px}.task-check{width:32px;height:32px}.task-row>form{padding:6px 0}
 input:not([type=checkbox]):not([type=radio]),select,textarea,.mail-reply-form input,.mail-reply-form textarea,.estimate-fields input,.estimate-fields select,.estimate-line input,.estimate-line select,.estimate-line textarea,.top-search input{font-size:16px}
 .crm-shell .nav-link{min-height:44px}.activity-types span{min-height:44px}
}
@media(max-width:767px){
 .crm-shell .sidebar{position:fixed;inset:auto 0 0;width:100%;height:calc(76px + env(safe-area-inset-bottom));max-height:none;padding:6px max(8px,env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));display:flex;flex-direction:row;align-items:center;gap:4px;overflow-x:auto;overflow-y:hidden;z-index:20;box-shadow:0 -2px 12px #211b5020}
 .crm-shell .sidebar .brand,.crm-shell .nav-label,.crm-shell .sidebar .avatar,.crm-shell .account-details{display:none}
 .crm-shell .sidebar nav{display:flex;flex-direction:row;gap:4px;margin:0;overflow:visible;flex:0 0 auto}
 .crm-shell .sidebar .nav-link{display:flex;flex-direction:column;justify-content:center;gap:4px;width:66px;height:60px;min-height:60px;padding:7px 4px;margin:0;flex:0 0 66px;border-radius:9px}
 .crm-shell .sidebar .nav-text{display:block;font-size:10px;line-height:14px;white-space:nowrap}.crm-shell .sidebar .nav-link .ui-icon{width:22px;height:22px}
 .crm-shell .sidebar .count{display:block;right:3px;top:0}.crm-shell .sidebar-bottom{display:flex;flex-direction:row;align-items:center;gap:4px;margin:0;padding:0;border:0;flex:0 0 auto}
 .crm-shell .sidebar-bottom>.nav-link{margin:0}.crm-shell .account{margin:0;padding:0;border:0}.crm-shell .account .icon-button{width:50px;height:56px}
 .crm-shell .workspace{margin-left:0;min-height:100dvh;padding-bottom:calc(88px + env(safe-area-inset-bottom))}
 .crm-shell .topbar{height:auto;min-height:60px;padding:12px 16px;gap:12px;flex-wrap:wrap}.topbar-title{flex:1}.top-search{width:100%;height:44px;order:2}.top-search input{height:40px}
 .crm-shell main,.projects-page main{padding:20px 14px}.crm-shell h1,.crm-shell .page-heading h1{font-size:24px;line-height:1.25}
 .page-heading{align-items:stretch}.page-heading>.actions{width:100%;gap:8px}.page-heading .actions>.button{flex:1 1 auto;white-space:normal;text-align:center}
 .padded,.client-panel,.contact-editor,.contact-suggestions{padding:18px}.stats{gap:10px}.crm-shell .stat{padding:14px}.stat strong{font-size:26px}
 .project-grid,.contact-fields,.contact-conflicts,.contact-suggestion-list,.estimate-fields{grid-template-columns:minmax(0,1fr)}
 .client-panel dl{display:block}.client-panel dt{margin-top:16px}.client-panel dd{margin:4px 0 0}
 .pipeline-toolbar{justify-content:flex-start}.pipeline-toolbar>.actions{width:100%;justify-content:space-between}.pipeline-filter{width:100%;display:flex;gap:8px}.pipeline-filter select{flex:1;min-width:0}
 .pipeline-subbar{flex-wrap:wrap;gap:8px}.pipeline-board{grid-template-columns:repeat(5,minmax(260px,82vw));min-height:55dvh}
 .calendar-toolbar .actions{gap:8px}.calendar-toolbar h2{font-size:18px;margin:8px 0;flex-basis:100%}.calendar-toolbar .tabs{width:100%}.calendar-toolbar .tabs a{flex:1;justify-content:center}
 .time-calendar{max-height:65dvh;min-height:280px}.time-columns{grid-template-columns:48px repeat(var(--day-count),minmax(130px,1fr));min-width:calc(48px + var(--day-count)*130px)}
 .mail-row{padding:16px}.mail-meta{flex-wrap:wrap;gap:4px}.mail-meta>span{min-width:0;overflow-wrap:anywhere}.mail-actions{gap:4px 14px}.mail-actions a,.mail-actions .text-button{font-size:13px}
 .mail-reading,.mail-inline-reply{padding:12px}.mail-full-body{font-size:15px;max-height:60dvh}.inline-form{flex-wrap:wrap}.inline-form select{max-width:100%;flex:1 1 190px}
 .task-row{flex-wrap:wrap}.task-main{flex-basis:65%}.panel-heading{flex-wrap:wrap}.document-source{font-size:11px}.document-group>summary{gap:8px}.document-group-heading h2{font-size:16px}
 .estimate-builder-footer,.estimate-index-row{flex-direction:column;align-items:stretch}.estimate-line{gap:10px}.estimate-line input,.estimate-line select{width:100%}
 .modal,.crm-shell .modal,.task-planner{width:calc(100vw - 16px);max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);margin:auto;border-radius:12px}
 .modal-heading{padding:16px}.modal-heading h2{font-size:19px}.form-grid{padding:16px;grid-template-columns:minmax(0,1fr);gap:16px}.form-grid .span2{grid-column:auto}
 .modal-footer{padding:14px 16px;flex-wrap:wrap}.modal-footer>.button{flex:1;white-space:normal}.planner-fields{padding:0 16px 18px}.planner-dates{gap:12px}
 .activity-types{flex-wrap:wrap;gap:6px;width:100%}.activity-types label{flex:1 1 28%}.activity-types span,.activity-types label:first-of-type span,.activity-types label:last-of-type span{border-radius:7px;margin:0}
 .planner-agenda{height:320px}.pdf-preview{height:calc(100dvh - 16px)}.pdf-preview-toolbar{flex-wrap:wrap;padding:10px 14px}.pdf-preview-frame{min-height:150px}
 .crm-shell footer{padding:16px;gap:8px;flex-wrap:wrap}.login-page{padding:16px;min-height:100dvh}.login-card,.two-factor-card{padding:24px}.login-card h1{font-size:28px}
}
@media(max-height:600px) and (min-width:768px){
 .crm-shell .sidebar .brand{margin-bottom:8px}.crm-shell .sidebar nav{gap:6px}.crm-shell .sidebar-bottom{padding-top:8px}
 .modal,.task-planner{max-height:calc(100dvh - 16px)}.time-calendar{min-height:240px}
}

/* Auth cards must not give the grid an intrinsic width wider than the phone. */
.login-page{grid-template-columns:minmax(0,1fr);padding:24px 16px;min-height:100svh}
.login-page .login-card{width:min(520px,100%);min-width:0;max-width:100%;justify-self:center;overflow-wrap:anywhere}
.login-page .two-factor-card{width:min(480px,100%)}
.login-page .login-card>*{min-width:0;max-width:100%}
.login-page .button.full{white-space:normal;text-align:center;justify-content:center;min-height:48px}
.login-page .trusted-choice>span{min-width:0}
@media(max-width:520px){
 .login-page{padding:20px 16px}
 .login-page .login-card{padding:26px 22px;border-radius:18px}
 .login-page .login-card .brand-icon{margin-bottom:24px}
 .login-page .login-card h1{font-size:28px;line-height:1.2}
 .login-page .login-card>p.muted{font-size:15px;line-height:1.6}
 .login-page .login-features{gap:6px;margin:20px 0 24px}
 .login-page .login-features span{font-size:11px;padding:6px 8px}
 .login-page .login-footer{margin-top:24px;font-size:11px}
}
@media(max-height:600px){.login-page{align-items:start}}

/* Compact sign-in layout, shared by Microsoft login and verification. */
.login-page{padding:20px 16px}
.login-page .login-card,.login-page .two-factor-card{width:min(420px,100%);padding:28px;border-radius:18px}
.login-page .auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:24px;font-size:14px;font-weight:650;line-height:1.35}
.login-page .auth-brand .brand-icon{width:38px;height:38px;font-size:23px;border-radius:10px;margin:0}
.login-page .auth-brand small{display:block;font-size:12px;font-weight:400;color:var(--muted);margin-top:3px}
.login-page .login-card h1{font-size:26px;line-height:1.2;margin-bottom:8px;letter-spacing:-.6px}
.login-page .login-card>p.muted{font-size:14px;line-height:1.5;margin-bottom:22px}
.login-page .login-card>.fine{font-size:12px;line-height:1.5;margin:14px 0 0}
.login-page .login-card .auth-form{margin:18px 0;gap:8px}
.login-page .two-factor-card .otp-input{height:52px;font-size:24px}
.login-page .two-factor-card .trusted-choice{padding:12px;margin:6px 0}
.login-page .two-factor-card .recovery-option{padding-top:14px}
.login-page .two-factor-card .auth-cancel{margin-top:14px}
.login-page .login-card .login-footer{margin-top:18px;padding-top:14px;font-size:10px}
@media(max-width:520px){
 .login-page .login-card,.login-page .two-factor-card{padding:24px 20px}
 .login-page .auth-brand{margin-bottom:22px;font-size:13px}
 .login-page .login-card h1{font-size:25px}
}

/* Project cost ledger */
.cost-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}.cost-form label,.cost-receipt label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:600;min-width:0}.cost-form>div{align-self:end}.cost-form .fine{margin:0}.cost-disclosure{margin:16px 0}.cost-disclosure summary{cursor:pointer;color:var(--accent);font-size:14px;padding:8px 0}.cost-entry{border-top:1px solid var(--line);padding:20px 0;overflow-wrap:anywhere}.cost-entry-heading{display:flex;justify-content:space-between;gap:16px}.cost-entry-heading>div{min-width:0}.cost-entry-heading>strong{white-space:nowrap}.cost-entry p{margin:6px 0;font-size:14px}.cost-void,.cost-receipt{display:flex;flex-wrap:wrap;align-items:center;gap:14px;margin-top:18px}.cost-void label,.cost-review{display:flex;align-items:flex-start;gap:10px;font-size:13px}.cost-void input,.cost-review input{width:20px;height:20px;flex-shrink:0;margin:0}.cost-review{padding:18px 0}.cost-table-wrap{overflow:auto}.cost-table{border-collapse:collapse;width:100%;margin-top:15px;font-size:14px}.cost-table td,.cost-table th{text-align:left;padding:12px;border-bottom:1px solid var(--line)}.cost-stats .stat strong{font-size:clamp(21px,2.3vw,30px)}
@media(max-width:767px){.cost-form{grid-template-columns:minmax(0,1fr)}.cost-form .span2{grid-column:auto}.cost-entry-heading{flex-wrap:wrap;gap:4px}.cost-stats{grid-template-columns:minmax(0,1fr)}.cost-receipt input[type=file]{max-width:100%}}

.manual-quote{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:12px 0;margin:20px 0}
.manual-quote>summary{font-weight:600;font-size:13px;line-height:1.5}
.manual-quote>.fine{font-size:12px;line-height:1.6;margin:10px 0 0}
.manual-quote .manual-quote-form{grid-template-columns:minmax(0,1fr);gap:14px;margin:18px 0 8px}
.manual-quote-form input,.manual-quote-form select,.manual-quote-form textarea{font-weight:400;line-height:1.5;width:100%;min-width:0}
.manual-quote-form textarea{min-height:92px}
.manual-quote-form>.button{width:100%;min-height:44px;justify-content:center;white-space:normal;align-self:start}
.manual-quote .cost-void{padding-top:12px;border-top:1px solid var(--line)}

@media(min-width:1101px){.project-detail{grid-template-columns:minmax(0,1fr) 370px}}

/* Quiet, compact editable customer details. */
.client-panel .client-edit-hint{font-size:12px;line-height:1.5;color:var(--muted);margin:18px 0 8px}
.client-panel .client-data-field{margin:0;padding:14px 0;border-bottom:1px solid var(--line)}
.client-data-field .inline-field-label{font-size:11px;font-weight:600;letter-spacing:.2px;margin:0 0 3px;color:#747783}
.client-panel .client-data-field .inline-field-value{font-size:14px;font-weight:500;line-height:1.6;padding:7px 8px;margin-left:-8px;width:calc(100% + 8px);min-height:38px;border-radius:8px;align-items:center}
.client-data-field .inline-field-value .preserve{font-size:14px;line-height:1.6;min-width:0}
.client-data-field .inline-pencil{display:grid;place-items:center;width:26px;height:26px;border-radius:6px;color:#8b8e98}
.client-data-field .inline-field-value:hover .inline-pencil{background:#e9edf0;color:var(--accent)}
.client-data-field .client-empty{font-size:13px!important;color:#9295a0;font-weight:400}
.client-panel .client-notes{margin-top:18px;padding:14px;background:#f7f8fa;border:1px solid #edf0f3;border-radius:10px}
.client-notes .inline-field-value{align-items:flex-start!important}
.client-notes .inline-field-value .preserve{font-size:13px;line-height:1.7;font-weight:400}
.client-data-field form{margin-top:8px}.client-data-field form input,.client-data-field form textarea{font-size:14px;line-height:1.6;border-radius:8px}.client-data-field .actions .button{min-height:38px;font-size:12px}
@media(max-width:767px){.client-data-field .inline-field-value{min-height:44px!important}.client-data-field form input,.client-data-field form textarea{font-size:16px}.client-data-field .actions .button{min-height:44px}}

/* Subtle grouping for the customer sidebar. */
.client-panel .client-card-heading{display:flex;align-items:center;gap:12px;margin-bottom:20px;min-width:0}.client-card-heading>div{min-width:0}.client-card-heading .eyebrow{font-size:10px;letter-spacing:1.5px;margin:0 0 4px;color:#78837d}.client-card-heading strong{font-size:16px;line-height:1.4;overflow-wrap:anywhere}.client-monogram{display:grid;place-items:center;flex:0 0 40px;height:40px;border-radius:12px;background:#edf2ef;color:#547262;font-size:21px;font-weight:650}
.client-panel .client-group{border:1px solid;border-radius:12px;padding:16px;margin-top:14px}.client-panel .client-group h3{font-size:12px;font-weight:650;letter-spacing:.15px;margin:0 0 10px}.client-panel .client-finance{background:#f2f7f3;border-color:#e0eae3}.client-finance h3{color:#496452}.client-panel .client-contact{background:#f4f7fa;border-color:#e3e9ef}.client-contact h3{color:#52677e}.client-panel .client-memo{background:#faf8f3;border-color:#ede8dc}.client-memo h3{color:#7a6b4f}
.client-finance .project-money-totals{border:0;padding:0;margin:0}.client-finance .project-money-totals small{font-size:11px;line-height:1.6;margin-top:10px}.client-finance .manual-quote{border-top:1px solid #dce6df;border-bottom:0;margin:14px 0 0;padding:10px 0 0}.client-finance .manual-quote>summary{font-size:12px;color:#496452}.client-panel .client-edit-hint{font-size:11px;margin:14px 2px 0}
.client-contact .client-data-field{padding:10px 0;border-color:#e1e7ed}.client-contact .client-data-field:last-child{border-bottom:0;padding-bottom:0}.client-panel .client-memo .client-notes{margin:0;padding:0;border:0;background:transparent}.client-memo .inline-field-label{display:none}.client-memo .inline-field-value .preserve{font-size:13px;line-height:1.75}.client-group .inline-field-value:hover,.client-group .inline-field-value:focus-visible{background:#ffffffb3}.client-contact .inline-field-label{color:#6b7b8b}.client-group .inline-pencil{color:#8a969e}

.client-route-link{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:3px 0;font-size:12px;font-weight:500;color:#526d87}.client-route-link:hover{color:#284e70}.client-route-link>svg{flex-shrink:0}@media(pointer:coarse),(max-width:767px){.client-route-link{min-height:44px}}

/* Shared muted palette for the project cost workspace. */
.cost-stats{gap:14px}.cost-stats .stat{border-radius:12px;box-shadow:none;border:1px solid;padding:20px;min-width:0}.cost-stats .stat>span{font-size:12px;font-weight:600;line-height:1.5}.cost-stats .stat>strong{margin:10px 0 8px;letter-spacing:-.6px}.cost-stats .stat>small{font-size:11px;line-height:1.6}
.cost-stats .cost-revenue{background:#f2f7f3;border-color:#e0eae3}.cost-revenue>span{color:#496452}.cost-stats .cost-labour{background:#f4f7fa;border-color:#e3e9ef}.cost-labour>span{color:#52677e}.cost-stats .cost-purchases{background:#faf8f3;border-color:#ede8dc}.cost-purchases>span{color:#7a6b4f}.cost-stats .cost-result{background:#f5f4f8;border-color:#e7e3ed}.cost-result>span{color:#6b617d}.cost-stats .cost-result.attention{background:#fbf3f2;border-color:#efdfdc}.cost-result.attention>strong{color:#945a52}
.cost-summary-note{font-size:12px;line-height:1.7;margin:16px 0 24px;color:#777c85;max-width:1100px}
.cost-workspace .ledger-panel{border-radius:12px;padding:22px;margin:18px 0;border:1px solid;box-shadow:none;min-width:0}.cost-workspace .ledger-hours{background:#f4f7fa;border-color:#e3e9ef;--ledger-ink:#52677e;--ledger-line:#dfe6ee}.cost-workspace .ledger-purchases{background:#faf8f3;border-color:#ede8dc;--ledger-ink:#7a6b4f;--ledger-line:#e8e2d6}.cost-workspace .ledger-team{background:#f5f4f8;border-color:#e7e3ed;--ledger-ink:#6b617d;--ledger-line:#e5e0ec}
.ledger-panel>h2{font-size:16px;margin:0 0 12px;color:var(--ledger-ink)}.ledger-panel>summary{font-size:14px;font-weight:600;color:var(--ledger-ink);cursor:pointer;line-height:1.5}.ledger-panel .cost-disclosure{margin:12px 0}.ledger-panel .cost-disclosure>summary{font-size:13px;font-weight:600;color:var(--ledger-ink);min-height:40px;line-height:1.6}.ledger-panel .cost-disclosure[open]>summary{border-bottom:1px solid var(--ledger-line);padding-bottom:12px}.ledger-panel>p.muted{font-size:13px;margin:14px 0 0}.ledger-panel .pagination:empty{display:none}.ledger-panel .cost-form{background:#fff;border:1px solid var(--ledger-line);padding:18px;border-radius:10px;gap:16px;margin:16px 0 4px}.ledger-panel .cost-form input,.ledger-panel .cost-form select,.ledger-panel .cost-form textarea{background:#fff;font-weight:400}.ledger-panel .cost-form .button{white-space:normal;min-height:42px}.ledger-panel .cost-entry{border-color:var(--ledger-line);padding:18px 0}.ledger-panel .cost-entry:last-of-type{padding-bottom:0}.ledger-panel .cost-table{background:#ffffffa6;border-radius:8px}.ledger-team>h3{font-size:14px;margin-top:20px;color:var(--ledger-ink)}
@media(max-width:1000px) and (min-width:768px){.cost-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:767px){.cost-stats{gap:10px}.cost-stats .stat{padding:16px}.cost-workspace .ledger-panel{padding:16px;margin:14px 0}.ledger-panel .cost-form{padding:14px;gap:14px}.ledger-panel .cost-form input,.ledger-panel .cost-form select,.ledger-panel .cost-form textarea{font-size:16px}.ledger-panel .cost-disclosure>summary{min-height:44px}.ledger-panel .cost-form .button{width:100%;min-height:44px}.cost-summary-note{font-size:11px}}

/* Project files: quiet upload area and compact document rows. */
.project-files-content .files-toolbar{align-items:center;justify-content:space-between;gap:16px;margin:0 0 18px}.files-toolbar h3,.files-list-heading h3{font-size:13px;margin:0;color:#52677e}.files-toolbar p{font-size:12px;color:var(--muted);margin:5px 0 0;line-height:1.5}.files-toolbar .button{flex-shrink:0;font-size:12px;color:#647180;min-height:38px}
.project-files-content>.files-upload{display:flex;align-items:flex-end;gap:14px;margin:0 0 24px;padding:18px;background:#f4f7fa;border:1px solid #e3e9ef;border-radius:12px}.files-upload label{display:flex;flex-direction:column;flex:1;min-width:0;gap:6px;font-size:13px;font-weight:600;color:#52677e}.files-upload label>span{font-size:11px;font-weight:400;color:#78838f}.files-upload input[type=file]{width:100%;min-width:0;font-size:12px;font-weight:400;background:white;border:1px solid #dfe6ee;padding:8px;border-radius:8px;line-height:1.6;margin-top:6px}.files-upload input::file-selector-button{border:0;border-radius:5px;background:#edf1f5;color:#52677e;padding:7px 10px;margin-right:10px;font:inherit;cursor:pointer}.files-upload .button{min-height:46px;font-size:13px;white-space:nowrap}
.files-list-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.files-list-heading a{font-size:12px;color:#64798a}.files-list-heading a[hidden]{display:none}.project-files-content>.files-status{font-size:11px;color:#858b96;margin:7px 0 12px}.project-files .files-list{list-style:none;padding:0;margin:0}.project-files .files-list li{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid #edf0f3}.project-files .files-list li:last-child{border-bottom:0}.files-type{flex:0 0 42px;display:grid;place-items:center;height:44px;border-radius:9px;background:#f2f7f3;color:#607b69;font-size:10px;font-weight:650;letter-spacing:.3px}.files-item-info{min-width:0;flex:1}.files-item-info a,.files-item-info>span{font-size:13px;font-weight:500;line-height:1.5;color:#3f5261;overflow-wrap:anywhere}.files-item-info a:hover{color:var(--accent);text-decoration:underline}.files-item-info small{display:block;font-size:11px;color:#8b919b;margin-top:3px}.files-open{color:#94a0ac;font-size:17px}
.files-settings{border-top:1px solid #edf0f3;margin-top:18px;padding-top:12px}.files-settings summary{font-size:11px;color:#858b96;cursor:pointer;padding:8px 0}.files-settings p{font-size:12px;line-height:1.7;color:var(--muted);margin:8px 0}.files-settings a{color:#64798a}
@media(max-width:767px){.project-files-content>.files-upload{flex-direction:column;align-items:stretch;padding:14px;gap:12px}.files-upload .button{width:100%;min-height:44px}.files-toolbar p{max-width:190px}.files-toolbar .button{min-height:44px}.files-settings summary{min-height:44px}.files-list-heading a{padding:10px 0}.files-item-info a{display:inline-block;padding:5px 0}}

.files-thumbnail{width:48px;height:48px;flex:0 0 48px;object-fit:cover;border:1px solid #e3e9ef;border-radius:9px;background:#f4f7fa}.files-delete{border:0;background:transparent;color:#8a7474;font-size:11px;cursor:pointer;padding:10px 6px;min-height:40px}.files-delete:hover{background:#fbf3f2;color:#945a52;border-radius:6px}.files-delete:disabled{opacity:.5;cursor:wait}@media(max-width:767px){.project-files .files-list li{flex-wrap:wrap}.files-delete{margin-left:auto;min-height:44px}.files-item-info{flex-basis:calc(100% - 95px)}}

.files-delete-dialog{border:1px solid #e3e9ef;border-radius:14px;padding:24px;width:min(440px,calc(100vw - 32px));max-width:calc(100vw - 32px);margin:auto;box-shadow:0 16px 60px #172b3a26}.files-delete-dialog::backdrop{background:#1a293959}.files-delete-dialog h2{font-size:18px;margin:0 0 12px}.files-delete-dialog p{font-size:14px;line-height:1.6;overflow-wrap:anywhere;color:#707986}.files-delete-dialog .actions{justify-content:flex-end;margin-top:22px;gap:10px}.files-delete-dialog .button{min-height:44px}.files-delete-dialog .button:last-child{background:#f8eded;border-color:#ecd8d6;color:#945a52}

/* Prominent route action with a generous phone touch target. */
.client-panel .client-route-link{display:flex;width:100%;box-sizing:border-box;gap:12px;min-height:60px;padding:12px 16px;margin-top:12px;border:1px solid #426c87;border-radius:10px;background:#426c87;color:#fff;font-size:16px;font-weight:650;line-height:1.3;text-decoration:none}.client-panel .client-route-link:hover{background:#365b74;border-color:#365b74;color:#fff}.client-route-link small{display:block;margin-top:3px;color:#e1eaf0;font-size:11px;font-weight:400}.client-route-arrow{margin-left:auto;font-size:23px}.client-panel .client-route-link:focus-visible{outline:3px solid #8ab7d4;outline-offset:3px}.client-panel .client-route-link:active{background:#2f5066}@media(max-width:767px){.client-panel .client-route-link{min-height:64px;font-size:17px}}

/* Consistent, grouped project overview controls. */
.projects-controls{border:1px solid #e3e9ef;border-radius:12px;margin-bottom:12px;overflow:hidden;background:white;flex-shrink:0}.projects-controls-top{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px}.projects-controls-title{display:flex;align-items:center;gap:12px;min-width:0}.projects-controls-title h1{font-size:20px;letter-spacing:-.3px;margin:0}.projects-total{padding:5px 9px;border-radius:7px;background:#f2f7f3;color:#647c6c;font-size:11px;white-space:nowrap}.projects-actions{display:flex;align-items:center;gap:18px}.projects-secondary{font-size:12px;color:#727d8a;line-height:1.4;min-height:40px;display:inline-flex;align-items:center}.projects-secondary:hover{color:#365b74}.projects-actions>.button{min-height:40px;font-size:12px;border-radius:8px;white-space:nowrap}.projects-controls-bottom{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:12px 18px;background:#f4f7fa;border-top:1px solid #e3e9ef}.projects-controls .view-switch{border:1px solid #dfe6ee;border-radius:8px;background:white;flex-shrink:0}.projects-controls .view-switch a{font-size:12px;gap:8px;height:38px;min-width:90px;padding:8px 12px;line-height:1;color:#7a8693}.projects-controls .view-switch a.selected{background:#e7eef4;color:#42647e;box-shadow:none;font-weight:650}.projects-controls .view-switch .ui-icon{width:16px;height:16px}.projects-filter{display:flex;gap:8px;align-items:center;margin:0;min-width:0}.projects-filter label{font-size:11px;color:#7a8693;margin-right:2px}.projects-filter select{width:175px;min-width:0;height:38px;padding:7px 10px;background:#fff;border-color:#dfe6ee;border-radius:8px;font-size:12px}.projects-filter .button{min-height:38px;font-size:12px;border-color:#dfe6ee;color:#52677e;border-radius:8px}.projects-page .pipeline-subbar{font-size:10px;color:#8a919b;margin:0 2px 14px}
@media(max-width:900px){.projects-controls-top{flex-wrap:wrap}.projects-actions{margin-left:auto;gap:14px}}
@media(max-width:600px){.projects-controls-top{padding:14px;gap:10px}.projects-controls-title{width:100%;justify-content:space-between}.projects-controls-title h1{font-size:18px}.projects-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:4px 12px}.projects-actions>.button{grid-column:1/-1;grid-row:1;min-height:44px;width:100%;justify-content:center}.projects-secondary{justify-content:center;min-height:44px;font-size:12px}.projects-controls-bottom{flex-wrap:wrap;padding:12px 14px;gap:12px}.projects-controls .view-switch{width:100%}.projects-controls .view-switch a{flex:1;height:44px}.projects-filter{width:100%;gap:8px}.projects-filter label{display:none}.projects-filter select{flex:1;width:0;height:44px;font-size:14px}.projects-filter .button{min-height:44px}}

.website-inquiry-notice{display:flex;gap:8px 16px;flex-wrap:wrap;align-items:center;background:#f2f7f3;border:1px solid #e0eae3;border-radius:10px;color:#496452;font-size:12px}.website-inquiry-notice span{color:#6b7c71}.website-inquiry-notice p{flex-basis:100%;margin:0}

/* Match the homepage content width throughout the dashboard, including desktop gutters. */
.crm-shell main{width:100%;max-width:1728px;margin-inline:auto}
