/* CA Portal Crystal Watercolor — v1.15.78. SCREEN ONLY.
   Shared presentation layer: zero changes to permission, forms, calculations, print or stored data.
   All selectors are scoped to the portal shell; color meanings for money/status are preserved. */
@media screen {
html body.msa-crystal-ui:is(.portal-context-staff,.portal-context-admin,.portal-context-client,.portal-context-associate,.portal-context-public){
 --msa-water-ink:#173b60;--msa-water-soft:#5b7590;--msa-water-line:rgba(111,157,194,.23);
 --msa-water-white:rgba(255,255,255,.95);--msa-water-focus:#176aa9;
 background:
 radial-gradient(ellipse 48% 36% at 4% 14%,rgba(175,221,255,.42),transparent 78%),
 radial-gradient(ellipse 45% 42% at 91% 8%,rgba(166,240,231,.40),transparent 76%),
 radial-gradient(ellipse 34% 32% at 68% 64%,rgba(226,211,255,.39),transparent 80%),
 linear-gradient(120deg,#eef6ff 0%,#f6f3ff 48%,#ebfaf8 100%)!important;
 color:var(--msa-water-ink);
 -webkit-font-smoothing:antialiased;
}
/* Keep backgrounds gentle; the header remains readable at small sizes. */
body.msa-crystal-ui .portal-topbar{
 background:rgba(255,255,255,.92)!important;
 border-bottom:1px solid rgba(127,173,205,.26)!important;
 box-shadow:0 5px 24px rgba(30,82,134,.07)!important;
 backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
}
body.msa-crystal-ui .topbar-shell{gap:clamp(7px,1vw,16px)}
body.msa-crystal-ui .portal-brand .brand-mark{background:linear-gradient(135deg,#17477d,#1a88b1 75%,#1ca996)!important;box-shadow:0 7px 18px rgba(23,93,148,.2);border-radius:13px}
body.msa-crystal-ui .portal-brand .brand-copy strong{color:#194570}
body.msa-crystal-ui .portal-brand .brand-copy small{color:#647f98}
body.msa-crystal-ui .topnav-menu{
 border:1px solid #d3e5f0!important;border-radius:17px!important;
 box-shadow:0 18px 45px rgba(17,63,107,.16)!important;background:#fff!important;
}
body.msa-crystal-ui .topnav a:focus-visible,body.msa-crystal-ui .topnav button:focus-visible,
body.msa-crystal-ui :is(a,button,input,textarea,select,[role="button"],summary):focus-visible{
 outline:3px solid rgba(24,110,169,.58)!important;outline-offset:2px;
}
/* Universal information surfaces. Do not force a background on charts or tables themselves. */
body.msa-crystal-ui :is(.card,.form-card,.data-center,.work-form-card,.hero-card,.stat,.metric-card,.billingx-card,.staff-salary-card,.staff-payroll-card,.simplex-bank-panel,.fee-work-card,.fee-closing-wrap,.collection-center-panel,.work-card){
 border:1px solid var(--msa-water-line)!important;
 border-radius:clamp(15px,1.4vw,22px)!important;
 box-shadow:0 12px 34px rgba(36,76,132,.07),inset 0 1px 0 rgba(255,255,255,.85)!important;
}
body.msa-crystal-ui :is(.card,.form-card,.data-center,.work-form-card,.stat,.metric-card,.billingx-card,.staff-salary-card,.staff-payroll-card,.simplex-bank-panel,.fee-work-card,.fee-closing-wrap,.collection-center-panel,.work-card){
 background:linear-gradient(144deg,rgba(255,255,255,.98),rgba(248,252,255,.95) 60%,rgba(239,250,248,.9))!important;
}
body.msa-crystal-ui :is(.dashboard-head,.staff-live-switch,.billingx-summary,.staff-modern-hero-chips,.actions){gap:clamp(8px,1vw,14px)}
/* Professional compact headings and consistent vertical rhythm. */
body.msa-crystal-ui main.wrap{width:min(1250px,calc(100% - 32px));min-width:0}
body.msa-crystal-ui :is(.dashboard-head,.section,.billingx-head,.staff-gst-live-head) h1{letter-spacing:-.025em;line-height:1.16}
body.msa-crystal-ui :is(.dashboard-head,.billingx-head,.data-center,.card) h2{letter-spacing:-.02em}
body.msa-crystal-ui :is(.dashboard-head,.staff-modern-hero,.staff-hero){margin-top:clamp(10px,1.8vw,22px)}
body.msa-crystal-ui :is(.staff-modern-hero,.staff-gst-live-top,.staff-hero,.msa-u-head){
 background:linear-gradient(114deg,#173c73 0%,#1876a6 52%,#109a8b 100%)!important;
 color:#fff!important;box-shadow:0 14px 32px rgba(24,92,143,.16)!important;
 border:1px solid rgba(255,255,255,.27)!important;
 border-radius:22px!important;
}
body.msa-crystal-ui :is(.staff-modern-hero,.staff-gst-live-top,.staff-hero) :is(h1,h2,h3,.staff-modern-welcome-name,.staff-gst-live-title){color:#fff}
body.msa-crystal-ui :is(.staff-modern-hero,.staff-gst-live-top,.staff-hero) :is(p,small){color:rgba(242,250,255,.86)}
/* Dashboard numbers retain their semantic positive/negative colors. */
body.msa-crystal-ui :is(.staff-gst-live-card,.billingx-stat,.metric-card,.stat,.kpi,.staff-due-kpi,.collect-kpi,.fee-stat){
 transition:box-shadow .16s ease,border-color .16s ease,transform .16s ease;
}
@media(hover:hover) and (prefers-reduced-motion:no-preference){
 body.msa-crystal-ui :is(a.staff-gst-live-card,a.quick-card,a.desk-quick-tile,a.billingx-client,.staff-live-switch>a):hover{transform:translateY(-2px);box-shadow:0 13px 26px rgba(29,98,144,.13)!important}
}
/* Buttons: clear small controls, no broad recoloring of delete/warning/pay indicators. */
body.msa-crystal-ui :is(.btn,button[type="submit"],.msa-u-btn){
 border-radius:11px;min-height:37px;font-weight:750;letter-spacing:-.005em;
}
body.msa-crystal-ui :is(.btn:not(.btn-secondary):not(.btn-danger),.msa-u-btn:not(.msa-u-btn-secondary)){
 box-shadow:0 6px 14px rgba(25,103,157,.11)
}
body.msa-crystal-ui :is(.btn,.msa-u-btn):hover:not(:disabled){filter:brightness(1.045)}
body.msa-crystal-ui button:disabled,body.msa-crystal-ui [aria-disabled="true"]{cursor:not-allowed!important;opacity:.62}
/* Input family and native select accessibility. Exclude tiny checkbox/radio and hidden controls. */
body.msa-crystal-ui :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]),select,textarea){
 border-color:#cfe0ed;border-radius:11px;background-color:#fff;
 box-shadow:inset 0 1px 2px rgba(49,87,126,.025);
 max-width:100%;color:#173f61;
}
body.msa-crystal-ui :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),select,textarea):focus{
 border-color:#2b8eae;box-shadow:0 0 0 3px rgba(44,151,179,.16)!important;outline:none;
}
body.msa-crystal-ui input[type="checkbox"],body.msa-crystal-ui input[type="radio"]{accent-color:#078d84}
body.msa-crystal-ui label{color:#305776}
/* Financial tables: preserve chronological rows and totals. Do not restyle amounts by their color. */
body.msa-crystal-ui :is(.table-wrap,.billingx-table-wrap,.fee-table-wrap){
 border-radius:16px;border:1px solid #d9e8f2;background:#fff;overscroll-behavior-x:contain
}
body.msa-crystal-ui table{font-variant-numeric:tabular-nums}
body.msa-crystal-ui :is(table>thead>tr>th,table thead th){
 background:linear-gradient(135deg,#e8f2fb,#e6f7f4)!important;
 color:#315573!important;font-size:12px;font-weight:800;
 letter-spacing:.018em;border-bottom:1px solid #d5e7ed;
}
body.msa-crystal-ui table tbody tr:nth-child(even){background-color:rgba(240,248,254,.37)}
body.msa-crystal-ui table tbody tr:hover{background-color:rgba(219,241,253,.26)}
body.msa-crystal-ui table :is(td,th){overflow-wrap:anywhere}
body.msa-crystal-ui table td{border-bottom:1px solid rgba(133,170,199,.15)}
/* Modal cards are scrollable even in smaller desktop windows; do not touch modal visibility. */
body.msa-crystal-ui :is(.fee-modal-card,.portal-document-modal-card,.msa-modal-card,.simplex-modal-card){
 border:1px solid rgba(187,215,234,.9);border-radius:21px!important;
 box-shadow:0 24px 70px rgba(15,49,83,.27)!important;
 max-height:calc(100dvh - 38px);overflow-y:auto;overscroll-behavior:contain;
}
body.msa-crystal-ui :is(.fee-modal-head,.portal-document-modal-head){
 background:linear-gradient(110deg,#eaf5ff,#edfcf7)!important;border-bottom:1px solid #d8e7f1;
}
/* Update centre: premium cohesive view, compact and direct action. */
body.msa-crystal-ui .msa-u-all{max-width:1100px;margin:18px auto 42px}
body.msa-crystal-ui .msa-u-head{
 position:relative;overflow:hidden;padding:28px 32px!important;
 background:linear-gradient(112deg,#123f77,#1688ae 58%,#119887)!important;
}
body.msa-crystal-ui .msa-u-head:after{content:"";position:absolute;width:245px;height:245px;right:-76px;top:-108px;border-radius:50%;background:rgba(255,255,255,.13);pointer-events:none}
body.msa-crystal-ui .msa-u-head h1{font-size:clamp(26px,3vw,36px);letter-spacing:-.03em}
body.msa-crystal-ui .msa-u-card{
 border-radius:19px!important;border:1px solid #d7e8f1!important;
 background:linear-gradient(135deg,#fff,#f4faff 70%,#effcf8)!important;
 box-shadow:0 9px 27px rgba(20,84,128,.06)!important;
 padding:20px 22px!important;
}
body.msa-crystal-ui .msa-u-layout{gap:12px}
body.msa-crystal-ui .msa-u-version{font-size:clamp(24px,2.6vw,32px);color:#174a78}
body.msa-crystal-ui .msa-u-good{background:#e1f8ef;border:1px solid #b7e8d8;color:#0b7555;border-radius:12px}
body.msa-crystal-ui .msa-u-btn{min-height:42px}
body.msa-crystal-ui .msa-u-role a{background:rgba(239,249,255,.82);border:1px solid #d5e6f2;border-radius:13px}
body.msa-crystal-ui .msa-u-role a:hover{background:#e2f7f3;border-color:#8ed3c6}
body.msa-crystal-ui .msa-u-caution{border-radius:11px;background:#fff8eb}
body.msa-crystal-ui .footer{color:#6c879e}
/* Semantic styles: do not change .due, .paid, .danger, .error or warning classes. */
@media(max-width:900px){
 body.msa-crystal-ui main.wrap{width:calc(100% - 22px)}
 body.msa-crystal-ui .stats-4,body.msa-crystal-ui .staff-gst-live-grid{gap:9px}
 body.msa-crystal-ui .msa-u-head{padding:22px!important}
}
@media(max-width:640px){
 body.msa-crystal-ui main.wrap{width:calc(100% - 16px)}
 body.msa-crystal-ui :is(.card,.data-center,.form-card,.work-form-card){padding:clamp(13px,3vw,19px)}
 body.msa-crystal-ui :is(.staff-modern-hero,.staff-gst-live-top,.staff-hero){border-radius:17px!important;padding:16px!important}
 body.msa-crystal-ui :is(.msa-u-card,.msa-u-head){padding:16px!important}
 body.msa-crystal-ui .msa-u-role{grid-template-columns:repeat(2,minmax(0,1fr))}
 body.msa-crystal-ui :is(.msa-u-btn,.btn){max-width:100%}
 body.msa-crystal-ui .table-wrap{max-width:100%;overflow-x:auto}
 body.msa-crystal-ui :is(.fee-modal-card,.portal-document-modal-card){max-height:calc(100dvh - 14px);border-radius:16px!important}
}
@media(prefers-reduced-motion:reduce){body.msa-crystal-ui *,body.msa-crystal-ui *:before,body.msa-crystal-ui *:after{transition-duration:.01ms!important;animation-duration:.01ms!important;scroll-behavior:auto!important}}
}
