@font-face{font-family:NGFSignature;src:url('../signature-font.php?v=1') format('truetype');font-weight:400;font-style:normal;font-display:swap}
.ma-banner{background:#edf4fc;border:1px solid #c4d7ef;border-left:5px solid #225991;border-radius:12px;padding:16px 20px;margin:18px 0;line-height:1.6}.ma-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:20px 0}.ma-stats div{padding:20px;background:white;border:1px solid #dbe3ec;border-radius:12px}.ma-stats b{display:block;font-size:30px;color:#173c69}.ma-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.ma-tabs .selected{background:#173c69;color:white}.ma-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(320px,1fr);gap:20px}.ma-flags{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}.ma-flags label{display:flex;align-items:flex-start;gap:8px;font-weight:400}.ma-tag{display:inline-block;border-radius:20px;padding:5px 10px;background:#eaf1fa;color:#254d78;font-size:12px;margin:3px}.ma-tag.good{background:#e2f3e8;color:#205a39}.ma-tag.wait{background:#fff0cc;color:#714f09}.ma-event{border-left:3px solid #dce6f0;padding:8px 16px;margin:12px 0}.ma-event small{color:#61738c}.ma-event p{white-space:pre-wrap;overflow-wrap:anywhere}.ma-note{min-height:180px;width:100%;resize:vertical}.ma-table{overflow-x:auto}.ma-table table{width:100%;border-collapse:collapse}.ma-table td,.ma-table th{text-align:left;border-bottom:1px solid #e1e7ef;padding:14px 12px;vertical-align:top}.ma-table th{background:#f3f6fa;font-size:12px;text-transform:uppercase}.ma-step{padding:12px;border-bottom:1px solid #e3e8ee}.ma-step b{float:right}.ma-library{max-height:550px;overflow:auto}.ma-library li{margin:12px 0;line-height:1.6}.ma-invoice{background:#f8fbff;border-radius:12px;padding:20px}.ma-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center}button:disabled{opacity:.5;cursor:not-allowed}@media(max-width:1000px){.ma-grid{grid-template-columns:1fr}}@media(max-width:650px){.ma-stats{grid-template-columns:repeat(2,1fr)}}

.ma-source{white-space:pre-wrap;overflow-wrap:anywhere;max-height:450px;overflow:auto;font-size:12px}.auth-card{max-width:750px;margin:45px auto;padding:30px;background:white;border-radius:15px}
.ma-terms{white-space:pre-line;line-height:1.65;background:#f6f8fb;padding:20px;border-radius:8px;margin:20px 0}.ma-consent{display:flex;align-items:flex-start;gap:10px;margin:16px 0}.ma-consent input{width:auto;flex-shrink:0;margin-top:5px}

.ma-type-tabs{display:flex;gap:14px;margin:24px 0}.ma-type-tabs button{font-size:20px;font-weight:700;padding:17px 28px;border:2px solid #bacada;border-radius:12px}.ma-type-tabs button.selected{background:#163f72;color:#fff;border-color:#163f72}.ma-type-tabs span{display:inline-block;margin-left:10px;opacity:.8}

.ma-retainer-html{max-height:600px;overflow:auto;border:1px solid #dbe3ec;border-radius:10px;padding:22px;font-size:14px;line-height:1.6;color:#323232;overflow-wrap:anywhere}.ma-retainer-html img{display:block;margin:0 auto;max-width:100%;height:auto}.ma-retainer-html h2{text-align:center;font-size:22px;line-height:1.3}.ma-retainer-html p{margin:14px 0}

/* Thor Marital Agreements full-width workspace */
body.ma-fullscreen .staff-layout{display:block!important;grid-template-columns:minmax(0,1fr)!important;min-height:100vh}
body.ma-fullscreen #ma-nav{display:none!important}
body.ma-fullscreen .staff-main{width:100%;max-width:none;min-width:0;margin:0;padding:0 24px}
body.ma-fullscreen .staff-main>header.firm{max-width:none;width:100%;padding:16px 0;display:flex;align-items:center;justify-content:space-between;gap:16px}
body.ma-fullscreen .staff-main>header.firm>a{font-weight:700}
body.ma-fullscreen #ma-root{max-width:none;width:100%;min-width:0}
body.ma-fullscreen #ma-root:has(>.ma-tabs){display:grid;grid-template-columns:190px minmax(0,1fr);gap:14px 20px;align-items:start}
body.ma-fullscreen #ma-root:has(>.ma-tabs)>.row,body.ma-fullscreen #ma-root:has(>.ma-tabs)>.ma-banner,body.ma-fullscreen #ma-root:has(>.ma-tabs)>.ma-type-tabs,body.ma-fullscreen #ma-root:has(>.ma-tabs)>.ma-stats{grid-column:1/-1}
body.ma-fullscreen #ma-root:has(>.ma-tabs)>.ma-tabs{grid-column:1;grid-row:5;display:flex;flex-direction:column;align-items:stretch;gap:6px;position:sticky;top:12px;padding:10px;border:1px solid #d8e0eb;border-radius:12px;background:#fff}
body.ma-fullscreen #ma-root:has(>.ma-tabs)>.ma-tabs~*{grid-column:2}
body.ma-fullscreen #ma-root:has(>.ma-tabs)>.ma-tabs button{width:100%;text-align:left;justify-content:flex-start}
.ma-folder-card{margin-top:18px}.ma-folder-card label{display:block;margin:12px 0;font-weight:600}.ma-folder-card input{display:block;width:100%;max-width:680px;margin-top:5px}.ma-folder-card .muted{font-weight:400;color:#667085}
@media(max-width:800px){body.ma-fullscreen .staff-main{padding:0 12px}body.ma-fullscreen #ma-root:has(>.ma-tabs){display:block}body.ma-fullscreen #ma-root:has(>.ma-tabs)>.ma-tabs{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:12px 0}body.ma-fullscreen #ma-root:has(>.ma-tabs)>.ma-tabs~*{grid-column:auto}}

/* Compact marital dashboard controls. */
.ma-fullscreen .staff-main{padding:4px 16px 18px!important}.ma-fullscreen .staff-main>header.firm{padding:6px 0!important;margin:0 auto!important;min-height:0!important;align-items:center!important}.ma-fullscreen .staff-main>header.firm strong{font-size:24px!important;line-height:1.15!important}.ma-fullscreen .staff-main>header.firm span{line-height:1.1!important}.ma-fullscreen .staff-main>header.firm a{font-size:14px!important}#ma-root{padding-top:0!important}#ma-root h1{margin:6px 0 4px!important}#ma-root .ma-type-tabs{gap:6px!important;margin:8px 0!important;flex-wrap:wrap!important}#ma-root .ma-type-tabs button{font-size:14px!important;padding:7px 12px!important;border-radius:8px!important}#ma-root .ma-type-tabs span{font-size:12px!important;margin-left:5px!important}#ma-root .ma-stats{display:flex!important;gap:6px!important;margin:7px 0 9px!important;flex-wrap:wrap!important}#ma-root .ma-stats>div{min-width:0!important;padding:6px 10px!important;font-size:12px!important;cursor:pointer!important;border-radius:8px!important}#ma-root .ma-stats b{font-size:15px!important}#ma-root .ma-tabs{display:flex!important;gap:6px!important;margin:6px 0 8px!important;align-items:center!important;flex-wrap:wrap!important}#ma-root .ma-tabs button{font-size:12px!important;padding:6px 9px!important;border-radius:7px!important}#ma-root .ma-tabs button[data-tab]:not([data-tab="Trash"]){display:none!important}#ma-root label:has(#work-status){display:none!important}#ma-root .ma-table{margin-top:8px!important}@media(max-width:700px){.ma-fullscreen .staff-main{padding:4px 10px 14px!important}.ma-fullscreen .staff-main>header.firm{gap:8px!important;flex-wrap:wrap!important}.ma-fullscreen .staff-main>header.firm strong{font-size:19px!important}#ma-root .ma-type-tabs button{font-size:13px!important;padding:6px 9px!important}#ma-root .ma-stats>div{padding:5px 8px!important}}

/* Compact top status shortcuts; keep the existing dashboard grid. */
#ma-root{margin-top:8px!important;padding-top:0!important}#ma-root>div:has(+.ma-tabs){display:none!important}#ma-root .ma-stats>div{color:#174a7e!important;text-decoration:underline!important;background:#fff!important;border-color:#b8c8d8!important}#ma-root .ma-stats>div:hover{background:#eff6ff!important}

/* Keep the top status shortcuts visible and clickable. */
#ma-root>div:has(+.ma-tabs){display:flex!important;flex-wrap:wrap!important;gap:8px!important;margin:8px 0!important}

/* Service selection lives in the compact buttons above; remove redundant card. */
#ma-root .ma-stats>:last-child{display:none!important}

/* Put the compact matter search in the title row; let the case table share the sidebar row. */
#ma-root{position:relative!important;grid-auto-flow:row dense!important}
#ma-root label[for="search"]{position:absolute!important;top:28px!important;right:150px!important;width:min(320px,32vw)!important;max-width:320px!important;margin:0!important;z-index:4!important}
#ma-root label[for="search"] input{width:100%!important;height:38px!important}
#ma-root .ma-table{margin-top:0!important;align-self:start!important}
#ma-root .ma-tabs:has(#library){align-self:start!important;margin-top:0!important}

#ma-root label[for="search"]{text-align:left!important}
#ma-root input#search{position:absolute!important;top:52px!important;right:150px!important;width:min(320px,32vw)!important;max-width:320px!important;height:38px!important;z-index:4!important}

#ma-root label[for="search"]{right:160px!important}
#ma-root input#search{right:160px!important}
#ma-root .ma-tabs:has(#library){position:absolute!important;top:280px!important;left:0!important;width:180px!important;display:flex!important;flex-direction:column!important;gap:6px!important;margin:0!important;z-index:3!important}

#ma-root div:has(>button#library){position:absolute!important;top:280px!important;left:0!important;width:180px!important;display:flex!important;flex-direction:column!important;gap:6px!important;z-index:10!important;padding:8px!important;border:1px solid #d8e0eb!important;border-radius:12px!important;background:#fff!important}
#ma-root div:has(>button#library)>button{width:100%!important;text-align:left!important}

/* Compact case workspace: keep utility rail and table together below the status links. */
#ma-root .ma-content-layout{display:grid!important;grid-template-columns:180px minmax(0,1fr)!important;gap:10px!important;align-items:start!important;margin-top:8px!important;position:relative!important}
#ma-root .ma-content-layout>.ma-tabs{position:static!important;top:auto!important;left:auto!important;grid-column:1!important;grid-row:1!important;width:auto!important;display:flex!important;flex-direction:column!important;gap:6px!important;align-self:start!important;z-index:auto!important}
#ma-root .ma-content-layout>.ma-tabs>button{width:100%!important;text-align:left!important}
#ma-root .ma-content-layout>.ma-table{grid-column:2!important;grid-row:1!important;margin:0!important;align-self:start!important;min-width:0!important}

#ma-root .ma-content-layout>:first-child{position:static!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;transform:none!important;grid-column:1!important;grid-row:1!important;align-self:start!important;margin:0!important;width:auto!important;display:flex!important;flex-direction:column!important;gap:6px!important}

#ma-root .ma-content-layout>:first-child:has(#library){position:static!important;top:auto!important;right:auto!important;bottom:auto!important;left:auto!important;transform:none!important;grid-column:1!important;grid-row:1!important;align-self:start!important;margin:0!important;width:auto!important;display:flex!important;flex-direction:column!important;gap:6px!important}


/* Thor personal admin and matter-list controls */
#thor-utilities{display:flex;align-items:center;justify-content:flex-end;gap:8px;grid-column:4;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
#thor-utilities button{white-space:nowrap;min-height:48px}
.thor-matter-link{color:#173c69;text-decoration:underline;text-underline-offset:3px;font-weight:700;cursor:pointer}
.thor-admin{width:100%;max-width:1200px;margin:0 auto}
.thor-admin-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:22px 0}
.thor-admin-head h1{margin:0}
.thor-admin-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.thor-admin-grid article{padding:22px;background:#fff;border:1px solid #dbe3ec;border-radius:12px}
.thor-admin-grid h2{font-size:20px;margin:0 0 10px}
.thor-admin-grid p{min-height:48px;color:#53657a;line-height:1.5}
.thor-admin-note{color:#61738c;margin-top:22px;font-size:13px}
@media(max-width:900px){#thor-utilities{grid-column:1/-1;justify-content:flex-start}.thor-admin-grid{grid-template-columns:1fr}.thor-admin-head{align-items:flex-start;flex-direction:column}}


/* Keep Find a matter clear of Open case and My Admin */
#ma-root label[for="search"],#ma-root #search{right:280px!important}
@media(max-width:1100px){#ma-root label[for="search"],#ma-root #search{position:static!important;right:auto!important;top:auto!important;width:min(100%,320px)!important}#ma-root>.row{flex-wrap:wrap}}


/* Full-width, responsive Thor matter list */
#ma-root{display:block!important;width:100%!important;max-width:none!important;grid-template-columns:minmax(0,1fr)!important;box-sizing:border-box}
#ma-root>.ma-tabs{display:none!important}
#ma-root>.ma-table{display:block;width:100%!important;max-width:none!important;margin:16px 0 18px!important;box-sizing:border-box}
#ma-root>.ma-table table{width:100%!important;max-width:none!important;table-layout:fixed}
#ma-root>.ma-table th,#ma-root>.ma-table td{overflow-wrap:anywhere;word-break:normal}
#ma-root>.ma-table th:last-child,#ma-root>.ma-table td:last-child{display:none}
#ma-root>.ma-table th:nth-child(1){width:27%}
#ma-root>.ma-table th:nth-child(2){width:23%}
#ma-root>.ma-table th:nth-child(3){width:30%}
#ma-root>.ma-table th:nth-child(4){width:20%}
@media(max-width:760px){#ma-root>.ma-table{overflow-x:visible}#ma-root>.ma-table table,#ma-root>.ma-table tbody,#ma-root>.ma-table tr,#ma-root>.ma-table td{display:block;width:100%}#ma-root>.ma-table thead{display:none}#ma-root>.ma-table tr{padding:10px 0;border-bottom:1px solid #dbe3ec}#ma-root>.ma-table td{padding:5px 12px;border:0}#ma-root>.ma-table td:nth-child(2)::before{content:"Service / work status";display:block;font-size:11px;font-weight:700;text-transform:uppercase;color:#53657a;margin-bottom:4px}#ma-root>.ma-table td:nth-child(3)::before{content:"Next action";display:block;font-size:11px;font-weight:700;text-transform:uppercase;color:#53657a;margin-bottom:4px}#ma-root>.ma-table td:nth-child(4)::before{content:"Assigned to";display:block;font-size:11px;font-weight:700;text-transform:uppercase;color:#53657a;margin-bottom:4px}}


/* Final dashboard spacing and fixed back-to-top control */
#ma-root label[for="search"]{right:280px!important}
#ma-root input#search{right:280px!important}
#ma-root .ma-stats>#thor-utilities{display:flex!important;align-items:center!important;gap:8px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
#thor-utilities button{min-height:38px;padding:8px 12px!important}
#thor-back-top{position:fixed!important;left:18px!important;bottom:18px!important;z-index:10000!important;padding:10px 14px!important;border-radius:9px!important;box-shadow:0 2px 10px #0003!important;background:#173c69!important;color:#fff!important}
@media(max-width:600px){#thor-back-top{left:10px!important;bottom:10px!important}}


/* My Admin financial and matter totals */
.thor-admin-analytics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:18px 0 24px}
.thor-admin-analytics article,.thor-admin-years{padding:18px;background:#fff;border:1px solid #dbe3ec;border-radius:12px}
.thor-admin-analytics article{display:flex;flex-direction:column;gap:8px}
.thor-admin-analytics article span{font-size:13px;color:#53657a}
.thor-admin-analytics article strong{font-size:30px;color:#173c69}
.thor-admin-analytics article small{font-size:12px;color:#61738c}
.thor-admin-years{grid-column:1/-1}
.thor-admin-years h2{font-size:18px;margin:0 0 12px}
.thor-admin-years>div{display:flex;justify-content:space-between;gap:16px;padding:9px 0;border-bottom:1px solid #e1e7ef}
@media(max-width:760px){.thor-admin-analytics{grid-template-columns:1fr}.thor-admin-years{grid-column:auto}}


/* Live currently-working indicator */
.thor-presence-live{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;padding:4px 8px;border:1px solid #b9dfc6;border-radius:999px;background:#edf8f0;color:#205a39;font-size:12px;font-weight:700}
.thor-presence-live i{display:inline-block;width:8px;height:8px;border-radius:50%;background:#198754;animation:thor-presence-pulse 1.8s ease-in-out infinite}
.thor-presence-idle{color:#718096;font-size:13px}
.thor-detail-presence{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:6px 0 14px;padding:10px 14px;background:#f3f8f4;border:1px solid #cde5d4;border-radius:10px}
@keyframes thor-presence-pulse{0%,100%{box-shadow:0 0 0 0 #19875466}50%{box-shadow:0 0 0 5px #19875400}}
@media(max-width:760px){.thor-presence-live{white-space:normal}}


/* Mobile list heading and search alignment */
@media(max-width:760px){
 body.ma-fullscreen #ma-root:has(>.ma-type-tabs){display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important}
 body.ma-fullscreen #ma-root:has(>.ma-type-tabs)>.row{grid-row:1;display:flex!important;flex-direction:column!important;align-items:stretch!important;gap:8px!important;margin:0!important}
 body.ma-fullscreen #ma-root:has(>.ma-type-tabs)>.row>.ma-actions{width:100%;justify-content:flex-start;flex-wrap:wrap}
 body.ma-fullscreen #ma-root:has(>.ma-type-tabs)>label[for="search"]{grid-row:2;position:static!important;inset:auto!important;display:block!important;width:100%!important;max-width:none!important;box-sizing:border-box!important;margin:8px 0 2px!important;text-align:left!important}
 body.ma-fullscreen #ma-root:has(>.ma-type-tabs)>input#search{grid-row:3;position:static!important;inset:auto!important;display:block!important;width:100%!important;max-width:none!important;box-sizing:border-box!important;margin:0 0 8px!important}
 body.ma-fullscreen #ma-root:has(>.ma-type-tabs)>.ma-type-tabs{grid-row:4;display:flex!important;flex-wrap:wrap!important;margin:0 0 8px!important}
 body.ma-fullscreen #ma-root:has(>.ma-type-tabs)>.ma-stats{grid-row:5;margin:0 0 8px!important}
 body.ma-fullscreen #ma-root:has(>.ma-type-tabs)>.ma-tabs{display:none!important}
 body.ma-fullscreen #ma-root:has(>.ma-type-tabs)>label:not([for="search"]){display:none!important}
 body.ma-fullscreen #ma-root:has(>.ma-type-tabs)>.ma-table{grid-row:6;margin:0 0 18px!important}
}


/* My Admin return link */
#ma-root .thor-admin-return{display:inline-flex;align-items:center;justify-content:center;white-space:nowrap;min-height:44px;padding:11px 17px;border:1px solid #b4c1cc;border-radius:7px;background:#fff;color:#203349;text-decoration:none;font:inherit;font-size:14px;line-height:1.55;cursor:pointer}
#ma-root .thor-admin-return:hover{background:#f3f6fa;text-decoration:none}
#ma-root .thor-admin-return:focus-visible{outline:3px solid #7aa7d8;outline-offset:2px}

/* Shared Contact summary on all marital service matter screens. */
#ma-root .ma-contact-summary{padding:14px 18px;margin:14px 0}
#ma-root .ma-contact-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
#ma-root .ma-contact-heading h2{font-size:18px;margin:0}
#ma-root .ma-contact-heading .button{margin:0;padding:8px 13px;white-space:nowrap}
#ma-root .ma-contact-data{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 18px;margin:0}
#ma-root .ma-contact-data>div{min-width:0;margin:0}
#ma-root .ma-contact-data dt{font-size:11px;font-weight:700;color:#596b7c;line-height:1.4;margin:0 0 2px}
#ma-root .ma-contact-data dd{font-size:14px;line-height:1.4;overflow-wrap:anywhere;white-space:pre-line;margin:0}
#ma-root .ma-contact-data .ma-contact-address{grid-column:1/-1}
@media(max-width:760px){#ma-root .ma-contact-data{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 12px}#ma-root .ma-contact-summary{padding:12px}#ma-root .ma-contact-heading{gap:8px}}
@media(max-width:420px){#ma-root .ma-contact-data{grid-template-columns:minmax(0,1fr)}}
