/* ZeroniX Agency OS v1.5 — screenshot-driven responsive, readability and workflow corrections */
:root{
  --zx-sidebar:264px;
  --zx-bg:#f3f6fa;
  --zx-surface:#ffffff;
  --zx-surface-soft:#f8fafc;
  --zx-text:#132036;
  --zx-copy:#48566d;
  --zx-muted:#6e7b90;
  --zx-border:#dbe3ed;
  --zx-primary:#2667e8;
  --zx-primary-2:#19a9c3;
  --zx-focus:rgba(38,103,232,.18);
  --zx-shadow:0 12px 34px rgba(27,49,78,.09);
  --zx-shadow-lg:0 24px 70px rgba(27,49,78,.15);
  --zx-radius:18px;
}
html{font-size:16px;text-size-adjust:100%}
body{font-family:"Segoe UI Variable Text","Segoe UI",Inter,system-ui,-apple-system,BlinkMacSystemFont,sans-serif}

/* One layout system only: prevents the double sidebar offset shown in v1.4. */
.dashboard-shell,.client-shell{display:grid!important;grid-template-columns:var(--zx-sidebar) minmax(0,1fr)!important;min-height:100dvh!important}
.dashboard-sidebar,.client-sidebar{position:sticky!important;inset:auto!important;top:0!important;width:var(--zx-sidebar)!important;height:100dvh!important;min-width:0!important}
.dashboard-main,.client-main{margin-left:0!important;width:auto!important;min-width:0!important;max-width:none!important}
.dashboard-content,.client-content{box-sizing:border-box!important;width:100%!important;max-width:1600px!important;margin-inline:auto!important;padding:clamp(1rem,2.25vw,2rem)!important;overflow:visible!important}
.dashboard-topbar,.client-topbar{height:auto!important;min-height:72px!important;gap:1rem!important}
.dashboard-topbar>div:first-child,.client-topbar>div:first-child{min-width:0;flex:1}
.dashboard-topbar .toolbar,.client-topbar .toolbar{justify-content:flex-end;min-width:0}

/* Universal readable surfaces. */
.dashboard-body,.client-body{background:var(--zx-bg)!important;color:var(--zx-text)!important}
.dashboard-body :where(h1,h2,h3,h4,strong,label,legend,summary,dt),.client-body :where(h1,h2,h3,h4,strong,label,legend,summary,dt){color:var(--zx-text)}
.dashboard-body :where(p,small,dd,li,.form-help),.client-body :where(p,small,dd,li,.form-help){color:var(--zx-copy)}
.panel,.detail-card,.kpi-card,.manager-card,.team-card,.finance-card,.project-overview-card,.requirement-card,.document-client-card,.payment-stage,.project-list-card,.vault-card,.hosting-asset-card{background:var(--zx-surface)!important;color:var(--zx-text)!important;border-color:var(--zx-border)!important;box-shadow:var(--zx-shadow)!important}
.panel-header{background:var(--zx-surface-soft)!important;border-color:var(--zx-border)!important}
.panel-header h2,.panel-header strong{color:var(--zx-text)!important}
.panel-header small{color:var(--zx-muted)!important}
.panel-body{min-width:0;color:var(--zx-text)!important}
.panel-body :where(p,small,li){color:var(--zx-copy)!important}

/* Grid children must be allowed to shrink without clipping money/text. */
.dashboard-grid,.detail-grid,.kpi-grid,.action-centre,.payment-layout,.payment-stage-grid,.project-profile-grid,.form-grid,.team-layout,.team-grid,.portfolio-manager-layout,.cms-layout,.finance-layout,.hosting-layout,.settings-layout{min-width:0!important}
.dashboard-grid>* ,.detail-grid>* ,.kpi-grid>* ,.action-centre>* ,.payment-layout>* ,.payment-stage-grid>* ,.form-grid>* ,.team-layout>* ,.team-grid>* ,.portfolio-manager-layout>* ,.cms-layout>* ,.finance-layout>* ,.hosting-layout>* ,.settings-layout>*{min-width:0!important;max-width:100%}
.kpi-grid{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important}
.kpi-card{min-height:126px!important;overflow:hidden}
.kpi-card strong{font-size:clamp(1.45rem,2.3vw,2.05rem)!important;line-height:1.14;overflow-wrap:anywhere}
.dashboard-grid{grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr)!important}

/* Forms never escape their cards. */
.field,.field input,.field select,.field textarea,.toolbar input,.toolbar select{min-width:0;max-width:100%;box-sizing:border-box}
.field input,.field select,.field textarea,.toolbar input,.toolbar select{background:#fff!important;color:var(--zx-text)!important;border-color:#cbd7e5!important}
.field>span,.field label{color:#3a4960!important}
.field small,.form-help{color:#66758b!important}
input::placeholder,textarea::placeholder{color:#8b98aa!important;opacity:1}
input:focus,select:focus,textarea:focus{outline:0!important;border-color:var(--zx-primary)!important;box-shadow:0 0 0 4px var(--zx-focus)!important}
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.form-grid .full{grid-column:1/-1!important}

/* Notifications: readable, dismiss highlight on read, exact-source links. */
.notification-drawer{background:#fff!important;color:var(--zx-text)!important;border-color:var(--zx-border)!important;box-shadow:var(--zx-shadow-lg)!important}
.notification-drawer header{background:#f8fafc;border-color:var(--zx-border)!important}
.notification-item{color:var(--zx-text)!important;border:1px solid transparent}
.notification-item strong{color:var(--zx-text)!important}
.notification-item small{color:var(--zx-copy)!important}
.notification-item.unread{background:#eef5ff!important;border-color:#cfe0fa!important}
.notification-item:not(.unread){background:transparent!important;opacity:.9}
.nav-notification-pulse{animation:zxNavPulse 1.8s ease-in-out infinite}
@keyframes zxNavPulse{50%{filter:brightness(1.13)}}

/* Dashboard titles and project tabs. */
.dashboard-title{padding:0 0 1.15rem!important;margin:0!important;align-items:start!important}
.dashboard-title h1{font-size:clamp(1.75rem,2.7vw,2.55rem)!important;color:var(--zx-text)!important;max-width:24ch}
.dashboard-title p{color:var(--zx-copy)!important;max-width:900px}
.project-tabs{position:sticky;top:72px;z-index:35;display:flex;gap:.35rem;overflow-x:auto;padding:.6rem;margin:0 0 1rem;background:rgba(243,246,250,.94);backdrop-filter:blur(14px);border:1px solid var(--zx-border);border-radius:15px;scrollbar-width:thin}
.project-tabs a{flex:0 0 auto;padding:.65rem .85rem;border-radius:10px;color:#41516a;font-size:.84rem;font-weight:700}
.project-tabs a:hover,.project-tabs a.active{background:#fff;color:var(--zx-primary);box-shadow:0 4px 14px rgba(30,60,100,.08)}
.project-section{scroll-margin-top:150px}

/* Client action centre: one clear hierarchy, no squeezed balance cards. */
.client-content .action-centre{grid-template-columns:minmax(0,1.2fr) minmax(330px,.8fr)!important;align-items:start}
.client-content .project-overview-card{background:linear-gradient(145deg,#102239,#1a3654)!important;color:#fff!important;min-height:0!important}
.client-content .project-overview-card :where(h2,h3,strong){color:#fff!important}
.client-content .project-overview-card :where(p,small){color:#d9e5f3!important}
.project-head{align-items:flex-start}
.project-health{display:inline-flex;align-items:center;gap:.35rem;padding:.4rem .65rem;border-radius:999px;background:#e5f7ef!important;color:#126044!important;font-size:.78rem;font-weight:800;white-space:nowrap}
.project-progress{grid-template-columns:96px minmax(0,1fr)!important;margin-top:1.3rem!important}
.client-ring{width:96px!important;height:96px!important;color:#fff!important}
.client-ring strong{color:#fff!important}
.payment-position-grid,.client-money-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.65rem}
.payment-position-grid article,.client-money-grid article{min-width:0;padding:.9rem;border:1px solid var(--zx-border);border-radius:14px;background:#fff}
.payment-position-grid strong,.client-money-grid strong{display:block;font-size:clamp(1.05rem,2vw,1.45rem);line-height:1.2;overflow-wrap:anywhere;color:var(--zx-text)!important}
.payment-position-grid span,.client-money-grid span{display:block;color:var(--zx-muted);font-size:.76rem}
.next-action-card article:first-child{border:2px solid #a8c8fb!important;background:#f4f8ff!important}
.next-action-card h3{font-size:1.05rem!important;line-height:1.35}

/* Milestones: clear editable cards and client display. */
.milestone-admin-card{background:#fff!important;border:1px solid var(--zx-border)!important;border-radius:16px!important;box-shadow:0 8px 24px rgba(25,48,78,.06)!important;padding:1rem!important}
.milestone-admin-card .form-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}
.milestone-admin-card .field:first-of-type{grid-column:span 2}
.milestone-admin-card .full{grid-column:1/-1!important}
.milestone{grid-template-columns:42px minmax(0,1fr) auto!important;align-items:start!important;padding:1rem!important}
.milestone-meta{display:grid;gap:.45rem;justify-items:end}
.milestone-meta b{color:var(--zx-primary)}

/* Conversation rendering: no vertical single-letter messages, attachments and staff identity. */
.conversation-layout{min-width:0}
.conversation-view,.conversation-stream,.message-thread{min-width:0}
.conversation-stream{padding:1rem!important;background:#f7f9fc!important}
.chat-row{min-width:0}
.chat-row>div{width:auto!important;min-width:0!important;max-width:min(76%,720px)!important}
.chat-message{display:inline-block!important;width:auto!important;min-width:2.25rem!important;max-width:100%!important;white-space:pre-wrap!important;word-break:normal!important;overflow-wrap:anywhere!important;line-height:1.45!important;padding:.72rem .88rem!important}
.chat-row.user>div,.chat-row.team>div{display:block!important}
.chat-row.user .chat-message{float:right}
.chat-message.bot,.chat-message.team{background:#fff!important;color:#27364d!important;border:1px solid #d8e2ee!important}
.chat-message.user{color:#fff!important}
.message-sender{color:#486b9f!important;font-weight:750;margin-bottom:.25rem!important}
.message-attachment{display:inline-flex;align-items:center;gap:.45rem;margin-top:.55rem;padding:.5rem .65rem;border-radius:10px;background:rgba(38,103,232,.09);color:#245caf!important;font-weight:700}
.conversation-composer,.message-compose{background:#fff!important;border-color:var(--zx-border)!important;align-items:end!important}
.conversation-composer input,.conversation-composer textarea{min-width:0!important;color:var(--zx-text)!important;background:#fff!important;border:1px solid #cbd7e5!important}
.thread-message{max-width:min(78%,760px)!important;white-space:normal!important;word-break:normal!important;overflow-wrap:anywhere!important}
.thread-message.team{background:#eef3fa!important;color:#24344b!important}
.thread-message.client{color:#fff!important}

/* Chatbot: predictable 4-zone layout and usable choice scroll. */
.chat-panel{display:grid!important;grid-template-rows:auto auto minmax(150px,1fr) minmax(0,auto) auto auto!important;width:min(470px,calc(100vw - 24px))!important;height:min(760px,calc(100dvh - 32px))!important;max-height:calc(100dvh - 16px)!important;overflow:hidden!important;inset:auto 12px 12px auto!important;border-radius:22px!important;background:#f4f7fb!important;color:#1e2c42!important}
.chat-header{min-width:0;background:linear-gradient(135deg,#10243e,#19496a)!important;color:#fff!important}
.chat-agent{min-width:0}.chat-agent strong,.chat-agent small{color:#fff!important}.chat-reference{color:#1e5948!important;background:#e8f7f1!important;border-color:#c7e8dc!important}
.chat-messages{min-height:0!important;overflow-y:auto!important;background:#eef3f9!important;color:#24344a!important;scrollbar-gutter:stable!important}
.chat-message.bot{background:#fff!important;color:#34445d!important;border-color:#dae3ee!important}
.chat-message.team{background:#e8f2ff!important;color:#244d80!important;border-color:#bfd7f4!important}
.chat-choices{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:.5rem!important;max-height:min(210px,29dvh)!important;overflow-y:auto!important;overflow-x:hidden!important;align-content:start!important;padding:.7rem!important;background:#f8fafc!important;border-block:1px solid #dce4ef!important;scrollbar-width:auto!important;overscroll-behavior:contain!important}
.chat-choice{width:100%!important;min-width:0!important;max-width:none!important;white-space:normal!important;text-align:left!important;line-height:1.3!important;color:#29405f!important;background:#fff!important;border:1px solid #ccd9e8!important;border-radius:12px!important;padding:.68rem .72rem!important}
.chat-choice:hover,.chat-choice:focus-visible{background:#edf5ff!important;border-color:#7ca9e8!important;transform:none!important}
.chat-form{grid-template-columns:minmax(0,1fr) auto!important;background:#fff!important;border-color:#dce4ef!important}
.chat-form input{color:#24344a!important;background:#fff!important;border:1px solid #cbd7e5!important}
.chat-footer{background:#fff!important;color:#6a778c!important;border-color:#dce4ef!important}
.chat-human-link{color:#245caf!important}
.chat-panel.human-active .chat-choices{display:none!important}
.chat-panel.human-active .chat-form input{border-color:#77a7e8!important;background:#f7fbff!important}
.chat-panel.human-active .chat-footer::before{content:"Human support is active";color:#187653;font-weight:750;margin-right:auto}

/* Proposal: readable screen layout separate from A4 print. */
.proposal-body{padding:clamp(.75rem,2vw,2rem)!important;background:#eaf0f6!important;color:var(--zx-text)!important}
.proposal-shell{width:min(1040px,100%)!important;max-width:1040px!important;margin:0 auto!important;border-radius:18px!important;box-shadow:var(--zx-shadow-lg)!important;font-size:16px!important;line-height:1.68!important;overflow:hidden!important}
.proposal-shell>header{padding:1.1rem 1.5rem!important;background:#10243a!important;color:#fff!important}
.proposal-shell>header span{color:#b9c9dc!important;font-size:.75rem!important}
.proposal-shell>header strong{color:#fff!important;font-size:.92rem!important}
.proposal-title{padding:clamp(1.5rem,4vw,3rem)!important;background:linear-gradient(135deg,#f8fbff,#edf4fb)!important;color:var(--zx-text)!important}
.proposal-title .eyebrow{color:#315d9a!important}
.proposal-title h1{font-size:clamp(2.1rem,5vw,4rem)!important;color:#11223a!important;max-width:18ch}
.proposal-title>p{color:#42536a!important;font-size:1.05rem!important;max-width:850px}
.proposal-meta{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.proposal-meta span{background:#fff!important;border:1px solid #d5e0ec!important;color:#2f4158!important;min-width:0}
.proposal-meta b{color:#62728a!important}
.proposal-section{padding:clamp(1.35rem,3vw,2.2rem)!important;background:#fff!important;color:var(--zx-text)!important}
.proposal-section h2{font-size:1.35rem!important;color:#14253d!important}
.proposal-section p,.proposal-section li{font-size:1rem!important;color:#384961!important}
.proposal-section table{display:table;width:100%;color:var(--zx-text)!important}
.proposal-section th{background:#102b47!important;color:#fff!important}
.proposal-section td{color:#273950!important}
.proposal-payment-grid article{background:#f5f8fc!important;border-color:#d5e0ec!important}
.proposal-payment-grid strong{color:var(--zx-primary)!important}
.proposal-payment-grid span{color:#17273e!important}
.proposal-payment-grid p{color:#526279!important}
.proposal-decision{padding:clamp(1.35rem,3vw,2.2rem)!important;background:#eef3f8!important;gap:1rem!important}
.proposal-decision>div{color:var(--zx-text)!important}
.proposal-decision p,.proposal-decision label span{color:#46566d!important}
.proposal-decision .btn{width:100%}

/* Portfolio and manager modules. */
.portfolio-grid{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))!important}
.portfolio-card{background:linear-gradient(155deg,#121d2c,#182c43)!important;border-color:rgba(160,195,225,.22)!important}
.portfolio-card h2,.portfolio-card h3,.portfolio-card strong{color:#fff!important}
.portfolio-card p,.portfolio-card small,.portfolio-card li{color:#d4deea!important}
.portfolio-card img{aspect-ratio:16/10;object-fit:cover}
.portfolio-card::after{content:"";position:absolute;inset:auto 0 0;height:3px;background:linear-gradient(90deg,var(--zx-primary),var(--zx-primary-2));transform:scaleX(0);transform-origin:left;transition:.3s ease}
.portfolio-card:hover::after{transform:scaleX(1)}
.portfolio-manager-layout,.team-layout,.cms-layout,.document-studio-layout{grid-template-columns:minmax(0,1.45fr) minmax(320px,.55fr)!important;align-items:start}
.team-grid{grid-template-columns:repeat(auto-fit,minmax(300px,1fr))!important}
.team-card{padding:1rem!important;overflow:hidden}
.team-card form{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--zx-border)}
.team-card-head{align-items:center}
.team-dp{flex:0 0 auto}

/* Alerts, secure records and document cards. */
.alert{border-radius:13px!important;line-height:1.55}
.alert,.alert p,.alert strong,.alert small{color:#27364b!important}
.alert-success{background:#e6f7ef!important;border-color:#b8e5d0!important}
.alert-warning{background:#fff4d8!important;border-color:#eed998!important}
.alert-error{background:#ffe9eb!important;border-color:#efb8bf!important}
.vault-client-item,.document-client-card{background:#fff!important;color:var(--zx-text)!important;border-color:var(--zx-border)!important}
.vault-client-item :where(strong,a),.document-client-card :where(h3,strong,a){color:var(--zx-text)!important}
.vault-client-item small,.document-client-card p,.document-client-card small{color:var(--zx-copy)!important}
.document-client-card{grid-template-columns:48px minmax(0,1fr) minmax(180px,auto)!important}
.document-actions{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end}
.document-actions form{display:flex;flex-wrap:wrap;gap:.45rem}

/* Public site readability. */
.public-site .service-index-card{background:linear-gradient(145deg,#12243a,#172f49)!important;border-color:rgba(159,197,230,.24)!important;color:#fff!important}
.public-site .service-index-card h2,.public-site .service-index-card h3{color:#fff!important}
.public-site .service-index-card p,.public-site .service-index-card li,.public-site .service-index-card small{color:#d6e0ed!important}
.public-site .contact-card{background:linear-gradient(145deg,#12243a,#172f49)!important;color:#fff!important}
.public-site .contact-card h2,.public-site .contact-card h3,.public-site .contact-card strong{color:#fff!important}
.public-site .contact-card p,.public-site .contact-card small{color:#d7e1ee!important}
.planner-card,.planner-aside{overflow:hidden}
.planner-card .field input,.planner-card .field select,.planner-card .field textarea{width:100%!important;max-width:100%!important}

/* Breakpoints. */
@media(max-width:1180px){
  :root{--zx-sidebar:86px}
  .dashboard-sidebar .brand span,.client-sidebar .brand span,.dashboard-nav a span,.client-sidebar nav a span,.sidebar-user,.client-sidebar footer{display:none!important}
  .dashboard-sidebar .brand,.client-sidebar .brand,.dashboard-nav a,.client-sidebar nav a{justify-content:center!important}
  .dashboard-nav a,.client-sidebar nav a{grid-template-columns:1fr!important}
  .dashboard-grid{grid-template-columns:1fr!important}
  .client-content .action-centre{grid-template-columns:1fr!important}
  .portfolio-manager-layout,.team-layout,.cms-layout,.document-studio-layout{grid-template-columns:1fr!important}
  .milestone-admin-card .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:900px){
  .payment-position-grid,.client-money-grid,.payment-stage-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .proposal-meta{grid-template-columns:1fr!important}
  .proposal-decision{grid-template-columns:1fr!important}
  .document-client-card{grid-template-columns:44px minmax(0,1fr)!important}
  .document-actions{grid-column:2;justify-content:flex-start}
}
@media(max-width:760px){
  .dashboard-shell,.client-shell{display:block!important}
  .dashboard-sidebar,.client-sidebar{position:fixed!important;left:0!important;top:0!important;bottom:0!important;right:auto!important;width:min(310px,88vw)!important;height:100dvh!important;z-index:500!important;transform:translateX(-104%);transition:transform .25s ease;padding:1rem!important}
  .dashboard-body.nav-open .dashboard-sidebar,.client-body.nav-open .client-sidebar{transform:none}
  .dashboard-sidebar .brand span,.client-sidebar .brand span,.dashboard-nav a span,.client-sidebar nav a span,.sidebar-user,.client-sidebar footer{display:block!important}
  .dashboard-nav,.client-sidebar nav{display:grid!important;margin:1rem 0!important;overflow-y:auto!important}
  .dashboard-nav a,.client-sidebar nav a{display:grid!important;grid-template-columns:32px minmax(0,1fr) auto!important;justify-content:stretch!important;text-align:left!important;min-width:0!important}
  .dashboard-main,.client-main{width:100%!important}
  .dashboard-topbar,.client-topbar{padding:.65rem .8rem!important;min-height:64px!important}
  .dashboard-topbar .toolbar,.client-topbar .toolbar{gap:.35rem!important}
  .dashboard-content,.client-content{padding:.85rem!important;padding-bottom:1.25rem!important}
  .mobile-nav-button{display:grid!important;position:fixed!important;left:.65rem!important;bottom:.65rem!important;z-index:450!important;width:48px!important;height:48px!important;border-radius:15px!important;place-items:center!important}
  .dashboard-overlay{display:block!important;position:fixed;inset:0;z-index:480;background:rgba(8,16,27,.54);opacity:0;pointer-events:none;transition:.2s}
  .nav-open .dashboard-overlay{opacity:1;pointer-events:auto}
  .form-grid{grid-template-columns:1fr!important}
  .form-grid .full{grid-column:auto!important}
  .kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .project-tabs{top:64px}
  .chat-panel{inset:0!important;width:100vw!important;height:100dvh!important;max-height:100dvh!important;border-radius:0!important}
  .chat-choices{grid-template-columns:1fr!important;max-height:32dvh!important}
  .proposal-body{padding:.45rem!important}
  .proposal-shell{border-radius:10px!important}
  .proposal-section,.proposal-title,.proposal-decision{padding:1.1rem!important}
  .proposal-section table{display:block;overflow-x:auto;white-space:nowrap}
  .milestone-admin-card .form-grid{grid-template-columns:1fr!important}
  .milestone-admin-card .field:first-of-type{grid-column:auto}
}
@media(max-width:520px){
  .kpi-grid,.payment-position-grid,.client-money-grid,.payment-stage-grid{grid-template-columns:1fr!important}
  .dashboard-title{grid-template-columns:1fr!important}
  .dashboard-title>.btn,.dashboard-title>.toolbar{justify-self:start}
  .client-topbar .deadline-clock,.dashboard-topbar .live-clock,.client-topbar .live-clock{display:none!important}
  .document-client-card{grid-template-columns:38px minmax(0,1fr)!important;padding:.8rem!important}
  .milestone{grid-template-columns:38px minmax(0,1fr)!important}
  .milestone-meta{grid-column:2;justify-items:start;grid-auto-flow:column;justify-content:start}
  .chat-header{padding-top:calc(.65rem + env(safe-area-inset-top))!important}
}

@media print{
  .proposal-body{background:#fff!important;padding:0!important}
  .proposal-shell{width:210mm!important;max-width:210mm!important;border-radius:0!important;box-shadow:none!important;font-size:10.5pt!important}
  .proposal-shell>header{padding:10mm 12mm!important}
  .proposal-title,.proposal-section,.proposal-decision{padding:9mm 12mm!important}
  .proposal-title h1{font-size:26pt!important}
  .proposal-section h2{font-size:14pt!important}
  .proposal-section p,.proposal-section li,.proposal-section td,.proposal-section th{font-size:9.5pt!important}
  .proposal-decision{display:none!important}
  .proposal-section{break-inside:avoid-page}
}

/* v1.5 workflow components and final screenshot corrections */
.project-profile-grid{display:grid!important;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr)!important;gap:1rem!important;align-items:stretch!important}
.client-content .project-status-card{background:linear-gradient(145deg,#102239,#1a3654)!important;color:#fff!important}
.client-content .project-status-card :where(h2,h3,strong){color:#fff!important}
.client-content .project-status-card :where(p,small){color:#d9e5f3!important}
.client-content .project-payment-card{background:#fff!important;color:var(--zx-text)!important}
.client-content .project-payment-card :where(h2,h3,strong){color:var(--zx-text)!important}
.client-content .project-payment-card :where(p,small){color:var(--zx-copy)!important}
.client-content .project-payment-card>.btn{margin-top:1rem}
.finance-summary.compact{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:.65rem!important}
.finance-summary.compact .finance-card{min-width:0!important;padding:.85rem!important;box-shadow:none!important;background:#f8fafc!important}
.finance-summary.compact .finance-card strong{font-size:clamp(1.05rem,1.8vw,1.4rem)!important;overflow-wrap:anywhere!important}

.client-notice-board{display:grid;gap:.75rem;margin-bottom:1rem}
.client-notice{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:1rem;padding:1rem 1.1rem;border:1px solid #cad9ea;border-radius:16px;background:linear-gradient(135deg,#f8fbff,#edf5ff);box-shadow:var(--zx-shadow)}
.client-notice>span{padding:.35rem .55rem;border-radius:999px;background:#ddebff;color:#245caf;font-size:.72rem;font-weight:850;text-transform:uppercase;letter-spacing:.05em}
.client-notice.offer{background:linear-gradient(135deg,#fff8e9,#fff1cd);border-color:#efd89a}
.client-notice.offer>span{background:#f5db8e;color:#704e06}
.client-notice h2{margin:0 0 .25rem;font-size:1.05rem}
.client-notice p{margin:0}

.requirement-grid,.requirement-review-list{display:grid!important;gap:1rem!important}
.requirement-card,.requirement-review-card{min-width:0;border:1px solid var(--zx-border);border-radius:16px;padding:1rem;background:#fff;box-shadow:0 7px 22px rgba(25,48,78,.055)}
.requirement-card>header,.requirement-review-card>header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin-bottom:.7rem}
.requirement-card>header span,.requirement-review-card>header small{display:block;color:var(--zx-muted)!important;font-size:.76rem}
.requirement-card h3{margin:.15rem 0 0;font-size:1.05rem}
.requirement-card.needs_correction,.requirement-review-card.needs_correction{border-color:#e3b75c;background:#fffaf0}
.requirement-card.approved,.requirement-review-card.approved{border-color:#aad9c5;background:#f7fcfa}
.requirement-form,.requirement-review-actions{display:grid;gap:.75rem;margin-top:.85rem;padding-top:.85rem;border-top:1px solid var(--zx-border)}
.submitted-value{padding:.8rem;border-radius:12px;background:#f4f7fb;border:1px solid #dbe5f0;margin:.6rem 0}
.submitted-value p{margin:.25rem 0 0}
.onboarding-summary{display:grid;grid-template-columns:minmax(220px,1fr) auto;align-items:center;gap:1rem;margin-bottom:1rem;padding:1rem;border:1px solid var(--zx-border);border-radius:16px;background:#fff;box-shadow:var(--zx-shadow)}
.onboarding-summary strong{font-size:1.5rem}

.conversation-assignee{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:1rem!important;flex-wrap:wrap!important}
.message-author{display:flex;align-items:center;gap:.65rem;min-width:0}
.message-author>div{min-width:0}
.message-author h2,.message-author small{margin:0}
.message-author img,.message-author>span,.team-dp{width:38px!important;height:38px!important;border-radius:50%!important;display:grid!important;place-items:center!important;background:#e8eff8 center/cover no-repeat!important;color:#245caf!important;font-weight:850!important;object-fit:cover!important;overflow:hidden!important}
.team-dp.has-image{color:transparent!important}
.message-thread{display:grid;gap:.75rem;padding:1rem;background:#f5f8fc;min-height:260px;max-height:56dvh;overflow:auto}
.thread-message{display:block;width:fit-content!important;min-width:48px!important;padding:.72rem .86rem!important;border-radius:15px!important;line-height:1.45!important}
.thread-message.client{margin-left:auto!important;background:linear-gradient(135deg,#2670e8,#1ca4c5)!important}
.thread-message.team{margin-right:auto!important}
.thread-message>p{margin:.25rem 0!important;color:inherit!important;white-space:pre-wrap!important;word-break:normal!important;overflow-wrap:anywhere!important}
.thread-message>small{display:block;margin-top:.35rem;color:inherit!important;opacity:.75}
.message-compose{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(210px,.45fr) auto!important;gap:.75rem!important;padding:1rem!important}
.message-compose .full{min-width:0}

.hosting-client-layout{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.65fr);gap:1rem;align-items:start}
.hosting-recommendation{margin-bottom:1rem;padding:1rem;border:1px solid #cbdbee;border-radius:16px;background:linear-gradient(135deg,#f7fbff,#edf5ff)}
.hosting-recommendation header{display:flex;justify-content:space-between;gap:1rem;align-items:start}
.hosting-recommendation h3{margin:.25rem 0;font-size:1.25rem}
.hosting-asset-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(270px,1fr));gap:1rem}
.vault-client-list{display:grid;gap:.75rem}
.vault-client-item{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;gap:.75rem!important;align-items:center!important;padding:.8rem!important;border:1px solid var(--zx-border)!important;border-radius:13px!important}
.vault-client-item a:not(.btn){display:block;margin-top:.2rem;color:#245caf!important;overflow-wrap:anywhere}

.document-register{display:grid;gap:.7rem}
.document-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto auto;gap:.8rem;align-items:center;padding:.85rem;border:1px solid var(--zx-border);border-radius:14px;background:#fff}
.document-row>span:first-child{width:38px;height:38px;border-radius:11px;display:grid;place-items:center;background:#edf4ff;color:#245caf;font-weight:850}
.document-row p{margin:.35rem 0 0}
.document-client-grid{display:grid;gap:.75rem}
.document-response-note{width:100%}

.project-tabs::-webkit-scrollbar,.chat-choices::-webkit-scrollbar,.message-thread::-webkit-scrollbar{height:9px;width:9px}
.project-tabs::-webkit-scrollbar-thumb,.chat-choices::-webkit-scrollbar-thumb,.message-thread::-webkit-scrollbar-thumb{background:#aebdd0;border-radius:999px;border:2px solid transparent;background-clip:padding-box}
.chat-choices{min-height:0!important}
.chat-panel .chat-messages{scroll-behavior:smooth}
.chat-panel .chat-form{position:relative;z-index:3}

/* Screen proposal actions stay easy to reach without shrinking the document. */
@media screen and (min-width:901px){
  .proposal-decision{position:sticky;bottom:0;z-index:15;box-shadow:0 -15px 35px rgba(21,40,65,.08)}
}

@media(max-width:1180px){
  .project-profile-grid,.hosting-client-layout{grid-template-columns:1fr!important}
}
@media(max-width:900px){
  .finance-summary.compact{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .message-compose{grid-template-columns:1fr!important}
  .document-row{grid-template-columns:40px minmax(0,1fr)!important}
  .document-row>.badge,.document-row>.btn{grid-column:2;justify-self:start}
}
@media(max-width:620px){
  .finance-summary.compact{grid-template-columns:1fr!important}
  .client-notice{grid-template-columns:1fr!important}
  .client-notice .btn{justify-self:start}
  .onboarding-summary{grid-template-columns:1fr!important}
  .vault-client-item{grid-template-columns:auto minmax(0,1fr)!important}
  .vault-client-item>.btn{grid-column:2;justify-self:start}
  .chat-panel{inset:0!important}
  .chat-choices{max-height:36dvh!important}
}

/* v1.6 release-candidate hardening */
.skip-link{position:fixed;z-index:10000;left:1rem;top:-5rem;padding:.75rem 1rem;background:#fff;color:#11223a;border-radius:10px;box-shadow:0 8px 24px rgba(0,0,0,.2);font-weight:800;transition:top .2s}.skip-link:focus{top:1rem}
:where(.dashboard-body,.client-body,.public-site) *{box-sizing:border-box}
:where(.dashboard-body,.client-body) :where(a,button,input,select,textarea,summary):focus-visible,.public-site :where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid #6da6ff!important;outline-offset:3px!important}
.dashboard-content,.client-content{contain:inline-size}
.panel,.manager-card,.detail-card,.project-list-card,.team-card,.portfolio-card,.contact-card,.service-index-card{overflow-wrap:anywhere}
.table-wrap{max-width:100%;overflow:auto;overscroll-behavior-inline:contain}
.chat-panel{min-height:min(540px,100dvh)!important}
.chat-messages{overscroll-behavior:contain!important}
.chat-choices:empty{display:none!important}
.chat-choice{min-height:46px!important}
.chat-form button{min-width:48px;min-height:44px}
.notification-item{min-height:56px}
.proposal-meta span{overflow-wrap:anywhere}
.proposal-section td,.proposal-section th{vertical-align:top}
.public-site img{max-width:100%;height:auto}
.public-site .section{content-visibility:auto;contain-intrinsic-size:1px 700px}
.public-site .page-hero,.public-site header,.public-site footer,.public-site .chat-panel{content-visibility:visible}
@media(max-width:900px){.dashboard-topbar,.client-topbar{position:sticky;top:0;z-index:60;background:rgba(255,255,255,.96);backdrop-filter:blur(12px)}.dashboard-content,.client-content{padding:1rem!important}.project-tabs{top:68px!important}.proposal-meta{grid-template-columns:1fr!important}.proposal-payment-grid{grid-template-columns:1fr!important}}
@media(max-width:420px){.dashboard-content,.client-content{padding:.75rem!important}.panel-body,.panel-header{padding:.85rem!important}.chat-panel{min-height:100dvh!important}.chat-choices{max-height:31dvh!important}.btn{white-space:normal;text-align:center}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}
