/* Existing FirmFlow green, scoped to the internal client hub. */
.cw-shell { max-width: 1100px; margin: 0 auto; min-width: 0; color: #18392c; }
.cw-header { display: block; padding: 0 0 1.25rem; border: 0; }
.cw-header h1 { margin: .35rem 0 .5rem; }
.cw-header p { margin: 0; }
.cw-tools { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: .8rem; align-items: end; }
.cw-tools label { display: grid; gap: .4rem; font-size: .875rem; font-weight: 650; min-width: 0; }
.cw-tools select { width: 100%; min-width: 0; background: #fff; color: #18392c; border: 1px solid #789082; border-radius: 8px; min-height: 44px; }
.cw-tools button { min-height: 44px; }
.cw-admin { grid-column: 1 / -1; font-size: .875rem; }
.cw-status { min-height: 1.5em; margin: 1rem 0 .6rem; font-size: .9rem; }
.cw-tabs { display: flex; flex-wrap: wrap; gap: .4rem; padding: .5rem 0 1rem; }
.cw-tabs button { min-height: 44px; padding: .55rem .9rem; border: 1px solid #789082; border-radius: 8px; color: #254e40; background: #fff; }
.cw-tabs button[aria-selected=true] { background: #254e40; border-color: #254e40; color: #fff; }
.cw-shell :focus-visible { outline: 3px solid #0b7154; outline-offset: 3px; }
.cw-content { min-height: 220px; background: #fff; border: 1px solid #d3dfd6; border-radius: 12px; padding: 1.4rem; overflow-wrap: anywhere; }
.cw-content h2 { margin-top: 0; }
.cw-content h3 { margin-top: 1.6rem; margin-bottom: .5rem; }
.cw-content a, .cw-admin { color: #254e40; text-decoration: underline; text-underline-offset: 3px; }
.cw-summary { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: 1rem 0; }
.cw-summary p { background: #edf4ef; border-left: 3px solid #4e7c62; padding: .8rem; margin: 0; }
.cw-legal { font-weight: 600; }
.cw-source { border-bottom: 1px solid #e3ebe5; padding: .5rem 0; }
.cw-document-list, .cw-request-list { list-style: none; padding: 0; }
.cw-document-list li, .cw-request-list li { border-bottom: 1px solid #dce6de; padding: 1rem 0; }
.cw-document-list p, .cw-request-list p { margin: .4rem 0; }
.cw-held { display: block; color: #7a3812; background: #fff7e9; padding: .4rem .6rem; }
.cw-shell footer { margin-top: 1.1rem; }
@media (max-width:700px) { .cw-tools { grid-template-columns: 1fr; } .cw-summary { grid-template-columns: 1fr; } .cw-tabs button { flex: 1 1 calc(50% - .4rem); } .cw-content { padding: 1rem; } }

/* Give the selected client work its full phone width; keep module navigation reachable. */
@media (max-width:700px) {
 #app.client-workspaces-active { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); height: 100dvh; }
 #app.client-workspaces-active > aside { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .7rem; padding: .75rem 1rem; overflow: hidden; border-right: 0; border-bottom: 1px solid var(--line); }
 #app.client-workspaces-active .brand { font-size: 17px; }
 #app.client-workspaces-active .account { margin: 0; padding: 0; border: 0; }
 #app.client-workspaces-active .account small, #app.client-workspaces-active .account .avatar { display: none; }
 #app.client-workspaces-active .account button { min-height: 44px; min-width: 44px; }
 #app.client-workspaces-active .module-nav { grid-column: 1 / -1; display: flex; min-width: 0; overflow-x: auto; gap: .35rem; padding-bottom: .3rem; }
 #app.client-workspaces-active .module-link { flex: 0 0 auto; width: auto; min-height: 44px; flex-direction: column; align-items: flex-start; justify-content: center; font-size: 12px; gap: 2px; }
 #app.client-workspaces-active > main { height: auto; min-height: 0; }
 #app.client-workspaces-active #moduleView { padding: 1.1rem 1rem 2rem; }
}
@media (prefers-reduced-motion:reduce) { .cw-shell { scroll-behavior: auto; } }

.cw-shell .muted, .cw-shell .footnote, .cw-shell .eyebrow, #app.client-workspaces-active .module-link small { color: #52665b; }

/* Evidence-backed Overview: exceptions first. Every status is written out; colour only reinforces it. */
.cw-shell { --cw-ok-ink: #14532d; --cw-ok-bg: #e6f2ea; --cw-warn-ink: #6b4400; --cw-warn-bg: #fff4dc; --cw-bad-ink: #8a1c1c; --cw-bad-bg: #fdecec; --cw-line: #dce6de; }
.cw-attention { margin: 1rem 0 1.4rem; }
.cw-attention h3 { margin-top: 0; }
.cw-counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .6rem; }
.cw-counter { display: grid; gap: .2rem; margin: 0; padding: .8rem .9rem; border-radius: 10px; border: 1px solid transparent; }
.cw-counter strong { font-size: 1.6rem; line-height: 1; }
.cw-counter span { font-size: .875rem; font-weight: 600; }
.cw-alert { margin: 0; padding: .8rem .9rem; border-radius: 10px; background: var(--cw-bad-bg); color: var(--cw-bad-ink); border: 1px solid #e7b9b9; font-weight: 600; }
.cw-ok { background: var(--cw-ok-bg); color: var(--cw-ok-ink); border-color: #b9dbc5; }
.cw-warn { background: var(--cw-warn-bg); color: var(--cw-warn-ink); border-color: #ecd29a; }
.cw-bad { background: var(--cw-bad-bg); color: var(--cw-bad-ink); border-color: #e7b9b9; }
.cw-badge { display: inline-block; margin-left: .5rem; padding: .15rem .55rem; border-radius: 999px; border: 1px solid; font-size: .8rem; font-weight: 650; vertical-align: .1em; }
.cw-rows { list-style: none; margin: 0; padding: 0; }
.cw-rows li { border-bottom: 1px solid var(--cw-line); padding: .85rem 0; }
.cw-rows li > strong { font-size: 1rem; }
.cw-fact { margin: .3rem 0 0; font-size: .9rem; }
.cw-fact-label { color: #52665b; font-weight: 600; }
.cw-provenance { margin: .35rem 0 0; font-size: .85rem; color: #34493e; }
.cw-coverage { width: 100%; border-collapse: collapse; margin-top: .4rem; font-size: .9rem; }
.cw-coverage th, .cw-coverage td { text-align: left; padding: .55rem .4rem; border-bottom: 1px solid var(--cw-line); }
.cw-coverage th { font-size: .8rem; letter-spacing: .02em; color: #52665b; }
.cw-coverage .cw-badge { margin-left: 0; }
@media (max-width:700px) { .cw-counters { grid-template-columns: 1fr 1fr; } .cw-badge { margin: .35rem 0 0; } .cw-rows li > .cw-badge { display: table; } }
/* The selected client is the page's subject: give its name the display face used by the hub title. */
.cw-content > h2 { font: 600 1.45rem/1.25 Georgia, 'Times New Roman', serif; letter-spacing: -.01em; margin-bottom: .2rem; }
.cw-content > .cw-legal { margin-top: 0; color: #34493e; }

/* Conversations: one card per collected thread. Direction, provenance and limits are written out; colour only reinforces. */
.cw-thread { border: 1px solid var(--cw-line); border-radius: 12px; padding: .9rem 1rem; margin: .8rem 0; background: #fff; }
.cw-thread h4 { margin: 0 0 .2rem; font-size: 1rem; overflow-wrap: anywhere; }
.cw-thread > .cw-badge { margin-left: 0; }
.cw-messages { list-style: none; margin: .6rem 0 0; padding: 0; }
.cw-messages > li { border-top: 1px solid var(--cw-line); padding: .65rem 0; }
.cw-messages > li > .cw-badge { margin-left: 0; }
.cw-thread .cw-fact, .cw-rows .cw-fact { overflow-wrap: anywhere; }
.cw-preview { margin: .4rem 0 0; padding: .45rem .7rem; border-left: 3px solid #b9dbc5; background: #f6faf7; font-size: .9rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.cw-attachments { margin: .35rem 0 0; padding-left: 1.1rem; font-size: .85rem; overflow-wrap: anywhere; }
.cw-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .55rem; }
.cw-actions button { min-height: 44px; }

/* Documents: the client's Drive folders from the last complete inventory, by stable Drive ID. */
.cw-drive { margin: .4rem 0 1.4rem; }
.cw-drive-sync .cw-badge { margin-left: 0; }
.cw-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .4rem; margin: .6rem 0 .2rem; font-size: .92rem; }
.cw-crumb { background: none; border: 0; padding: .35rem .2rem; min-height: 44px; color: #14532d; text-decoration: underline; cursor: pointer; font: inherit; }
.cw-crumb-here { font-weight: 650; overflow-wrap: anywhere; }
.cw-crumb-sep { color: #52665b; }
.cw-drive-list { list-style: none; margin: .4rem 0 0; padding: 0; border-top: 1px solid var(--cw-line); }
.cw-drive-list > li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .75rem; padding: .55rem 0; border-bottom: 1px solid var(--cw-line); }
.cw-drive-open { background: none; border: 0; padding: .35rem 0; min-height: 44px; font: inherit; font-weight: 650; color: #14532d; text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.cw-drive-open::before { content: "\25B8\00A0"; color: #52665b; }
.cw-drive-name { font-weight: 600; overflow-wrap: anywhere; flex: 1 1 14rem; }
.cw-drive-meta { color: #52665b; font-size: .85rem; }
.cw-drive-list .cw-badge { margin-left: 0; }
@media (max-width:700px) { .cw-badge { border-radius: 10px; } }
/* HUMA-REPORTS-TAX: Reports & Analysis list and Start/Resume return card (existing green theme). */
.cw-reports .cw-filters { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 1rem; }
.cw-filter { min-height: 44px; padding: .55rem .9rem; border: 1px solid #789082; border-radius: 8px; color: #254e40; background: #fff; }
.cw-filter[aria-selected=true] { background: #254e40; border-color: #254e40; color: #fff; }
.cw-rows { list-style: none; padding: 0; margin: .4rem 0 1rem; }
.cw-rows > li { border-bottom: 1px solid var(--cw-line, #dce6de); padding: .9rem 0; }
.cw-rows > li p { margin: .3rem 0; }
.cw-badge { display: inline-block; padding: .2rem .55rem; border-radius: 6px; font-size: .875rem; font-weight: 600; }
.cw-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.cw-chip { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .85rem; background: #edf4ef; color: #18392c; border: 1px solid #c9dccf; }
.cw-chip[data-state=recorded] { background: var(--cw-ok-bg); color: var(--cw-ok-ink); border-color: #b9dbc5; }
.cw-chip[data-state=conflict] { background: var(--cw-bad-bg); color: var(--cw-bad-ink); border-color: #e7b9b9; }
.cw-return { border: 1px solid var(--cw-line, #dce6de); border-radius: 12px; padding: 1rem 1.1rem; margin: .6rem 0 1.2rem; background: #fbfdfb; }
.cw-return h3 { margin-top: 0; }
.cw-steps { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: .3rem 0 .8rem; counter-reset: step; }
.cw-steps li { padding: .35rem .7rem; border-radius: 8px; background: #f1f5f2; color: #52665b; font-size: .9rem; }
.cw-steps li.cw-current { background: #254e40; color: #fff; font-weight: 650; }
.cw-primary { min-height: 44px; padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid #254e40; background: #254e40; color: #fff; font-weight: 650; margin: .6rem 0; }
.cw-primary:disabled { background: #9fb2a7; border-color: #9fb2a7; cursor: not-allowed; }
.cw-return .cw-actions, .cw-brief .cw-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0; }
.cw-return .cw-actions button, .cw-return li > button { min-height: 44px; padding: .5rem .8rem; border: 1px solid #789082; border-radius: 8px; background: #fff; color: #254e40; margin: .2rem .3rem .2rem 0; }
.cw-reason, .cw-note-form textarea, .cw-note-form select { width: 100%; max-width: 36rem; min-height: 44px; border: 1px solid #789082; border-radius: 8px; padding: .5rem; box-sizing: border-box; font: inherit; }
.cw-field { display: grid; gap: .3rem; margin: .5rem 0; font-size: .9rem; font-weight: 600; }
.cw-brief h5 { margin: 1rem 0 .3rem; font-size: 1rem; }
.cw-note-form { border-top: 1px solid var(--cw-line, #dce6de); margin-top: 1rem; padding-top: .6rem; }
@media (max-width:700px) { .cw-filter { flex: 1 1 calc(50% - .4rem); } .cw-return { padding: .8rem; } .cw-steps li { flex: 1 1 calc(50% - .4rem); } }

.cw-deadline-heading { color: #9b2525; }
