/* DocHuntr v0.8 M6: illustrated empty/success states, grouped settings, email-preview tabs, demo indicator, narrow layouts.
   Loaded last; tokens and brand colours only, no external assets. */
.dc-empty.dc-empty-state{display:flex;flex-direction:column;align-items:center;gap:.5rem;text-align:center;padding:2rem 1.25rem;border:1px solid #dfe6f1;border-radius:16px;background:linear-gradient(180deg,#fff,#f5f9ff);box-shadow:0 1px 2px rgba(11,31,68,.05),0 8px 24px rgba(11,31,68,.05);color:#33415a}
.dc-empty__art{width:6rem;height:6rem;flex:none;margin-bottom:.25rem}
.dc-empty__title{margin:0;font-size:1.25rem;line-height:1.3;color:#0B1F44}
.dc-empty__text{margin:0;max-width:30rem;font-size:1rem;line-height:1.5;color:#33415a}
.dc-empty__action{margin-top:.5rem;min-height:2.75rem}
.dc-empty__tag{margin:.5rem 0 0;font-size:.875rem;font-weight:600;color:#2563EB}
.dc-empty--success{background:linear-gradient(180deg,#fff,#eef8ff);border-color:#b8d9f5}
/* no dashed placeholder boxes */
.dc-empty,.empty,.empty-state,p.empty{border-style:solid}

/* Settings groups */
.settings-group{margin:0 0 var(--sp-6,1.5rem)}
.settings-group__title{margin:0 0 .75rem;font-size:.8125rem;letter-spacing:.06em;text-transform:uppercase;color:#44506a}
.settings-card h3{margin:0 0 .25rem;font-size:1.0625rem}

/* Email preview section switch */
.kind-tabs a[aria-current="true"],.kind-tabs a.is-active{background:#0B1F44;border-color:#0B1F44;color:#fff}
.kind-tabs a:not(.is-active):hover{border-color:#2563EB;color:#2563EB}
.kind-tabs a:focus-visible{outline:3px solid #2563EB;outline-offset:2px}

/* Workspace-level demo indicator */
.demo-indicator{display:inline-flex;align-items:center;gap:.5rem;min-height:2.75rem;margin-left:auto;margin-right:1rem;color:#0B1F44;font-size:.875rem;font-weight:600;text-decoration:none}
.demo-indicator:hover .demo-indicator__text{text-decoration:underline}
.demo-indicator:focus-visible{outline:3px solid #2563EB;outline-offset:2px;border-radius:6px}
.topbar{display:flex;align-items:center;gap:.5rem}
.topbar .topbar-user{margin-left:auto}
.demo-indicator+.topbar-user{margin-left:0}

/* Narrow layouts */
@media (max-width:51.25rem){
html,body{max-width:100%;overflow-x:hidden}
.topbar{min-height:2.5rem;padding-block:.25rem}
.topbar-user{display:none}
.demo-indicator{margin-right:0}
.app-header{padding-block:.5rem}
.breadcrumbs ol{flex-wrap:nowrap;min-width:0}
.breadcrumbs li{min-width:0;white-space:nowrap}
.breadcrumbs li:not(:last-child){flex:none}
.breadcrumbs li:last-child{flex:1 1 0;overflow:hidden;text-overflow:ellipsis}
.breadcrumbs li:last-child>*{display:block;overflow:hidden;text-overflow:ellipsis}
.kind-tabs,.dc-chips,.filter-chips{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 2rem),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 2rem),transparent);padding-right:2rem}
.kind-tabs::-webkit-scrollbar,.dc-chips::-webkit-scrollbar,.filter-chips::-webkit-scrollbar{display:none}
.kind-tabs li{flex:none}
.kind-tabs a{white-space:nowrap}
.row-item{display:grid;grid-template-columns:auto minmax(0,1fr) auto;column-gap:.75rem;align-items:center;min-height:2.75rem}
.row-item .row-main{min-width:0}
.row-item .row-main>strong,.row-item .row-meta{display:block;overflow-wrap:break-word}
.dc-act,.dc-act--text,.row-link,.nav-toggle,.dc-more__btn,summary{min-height:2.75rem}
.dc-rows__name,.dc-rows__sub,.dc-meter__label{overflow-wrap:break-word;word-break:normal;hyphens:none}
.dc-meter{min-width:0}
.dc-empty.dc-empty-state{padding:1.5rem 1rem}
.dc-empty__action{width:100%}
.dc-empty__art{width:4.5rem;height:4.5rem}
.email-frame,.preview-frame{max-width:100%}
.preview-grid{grid-template-columns:minmax(0,1fr)}
.email-text{white-space:pre-wrap;overflow-wrap:anywhere}
}
@media (max-width:20rem){
.demo-indicator__text{display:none}
.dc-summary{grid-template-columns:1fr}
}
/* v0.8 M7 judge-driven polish: presentation only */
.settings-group .dc-grid-3{grid-template-columns:repeat(auto-fit,minmax(16rem,1fr))}
.review-file .review-preview{background:#f6f9ff}
.review-file iframe.review-preview{height:min(30rem,62vh)}
.prog-figure strong{white-space:nowrap}
td,th{hyphens:none}
.dc-table td:nth-child(5),.dc-table th:nth-child(5){white-space:nowrap;overflow-wrap:normal}
@media (max-width:40rem){
.topbar{display:flex;flex-wrap:wrap;align-items:center;gap:.25rem .75rem;padding-block:.5rem}
.topbar .topbar-user{display:none}
}

/* v0.8 M8: commercial polish for Settings, Requests, Documents, Review */
.settings-card{align-items:center;min-height:0;padding:1.25rem 1.5rem;gap:1rem}
.settings-card h3{margin:0 0 .25rem}
.settings-card h3 a{text-decoration:none;color:#0B1F44}
.settings-card h3 a::after{content:"";position:absolute;inset:0;border-radius:inherit}
.settings-card h3 a:focus-visible{outline:2px solid #2563EB;outline-offset:4px;border-radius:6px}
.settings-card p{margin:0;color:#44506a}
.settings-card>div{flex:1;min-width:0}
.settings-card .set-open{margin:0;width:2.25rem;height:2.25rem;border-radius:50%;justify-content:center;background:#eef3ff;color:#2563EB;flex:none}
.settings-card:hover .set-open{background:#2563EB;color:#fff}
.settings-group .dc-grid-3{grid-template-columns:repeat(auto-fit,minmax(18rem,1fr))}
.settings-group__title{display:flex;align-items:center;gap:.75rem}
.settings-group__title::after{content:"";flex:1;height:1px;background:#dfe6f1}
.dc-steps{list-style:none;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1.5rem 0 0;padding:0}
.dc-steps li{display:flex;gap:.875rem;padding:1.25rem;border:1px solid #dfe6f1;border-radius:16px;background:linear-gradient(180deg,#fff,#f5f9ff);box-shadow:0 1px 2px rgba(11,31,68,.05)}
.dc-steps li>span{flex:none;display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;background:#2563EB;color:#fff;font-weight:700}
.dc-steps strong{display:block;color:#0B1F44}
.dc-steps p{margin:.25rem 0 0;color:#44506a;font-size:.9375rem}
.dc-group-card{margin:1.25rem 0;border:1px solid #dfe6f1;border-radius:16px;background:#fff;box-shadow:0 1px 2px rgba(11,31,68,.05),0 8px 24px rgba(11,31,68,.04);overflow:hidden}
.dc-group-card__head{display:flex;align-items:center;gap:.75rem;padding:1rem 1.25rem;border-bottom:1px solid #e8eef8}
.dc-group-card__head h2{margin:0;font-size:1.0625rem;color:#0B1F44}
.dc-group-card__avatar{display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;background:#e1ecfb;color:#2563EB;font-weight:700}
.dc-group-card__cycle{font-size:.8125rem;color:#44506a;background:#f1f5fb;border-radius:999px;padding:.125rem .625rem}
.dc-group-card__count{margin-left:auto;font-size:.875rem;color:#44506a}
.review-step{border:1px solid #cfdcf5;min-height:10rem;background:linear-gradient(180deg,#fff,#f0f6ff)}
.dc-group-card .dc-table-wrap,.dc-group-card .scroll{border:0;box-shadow:none;border-radius:0;margin:0}
@media (max-width:51.25rem){.dc-steps{grid-template-columns:1fr}.dc-group-card__count{display:none}}

/* v0.8 inspector repair: density, dashboard balance, documents list, demo scaffolding */
.dash-stack{display:grid;gap:var(--sp-5);align-content:start;min-width:0}
.dash-stack>section{margin-bottom:0}
.dash-cols--single{grid-template-columns:minmax(0,1fr)}
.dash-cols--single .act-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:var(--sp-5)}
.dash-cols--single .act-day{grid-column:1 / -1}
@media (max-width:48rem){.dash-cols--single .act-list{grid-template-columns:minmax(0,1fr)}}
.nav-demo{list-style:none;margin:0 0 .25rem}
.nav-demo .demo-indicator{margin:0;color:#c9d6f2;min-height:2.5rem;padding:0 .75rem;font-size:.8125rem;font-weight:600}
.nav-demo .demo-indicator__text{display:inline}
.badge-demo{opacity:.85;font-size:.75rem;padding:0 .375rem;margin-left:.25rem;vertical-align:middle}
.filters--compact{margin:var(--sp-3) 0}
.filters--compact label{flex:0 1 14rem}
.doc-bar{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:var(--sp-2) var(--sp-4);margin-bottom:var(--sp-3)}
.doc-bar .hint{margin:0}
.doc-summary{margin:0;gap:var(--sp-2);flex-wrap:wrap}
.doc-summary li{background:#eef3fc;border-radius:999px;padding:.125rem .75rem;font-size:.8125rem;color:#1f2d52}
@media (min-width:48.0625rem){
main table.doc-table.doc-table--fixed{display:table;width:100%;table-layout:fixed}
.doc-table--fixed thead{position:static;width:auto;height:auto;overflow:visible;clip:auto}
.doc-table--fixed tr{display:table-row}.doc-table--fixed th,.doc-table--fixed td{display:table-cell}
.doc-table--fixed tbody tr{border:0;box-shadow:none;margin:0;border-radius:0}
.doc-table--fixed th:nth-child(1){width:14%}.doc-table--fixed th:nth-child(3){width:3.5rem}.doc-table--fixed th:nth-child(4){width:6rem}.doc-table--fixed th:nth-child(5){width:7rem}.doc-table--fixed th:nth-child(6){width:10rem}.doc-table--fixed th:nth-child(7){width:6.5rem}
.doc-table--fixed th,.doc-table--fixed td{padding-inline:var(--sp-3)}
.doc-table--fixed td{padding-block:var(--sp-2);vertical-align:middle;line-height:1.3}
.doc-table--fixed td.filename{display:table-cell}
.doc-table--fixed td.filename{white-space:normal;overflow-wrap:anywhere;color:#44506a;font-size:.875rem}
.doc-table--fixed .nowrap{white-space:nowrap}
.doc-table--fixed .dc-row-actions{display:flex;gap:.25rem;justify-content:flex-end}
}
.dc-group-card{margin-bottom:var(--sp-3)}

/* QA #247 repair 1: client upload/receipt polish and 320px guards */
.client-card .client-again{display:inline-flex;align-items:center;justify-content:center;min-height:var(--tap);padding:0 var(--space-4);border:1px solid var(--c-border);border-radius:var(--radius-lg);font-weight:600;text-decoration:none}
.client-card .client-again:focus-visible,.client-card .client-submit:focus-visible,.client-drop input:focus-visible{outline:3px solid var(--dc-cyan,#00d5fc);outline-offset:2px}
.client-card-ok .client-status-ok{background:#e8f6ee;border-radius:var(--radius-lg);padding:var(--space-3)}
@media (max-width:20rem){.client-card{margin:var(--space-2);padding:var(--space-3)}.client-card h1{font-size:1.25rem}.client-again{width:100%}}
