/* Shared SCIM look for case management, using the existing app.css theme tokens. */
.cases-page { min-width:320px; --cases-scroll-offset:5rem; }
.cases-page .page-heading,
.cases-page #registry,
.cases-page #case-list-section,
.cases-page #case-detail,
.cases-page #case-form-panel,
.cases-page #case-form .field,
.cases-page #case-extension,
.cases-page .detail-card,
.cases-page .archived-act-details,
.cases-page .archived-extension-details,
.cases-page [role="status"],
.cases-page [role="alert"],
.cases-page :focus { scroll-margin-top:var(--cases-scroll-offset); }
.cases-page details > summary { scroll-margin-top:var(--cases-scroll-offset); }
.cases-page .case-opinion-menu > summary { min-height:44px; }
.case-secondary-disclosure { grid-column:1/-1; }
/* Runda 8: a section that is only a window (opened by its step) takes no room in the page. */
.window-only { position:absolute; width:0; height:0; overflow:hidden; margin:0; padding:0; border:0; }
.window-only > summary { display:none; }
.case-secondary-disclosure:has(> section[hidden]) { display:none; }
.case-secondary-disclosure > summary { display:flex; flex-wrap:wrap; align-items:center; gap:.3rem .75rem; min-height:44px; cursor:pointer; font-weight:600; }
.case-secondary-disclosure > summary::before { content:'▸'; }
.case-secondary-disclosure[open] > summary::before { content:'▾'; }
.case-secondary-disclosure > summary .help { margin:0; font-weight:400; }
.case-secondary-disclosure[open] > section { margin-top:.7rem; }
.cases-page .site-header { margin-left:256px; }
.cases-page .layout { margin-left:256px; padding:var(--page-gutter); }
.cases-page h2,.cases-page h3,.cases-page h4,.cases-page h5 { margin-top:0; }
.cases-page h3 { margin-bottom:.35rem; font-size:1.08rem; }
.cases-page #detail-title:focus { outline:2px solid hsl(var(--primary)); outline-offset:4px; border-radius:var(--radius); }
.cases-page #document-review-title:focus { outline:2px solid hsl(var(--primary)); outline-offset:4px; border-radius:var(--radius); }
.cases-page h4 { margin-bottom:.75rem; font-size:.96rem; }
.cases-page h5 { margin:.2rem 0 .2rem; font-size:.9rem; }
.cases-layout { min-width:0; }
.case-detail-name { margin:.1rem 0 0; font-size:1.05rem; font-weight:600; overflow-wrap:anywhere; }
.working-document-check { flex-basis:100%; margin:.35rem 0; padding:.5rem .65rem; border-left:3px solid hsl(var(--primary)); background:hsl(var(--muted)/.55); font-size:.85rem; line-height:1.45; overflow-wrap:anywhere; }
.case-name-line { display:block; font-weight:600; overflow-wrap:anywhere; }
.procedure-rule:empty { display:none; }
.cases-workspace { min-width:0; }
.page-heading,.section-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:1rem; }
.page-heading p { margin-top:0; }
.eyebrow { margin:0; color:hsl(var(--primary)); font-weight:600; font-size:.74rem; letter-spacing:.05em; text-transform:uppercase; }
.registry-panel,.case-form-panel,.detail-card { min-width:0; padding:1rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); }
.registry-panel { margin:0 0 1.2rem; background:hsl(var(--muted)/.45); }
.registry-summary { min-height:2rem; margin-top:.6rem; }
.registry-page-summary,.browse-page-summary { scroll-margin-top:var(--cases-scroll-offset); }
.registry-page-summary:focus,.browse-page-summary:focus { outline:2px solid hsl(var(--primary)); outline-offset:4px; border-radius:var(--radius); }
.browse-pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:.45rem; margin:.85rem 0; }
.browse-pagination button { min-height:44px; min-width:44px; }
.browse-pagination [role="status"] { padding:.35rem .5rem; font-size:.85rem; text-align:center; }
.detail-heading-actions { display:flex; flex-wrap:wrap; gap:.45rem; }
.registry-list { display:grid; gap:.5rem; margin:.5rem 0 0; padding:0; list-style:none; }
.registry-list li { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,auto); gap:.2rem .75rem; align-items:center; min-width:0; padding:.65rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); }
.registry-entry-title { min-width:0; font-weight:600; overflow-wrap:anywhere; }.registry-entry-meta { grid-column:1; color:hsl(var(--muted-foreground)); font-size:.76rem; overflow-wrap:anywhere; }.registry-case-link { grid-column:1; min-height:44px; display:inline-flex; align-items:center; width:fit-content; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.registry-list .state-badge { grid-column:2; grid-row:1/3; }
.registry-entry-actions { grid-column:1; min-width:0; margin-top:.1rem; }
.registry-entry-actions a { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.case-form-panel { margin:1rem 0 1.4rem; border-left:3px solid hsl(var(--primary)); }
.case-create-notice { margin:.5rem 0 1rem; padding:.75rem; border:1px solid hsl(var(--border)); border-left:3px solid hsl(var(--primary)); border-radius:var(--radius); background:hsl(var(--muted)/.5); color:hsl(var(--foreground)); font-size:.875rem; line-height:1.5; overflow-wrap:anywhere; }
.form-grid,.filter-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.8rem 1rem; }
.filter-grid { grid-template-columns:minmax(180px,2fr) minmax(150px,1fr) minmax(190px,1fr); margin:.7rem 0 1rem; }
.case-filter-grid { grid-template-columns:minmax(190px,1.6fr) repeat(3,minmax(155px,1fr)); align-items:start; }
.case-filter-grid .field { min-width:0; }
.case-deadline-help { margin:-.55rem 0 .9rem; font-size:.76rem; line-height:1.4; }
.registry-filter-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.registry-reset-field button { width:100%; min-height:44px; }
.registry-filter-grid > .field { min-width:0; }
.form-grid .field,.filter-grid .field { min-width:0; margin:0; max-width:none; }
.form-grid .form-wide { grid-column:1/-1; }
.form-actions { align-items:center; }
.case-form-session-note { flex-basis:100%; margin-top:-.15rem; font-size:.78rem; }
.case-next-step { margin:.25rem 0 1rem; padding:.7rem .85rem; border-left:3px solid hsl(var(--primary)); border-radius:0 var(--radius) var(--radius) 0; color:hsl(var(--foreground)); background:hsl(var(--muted)/.55); font-size:.88rem; line-height:1.45; overflow-wrap:anywhere; }
.case-next-step-browse { display:block; max-width:100%; margin-top:.55rem; white-space:normal; overflow-wrap:anywhere; }
.case-detail { margin:1.25rem 0; padding:1rem; border:1px solid hsl(var(--border)); border-left:3px solid hsl(var(--primary)); border-radius:var(--radius); background:hsl(var(--muted)/.35); }
.case-detail > .section-heading { margin-bottom:1rem; }
.case-detail h3 { margin:.1rem 0; font-size:1.2rem; overflow-wrap:anywhere; }
.detail-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.55rem; margin-bottom:1rem; }
.detail-overview div { min-width:0; padding:.65rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); overflow-wrap:anywhere; }
.detail-overview dt { color:hsl(var(--muted-foreground)); font-size:.72rem; }
.detail-overview dd { margin:.15rem 0 0; font-weight:500; }
.detail-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem; }
.detail-card { overflow-wrap:anywhere; }
.history-card { grid-column:1/-1; }
.extension-card { grid-column:1/-1; min-width:0; }
.archived-act-card { grid-column:1/-1; min-width:0; }
.archived-act-notice { margin:.2rem 0 .55rem; }
.archived-act-notice,.archived-act-details > .help,.archived-extension-card .help { font-size:.875rem; line-height:1.45; }
.archived-act-details,.archived-extension-details { margin:.35rem 0 .75rem; }
.archived-act-details summary,.archived-extension-details summary { display:flex; align-items:center; min-height:44px; cursor:pointer; font-size:.875rem; font-weight:600; }
.archived-act-details > .help,.archived-extension-details > .help { margin:.25rem 0; }
.archived-act-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem 1rem; min-width:0; }
.archived-act-grid > .field { min-width:0; max-width:none; margin:0; }
.archived-act-wide { grid-column:1/-1; }
.archived-act-grid textarea { min-height:5.5rem; }
.archived-act-confirm { display:flex; align-items:flex-start; gap:.55rem; min-width:0; min-height:44px; margin:.45rem 0; padding:.55rem; border-radius:calc(var(--radius) - 2px); background:hsl(var(--muted)/.45); overflow-wrap:anywhere; }
.archived-act-confirm input { flex:0 0 auto; width:1.1rem; height:1.1rem; margin:.15rem 0 0; }
.archived-act-confirm span { min-width:0; }
.archived-act-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.archived-act-actions button { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.archived-act-notes { display:block; margin:.35rem 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.archived-act-pending { min-width:0; margin:.65rem 0; padding:.7rem; border:1px solid hsl(var(--border)); border-left:3px solid hsl(var(--primary)); border-radius:var(--radius); background:hsl(var(--muted)/.35); overflow-wrap:anywhere; }
.archived-act-list { min-width:0; }
.archived-extension-card { grid-column:1/-1; min-width:0; }
.archived-extension-notice { margin:.2rem 0 .55rem; }
.archived-extension-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem 1rem; min-width:0; }
.archived-extension-grid > .field { min-width:0; max-width:none; margin:0; }
.archived-extension-wide { grid-column:1/-1; }
.archived-extension-grid textarea { min-height:5.5rem; }
.archived-extension-confirm { display:flex; align-items:flex-start; gap:.55rem; min-width:0; min-height:44px; margin:.45rem 0; padding:.55rem; border-radius:calc(var(--radius) - 2px); background:hsl(var(--muted)/.45); overflow-wrap:anywhere; }
.archived-extension-confirm input { flex:0 0 auto; width:1.1rem; height:1.1rem; margin:.15rem 0 0; }
.archived-extension-confirm span { min-width:0; }
.archived-extension-actions { display:flex; flex-wrap:wrap; gap:.5rem; }
.archived-extension-actions button,.archived-extension-list .doc-actions a { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.archived-extension-pending { min-width:0; margin:.65rem 0; padding:.7rem; border:1px solid hsl(var(--border)); border-left:3px solid hsl(var(--primary)); border-radius:var(--radius); background:hsl(var(--muted)/.35); overflow-wrap:anywhere; }
.archived-extension-list { min-width:0; }
.extension-form,.extension-fields { min-width:0; }
.extension-form { display:grid; gap:.75rem; }
.extension-controls { display:grid; gap:.75rem; min-width:0; }
.extension-source-field { max-width:none; margin:0; }
.extension-source-summary { min-width:0; margin:-.35rem 0 0; padding:.6rem; border-left:3px solid hsl(var(--primary)); border-radius:0 var(--radius) var(--radius) 0; background:hsl(var(--muted)/.45); overflow-wrap:anywhere; }
.extension-source-summary:empty { display:none; }
.extension-existing { min-width:0; margin:.75rem 0; padding:.8rem; border:1px solid hsl(var(--border)); border-left:3px solid hsl(var(--primary)); border-radius:var(--radius); background:hsl(var(--muted)/.35); }
.extension-existing h5 { margin:0 0 .3rem; }
.extension-existing > .help { margin:.25rem 0 .6rem; }
.extension-details { min-width:0; padding:.55rem .65rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); }
.extension-details summary { min-height:44px; display:flex; align-items:center; cursor:pointer; font-weight:600; overflow-wrap:anywhere; }
.extension-details .help { margin:.25rem 0; }
.extension-fields { display:grid; gap:.65rem; }
.extension-fieldset { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.7rem 1rem; min-width:0; margin:0; padding:.8rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); }
.extension-fieldset legend { padding:0 .3rem; font-size:.84rem; font-weight:600; }
.extension-field { min-width:0; max-width:none; margin:0; }
.extension-check { display:flex; align-items:flex-start; gap:.55rem; min-width:0; min-height:44px; margin:0; padding:.45rem; border-radius:calc(var(--radius) - 2px); background:hsl(var(--muted)/.45); }
.extension-check input { flex:0 0 auto; width:1.1rem; height:1.1rem; margin:.15rem 0 0; }
.extension-check span { min-width:0; overflow-wrap:anywhere; }
.extension-disclaimer { margin:0; }
.extension-actions { display:flex; flex-wrap:wrap; gap:.55rem; min-width:0; }
.extension-actions button { display:inline-flex; align-items:center; justify-content:center; min-height:44px; max-width:100%; padding:.55rem .8rem; white-space:normal; overflow-wrap:anywhere; text-align:center; }
.inline-error { margin:.2rem 0; padding:.65rem; border-left:3px solid hsl(var(--destructive)); background:hsl(var(--destructive)/.08); overflow-wrap:anywhere; }
.act-versions { margin-top:.9rem; padding-top:.8rem; border-top:1px solid hsl(var(--border)); }
.act-version-item { border-left:3px solid hsl(var(--primary)) !important; }
.inline-form { display:grid; gap:.45rem; margin:1rem 0; padding-top:.8rem; border-top:1px solid hsl(var(--border)); }
.inline-form > label { margin:.2rem 0 0; }
.inline-form button { justify-self:start; margin-top:.3rem; }
.incoming-card { grid-column:1/-1; min-width:0; }
.incoming-list { display:grid; gap:.55rem; min-width:0; margin:.6rem 0; }
.incoming-record { min-width:0; padding:.7rem; border:1px solid hsl(var(--border)); border-left:3px solid hsl(var(--primary)); border-radius:var(--radius); background:hsl(var(--muted)/.35); overflow-wrap:anywhere; }
.incoming-record h5 { margin:0 0 .25rem; }
.incoming-record p { margin:.2rem 0; }
.incoming-record-meta { color:hsl(var(--muted-foreground)); font-size:.8rem; }
.incoming-record:focus { outline:2px solid hsl(var(--primary)); outline-offset:3px; }
.incoming-history-browse { display:block; max-width:100%; margin-top:.35rem; overflow-wrap:anywhere; }
.document-review-card { grid-column:1/-1; min-width:0; }
.document-review-list { display:grid; gap:.55rem; min-width:0; margin:.6rem 0; }
.document-review-item { min-width:0; padding:.7rem; border:1px solid hsl(var(--border)); border-left:3px solid hsl(var(--primary)); border-radius:var(--radius); background:hsl(var(--muted)/.35); overflow-wrap:anywhere; }
.document-review-item:focus { outline:2px solid hsl(var(--primary)); outline-offset:3px; }
.document-review-item h5 { margin:0 0 .3rem; }
.document-review-item p { margin:.2rem 0; }
.document-review-status { display:inline-block; margin:.1rem 0; padding:.15rem .45rem; border-radius:999px; background:hsl(var(--muted)); font-size:.78rem; font-weight:600; }
.document-review-meta { color:hsl(var(--muted-foreground)); font-size:.8rem; }
.document-review-note { white-space:pre-wrap; }
.document-review-history { margin-top:.45rem; padding:.35rem .55rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); }
.document-review-history summary { display:flex; align-items:center; min-height:44px; cursor:pointer; font-size:.85rem; font-weight:600; }
.document-review-history ol { margin:.2rem 0 .2rem 1.25rem; padding:0; }
.document-review-history li { margin:.35rem 0; padding-left:.15rem; }
.document-review-history li p { white-space:pre-wrap; }
.document-review-history button { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.document-review-clarification { margin:.65rem 0; padding:.55rem .7rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--muted)/.25); }
.document-review-clarification > summary { display:flex; align-items:center; min-height:44px; cursor:pointer; font-weight:600; }
.document-review-clarification > summary::before { content:'▸'; flex:none; margin-right:.45rem; }
.document-review-clarification[open] > summary::before { content:'▾'; }
.document-review-clarification[hidden] { display:none; }
.document-review-clarification-fieldset { min-width:0; margin:.5rem 0; padding:.5rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); }
.document-review-clarification-options { display:grid; gap:.35rem; max-height:16rem; overflow:auto; }
.document-review-clarification-option { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:.55rem; padding:.35rem; }
.document-review-clarification-option:focus-within { outline:2px solid hsl(var(--primary)); outline-offset:1px; }
.document-review-clarification-option label { min-width:0; white-space:pre-wrap; overflow-wrap:anywhere; cursor:pointer; }
.document-review-clarification textarea { display:block; width:100%; max-width:100%; min-width:0; min-height:12rem; box-sizing:border-box; margin-top:.25rem; white-space:pre-wrap; overflow-wrap:anywhere; scroll-margin-top:var(--cases-scroll-offset,6rem); }
.document-review-clarification-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.55rem; margin-top:.45rem; }
.document-review-clarification-actions button { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.document-review-clarification-actions .help { flex:1 1 16rem; min-width:0; margin:0; overflow-wrap:anywhere; }
@media(max-width:600px) {
  .document-review-clarification { padding:.45rem; }
  .document-review-clarification-actions { display:grid; grid-template-columns:1fr; }
  .document-review-clarification-actions button { width:100%; }
}
.document-review-form { min-width:0; }
.document-review-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem 1rem; min-width:0; }
.document-review-form-grid > .field { min-width:0; max-width:none; margin:0; }
.document-review-wide { grid-column:1/-1; }
.document-review-form input,.document-review-form select,.document-review-form textarea { width:100%; min-width:0; max-width:100%; }
.document-review-form textarea { min-height:5rem; }
.document-review-actions { display:flex; flex-wrap:wrap; gap:.45rem; }
.document-review-actions button { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.document-review-pending { min-width:0; margin:.65rem 0; padding:.7rem; border:1px solid hsl(var(--border)); border-left:3px solid hsl(var(--primary)); border-radius:var(--radius); background:hsl(var(--muted)/.35); overflow-wrap:anywhere; }
.document-review-source { display:block; margin:.25rem 0; }
.document-review-source a { margin-inline-start:.25rem; overflow-wrap:anywhere; }
.incoming-form { min-width:0; }
.incoming-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem 1rem; min-width:0; }
.incoming-form-grid > .field,.incoming-attachments { min-width:0; max-width:none; margin:0; }
.incoming-form-grid .form-wide,.incoming-attachments.field-wide { grid-column:1/-1; }
.incoming-attachments { padding:.7rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); }
.incoming-attachments legend { padding:0 .3rem; font-weight:600; }
.incoming-attachments-list { display:grid; gap:.35rem; min-width:0; }
.incoming-attachment-option { display:flex; align-items:flex-start; gap:.55rem; min-width:0; min-height:44px; padding:.45rem; border-radius:calc(var(--radius) - 2px); background:hsl(var(--muted)/.35); overflow-wrap:anywhere; }
.incoming-attachment-option input { flex:0 0 auto; width:1.1rem; height:1.1rem; margin:.15rem 0 0; }
.incoming-pending { min-width:0; margin:.65rem 0; padding:.7rem; border:1px solid hsl(var(--border)); border-left:3px solid hsl(var(--primary)); border-radius:var(--radius); background:hsl(var(--muted)/.35); overflow-wrap:anywhere; }
.incoming-pending .form-actions { display:flex; flex-wrap:wrap; gap:.45rem; }
.incoming-pending button { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.reference-slots { display:grid; gap:.5rem; min-width:0; }
.reference-field { min-width:0; max-width:none; margin:0; }
.prepare-form-box { display:grid; gap:.45rem; min-width:0; }
.prepare-form-box > label { margin:0; }
.prepare-form-box select { width:100%; min-width:0; max-width:100%; min-height:44px; }
.prepare-form-box .identity-source-field { min-width:0; max-width:none; margin:.15rem 0; }
.prepare-form-box .help { margin:.15rem 0; overflow-wrap:anywhere; }
.prepare-form-box button { justify-self:start; min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.doc-list,.form-list { display:grid; gap:.5rem; margin:.3rem 0 .8rem; padding:0; list-style:none; }
.doc-list li,.form-list li { min-width:0; padding:.65rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--muted)/.35); }
.communication-preference { min-width:0; margin:.5rem 0 .1rem; padding:.5rem .6rem; border-left:2px solid hsl(var(--primary)); border-radius:0 var(--radius) var(--radius) 0; color:hsl(var(--foreground)); background:hsl(var(--card)); font-size:.78rem; line-height:1.4; overflow-wrap:anywhere; }
.communication-preference strong,.communication-preference-source,.communication-preference-options,.communication-preference-note { display:block; }
.communication-preference strong { margin-bottom:.1rem; }
.communication-preference-source,.communication-preference-options,.communication-preference-note { margin-top:.12rem; }
.communication-preference-context { margin:.15rem 0 .35rem; padding:.5rem .6rem; border-left:2px solid hsl(var(--primary)); border-radius:0 var(--radius) var(--radius) 0; background:hsl(var(--muted)/.45); overflow-wrap:anywhere; }
.notification-reference-check { min-width:0; margin:.4rem 0 .1rem; padding:.5rem .6rem; border-left:2px solid hsl(var(--primary)); border-radius:0 var(--radius) var(--radius) 0; color:hsl(var(--foreground)); background:hsl(var(--muted)/.45); font-size:.78rem; line-height:1.4; overflow-wrap:anywhere; }
.reference-check-retry { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
#communication-preferences-retry { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.doc-title { display:block; font-weight:600; overflow-wrap:anywhere; }
.doc-meta { display:block; margin:.2rem 0; color:hsl(var(--muted-foreground)); font-size:.76rem; }
/* Review 23.11: after a correction of an extension, the sentence and, under it, its button «Vezi versiunea de dinainte» on its own row (one sentence and one button for each correction). */
.doc-meta.doc-extension-correction { display:flex; flex-direction:column; align-items:flex-start; gap:.4rem; margin:.35rem 0 .6rem; font-size:.8rem; }
/* Runda 22.11 (dosar, 8): the note of a scan removed or kept for an earlier version: the text, then its two buttons together on one aligned row */
.doc-signed-copy-note { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .75rem; }
.doc-signed-copy-note .doc-signed-copy-buttons { display:inline-flex; align-items:center; gap:.5rem; }
/* Lot A, item 23: the description given to a file brought to the dossier. */
.doc-description { display:block; margin:.15rem 0 0; font-size:.86rem; white-space:pre-line; overflow-wrap:anywhere; }
.document-communication { margin:.55rem 0 .3rem; padding:.5rem; border-left:2px solid hsl(var(--primary)); color:hsl(var(--foreground)); background:hsl(var(--muted)/.55); font-size:.8125rem; line-height:1.5; overflow-wrap:anywhere; }
.doc-actions { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.45rem; }
.doc-actions button { min-height:44px; }
.doc-actions a,.doc-list a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:.55rem .75rem; border:1px solid hsl(var(--input)); border-radius:calc(var(--radius) - 2px); color:hsl(var(--foreground)); background:hsl(var(--card)); font-size:.875rem; line-height:1.25; text-decoration:none; }
.doc-actions a:hover,.doc-list a:hover { background:hsl(var(--primary) / .07); color:hsl(var(--primary)); border-color:hsl(var(--primary) / .6); }
.cases-page input[type="file"] { display:block; width:100%; min-width:0; max-width:100%; white-space:normal; }
.cases-page input[type="file"]::file-selector-button { max-width:48%; white-space:normal; overflow-wrap:anywhere; }
.history-list { display:grid; gap:.7rem; padding-left:1.25rem; }
.history-list li { padding-left:.2rem; }
.history-date { display:block; color:hsl(var(--muted-foreground)); font-size:.75rem; }
.history-text { display:block; overflow-wrap:anywhere; }
.history-technical-details { margin-top:.25rem; font-size:.78rem; }
.history-technical-details summary { min-height:36px; display:flex; align-items:center; cursor:pointer; color:hsl(var(--muted-foreground)); }
.history-technical-value { display:block; overflow-wrap:anywhere; font-family:ui-monospace,monospace; }
.table-wrap { max-width:100%; overflow-x:auto; border:1px solid hsl(var(--border)); border-radius:var(--radius); }
.cases-table { width:100%; border-collapse:collapse; table-layout:fixed; }
.cases-table th,.cases-table td { padding:.7rem; border-bottom:1px solid hsl(var(--border)); text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.cases-table th { background:hsl(var(--muted)); font-size:.78rem; font-weight:600; }
.cases-table tbody tr:last-child td { border-bottom:0; }
/* Doc 256: five columns — the dossier cell holds the name, request and property. */
/* Round 18 (R18-2): the Termen column is wide enough for a whole date at 1024 px; the date never breaks. */
.cases-table th:nth-child(1) { width:36%; }.cases-table th:nth-child(2) { width:20%; }.cases-table th:nth-child(3) { width:14%; }.cases-table th:nth-child(4) { width:16%; }.cases-table th:nth-child(5) { width:14%; }
.cases-table .case-due { white-space:nowrap; overflow-wrap:normal; }
.case-number { display:block; font-weight:600; }
.case-subline { display:block; margin-top:.2rem; color:hsl(var(--muted-foreground)); font-size:.75rem; }
.state-badge { display:inline-flex; min-height:30px; align-items:center; padding:.15rem .5rem; border:1px solid hsl(var(--input)); border-radius:999px; background:hsl(var(--muted)); font-size:.75rem; }
.login-page { min-height:100vh; }
.login-header { margin-left:0!important; }
.login-header .wrap { justify-content:flex-start; }
.login-brand { display:flex; align-items:center; gap:.65rem; color:inherit; text-decoration:none; }
.login-brand strong { display:block; }
.login-main { display:grid; place-items:start center; padding:clamp(1rem,6vh,4rem) 1rem 2rem; }
.login-card { width:min(100%,440px); padding:clamp(1.25rem,5vw,2rem); border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); box-shadow:0 4px 16px rgb(15 23 42 / .06); }
.login-card h1 { margin:.3rem 0; font-size:1.5rem; }.login-intro { color:hsl(var(--muted-foreground)); }
.login-card form { display:grid; gap:.9rem; margin-top:1.25rem; }.login-card .field { margin:0; }.login-submit { width:100%; margin-top:.3rem; }
@media(max-width:1023px) {
  .cases-page { --cases-scroll-offset:6rem; }
  .cases-page .site-header { margin-left:0; }
  .cases-page .layout { margin-left:0; padding:1rem; }
}
@media(max-width:1100px) {
  .case-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .registry-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .case-filter-grid .field:first-child { grid-column:1/-1; }
}
/* A 1024px desktop still has room for readable rows; cards are for narrow screens. */
@media(max-width:760px) {
  .cases-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .cases-table,.cases-table tbody,.cases-table tr,.cases-table td { display:block; width:100%; }
  .table-wrap { overflow:visible; border:0; }
  .cases-table tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 .65rem; margin:.6rem 0; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); }
  .cases-table td { display:flex; flex-direction:column; align-items:flex-start; gap:.15rem; min-width:0; border-bottom:1px solid hsl(var(--border)); overflow-wrap:anywhere; word-break:normal; }
  .cases-table td:last-child { border:0; }
  .cases-table td:first-child { grid-column:1/-1; }
  .cases-table tbody tr:last-child td:not(:last-child) { border-bottom:1px solid hsl(var(--border)); }
  .cases-table td:nth-child(4) { white-space:nowrap; }
  .cases-table td:nth-child(5) > button { min-width:5.5rem; min-height:44px; white-space:nowrap; overflow-wrap:normal; word-break:normal; }
  /* Round 15: the row's «›» is a 44 px target; the wide minimum was for the old word «Deschide». */
  .cases-table td:nth-child(5) > button.row-open { min-width:44px; }
  .cases-table td::before { content:attr(data-label); font-weight:600; font-size:.78rem; }
  .cases-table td > * { min-width:0; }
}
@media(max-width:760px) {
  .cases-page { --cases-scroll-offset:6rem; }
  .filter-grid { grid-template-columns:1fr 1fr; }
  .filter-grid .field:first-child { grid-column:1/-1; }
  .detail-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .detail-grid { grid-template-columns:1fr; }
  .history-card { grid-column:auto; }
  .extension-card { grid-column:auto; }
  .archived-act-card { grid-column:auto; }
  .archived-act-grid { grid-template-columns:1fr; }
  .archived-act-wide { grid-column:auto; }
  .archived-act-actions { display:grid; grid-template-columns:1fr; }
  .archived-act-actions button { width:100%; min-width:0; }
  .archived-extension-grid { grid-template-columns:1fr; }
  .archived-extension-wide { grid-column:auto; }
  .archived-extension-actions { display:grid; grid-template-columns:1fr; }
  .archived-extension-actions button { width:100%; min-width:0; }
  .extension-fieldset { grid-template-columns:1fr; padding:.65rem; }
  .extension-actions { display:grid; grid-template-columns:1fr; }
  .extension-actions button { width:100%; min-width:0; }
}
@media(max-width:600px) {
  .incoming-form-grid { grid-template-columns:1fr; }
  .document-review-form-grid { grid-template-columns:1fr; }
  .document-review-wide { grid-column:auto; }
  .incoming-form-grid .form-wide,.incoming-attachments.field-wide { grid-column:auto; }
  .cases-page .layout { padding:.5rem; }
  .cases-page .workspace { padding:.85rem; }
  .page-heading,.section-heading { gap:.6rem; min-width:0; }
  .page-heading { flex-direction:column; }
  .section-heading { flex-wrap:wrap; }
  .section-heading > * { min-width:0; max-width:100%; }
  .section-heading > :last-child { flex:0 1 auto; }
  .case-detail > .section-heading { flex-direction:column; align-items:stretch; }
  .detail-heading-actions { width:100%; min-width:0; max-width:100%; flex:1 1 auto; }
  .detail-heading-actions > button { flex:1 1 120px; min-width:0; max-width:100%; padding-inline:.55rem; white-space:normal; overflow-wrap:anywhere; }
  .registry-panel .section-heading { flex-direction:column; align-items:stretch; }
  .registry-panel .button-link { width:fit-content; max-width:100%; white-space:normal; }
  .registry-list li { grid-template-columns:minmax(0,1fr); }
  .registry-list .state-badge { grid-column:1; grid-row:auto; width:fit-content; max-width:100%; white-space:normal; }
  .registry-entry-meta,.registry-case-link { grid-column:1; max-width:100%; }
  .form-grid,.filter-grid { grid-template-columns:1fr; }
  .case-filter-grid .field:first-child { grid-column:auto; }
  .case-filter-grid .field:last-child { width:100%; }
  .form-grid .form-wide,.filter-grid .field:first-child { grid-column:auto; }
  .detail-overview { grid-template-columns:1fr 1fr; }
  .cases-table tr { grid-template-columns:1fr; gap:0; }
  .cases-table td { display:grid; grid-template-columns:minmax(7rem,38%) minmax(0,1fr); gap:.55rem; border-bottom:1px solid hsl(var(--border)); }
}
@media(max-width:360px) {
  .cases-table td { grid-template-columns:1fr; gap:.15rem; }
  .detail-overview { grid-template-columns:1fr; }
  .browse-pagination { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .browse-pagination [role="status"] { grid-column:1/-1; grid-row:1; }
  .browse-pagination button { min-width:0; padding-inline:.45rem; }
}
/* Recover reading width on narrow screens without shrinking text or actions. */
@media(max-width:480px) {
  .cases-page .workspace { padding:1rem; }
  .cases-page .case-detail { padding:.65rem; }
  .cases-page .detail-card,
  .cases-page .registry-panel,
  .cases-page .case-form-panel { padding:.75rem; }
}
.cases-page dialog.ac-registration-layout { width:min(760px,calc(100% - 1rem)); max-height:88vh; padding:clamp(.8rem,3vw,1.5rem); }
.cases-page .ac-registration-layout .layout-issues { display:grid; gap:.7rem; min-width:0; }
.cases-page .ac-registration-layout .field-group { min-width:0; margin:0; padding:.8rem; }
.cases-page .ac-registration-layout .field-group legend,
.cases-page .ac-registration-layout .field-group .help { overflow-wrap:anywhere; }
.cases-page .ac-registration-layout .layout-option { min-width:0; align-items:flex-start; padding:.35rem 0; overflow-wrap:anywhere; }
.cases-page .ac-registration-layout .layout-option input { margin-top:.2rem; }
.cases-page .ac-registration-layout .form-actions { display:flex; flex-wrap:wrap; gap:.55rem; }
.cases-page .ac-registration-layout .form-actions button { min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; }
@media(max-width:480px) {
  .cases-page .ac-registration-layout { margin:auto; }
  .cases-page .ac-registration-layout .form-actions { display:grid; grid-template-columns:1fr; }
  .cases-page .ac-registration-layout .form-actions button { width:100%; }
}
.cases-page .case-form-panel .related-case-field { grid-column:1/-1; min-width:0; }
.cases-page .related-case-field > input,
.cases-page .related-case-field > select { display:block; width:100%; max-width:100%; min-width:0; box-sizing:border-box; }
.cases-page .related-case-field > label:not(:first-child) { display:block; margin-top:.55rem; }
.cases-page #related-case-search-help,
.cases-page .related-case-results,
.cases-page .related-case-selected,
.cases-page #related-case-error { min-width:0; max-width:100%; overflow-wrap:anywhere; word-break:break-word; }
.cases-page .related-case-results,
.cases-page .related-case-selected { margin:.25rem 0; line-height:1.4; }
.cases-page .reference-selected-details { min-width:0; max-width:100%; margin:.35rem 0 0; line-height:1.4; overflow-wrap:anywhere; word-break:break-word; }
.cases-page .reference-selected-details[hidden] { display:none; }
.cases-page .related-case-field > select:invalid,
.cases-page .related-case-field > select[aria-invalid="true"] { border-color:hsl(var(--destructive)); }
.cases-page .case-return-context { margin:.15rem 0 .65rem; overflow-wrap:anywhere; }
.cases-page .related-case-detail-link,
.cases-page .case-return-link { display:inline-flex; align-items:center; min-height:44px; max-width:100%; color:hsl(var(--primary)); text-decoration:underline; text-underline-offset:.16em; overflow-wrap:anywhere; }
.cases-page .related-case-detail-link:focus-visible,
.cases-page .case-return-link:focus-visible { outline:2px solid hsl(var(--primary)); outline-offset:3px; border-radius:2px; }
.cases-page .case-day-update { display:flex; align-items:center; flex-wrap:wrap; gap:.55rem; padding:.65rem .8rem; margin:.55rem 0; border:1px solid hsl(var(--border)); border-radius:6px; background:hsl(var(--muted)); }
.cases-page .case-day-update[hidden] { display:none; }
.cases-page .case-day-update .help { flex:1 1 17rem; min-width:0; margin:0; overflow-wrap:anywhere; }
.cases-page .case-day-update button { flex:0 1 auto; max-width:100%; min-height:44px; white-space:normal; overflow-wrap:anywhere; }
.cases-page .clarification-preparation { padding:.85rem; margin:.75rem 0; border:1px solid hsl(var(--border)); border-radius:6px; background:hsl(var(--muted)/.35); min-width:0; }
.cases-page .clarification-preparation[hidden],.cases-page .clarification-preparation [hidden] { display:none; }
.cases-page .clarification-preparation h5 { font-size:1rem; margin:0 0 .5rem; }
.cases-page .clarification-preparation .field { margin:.65rem 0; min-width:0; }
.cases-page .clarification-preparation select { width:100%; max-width:100%; min-width:0; }
.cases-page .clarification-preparation .help,.cases-page .clarification-preparation .inline-error { overflow-wrap:anywhere; }
.cases-page .clarification-preparation-actions { display:flex; flex-wrap:wrap; gap:.5rem; min-width:0; }
.cases-page .clarification-preparation-actions > * { display:inline-flex; align-items:center; justify-content:center; min-height:44px; max-width:100%; white-space:normal; overflow-wrap:anywhere; text-align:center; }
.cases-page .clarification-preparation-actions a { border:1px solid hsl(var(--border)); border-radius:6px; padding:.5rem .75rem; text-decoration:none; color:hsl(var(--foreground)); background:hsl(var(--background)); }
.cases-page .clarification-preparation-actions a:focus-visible { outline:2px solid hsl(var(--primary)); outline-offset:3px; }
@media(max-width:480px) {
  .cases-page .clarification-preparation { padding:.65rem; }
  .cases-page .clarification-preparation-actions { display:grid; grid-template-columns:1fr; }
  .cases-page .clarification-preparation-actions > * { width:100%; min-width:0; box-sizing:border-box; }
}

/* Doc 251 — list: the dossier name leads, the request number follows; recorded dates that passed or are near stand out. */
.case-name-line + .case-number { font-weight:400; font-size:.82rem; color:hsl(var(--muted-foreground)); }
.deadline-badge { display:inline-block; margin-left:.4rem; padding:.05rem .45rem; border-radius:999px; font-size:.72rem; font-weight:600; vertical-align:middle; }
.deadline-overdue { background:hsl(var(--destructive) / .12); color:#991b1b; border:1px solid hsl(var(--destructive) / .35); }
.deadline-today { background:hsl(var(--accent) / .25); color:hsl(var(--accent-foreground)); border:1px solid hsl(var(--accent)); }
.deadline-next_7_days { background:hsl(var(--primary) / .08); color:hsl(var(--primary)); border:1px solid hsl(var(--primary) / .3); }
/* UX 346: keep the deadline watch compact until the clerk asks for its full list. */
.deadline-watch-details { margin:.35rem 0 .65rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); }
.deadline-watch-details > summary { display:flex; flex-wrap:wrap; align-items:baseline; gap:.2rem .75rem; min-height:44px; padding:.5rem .75rem; cursor:pointer; list-style:none; }
.deadline-watch-details > summary::-webkit-details-marker { display:none; }
.deadline-watch-details > summary::after { content:"▾"; margin-left:auto; color:hsl(var(--muted-foreground)); }
.deadline-watch-details[open] > summary::after { content:"▴"; }
.deadline-watch-details > summary:focus-visible,.deadline-watch-more:focus-visible,.deadline-watch-retry:focus-visible { outline:2px solid hsl(var(--primary)); outline-offset:3px; }
.deadline-watch-details > summary h3 { margin:0; font-size:1rem; }
.deadline-watch-counts { display:flex; flex-wrap:wrap; gap:.2rem; color:hsl(var(--foreground)); font-size:.84rem; }
.deadline-watch-count-separator { margin:0 .35rem; color:hsl(var(--muted-foreground)); }
.deadline-watch-note-counts { padding-left:.75rem; border-left:1px solid hsl(var(--border)); color:hsl(var(--muted-foreground)); }
.deadline-watch-list { margin:.25rem 0 .75rem; padding:0 1rem 0 2rem; }
.deadline-watch-item { margin:.35rem 0; }
.deadline-watch-more,.deadline-watch-retry { margin:0 1rem .5rem; min-height:44px; }
.deadline-watch-details > .help { margin:.25rem 1rem .75rem; }
.deadline-watch-problem { margin:.25rem 0; }
/* Doc 256: the search and the state show; the other filters fold under «Mai multe filtre». Phones: only the search. */
.case-filters-toggle { display:inline-flex; margin:.25rem 0 .5rem; }
#case-list-section:not(.filters-open) .case-filter-grid > .field:nth-child(n+3),
#case-list-section:not(.filters-open) .case-deadline-help { display:none; }
@media (min-width:701px) { #case-list-section:not(.filters-open) .case-filter-grid { grid-template-columns:minmax(220px,2fr) minmax(170px,1fr); } }
@media (max-width:700px) {
  #case-list-section:not(.filters-open) .case-filter-grid > .field:not(:first-child),
  #case-list-section:not(.filters-open) .case-deadline-help { display:none; }
}
/* Doc 251 — detail: the name as title, a section bar that stays in view, folded occasional forms. */
.detail-sections { position:sticky; top:var(--cases-scroll-offset); z-index:5; display:flex; flex-wrap:wrap; gap:.4rem; margin:0 0 1rem; padding:.5rem; background:hsl(var(--card) / .96); border:1px solid hsl(var(--border)); border-radius:var(--radius); backdrop-filter:blur(6px); }
.detail-section-link { min-height:36px; padding:.3rem .75rem; border:1px solid hsl(var(--border)); border-radius:999px; background:hsl(var(--card)); color:hsl(var(--foreground)); font-size:.82rem; font-weight:500; cursor:pointer; }
.detail-section-link:hover { border-color:hsl(var(--primary)); color:hsl(var(--primary)); }
.cases-page .detail-card { scroll-margin-top:calc(var(--cases-scroll-offset) + 4rem); }
/* Analysis 377: inside a dossier the sticky tabs sit below the header; a form opened or focused there stays below both. */
.cases-page #case-detail :focus, .cases-page #case-detail details > summary, .cases-page #case-detail .case-fees-form { scroll-margin-top:calc(var(--cases-scroll-offset) + 4rem); }
.action-disclosure { margin-top:1rem; border-top:1px solid hsl(var(--border)); padding-top:.75rem; }
/* UX 2026-10-11: an action that opens a form looks like the other «Consemnează …» buttons, open or closed. */
.action-disclosure > summary { list-style:none; display:inline-flex; width:fit-content; align-items:center; gap:.4rem; min-height:44px; padding:.55rem 1rem; cursor:pointer;
  border:1px solid hsl(var(--input)); border-radius:calc(var(--radius) - 2px); background:hsl(var(--card)); color:hsl(var(--foreground)); font-size:.875rem; font-weight:500;
  box-shadow:0 1px 2px rgb(0 0 0 / .05); }
.action-disclosure > summary::-webkit-details-marker { display:none; }
.action-disclosure > summary::after { content:"▾"; font-size:.75rem; color:hsl(var(--muted-foreground)); }
.action-disclosure[open] > summary::after { content:"▴"; }
.action-disclosure > summary:hover { background:hsl(var(--primary) / .07); color:hsl(var(--primary)); border-color:hsl(var(--primary) / .6); }
.action-disclosure[open] > summary { margin-bottom:.5rem; }
@media (max-width:700px) { .detail-sections { flex-wrap:nowrap; overflow-x:auto; scrollbar-width:thin; } .detail-section-link { flex:0 0 auto; } }

/* Doc 252 — the confirmation of a communication stays next to its form; the dossiers opened later are listed. */
.communication-message:empty { display:none; }
.communication-message { margin:.5rem 0 0; padding:.5rem .75rem; border-left:3px solid hsl(var(--primary)); background:hsl(var(--primary) / .06); color:hsl(var(--foreground)); }
.related-case-children { margin:0; padding:0; list-style:none; display:grid; gap:.25rem; }

/* Doc 254 — the dossier wizard: choose what the citizen asks for, then one step at a time; the dossier as a folder. */
.wizard-start { display:grid; gap:1rem; }
.wizard-procedures { display:grid; grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); gap:.75rem; }
/* Round 26: the procedures could not be loaded — the message and «Reîncearcă» on one row of their own, the button at its size. */
.wizard-procedures > .wizard-catalog-missing { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; }
.wizard-procedures > .wizard-catalog-missing p { margin:0; }
.wizard-card { display:grid; gap:.3rem; text-align:left; padding:1rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); color:hsl(var(--foreground)); cursor:pointer; font:inherit; min-height:0; }
.wizard-card strong { font-weight:600; }
.wizard-card span { color:hsl(var(--muted-foreground)); font-size:.86rem; }
.wizard-card:hover, .wizard-card[aria-pressed="true"] { border-color:hsl(var(--primary)); box-shadow:0 0 0 1px hsl(var(--primary)); }
.wizard-more > summary { cursor:pointer; color:hsl(var(--primary)); font-weight:500; margin:.25rem 0 .75rem; }
.wizard-parent { display:grid; gap:.75rem; padding:1rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--muted) / .35); }
.wizard-ex-officio { margin:0; }
.editor-panel { width:min(1180px, 96vw); height:92vh; max-height:92vh; padding:0; border:1px solid hsl(var(--border)); border-radius:var(--radius); overflow:hidden; }
.editor-panel[open] { display:grid; grid-template-rows:auto auto minmax(0, 1fr); }
.editor-panel::backdrop { background:hsl(222 47% 11% / .45); }
.editor-panel-bar { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.6rem 1rem; border-bottom:1px solid hsl(var(--border)); background:hsl(var(--card)); }
.editor-panel-bar h3 { margin:0; font-size:1rem; }
.editor-panel-note { margin:0; flex:1 1 auto; font-size:.85rem; }
.editor-panel iframe { grid-row:3; min-height:0; width:100%; height:100%; border:0; background:hsl(var(--background)); }
.case-wizard { display:grid; gap:1rem; margin:1rem 0; }
.wizard-steps { list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; gap:.5rem; }
.wizard-step { display:inline-flex; align-items:center; gap:.4rem; padding:.2rem .5rem .2rem 0; border:0; border-radius:0; font-size:.86rem; color:hsl(var(--muted-foreground)); background:transparent; }
.wizard-step-number { display:inline-grid; place-items:center; width:1.5rem; height:1.5rem; border-radius:50%; border:1.5px solid hsl(var(--border)); font-size:.75rem; font-weight:600; }
.wizard-step.done { color:hsl(var(--foreground)); }
.wizard-step.done .wizard-step-number { background:hsl(142 60% 27%); border-color:hsl(142 60% 27%); color:#fff; }
/* A step both done and current (a closed dossier's last step) keeps the white check on green. */
.wizard-step.done.current .wizard-step-number { color:#fff; }
.wizard-step.current { color:hsl(var(--foreground)); font-weight:650; }
.wizard-step.current .wizard-step-number { border-color:hsl(var(--primary)); color:hsl(var(--primary)); }
.wizard-body { display:grid; gap:.75rem; padding:1.1rem 1.25rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); }
/* QA 2026-10-11: at 320 px a long link («Descarcă certificatul pentru tipărire») wraps instead of widening the step. */
.case-wizard, .wizard-body { grid-template-columns:minmax(0, 1fr); }
.wizard-body .button-link { white-space:normal; text-align:center; }
.wizard-body h4 { margin:0; font-size:1.05rem; }
.wizard-body .help { margin:0; }
.wizard-checklist { margin:0; padding-left:0; list-style:none; display:grid; gap:.3rem; }
/* QA 2026-10-12 (C13): a withdrawn file stays listed, struck. */
.attachment-withdrawn > .doc-title { text-decoration:line-through; color:hsl(var(--muted-foreground)); }
.wizard-checklist li { padding:.45rem .7rem; border:1px solid hsl(var(--border)); border-radius:calc(var(--radius) - 2px); font-size:.92rem; }
.wizard-checklist li.missing { color:hsl(var(--muted-foreground)); }
.wizard-note { margin:0; }
.wizard-handover { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:.75rem; }
/* QA 2026-10-11: the reference («Predat solicitantului, cu semnătură de primire») and the problem line take the whole row. */
.wizard-handover > .field:nth-of-type(3), .wizard-handover > .field.field-wide, .wizard-handover > .field-error, .wizard-inline > .field-error { grid-column:1 / -1; }
.wizard-actions { margin:0; }
.wizard-inline { display:grid; grid-template-columns:repeat(auto-fit, minmax(190px, 1fr)); gap:.75rem; padding:.85rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--muted) / .35); }
.wizard-inline[hidden] { display:none; }
.wizard-inline > .help, .wizard-inline > .form-actions, .wizard-inline .field:has(textarea) { grid-column:1 / -1; }
.wizard-inline textarea { width:100%; }
.wizard-checklist li.checked { border-color:hsl(var(--primary) / .45); }
.wizard-checklist li:has(.wizard-row-actions) { display:flex; align-items:center; justify-content:space-between; gap:.6rem; flex-wrap:wrap; }
.wizard-row-actions { display:inline-flex; flex-wrap:wrap; gap:.4rem; }
.wizard-row-actions button { min-height:0; padding:.3rem .75rem; font-size:.85rem; }
.case-workspace { min-width:0; }
.case-summary-data { margin:1.25rem 0; }
.case-summary-data h4 { margin:0; }
.case-summary-data .section-heading { margin-bottom:.5rem; align-items:center; }
.case-summary-data .detail-overview { margin:0; }
.wizard-other-actions { margin-left:auto; position:relative; }
.wizard-other-actions > summary { min-height:44px; display:flex; align-items:center; gap:.5rem; padding:.5rem .65rem; cursor:pointer; color:hsl(var(--muted-foreground)); border-radius:var(--radius); list-style:none; }
.wizard-other-actions > summary::after { content:'⌄'; }
.wizard-other-actions > summary:hover { background:hsl(var(--muted)); color:hsl(var(--foreground)); }
.wizard-other-actions > summary:focus-visible { outline:2px solid hsl(var(--primary)); outline-offset:2px; }
.wizard-other-actions[open] { flex-basis:100%; display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.wizard-other-actions[open] > summary { font-weight:600; }
#detail-title:focus:not(:focus-visible), #wizard-start-title:focus:not(:focus-visible) { outline:none; }
/* Doc 258: the open dossier is the page; the start cards align; the panel's own error line; ticks of verification. */
.cases-workspace:has(#case-detail:not([hidden])) > .page-heading { display:none; }
.wizard-card { justify-content:stretch; align-content:start; justify-items:start; }
.editor-panel-error { grid-row:2; margin:.5rem 1rem 0; max-height:30vh; overflow:auto; white-space:pre-line; }
.editor-panel-error:focus { outline:none; }
.wizard-checklist li.wizard-check { display:flex; align-items:flex-start; gap:.55rem; flex-wrap:wrap; }
/* QA 2026-10-12 (M4): the verification boxes are 20 px and their label at least 24 px high. */
.wizard-checklist li.wizard-check input[type="checkbox"] { width:1.5rem; min-width:1.5rem; height:1.5rem; min-height:1.5rem; margin:.15rem 0 0; flex:0 0 auto; }
.wizard-checklist li.wizard-check label { min-height:24px; }
.wizard-check input[type=checkbox] { margin-top:.2rem; }
.wizard-check label { flex:1 1 16rem; }
.wizard-check-note { color:hsl(var(--muted-foreground)); font-size:.8rem; }
.wizard-checklist li.wizard-check.missing label { color:hsl(var(--muted-foreground)); }
#registry:not(.filters-open) .registry-filter-grid > .field:not(.registry-main-filter) { display:none; }
.registry-about { margin:.4rem 0; }
.registry-about > summary, .about-disclosure > summary { cursor:pointer; font-size:.88rem; font-weight:500; color:hsl(var(--primary)); }

/* Doc 262 — the dossiers in the frame of every page: the list by state, the whole row opens its dossier, the dossier
   itself without a box inside the page's card, the way back above its title. */
.list-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:.25rem .75rem; margin:-.35rem 0 .75rem; }
.browse-summary { display:flex; flex-wrap:wrap; align-items:baseline; gap:.25rem 1rem; margin:.5rem 0; }
.browse-summary > p { margin:0; }
.browse-summary > :first-child { font-weight:600; color:hsl(var(--foreground)); }
.list-toolbar .case-filters-toggle { margin:0; min-height:36px; }
.list-toolbar #case-reset-filters { min-height:36px; }
.cases-table th { background:hsl(var(--muted) / .7); color:hsl(var(--muted-foreground)); }
.cases-table tr.case-row { cursor:pointer; }
.cases-table tr.case-row:hover td { background:hsl(var(--primary) / .045); }
.cases-table tr.case-row td:last-child { text-align:right; }
.cases-table.no-deadlines th:nth-child(4), .cases-table.no-deadlines td:nth-child(4) { display:none; }
.cases-table.no-deadlines th:nth-child(1) { width:48%; }
.cases-table.no-deadlines th:nth-child(2) { width:24%; }
.cases-table.no-deadlines th:nth-child(3) { width:16%; }
.cases-table.no-deadlines th:nth-child(5) { width:12%; }
.case-empty-state { text-align:center; }
.case-empty-state #case-empty:not([hidden]) { margin:.5rem 0 .75rem; padding:2rem 1rem; border:2px dashed hsl(var(--border)); border-radius:var(--radius); font-size:1rem; color:hsl(var(--muted-foreground)); }
.state-badge { min-height:28px; padding:.1rem .65rem; white-space:nowrap; }
.case-detail { margin:0; padding:0; border:0; background:none; }
.case-detail .back-link { margin:-.25rem 0 .25rem; }
.case-detail #detail-title { font-size:1.45rem; font-weight:650; }
.case-detail #detail-meta { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem; margin:.25rem 0 0; }
@media(max-width:760px) {
  .cases-table.no-deadlines td:nth-child(4) { display:none; }
  .cases-table tr.case-row td:last-child { text-align:left; }
}
.login-page .site-header.login-header { display:block; }
.login-changed { padding:.65rem .9rem; border-radius:var(--radius); background:hsl(150 45% 93%); color:hsl(150 60% 22%); font-size:.9rem; }
/* Doc 262 — the registry as rows: what was registered and its number on the left, the two links on the right. */
.registry-panel { padding:0; border:0; background:none; }
.registry-list li { grid-template-columns:minmax(0,1fr) auto; padding:.8rem 1rem; gap:.25rem 1rem; }
.registry-list li:hover { border-color:hsl(var(--primary) / .45); }
.registry-entry-meta { font-size:.85rem; }
.registry-list .state-badge { grid-column:1; grid-row:auto; width:fit-content; }
.registry-entry-actions { grid-column:2; grid-row:1 / span 4; display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; justify-content:flex-end; margin:0; }
.registry-entry-actions a { display:inline-flex; align-items:center; min-height:40px; padding:.4rem .85rem; border:1px solid hsl(var(--input)); border-radius:calc(var(--radius) - 2px); background:hsl(var(--card)); color:hsl(var(--foreground)); text-decoration:none; font-weight:500; font-size:.875rem; }
.registry-entry-actions a:hover { border-color:hsl(var(--primary) / .6); color:hsl(var(--primary)); background:hsl(var(--primary) / .07); }
@media(max-width:760px) { .registry-list li { grid-template-columns:minmax(0,1fr); } .registry-entry-actions { grid-column:1; grid-row:auto; justify-content:flex-start; } }
/* Button links are shared with forms and settings in app.css. */
/* Doc 262: on a phone a dossier is a short card — its name, then its state and «Deschide» on one line. */
@media(max-width:700px) {
  .cases-table tr.case-row { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .6rem; padding:.75rem .85rem; }
  .cases-table tr.case-row td { display:block; width:auto; padding:0; border:0 !important; }
  .cases-table tr.case-row td::before { content:none; }
  .cases-table tr.case-row td:first-child { flex:1 1 100%; }
  .cases-table tr.case-row td:nth-child(2) { flex:1 1 100%; color:hsl(var(--muted-foreground)); font-size:.875rem; }
  .cases-table tr.case-row td:nth-child(3), .cases-table tr.case-row td:nth-child(4) { flex:0 1 auto; }
  .cases-table tr.case-row td:last-child { flex:0 0 auto; margin-left:auto; }
  .cases-table tr.case-row td:last-child > button { min-height:40px; }
}
.wizard-body > a.button-link { width:fit-content; max-width:100%; }
/* Doc 263: the dossier's details in tabs; a card shows under its own tab only. */
.detail-tabs { display:flex; flex-wrap:wrap; gap:.25rem; margin:.75rem 0 1rem; padding:0; border:0; border-bottom:1px solid hsl(var(--border)); background:hsl(var(--card)); backdrop-filter:none; }
.detail-tabs .detail-section-link { min-height:40px; margin-bottom:-1px; padding:.5rem .9rem; border:0; border-bottom:2px solid transparent; border-radius:0; background:none; box-shadow:none; color:hsl(var(--muted-foreground)); font-weight:500; }
.detail-tabs .detail-section-link:hover { color:hsl(var(--foreground)); background:none; }
.detail-tabs .detail-section-link[aria-pressed="true"] { color:hsl(var(--primary)); border-bottom-color:hsl(var(--primary)); font-weight:600; }
.case-workspace .detail-grid { grid-template-columns:minmax(0,1fr); }
/* Round 14: three tabs — «Ce urmează» (data), «Documente» (documents), «Dosarul» (dossier: folded sections, whose inner panels keep their old names). */
/* Lot C (beneficiaries, item 21): «Documente» shows the steps and the documents' table; «Informații dosar» the rest. */
#case-advanced[data-tab="documents"] [data-detail-panel]:not([data-detail-panel="data"]):not([data-detail-panel="documents"]),
#case-advanced[data-tab="dossier"] [data-detail-panel="data"],
#case-advanced[data-tab="dossier"] [data-detail-panel="documents"] { display:none !important; }
.case-summary-line { margin:.6rem 0 0; color:hsl(var(--muted-foreground)); font-size:.9rem; }
.case-summary-line:empty { display:none; }
.dossier-folds { grid-column:1/-1; min-width:0; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); }
.dossier-fold + .dossier-fold { border-top:1px solid hsl(var(--border)); }
.dossier-single:has(> section[hidden]) { display:none; }
.dossier-fold > summary { display:flex; flex-wrap:wrap; align-items:center; gap:.2rem .9rem; min-height:44px; padding:.45rem .9rem; cursor:pointer; list-style:none; }
.dossier-fold > summary::-webkit-details-marker { display:none; }
.dossier-fold > summary::after { content:"▸"; order:99; margin-left:auto; color:hsl(var(--muted-foreground)); }
.dossier-fold[open] > summary::after { content:"▾"; }
.dossier-fold > summary .link-button { order:98; }
.dossier-title { flex:0 0 11rem; font-weight:600; }
.dossier-summary { flex:1 1 12rem; min-width:0; color:hsl(var(--muted-foreground)); font-size:.9rem; overflow-wrap:anywhere; }
.cases-page .case-workspace .dossier-fold > .detail-card, .cases-page .case-workspace .dossier-fold > section, .cases-page .case-workspace .dossier-fold > div { margin:0; padding:.2rem .9rem .9rem; border:0; border-radius:0; box-shadow:none; background:none; }
.cases-page .case-workspace .dossier-fold > section + section, .cases-page .case-workspace .dossier-fold > div + section, .cases-page .case-workspace .dossier-fold > section + div { padding-top:.9rem; border-top:1px solid hsl(var(--border)); }
.dossier-fold :is(#document-review-title,#case-participants-title,#case-fees-title,#case-legal-deadlines-title,#incoming-title,#case-summary-title),
.dossier-fold #case-planning-approvals > h4,
.dossier-fold :is(#detail-tracking-card,#detail-history-card) > h4 { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.dossier-note { margin:0 0 .5rem; overflow-wrap:anywhere; }
.dossier-note:empty { display:none; }
@media (max-width:700px) { .dossier-title { flex-basis:100%; } }

/* Optional contextual people: compact editing, shared SCIM tokens, no technical IDs in the reading view. */
.case-participants { min-width:0; }
.cases-page #case-participants, .cases-page #case-participants :focus { scroll-margin-top:calc(var(--cases-scroll-offset) + 6rem); }
.case-participants-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.75rem 1rem; margin-top:.75rem; }
.case-participants-form .field { min-width:0; max-width:none; margin:0; }
.case-person-tools { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:.4rem; }
.case-person-tools:empty { display:none; }
.case-participants-form .case-participant-context, .case-participant-properties, .case-participants-active, .case-participants-actions { grid-column:1/-1; }
.case-participant-properties { min-width:0; margin:0; padding:.65rem .75rem; border:1px solid hsl(var(--border)); border-radius:.4rem; }
.case-participant-properties legend { font-size:.875rem; padding:0 .25rem; }
.case-participant-property-list { list-style:none; margin:.35rem 0; padding:0; }
.case-participant-property-list li { display:flex; flex-wrap:wrap; align-items:center; gap:.35rem .75rem; padding:.3rem 0; overflow-wrap:anywhere; }
.case-participant-property-list li > span { flex:1 1 16rem; min-width:0; }
.case-participant-properties .help:empty { display:none; }
.case-participant-representations { grid-column:1/-1; min-width:0; margin:0; padding:.65rem .75rem; border:1px solid hsl(var(--border)); border-radius:.4rem; }
.case-participant-representations legend { font-size:.875rem; padding:0 .25rem; }
.case-participant-representations .help:empty { display:none; }
.case-participant-representation-list { list-style:none; margin:.35rem 0; padding:0; }
.case-participant-representation-list li { min-width:0; overflow-wrap:anywhere; padding:.5rem 0; }
.case-participant-representation-list li + li { border-top:1px solid hsl(var(--border)); }
.case-participant-representation-list p { margin:.25rem 0; }
.case-representation-caption, .case-representation-tools { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem .75rem; }
.case-representation-caption > strong, .case-representation-tools > .field { flex:1 1 16rem; min-width:0; }
.case-representation-tools { align-items:flex-end; }
.case-participants-form input:not([type="checkbox"]), .case-participants-form select, .case-participants-form textarea { width:100%; min-width:0; }
.case-participants-actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.case-participants button, .case-participants summary { min-height:44px; }
.case-participants summary { padding:.6rem 0; cursor:pointer; font-weight:500; }
/* QA 2026-10-15 (PP-14): the «Adaugă o persoană» disclosure keeps the padding of every other action button. */
.case-participants .action-disclosure > summary { padding:.55rem 1rem; }
.case-participant-entry { padding:.75rem 0; border-bottom:1px solid hsl(var(--border)); overflow-wrap:anywhere; }
.case-participant-entry p { margin:.35rem 0; }
.case-participant-entry .muted, .case-participant-reference { font-size:.875rem; }
.case-participant-entry .case-participants-actions { margin-top:.5rem; }
/* Round 25 (E1-S5): a current person is one compact row: name and role, the actions on the same line, the detail below in grey. */
.case-participant-entry.is-compact { display:flex; flex-wrap:wrap; align-items:center; gap:.1rem .4rem; padding:.45rem 0; }
.case-participant-entry.is-compact > .case-participant-role { color:hsl(var(--muted-foreground)); font-size:.875rem; }
@media (max-width:600px) { .case-participant-entry.is-compact > strong { flex:1 1 100%; } }
.case-participant-entry.is-compact > p, .case-participant-entry.is-compact > ul { flex:1 1 100%; order:3; margin:0; color:hsl(var(--muted-foreground)); font-size:.875rem; }
.case-participant-entry.is-compact > .case-participants-actions { order:2; margin:0 0 0 auto; gap:.25rem; }
.case-participant-entry.is-compact > .case-participants-actions button { min-height:36px; padding:.2rem .65rem; font-size:.875rem; }
@media (pointer:coarse) { .case-participant-entry.is-compact > .case-participants-actions button { min-height:44px; } }
.case-participant-entry.is-compact .case-participant-property-list { margin:0; }
.case-participant-entry.is-compact .case-participant-property-list li { padding:.1rem 0; }
.case-participants-active { display:flex; align-items:center; gap:.4rem; min-height:44px; }
.case-participants-history { margin-top:.5rem; }
.case-participants-status { color:hsl(var(--muted-foreground)); }
.case-participants-error { color:#991b1b; }
.case-participants-status:empty, .case-participants-error:empty { display:none; }
.case-participants-search { display:flex; flex-wrap:wrap; gap:.5rem; align-items:flex-end; margin:.75rem 0; }
.case-participants-search .field { flex:1 1 12rem; min-width:0; max-width:none; margin:0; }
#participant-search-count { flex-basis:100%; margin:0; font-size:.875rem; color:hsl(var(--muted-foreground)); }
@media(max-width:700px) { .case-participants-form { grid-template-columns:minmax(0,1fr); } }

/* UX 2026-10-11: the registry as a table, like the dossiers: the number stands out, the rest is one line each. */
.registry-table th:nth-child(1) { width:7.5rem; } .registry-table th:nth-child(2) { width:auto; } .registry-table th:nth-child(3) { width:26%; }
.registry-table th:nth-child(4) { width:15%; } .registry-table th:nth-child(5) { width:7rem; }
.registry-row td:first-child .case-number { white-space:nowrap; }
.registry-row .doc-actions a { white-space:nowrap; }
.registry-row .state-badge { white-space:normal; }
.registry-number { display:block; font-size:1rem; font-weight:650; color:hsl(var(--foreground)); }
.registry-row .registry-entry-title { display:block; font-weight:550; color:hsl(var(--foreground)); }
.registry-row .registry-applicant { display:block; color:hsl(var(--foreground)); }
.registry-row .registry-case-link { display:inline-block; margin-top:.15rem; font-size:.85rem; color:hsl(var(--primary)); }
.registry-row .registry-act-notes { display:block; margin-top:.2rem; font-size:.82rem; color:hsl(0 70% 38%); }
.registry-row .registry-transition { display:block; margin-top:.2rem; font-size:.82rem; color:hsl(var(--muted-foreground)); }
.registry-row .doc-actions { margin:0; }
.registry-row .doc-actions a { min-height:var(--control-height); padding:.35rem .75rem; }
.register-exports { margin-top:1.5rem; }

/* QA 2026-10-12 (M11): on a phone the tabs and the steps wrap on more rows: all are seen, none is cut. */
@media (max-width: 600px) {
  .detail-tabs > *, .wizard-steps > * { white-space:nowrap; }
}

/* UX 2026-10-11: the handovers and publications recorded, as tables; a cancelled row is struck through and quiet. */
.registers-history-table { margin-top:.5rem; }
.registers-history-table td > span { display:block; }
.registers-history-table .registers-sent { font-weight:550; color:hsl(var(--foreground)); }
.registers-history-table .registers-reference { overflow-wrap:anywhere; }
.registers-history-table tr.registers-cancelled td { color:hsl(var(--muted-foreground)); }
.registers-history-table tr.registers-cancelled td:first-child, .registers-history-table tr.registers-cancelled td:nth-child(2) { text-decoration:line-through; }

.registers-history-table td > span + span { color:hsl(var(--muted-foreground)); font-size:.85rem; font-weight:400; }
.registers-history-table td > .state-badge + span { margin-top:.2rem; }
/* QA 2026-10-11 (M13): while «Dosar nou» is open, the list's subtitle and the List/Folders switch step aside. */
body:has(#wizard-start:not([hidden])) :is(#page-description, #view-toggle) { display:none; }

/* QA 2026-10-12 (MT-05): «Registre» opened from the menu is not hidden under the fixed bar on a phone. */
.cases-page #registry, .cases-page #registry-title { scroll-margin-top:var(--cases-scroll-offset); }
/* QA 2026-10-12 (AU-15): on a phone the dossier tabs scroll with the page instead of covering the cards. */
@media (max-width:600px) { .cases-page .detail-sections { position:static; } }
/* Optional procedural questions: collapsed by default, the same controls as the dossier. */
.procedure-guide { margin: .75rem 0; padding: .75rem 1rem; border: 1px solid hsl(var(--border)); border-radius: var(--radius); background: hsl(var(--card)); }
.procedure-guide > summary { cursor: pointer; font-weight: 600; min-height: 32px; align-content: center; list-style:none; }
.procedure-guide > summary::-webkit-details-marker { display:none; }
.procedure-guide > summary::before { content: '›'; display: inline-block; margin-right: .5rem; }
.procedure-guide[open] > summary::before { transform: rotate(90deg); }
.procedure-guide .uat-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
.procedure-guide .field { min-width: 0; }
.case-quick-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; margin:.65rem 0; }
.case-quick-actions p { margin:0; font-size:.85rem; color:hsl(var(--muted-foreground)); }
.wizard-parent-search { margin-bottom:.5rem; }
.procedure-guide select { width: 100%; min-height: 40px; }
.procedure-guide [hidden] { display: none !important; }
.procedure-guide .procedure-guide-result { margin-top: .75rem; }
.compliance-result { padding: .75rem 0; border-bottom: 1px solid hsl(var(--border)); overflow-wrap: anywhere; }
.compliance-result p { margin: .35rem 0; }
.compliance-history + .compliance-history { margin-top: .75rem; border-top: 1px solid hsl(var(--border)); }
.compliance-conditions { grid-column: 1 / -1; }
#case-compliance > details { margin-top: 0; border-top: 0; }
#case-compliance [role="status"]:empty { display: none; }
#case-compliance input, #case-compliance select, #case-compliance textarea { min-width: 0; max-width: 100%; }
@media (max-width: 640px) { .procedure-guide .uat-settings-grid { grid-template-columns: minmax(0, 1fr); } .procedure-guide > summary, .procedure-guide select { min-height: 44px; } }
.attachment-mark-preview { grid-column: 1 / -1; min-width: 0; }
.attachment-mark-preview iframe { display: block; width: 100%; height: 32rem; margin-top: .5rem; border: 1px solid var(--border, #dce3ec); }
.attachment-mark-tool { margin-top: .5rem; }
.registration-review .registration-problems { margin:1rem 0; padding:0 0 1rem; border-bottom:1px solid hsl(var(--border)); }
.registration-review :is(h3, p) { margin:.5rem 0; }
.registration-review .problem-list { padding-left:1.25rem; overflow-wrap:anywhere; }
.registration-warnings > summary { min-height:44px; cursor:pointer; font-weight:600; }
.registration-warnings .registration-check + .registration-check { margin-top:1rem; }
/* Analysis 377: while a new dossier is being opened, its own form holds the filled button. */
.cases-page:has(#case-form-panel:not([hidden])) #new-case, .cases-page:has(#wizard-start:not([hidden])) #new-case { display:none; }

/* Round 14: a row of the list takes two lines (name, then number · type · date); the property is in the tooltip of the name. */
.cases-page .cases-table .case-name-line { -webkit-line-clamp:1; line-clamp:1; }
.dossier-edit { padding-bottom:0 !important; }

/* ===== Round 15 (Z5): dossiers, folders, registers — one calm look, from the shared tokens of ui.css ===== */
/* Search fields carry their magnifier. */
.cases-page input.search-field { padding-left:2.4rem; background-color:hsl(var(--card)); }
/* Review 15: the magnifier is drawn in CSS — the page's security policy refuses data: images. */
.cases-page .field:has(> input.search-field:last-child) { position:relative; }
.cases-page .field:has(> input.search-field:last-child)::before { content:''; position:absolute; left:.9rem; bottom:16px; width:10px; height:10px; border:2px solid hsl(var(--muted-foreground)); border-radius:50%; pointer-events:none; }
.cases-page .field:has(> input.search-field:last-child)::after { content:''; position:absolute; left:calc(.9rem + 13px); bottom:11px; width:2px; height:6px; border-radius:1px; background:hsl(var(--muted-foreground)); transform:rotate(-45deg); pointer-events:none; }
/* List: filters on one row, «Ordine» beside the count. */
.cases-page .case-filter-grid { gap:var(--space-3) var(--space-4); margin:var(--space-3) 0 var(--space-2); }
@media (min-width:1101px) {
  .cases-page .case-filter-grid { grid-template-columns:minmax(220px,2fr) repeat(3,minmax(140px,1fr)); }
  .cases-page #case-list-section:not(.filters-open) .case-filter-grid { grid-template-columns:minmax(220px,2fr) minmax(170px,1fr); }
}
.cases-page .browse-summary { align-items:center; }
/* List: the term in the row says its own state. */
.cases-table .case-due { display:block; font-variant-numeric:tabular-nums; }
.cases-table .case-due.due-overdue { color:hsl(var(--tone-problem-fg)); font-weight:650; }
.cases-table .case-due.due-soon { color:hsl(var(--tone-attn-fg)); font-weight:650; }
.cases-table .due-note { display:inline; font-size:var(--text-label); color:hsl(var(--muted-foreground)); }
.cases-table .due-note + .due-note::before { content:' · '; color:hsl(var(--muted-foreground)); font-weight:400; }
.cases-table .due-note-overdue { color:hsl(var(--tone-problem-fg)); font-weight:600; }
.cases-table .due-note-soon { color:hsl(var(--tone-attn-fg)); font-weight:600; }
.cases-table tr.case-row td:last-child { width:3rem; text-align:right; }
.cases-table button.row-open { min-width:44px; min-height:44px; padding:0 .5rem; font-size:1.5rem; line-height:1; color:hsl(var(--muted-foreground)); }
.cases-table tr.case-row:hover button.row-open { color:hsl(var(--primary)); }
/* Paging: «‹ Înapoi · Pagina 1 din 4 · Înainte ›». */
.browse-pagination { gap:var(--space-2) var(--space-3); }
.browse-pagination button.page-edge { min-width:44px; padding-inline:.6rem; color:hsl(var(--muted-foreground)); }
.browse-pagination > button:not(.page-edge) { border-color:transparent; background:none; box-shadow:none; color:hsl(var(--primary)); font-weight:600; }
.browse-pagination > button:disabled { color:hsl(var(--muted-foreground)); opacity:.55; }
/* Round 26: on a phone «Pagina 1 din 4» stands on its own row above, and the four controls share one row (they were split
   two and two, framed and plain buttons crosswise). */
@media (max-width:600px) {
  .browse-pagination { display:flex; flex-wrap:wrap; justify-content:center; gap:var(--space-1) .35rem; }
  .browse-pagination [role="status"] { flex:1 1 100%; order:-1; }
  .browse-pagination > button:not(.page-edge) { min-width:0; padding-inline:.35rem; }
  .browse-pagination > button.page-edge { min-width:44px; }
}
.browse-pagination [role="status"] { color:hsl(var(--muted-foreground)); }
/* «Termene legale de urmărit»: coloured chips on one line that filter the list; compact lines when open. */
.cases-page .deadline-watch-details { border-radius:var(--radius-card); }
.cases-page .deadline-watch-details > summary { position:relative; padding:var(--space-2) calc(var(--space-4) + 1.5rem) var(--space-2) var(--space-4); gap:var(--space-2) var(--space-4); }
.cases-page .deadline-watch-details > summary::after { content:''; display:inline-block; box-sizing:border-box; width:.55rem; height:.55rem; border-right:2px solid hsl(var(--muted-foreground)); border-bottom:2px solid hsl(var(--muted-foreground)); border-top:0; border-left:0; transform:rotate(45deg); position:absolute; right:var(--space-4); top:1.1rem; margin:0; }
.cases-page .deadline-watch-details[open] > summary::after { content:''; transform:rotate(-135deg); top:1.3rem; }
.cases-page .deadline-watch-counts, .cases-page .deadline-watch-term-counts, .cases-page .deadline-watch-note-counts { display:inline-flex; flex-wrap:wrap; align-items:center; gap:var(--space-2); border:0; padding:0; }
.cases-page .deadline-watch-term-counts, .cases-page .deadline-watch-note-counts { color:hsl(var(--muted-foreground)); font-size:var(--text-help); }
.cases-page .deadline-watch-filter { min-height:32px; padding:.15rem .75rem; border:1px solid hsl(var(--tone-neutral-fg) / .35); border-radius:999px; background:hsl(var(--tone-neutral-bg)); color:hsl(var(--tone-neutral-fg)); font-size:var(--text-help); font-weight:600; text-decoration:none; }
.cases-page .deadline-watch-filter[data-kind="OVERDUE"] { background:hsl(var(--tone-problem-bg)); border-color:hsl(var(--tone-problem-border)); color:hsl(var(--tone-problem-fg)); }
.cases-page .deadline-watch-filter[data-kind="TODAY"], .cases-page .deadline-watch-filter[data-kind="SOON"] { background:hsl(var(--tone-attn-bg)); border-color:hsl(var(--tone-attn-border)); color:hsl(var(--tone-attn-fg)); }
.cases-page .deadline-watch-filter:hover { text-decoration:underline; }
@media (max-width:700px) { .cases-page .deadline-watch-filter { min-height:44px; padding-inline:.9rem; } }
.cases-page .deadline-watch-list { list-style:none; margin:0; padding:0; border-top:1px solid hsl(var(--border)); }
.cases-page .deadline-watch-item { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 var(--space-2); margin:0; padding:.4rem var(--space-4); border-bottom:1px solid hsl(var(--border) / .6); font-size:.9rem; }
.cases-page .deadline-watch-item .deadline-watch-case { font-weight:600; }
.cases-page .deadline-watch-more { margin:var(--space-2) var(--space-4); }
/* The dossier: the way back to the left, the other links to the right. */
.cases-page .case-back-nav { justify-content:flex-end; }
.cases-page .case-back-nav > .back-link { margin-right:auto; }
.cases-page .case-back-nav > .button-link { border-color:transparent; background:none; box-shadow:none; color:hsl(var(--primary)); font-weight:500; }
.cases-page .case-back-nav > .button-link:hover { background:hsl(var(--primary) / .07); }
/* Steps: the current one is a pill; on a phone only it shows, with «Pasul 2 din 5». */
.cases-page .wizard-step.current { background:hsl(var(--primary) / .1); border-radius:999px; padding:.2rem .7rem .2rem .25rem; color:hsl(var(--primary)); }
.cases-page .wizard-step.current.done { color:hsl(var(--foreground)); }
@media (max-width:600px) {
  .cases-page .wizard-steps::before { content:attr(data-position); flex:1 0 100%; font-size:var(--text-help); font-weight:600; color:hsl(var(--muted-foreground)); }
  .cases-page .wizard-steps > .wizard-step:not(.current) { display:none; }
  .cases-page .wizard-steps { flex-wrap:wrap; overflow:visible; }
}
/* «Ce urmează»: the checklist reads normally; only what the request did not declare is flagged. */
.cases-page .wizard-checklist li.wizard-check.missing label { color:inherit; }
.cases-page .wizard-checklist li.wizard-check:not(.checked) { border-color:hsl(var(--border)); }
.cases-page .wizard-check-undeclared { padding:.05rem .55rem; border:1px solid hsl(var(--tone-attn-border)); border-radius:999px; background:hsl(var(--tone-attn-bg)); color:hsl(var(--tone-attn-fg)); font-size:var(--text-label); font-weight:600; white-space:nowrap; }
.cases-page .wizard-checklist li.wizard-check > label { flex:1 1 12rem; min-width:0; }
/* Round 18 (proposal 5): every annex row has the same border, the box centred on the text, and both notes are the same pill. */
.cases-page .wizard-checklist li.wizard-check, .cases-page .wizard-checklist li.wizard-check.checked { align-items:center; border-color:hsl(var(--border)); }
.cases-page .wizard-checklist li.wizard-check input[type="checkbox"] { margin:0; }
.cases-page .wizard-check-note { padding:.05rem .55rem; border:1px solid hsl(var(--border)); border-radius:999px; background:hsl(var(--muted) / .6); color:hsl(var(--muted-foreground)); font-size:var(--text-label); font-weight:600; white-space:nowrap; }
.cases-page .wizard-check-note.wizard-check-undeclared { border-color:hsl(var(--tone-attn-border)); background:hsl(var(--tone-attn-bg)); color:hsl(var(--tone-attn-fg)); }
.cases-page .wizard-documents-link { align-self:start; justify-self:start; }
/* Documents: one title, one compact row per document, no frames inside the frame. */
.cases-page #detail-documents-card .doc-list, .cases-page #detail-documents-card .form-list { gap:0; margin:var(--space-2) 0 var(--space-4); }
.cases-page #detail-documents-card .doc-list li, .cases-page #detail-documents-card .form-list li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.1rem var(--space-4); align-items:center; padding:var(--space-3) 0; border:0; border-bottom:1px solid hsl(var(--border)); border-radius:0; background:none; }
.cases-page #detail-documents-card .doc-list li:last-child, .cases-page #detail-documents-card .form-list li:last-child { border-bottom:0; }
.cases-page #detail-documents-card .doc-list li > *, .cases-page #detail-documents-card .form-list li > * { grid-column:1; min-width:0; }
.cases-page #detail-documents-card li > .doc-actions { grid-column:2; grid-row:1 / span 2; margin:0; justify-content:flex-end; align-items:center; }
.cases-page #detail-documents-card li > .state-badge { justify-self:start; margin:.15rem 0; }
.cases-page #detail-documents-card .doc-actions a { min-height:36px; padding:.25rem .75rem; }
.cases-page #detail-documents-card .doc-actions a.doc-open { border-color:transparent; background:none; color:hsl(var(--primary)); padding-inline:.4rem; }
.cases-page #detail-documents-card li.empty { display:block; padding:var(--space-2) 0; border:0; }
.cases-page #detail-documents-card .document-create-item { display:block; padding:0; border:0; }
.cases-page #detail-documents-card .document-create-disclosure { margin:var(--space-2) 0; padding:0; border:0; background:none; }
.cases-page #detail-documents-card h5 { margin:var(--space-4) 0 0; font-size:var(--text-label); font-weight:600; letter-spacing:.02em; color:hsl(var(--muted-foreground)); }
@media (max-width:600px) {
  .cases-page #detail-documents-card .doc-list li, .cases-page #detail-documents-card .form-list li { grid-template-columns:minmax(0,1fr); }
  .cases-page #detail-documents-card li > .doc-actions { grid-column:1; grid-row:auto; justify-content:flex-start; margin-top:var(--space-2); }
  .cases-page #detail-documents-card .doc-actions a { min-height:44px; }
}
/* The mentions, reception and opinions cards repeat their summary as a title: said once. */
.cases-page .case-secondary-disclosure > section > h4:first-child { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.cases-page .case-act-note h5 .library-badge:not(.library-badge-retired) { display:none; }
.cases-page .case-secondary-disclosure > summary::before { content:''; width:.5rem; height:.5rem; border-right:2px solid hsl(var(--muted-foreground)); border-bottom:2px solid hsl(var(--muted-foreground)); transform:rotate(-45deg); transition:transform .15s; }
.cases-page .case-secondary-disclosure[open] > summary::before { content:''; transform:rotate(45deg); }
/* «Dosarul»: a visible chevron, summaries with a tone, quiet empty lines. */
.cases-page .dossier-fold > summary::after { content:''; width:.55rem; height:.55rem; border-right:2px solid hsl(var(--muted-foreground)); border-bottom:2px solid hsl(var(--muted-foreground)); transform:rotate(-45deg); transition:transform .15s; margin-right:.25rem; }
.cases-page .dossier-fold[open] > summary::after { content:''; transform:rotate(45deg); }
.cases-page .dossier-fold > summary:hover { background:hsl(var(--muted) / .5); }
.cases-page .dossier-summary { color:hsl(var(--foreground) / .8); }
.cases-page .dossier-summary.tone-problem { color:hsl(var(--tone-problem-fg)); font-weight:600; }
.cases-page .dossier-summary.tone-attn { color:hsl(var(--tone-attn-fg)); font-weight:600; }
.cases-page .dossier-summary.tone-empty { color:hsl(var(--muted-foreground)); }
.case-facts-summary:empty { display:none; }
.cases-page .dossier-edit button.compact { min-height:36px; padding:.2rem .75rem; font-size:.875rem; }
.cases-page #state-disclosure { margin-top:0; padding-top:0; border-top:0; }
.cases-page #state-disclosure > summary { min-height:44px; padding:0; border:0; background:none; box-shadow:none; color:hsl(var(--primary)); font-weight:500; }
.cases-page #state-disclosure > summary:hover { background:none; text-decoration:underline; }
.cases-page .dossier-fold .empty { color:hsl(var(--muted-foreground)); font-size:var(--text-help); }
/* History: one compact line per event, «21:46 · Cerere înregistrată…». */
.cases-page #detail-history > li:not(.history-day) { display:flex; flex-wrap:wrap; align-items:baseline; gap:0 var(--space-3); margin:0; padding:.25rem 0; }
.cases-page #detail-history .history-date { flex:0 0 auto; min-width:3rem; font-size:var(--text-help); }
.cases-page #detail-history .history-day-part, .cases-page #detail-history .history-sep { display:none; }
.cases-page #detail-history .history-text { flex:1 1 14rem; min-width:0; }
.cases-page #detail-history > li > :is(button,details,a.history-version-link) { flex:1 1 100%; }
.cases-page #detail-history > li > .history-version-link { text-align:left; padding-left:calc(3rem + var(--space-3)); }
/* Round 25 (E1-V8): every line starts with its hour and the text at the same place; the account, where it is shown, stands at the end of the line. */
.cases-page #detail-history > li:not(.history-day) > .history-date { display:contents; }
.cases-page #detail-history > li:not(.history-day) .history-time-part { order:0; min-width:3rem; margin:0; }
.cases-page #detail-history > li:not(.history-day) .history-text { order:1; }
.cases-page #detail-history > li:not(.history-day) .history-actor-part { order:2; margin-left:auto; color:hsl(var(--muted-foreground)); font-size:var(--text-help); }
.cases-page #detail-history > li:not(.history-day) > :is(button,details,a.history-version-link) { order:3; }
/* Phone: the request assistant takes the whole screen; no ring around a container that only scrolls. */
/* Review 15: only the dialog loses the ring; a panel reachable with Tab keeps its focus indicator. */
.cases-page .editor-panel:focus, .cases-page .editor-panel:focus-visible, .cases-page [role="tabpanel"][tabindex="-1"]:focus { outline:none; }
@media (max-width:700px) {
  .cases-page dialog.editor-panel { width:100vw; max-width:100vw; height:100dvh; max-height:100dvh; margin:0; border:0; border-radius:0; }
  .cases-page .wizard-actions > button.primary, .cases-page .wizard-actions > a.primary { flex:1 1 100%; width:100%; }
  .cases-page .wizard-actions .wizard-other-actions { margin-left:0; }
  .cases-page .cases-table tr.case-row { padding:.6rem .75rem; }
}

/* Round 15 (R-01..R-07): registers. */
.registry-table.no-state th:nth-child(4) { width:7rem; }
.registry-row .state-badge { white-space:nowrap; }
/* The history tables fit 1366 px: three flexible columns, a short one for the state and one for the action, which stays whole and quiet. */
.cases-page .registers-history-table { table-layout:auto; }
.cases-page .registers-history-table th, .cases-page .registers-history-table td { width:auto; overflow-wrap:break-word; }
.cases-page .registers-history-table th:last-child, .cases-page .registers-history-table td:last-child { width:1%; white-space:nowrap; text-align:right; }
.cases-page .registers-history-table td button.link-button { min-height:36px; padding:0 .25rem; white-space:nowrap; font-weight:500; color:hsl(var(--muted-foreground)); }
.cases-page .registers-history-table td button.link-button:hover { color:hsl(var(--danger)); text-decoration:underline; }
.cases-page .registers-history-table td .link-button + .link-button { display:block; margin-left:0; }
.cases-page .registers-history-table td > .registers-reference { overflow-wrap:anywhere; }
@media (max-width:760px) { .cases-page .registers-history-table td:last-child { width:auto; white-space:normal; text-align:left; } }
/* Round 19 (A12): on a phone the action of a handover or publication row takes its own full line and never breaks letter by letter. */
@media (max-width:760px) {
  .cases-page .registers-history-table td:last-child:has(> button, > a), .cases-page .cases-table tr.case-row td:last-child:has(> button.danger) { flex:1 1 100%; margin-left:0; grid-column:1 / -1; display:flex; text-align:left; flex-direction:row; flex-wrap:wrap; align-items:center; gap:.25rem .75rem; }
  .cases-page .registers-history-table td:last-child:has(> button, > a)::before { display:none; }
  .cases-page .registers-history-table td:last-child > :is(button, a) { flex:0 0 auto; width:auto; max-width:none; white-space:nowrap; overflow-wrap:normal; word-break:normal; }
}
/* Runda 7.11 (B2): «Predări consemnate» and «Publicări consemnate» are cards on a phone, as «Documente înregistrate»: the month or list and the date on
   the first line, the recipient or place and its proof, then the state with the action on the same line. */
@media (max-width:760px) {
  .cases-page .registers-history-table, .cases-page .registers-history-table tbody { display:block; width:100%; }
  .cases-page .registers-history-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .cases-page .registers-history-table tr { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:.3rem .75rem; margin:.6rem 0; padding:.65rem .75rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); }
  .cases-page .registers-history-table td { display:block; width:auto; min-width:0; padding:0; border:0; text-align:left; white-space:normal; }
  .workspace table.registers-history-table tbody tr > td { padding:0; border:0; background:none; }
  .workspace table.registers-history-table tbody tr > td.col-actions { width:auto; white-space:normal; }
  .cases-page .registers-history-table td:nth-child(1) { grid-column:1; grid-row:1; }
  .cases-page .registers-history-table td:nth-child(2) { grid-column:2; grid-row:1; white-space:nowrap; color:hsl(var(--muted-foreground)); }
  .cases-page .registers-history-table td:nth-child(3) { grid-column:1 / -1; grid-row:2; }
  .cases-page .registers-history-table td:nth-child(4) { grid-column:1; grid-row:3; align-self:center; }
  .cases-page .registers-history-table td:nth-child(5), .cases-page .registers-history-table td:last-child:has(> button, > a) { grid-column:2; grid-row:3; flex:none; justify-content:flex-end; }
  .cases-page .registers-history-table td:nth-child(5):empty { display:none; }
  .cases-page .registers-history-table td:nth-child(4):has(+ td:empty) { grid-column:1 / -1; }
}
/* The deadline of the handover, as a badge beside «Luna». */
.registers-term-badge { margin-left:var(--space-2); vertical-align:middle; font-weight:600; }
/* The period of a public list: one segmented switch. */
.cases-page .registers-presets.segmented { display:inline-flex; flex-wrap:nowrap; gap:0; margin:var(--space-2) 0; padding:2px; border:1px solid hsl(var(--button-border)); border-radius:999px; background:hsl(var(--muted)); }
.cases-page .registers-presets.segmented button { min-height:40px; padding:.25rem 1rem; border:0; border-radius:999px; background:transparent; box-shadow:none; color:hsl(var(--foreground)); font-weight:500; white-space:nowrap; }
/* Review 15: a chosen option is tinted, not filled; the one filled button stays the action.
   Round 25: the tint is .07, as on «Listă / Foldere», so the blue text keeps a 4.5:1 contrast. */
.cases-page .registers-presets.segmented button[aria-pressed="true"] { background:hsl(var(--primary) / .07); color:hsl(var(--primary)); font-weight:600; }
@media (max-width:400px) { .cases-page .registers-presets.segmented { display:flex; } .cases-page .registers-presets.segmented button { flex:1 1 0; padding-inline:.5rem; white-space:normal; } }
/* The tools of the registry: filters at the left, the export and «Despre registru» at the right, on one row. */
.cases-page .registry-tools { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-1) var(--space-4); }
.cases-page .registry-tools .registry-export-row { order:2; margin:0 0 0 auto; }
.cases-page .registry-tools .registry-about { order:3; }
.cases-page .registry-tools .registry-about[open] { order:4; flex:1 1 100%; }
.cases-page .registry-tools .registry-about > summary { min-height:44px; display:flex; align-items:center; cursor:pointer; color:hsl(var(--primary)); font-weight:500; }
/* Registry rows on a phone are short cards: the number and the date on one line, the document, the dossier, then the download. */
@media (max-width:700px) {
  .cases-page .registry-row { gap:.15rem .6rem; }
  .cases-page .registry-row td:nth-child(1) { flex:1 1 100%; display:flex; align-items:baseline; gap:var(--space-3); }
  .cases-page .registry-row td:nth-child(2) { flex:1 1 100%; color:hsl(var(--foreground)); font-size:1rem; }
  .cases-page .registry-row td:nth-child(3) { flex:1 1 100%; font-size:.9rem; }
  .cases-page .registry-row td:last-child { flex:1 1 100%; margin-left:0; }
  .cases-page .registry-row .registry-entry-actions a { min-height:44px; }
}
/* Round 15 (coordinator): the title and the colored counts of the legal-deadline box do not touch. */
.deadline-watch summary h3 { margin-right:var(--space-3); }

/* Round 16 (T1-U6): the chosen count is filled, not only underlined. */
.cases-page .deadline-watch-filter.is-active, .cases-page .deadline-watch-filter[aria-pressed="true"] { background:hsl(var(--tone-neutral-fg)); border-color:hsl(var(--tone-neutral-fg)); color:hsl(var(--card)); text-decoration:none; box-shadow:0 0 0 2px hsl(var(--card)), 0 0 0 4px hsl(var(--tone-neutral-fg) / .45); }
.cases-page .deadline-watch-filter[data-kind="OVERDUE"][aria-pressed="true"] { background:hsl(var(--tone-problem-fg)); border-color:hsl(var(--tone-problem-fg)); box-shadow:0 0 0 2px hsl(var(--card)), 0 0 0 4px hsl(var(--tone-problem-fg) / .45); }
.cases-page .deadline-watch-filter[data-kind="TODAY"][aria-pressed="true"], .cases-page .deadline-watch-filter[data-kind="SOON"][aria-pressed="true"] { background:hsl(var(--tone-attn-fg)); border-color:hsl(var(--tone-attn-fg)); box-shadow:0 0 0 2px hsl(var(--card)), 0 0 0 4px hsl(var(--tone-attn-fg) / .45); }
/* Round 16 (T1-U5): the cancellation of a calculation stands apart from the payment. */
/* Round 18 (proposal 12): the sticky tabs are opaque, and the strip above them is covered too, so the text behind never shows. */
@media (min-width:701px) {
  .case-workspace .detail-tabs { background:hsl(var(--card)); }
  .case-workspace .detail-tabs::before { content:""; position:absolute; left:0; right:0; bottom:100%; height:var(--cases-scroll-offset); background:hsl(var(--card)); pointer-events:none; }
  /* Round 25 (E1-V1): the strip above the tabs lies in their own top margin, so it never paints over the state badge of the header. */
  .cases-page .case-workspace .detail-tabs { margin-top:calc(var(--cases-scroll-offset) + .25rem); }
}
/* Round 18 (proposal 3): the glance line is for the closed box on a phone only. */
.cases-page .deadline-watch-glance { display:none; white-space:nowrap; font-size:var(--text-help); font-weight:600; color:hsl(var(--muted-foreground)); }
.cases-page .deadline-watch-glance[data-kind="OVERDUE"] { color:hsl(var(--tone-problem-fg)); }
@media (max-width:600px) {
  .cases-page .deadline-watch-details:not([open]) > summary .deadline-watch-glance { display:inline; }
  .cases-page .deadline-watch-details:not([open]) > summary .deadline-watch-counts { display:none; }
}
/* Round 18 (proposal 9): «depășit de n zile» is red here too, as in the list. */
/* Round 25 (E1-V10): «Termen notat: … · peste 17 zile» has one space round the dot (the flex gap and the dot's own space were added), and every text action
   of the term (the step's link and the one of each term) has the same size. */
.cases-page .case-quick-actions .case-due-left { margin-left:-.75rem; }
@media (max-width:600px) { .cases-page .case-quick-actions .case-due-left { margin-left:0; } }
.cases-page .case-quick-actions .link-button, .cases-page .case-legal-deadlines .library-card-actions .link-button { min-height:32px; font-size:.875rem; font-weight:500; text-decoration:none; }
.cases-page .case-quick-actions .case-due-left.is-overdue { color:hsl(var(--tone-problem-fg)); font-weight:650; }
/* Round 18 (proposal 7): the cancellation row is close under the card, with no extra gap before «Calculează taxa». */
.case-fee-cancel-row { display:flex; justify-content:flex-end; margin-top:var(--space-1); padding-top:0; border-top:0; }
.case-fee-cancel-row .danger { min-height:40px; }
.cases-page .case-fees > .case-fees-list + .form-actions { margin-top:0; padding-top:var(--space-2); }
.cases-page .case-fees .case-fee:last-child { padding-bottom:var(--space-1); }
.case-fee-payments .danger, .case-fee-regularization .danger { min-height:44px; padding:0 .4rem; }
/* Round 16 (T1-U8): on a phone the links of the dossier header share one row; «Dosar nou» sits beside the title. */
.cases-page .wizard-review-link { align-self:flex-start; margin-top:var(--space-2); }
@media (max-width:600px) {
  /* Round 26: with «Imobil pe hartă» the three links did not fit at 320–390 px and ran into one another; they share the row
     while they fit, and a link that does not fit goes to a second row, on the right. */
  .cases-page .case-back-nav { flex-wrap:wrap; justify-content:flex-end; gap:0 .1rem; }
  .cases-page .case-back-nav > .back-link, .cases-page .case-back-nav > .button-link { white-space:nowrap; font-size:.8rem; padding-inline:.3rem; flex:0 0 auto; }
  .cases-page .case-back-nav > .back-link { margin-right:auto; }
  .cases-page .workspace > .page-heading { flex-direction:row; flex-wrap:wrap; align-items:flex-start; }
  .cases-page .page-heading > div:first-child { flex:1 1 12rem; min-width:0; }
  .cases-page .page-heading > div[data-write-only] { flex:0 0 auto; }
}

/* Round 17 (R17-A5): on a narrow screen the chips wrap alone; the dot between them would stand on a line of its own. */
@media (max-width:700px) { .cases-page .deadline-watch-dot { display:none; } }

/* Round 17 (R17-A6): the rarer fee actions are a quiet second row. */
.case-fee-more { display:flex; flex-wrap:wrap; gap:0 var(--space-4); margin-top:var(--space-1); }

/* ===== Round 19 (zone A): finish of the list, the dossier, the registers ===== */
/* A1: the date weighs less; only an overdue or a very near term is bold and coloured, and the row answers the pointer. */
.cases-table .case-due.due-overdue, .cases-table .case-due.due-soon { font-weight:600; }
.cases-table tr.case-row { transition:background-color .12s; }
/* A2: «Depășit» and the other states of the watch box read as coloured text, the dossier links are not underlined. */
.cases-page .deadline-watch-item .deadline-badge { margin-left:0; padding:0; border:0; background:none; font-size:var(--text-label); font-weight:600; }
.cases-page .deadline-watch-item.legal-overdue .deadline-badge { color:hsl(var(--tone-problem-fg)); }
.cases-page .deadline-watch-item.legal-soon .deadline-badge, .cases-page .deadline-watch-item.legal-today .deadline-badge { color:hsl(var(--tone-attn-fg)); }
.cases-page .deadline-watch-item .deadline-watch-case { text-decoration:none; }
.cases-page .deadline-watch-item .deadline-watch-case:hover { text-decoration:underline; }
/* A3: «Mai multe filtre» keeps one shape, open or closed, with a chevron that turns. */
.case-filters-toggle, .case-filters-toggle:hover, .case-filters-toggle[aria-expanded="true"] { background:none; }
.case-filters-toggle::after { content:''; display:inline-block; width:.4rem; height:.4rem; margin-left:.45rem; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:translateY(-.1rem) rotate(45deg); transition:transform .12s; }
.case-filters-toggle[aria-expanded="true"]::after { transform:translateY(.1rem) rotate(-135deg); }
/* A4: a procedure card has a description of at most two lines. */
.wizard-card span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.wizard-more > summary { margin:0 0 .5rem; }
/* A5: the badge of the dossier header is whole (line-height) and the two side links are quiet. */
.case-detail #detail-meta .state-badge { line-height:1.5; padding-block:.1rem; }
.cases-page .case-back-nav > .button-link { color:hsl(var(--muted-foreground)); font-weight:450; }
.cases-page .case-back-nav > .button-link:hover { color:hsl(var(--primary)); }
/* A7: the first card of «Documente» breathes evenly. */
.cases-page #detail-documents-card .doc-list, .cases-page #detail-documents-card .form-list { margin-bottom:var(--space-3); }
.cases-page #detail-documents-card .document-create-disclosure { margin:var(--space-1) 0; }
.cases-page #detail-documents-card .document-create-item { margin:0; }
/* Round 25 (E1-V7, E1-S6): a file's tools and withdrawal form run under the whole row (the separator line is whole), the row's actions stand
   in two even columns, and «Aplică marcaj pe copie» looks like «Creează un document». */
.cases-page #detail-documents-card .doc-list li > :is(details, form) { grid-column:1 / -1; }
.cases-page #detail-documents-card .doc-list li > .attachment-mark-tool { margin:var(--space-2) 0 0; }
.cases-page #detail-documents-card .doc-actions > :first-child { min-width:8.5rem; justify-content:center; }
.cases-page #detail-documents-card .doc-actions > :nth-child(2):not(details) { min-width:9.6rem; justify-content:center; }/* Runda 16.11: the second control is «Vezi documentul scanat» or the next step; «⋯» keeps its own width */
.attachment-mark-options { margin:.25rem 0; }
.attachment-mark-options > summary { min-height:36px; cursor:pointer; color:hsl(var(--primary)); font-weight:500; }
.attachment-mark-options-body { display:grid; gap:.45rem; margin-top:.35rem; }
.attachment-mark-options-body > label { margin:.2rem 0 0; }
.attachment-mark-tool .field-error { margin:.25rem 0 0; }
.attachment-mark-tool input[aria-invalid="true"], .attachment-mark-tool select[aria-invalid="true"] { border-color:hsl(var(--destructive)); }
@media (max-width:600px) { .cases-page #detail-documents-card .doc-actions > :first-child, .cases-page #detail-documents-card .doc-actions > :nth-child(2) { min-width:0; } }
/* Round 25 (E1-V9, E1-V11): «Editează» does not touch the section's header, «Responsabil» stands on the line of its list, and a disclosure
   that opens the checks has room under the title of the section. */
.cases-page .case-workspace .dossier-fold > .dossier-edit { padding-top:.75rem; padding-bottom:.35rem !important; }
.cases-page .case-owner { align-items:center; gap:.4rem .75rem; }
.cases-page .case-owner label { display:inline-flex; align-items:center; min-height:44px; margin:0; }
.cases-page .case-owner select { margin:0; }
#case-compliance > .action-disclosure { margin-bottom:var(--space-4); }
/* A8: the open rows of «Dosarul» have one level of title and their actions together. */
.dossier-fold[open] > :is(.detail-card, section, div) :is(h4, h5) { font-size:var(--text-card); }
.dossier-fold[open] > :is(.detail-card, section, div) .form-actions { display:flex; flex-wrap:wrap; gap:var(--space-2); margin-top:var(--space-3); }
/* A10: the Dosar links of the registry are not underlined; the state sits under the document. */
.registry-case-link { text-decoration:none; }
.registry-case-link:hover { text-decoration:underline; }
.registry-entry-state { display:inline-block; margin-top:.25rem; }
.registry-export-row { gap:var(--space-4); }
/* A11: the term badge on the title line. */
.registry-activity-title .registers-term-badge { margin-left:var(--space-3); font-size:var(--text-label); vertical-align:middle; }
.case-cell .case-draft-drop { display:block; width:fit-content; margin-top:.15rem; min-height:24px; padding:0; font-size:var(--text-help); }
@media (max-width:768px) { .case-cell .case-draft-drop { min-height:44px; } }
/* Round 23 (U-16): a certificate not yet issued stands grey after the issued ones. */
#wizard-parent-select option.is-not-issued { color:hsl(var(--muted-foreground)); }
.wizard-completion-sent { margin:.25rem 0 0; }
.wizard-note > span.wizard-completion-sent { display:block; margin-top:.35rem; color:hsl(var(--muted-foreground)); }/* Runda 16: the second line of the box of the completions asked */
/* Round 24 (U-04): the account in charge, in the dossier and in the list. */
.case-owner { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .75rem; margin:.5rem 0 1rem; }
.case-owner label { font-weight:600; }
.case-owner select { width:auto; min-width:14rem; max-width:100%; min-height:44px; }
.case-take-over { margin:0 0 .75rem; }
.case-take-over[hidden] { display:none; }
/* Round 24 (U-02): the «Azi» row, one line of numbers that filter the list; on a phone it folds like the deadline box. */
.case-today { display:flex; flex-wrap:wrap; align-items:center; gap:var(--space-2) var(--space-3); margin:var(--space-2) 0; padding:var(--space-2) var(--space-4); border:1px solid hsl(var(--border)); border-radius:var(--radius-card,var(--radius)); background:hsl(var(--card)); }
.case-today[hidden],.case-today-chips[hidden],.case-today-print[hidden] { display:none; }
.case-today-toggle { min-width:2rem; display:inline-flex; align-items:baseline; gap:var(--space-2); min-height:32px; padding:0; border:0; background:none; color:inherit; font:inherit; cursor:default; }
.case-today-label { font-weight:700; font-size:1rem; }
.case-today-glance { display:none; color:hsl(var(--muted-foreground)); font-size:var(--text-help,.84rem); }
.case-today-chips { display:flex; flex-wrap:wrap; gap:var(--space-2); }
.case-today-chip { min-height:32px; padding:.15rem .75rem; border:1px solid hsl(var(--tone-neutral-fg) / .35); border-radius:999px; background:hsl(var(--tone-neutral-bg)); color:hsl(var(--tone-neutral-fg)); font-size:var(--text-help,.84rem); font-weight:600; cursor:pointer; }
.case-today-chip.is-zero { font-weight:400; opacity:.65; }
.case-today-chip.is-active { background:hsl(var(--primary)); border-color:hsl(var(--primary)); color:hsl(var(--primary-foreground)); opacity:1; }
.case-today-chip:focus-visible,.case-today-toggle:focus-visible { outline:2px solid hsl(var(--primary)); outline-offset:3px; }
.case-today-print { margin-left:auto; min-height:32px; }
@media (max-width:600px) {
  .case-today { padding:var(--space-2) var(--space-3); }
  .case-today-toggle { flex:1; min-height:44px; cursor:pointer; text-align:left; }
  .case-today-toggle::after { content:''; margin-left:auto; width:.55rem; height:.55rem; border-right:2px solid hsl(var(--muted-foreground)); border-bottom:2px solid hsl(var(--muted-foreground)); transform:rotate(45deg); align-self:center; }
  .case-today-toggle[aria-expanded="true"]::after { transform:rotate(-135deg); }
  .case-today-glance { display:inline; }
  .case-today-chip,.case-today-print { min-height:44px; padding-inline:.9rem; }
  .case-today-print { margin-left:0; }
}
/* Round 25 (E1-V4/S2): the registration review scrolls inside, its buttons stay in view; one line above the buttons, a chevron like the other folds. */
.layout-dialog.registration-review { max-height:calc(100vh - 2rem); max-height:calc(100dvh - 2rem); overflow:hidden; }
.layout-dialog.registration-review[open] { display:flex; flex-direction:column; }
.registration-review > h2, .registration-review > .form-actions { flex:none; }
.registration-review > .form-actions { margin-top:.75rem; padding-top:.85rem; background:hsl(var(--card)); }
.registration-review-body { flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding-right:.25rem; }
.registration-review .registration-problems { margin:.75rem 0 0; padding:0; border-bottom:0; }
.registration-review .registration-problems + .registration-problems { margin-top:1rem; padding-top:.75rem; border-top:1px solid hsl(var(--border)); }
.registration-review .registration-problems > .secondary { margin-top:.5rem; }
.registration-review .registration-problems > h3 { font-size:1rem; }
.registration-review .problem-list .problem-section { list-style:none; margin-left:-1.25rem; }
.registration-review .problem-list .problem-section > strong { display:inline; margin:0; }
.registration-review .problem-count { color:hsl(var(--muted-foreground)); }
.registration-review .problem-labels { display:block; margin:.1rem 0 0; }
.registration-review .registration-blocked-reason { margin-bottom:0; }
.registration-review .registration-warnings { margin-top:.75rem; border:0; padding:0; }
.registration-review .registration-problems + .registration-warnings { border-top:1px solid hsl(var(--border)); margin-top:1rem; }
.registration-review .registration-warnings > summary { list-style:none; display:flex; align-items:center; min-height:44px; cursor:pointer; font-weight:600; }
.registration-review .registration-warnings > summary::-webkit-details-marker { display:none; }
.registration-review .registration-warnings > summary::before { content:''; flex:none; margin:0 .65rem 0 .15rem; width:.5rem; height:.5rem; border-right:2px solid hsl(var(--muted-foreground)); border-bottom:2px solid hsl(var(--muted-foreground)); transform:rotate(-45deg); transition:transform .15s; }
.registration-review .registration-warnings[open] > summary::before { transform:rotate(45deg); }
.registration-review .registration-warnings > .registration-check:last-child { padding-bottom:.25rem; }
/* Round 25 (E1-V12): a card chosen with the mouse keeps no focus frame; the chosen state is its border. */
.wizard-card:focus:not(:focus-visible) { outline:none; }
/* Round 25 (E1-V5/S12): «Alte acțiuni» starts at the card's edge, and its actions stand apart, with a gap between them. */
.case-workspace .wizard-actions .wizard-other-actions > summary { padding-inline:0 .65rem; }
.case-workspace .wizard-actions .wizard-other-actions[open] { display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; gap:.5rem .75rem; }
.case-workspace .wizard-actions .wizard-other-actions[open] > summary { flex:0 0 100%; }
.case-workspace .wizard-actions .wizard-other-actions[open] > :is(button, a, label) { margin:0; }
/* Round 25 (E1-S10): «Dosar fără cerere» keeps the essential fields in view, the rest under «Mai multe»; the required fields carry the red * of the other forms (ui.css, «Runda 22», for every page). */
.case-form-panel .required-legend { margin:.25rem 0 .5rem; }
.case-more-fields { margin-top:.25rem; }
.case-more-fields > summary { list-style:none; display:flex; align-items:center; min-height:44px; cursor:pointer; font-weight:600; }
.case-more-fields > summary::-webkit-details-marker { display:none; }
.case-more-fields > summary::before { content:''; flex:none; margin:0 .65rem 0 .15rem; width:.5rem; height:.5rem; border-right:2px solid hsl(var(--muted-foreground)); border-bottom:2px solid hsl(var(--muted-foreground)); transform:rotate(-45deg); transition:transform .15s; }
.case-more-fields[open] > summary::before { transform:rotate(45deg); }
.case-more-fields > .form-grid { margin-top:.5rem; }
/* Round 25 (F1-D1): the lines of «Termene legale de urmărit» take at most two lines for the dossier and two for the title. */
.deadline-watch-item .deadline-watch-case, .deadline-watch-item .deadline-watch-what { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.deadline-watch-item .deadline-watch-what { margin-top:.1rem; }
.deadline-watch-item .deadline-badge { margin:.1rem 0; }

/* Round 25 (F1-dosar): «Anulează consemnarea» repeated on every line is a quiet grey action, not the line's loudest word. */
.case-undo.link-button { color:hsl(var(--muted-foreground)); font-size:.8125rem; font-weight:400; min-height:28px; margin-left:.5rem; text-decoration:none; }
.case-undo.link-button:hover, .case-undo.link-button:focus-visible { color:hsl(var(--primary)); text-decoration:underline; }
@media (pointer:coarse) { .case-undo.link-button { min-height:44px; } }
/* Round 25 (S-06): the three folding actions of «Documente» (marcaj, creare, încărcare) stand at equal distances. */
.cases-page #detail-documents-card .attachment-list-section .doc-list { margin-bottom:0; }
.cases-page #detail-documents-card .attachment-list-section { margin-bottom:-.5rem; }

/* Lot C, from the beneficiaries' list (items 13 and 21): the documents of the dossier as one table, desktop-like —
   Document · Nr. · Data · Stare · Acțiuni —; the working documents and the files keep the same columns; what belongs to a
   row stands under it, across the row. On a phone each row becomes a card. */
#detail-documents-card .doc-table-head, #detail-documents-card .doc-list > li.doc-row, #detail-documents-card .form-list > li.doc-row {
  display:grid; grid-template-columns:minmax(0,1fr) 5.5rem 6.5rem 9rem 6rem minmax(11rem,max-content); column-gap:.9rem; align-items:center; }
#detail-documents-card .doc-table-head { padding:.4rem .65rem; border-bottom:2px solid hsl(var(--border)); color:hsl(var(--muted-foreground));
  font-size:.72rem; font-weight:650; letter-spacing:.04em; text-transform:uppercase; }
#detail-documents-card .doc-table-head > span:last-child { text-align:right; }
#detail-documents-card :is(.doc-list, .form-list) { margin:0; padding:0; list-style:none; }
#detail-documents-card :is(.doc-list, .form-list) > li.doc-row { margin:0; padding:.5rem .65rem; border:0; border-bottom:1px solid hsl(var(--border)); border-radius:0; background:transparent; box-shadow:none; }
#detail-documents-card :is(.doc-list, .form-list) > li.doc-row:hover { background:hsl(var(--muted) / .5); }
#detail-documents-card li.doc-row > .doc-cell { min-width:0; font-size:.86rem; }
#detail-documents-card li.doc-row .doc-name { display:flex; flex-direction:column; gap:.1rem; }
#detail-documents-card li.doc-row .doc-title { font-weight:600; overflow-wrap:anywhere; }
#detail-documents-card li.doc-row .doc-kind { color:hsl(var(--muted-foreground)); font-size:.74rem; overflow-wrap:anywhere; }
#detail-documents-card li.doc-row .doc-description { font-size:.8rem; }
#detail-documents-card li.doc-row .doc-number, #detail-documents-card li.doc-row .doc-date { font-variant-numeric:tabular-nums; }
#detail-documents-card li.doc-row .doc-state { display:flex; flex-direction:column; align-items:flex-start; gap:.15rem; }
/* Runda 16.11 (D-4): «Anexe verificate»: «Da», «Nu» in red (the word, not only the colour), «Nu este cazul» quiet. */
#detail-documents-card li.doc-row .doc-annex { font-size:.8rem; line-height:1.25; }
#detail-documents-card .doc-annex-value.annex-yes { color:hsl(142 55% 26%); font-weight:650; }
#detail-documents-card .doc-annex-value.annex-no { color:hsl(var(--danger)); font-weight:700; }
#detail-documents-card .doc-annex-value.annex-na, #detail-documents-card .doc-annex-value.annex-pending { color:hsl(var(--muted-foreground)); font-size:.74rem; }
/* Runda 22.11 (dosar, 5): in a closed dossier «Nu» has no tone of attention */
#detail-documents-card .doc-annex-value.annex-no.annex-closed, .chain-documents-table .annex-no.annex-closed { color:hsl(var(--muted-foreground)); font-weight:500; }
.chain-documents-table .annex-yes { color:hsl(142 55% 26%); font-weight:650; }
.chain-documents-table .annex-no { color:hsl(var(--danger)); font-weight:700; }
.chain-documents-table .annex-na, .chain-documents-table .annex-pending { color:hsl(var(--muted-foreground)); font-size:.78rem; }
#detail-documents-card li.doc-row .doc-subtle { color:hsl(var(--muted-foreground)); font-size:.72rem; line-height:1.25; }
/* Runda 22.11 (dosar, 2): «Incompletă» under «Înregistrat», in the tone of attention (as «doc-working») */
#detail-documents-card li.doc-row .doc-subtle.doc-incomplete { color:hsl(30 80% 32%); font-weight:650; }
#detail-documents-card .doc-state-badge.doc-done { background:hsl(142 60% 94%); color:hsl(142 55% 26%); border-color:hsl(142 45% 80%); }
#detail-documents-card .doc-state-badge.doc-working { background:hsl(38 95% 94%); color:hsl(30 80% 32%); border-color:hsl(38 80% 78%); }
#detail-documents-card .doc-state-badge.doc-file { background:hsl(var(--muted)); color:hsl(var(--foreground)); }
#detail-documents-card .doc-state-badge.doc-withdrawn { background:hsl(var(--muted)); color:hsl(var(--muted-foreground)); text-decoration:line-through; }
/* Verificarea din 21.11: a long state («Comunicată la 21.11.2026», «Exemplar semnat încărcat») breaks inside its column; on one line it ran over «Anexe verificate». */
#detail-documents-card li.doc-row .doc-state-badge { white-space:normal; text-align:left; max-width:100%; border-radius:.75rem; }
#detail-documents-card li.doc-row > .doc-actions { display:flex; flex-wrap:wrap; gap:.3rem; justify-content:flex-end; margin:0; }
#detail-documents-card li.doc-row > .doc-actions > :is(a, button) { min-height:32px; padding:.2rem .6rem; font-size:.8rem; }
#detail-documents-card li.doc-row > .doc-extra { grid-column:1 / -1; min-width:0; }
#detail-documents-card li.doc-row > .doc-extra:empty, #detail-documents-card li.doc-row > .doc-extra:not(:has(> :not([hidden]))) { display:none; }
#detail-documents-card li.doc-row > .doc-extra > * { margin:.35rem 0 0; }
#detail-documents-card :is(#detail-forms, .attachment-list-section, .act-versions) > h5 { margin:.75rem 0 0; padding:.3rem .65rem; background:hsl(var(--muted)); border-radius:var(--radius);
  color:hsl(var(--muted-foreground)); font-size:.72rem; font-weight:650; letter-spacing:.04em; text-transform:uppercase; }
#detail-documents-card li.attachment-withdrawn .doc-title { text-decoration:line-through; }
@media (max-width:760px) {
  #detail-documents-card .doc-table-head { display:none; }
  #detail-documents-card :is(.doc-list, .form-list) > li.doc-row { grid-template-columns:repeat(3,minmax(0,1fr)); row-gap:.35rem; padding:.65rem .5rem; }
  #detail-documents-card li.doc-row .doc-name, #detail-documents-card li.doc-row > .doc-actions, #detail-documents-card li.doc-row > .doc-extra { grid-column:1 / -1; }
  #detail-documents-card li.doc-row > .doc-actions { justify-content:flex-start; }
  #detail-documents-card li.doc-row :is(.doc-number, .doc-date, .doc-annex)::before { content:attr(data-label) ' '; color:hsl(var(--muted-foreground)); font-size:.72rem; }
  #detail-documents-card li.doc-row > .doc-actions > :is(a, button) { min-height:40px; }
}

/* Lot C, item 38: «Adaugă» above the dossier — the next request of the same investment, a document, a file. */
.case-back-nav .case-add-menu { position:relative; margin-left:auto; }
.case-back-nav .case-add-menu > summary { min-height:36px; }
.case-add-menu .case-add-options { position:absolute; right:0; z-index:20; display:flex; flex-direction:column; align-items:stretch; min-width:16rem; margin-top:.25rem;
  padding:.35rem; background:hsl(var(--card)); border:1px solid hsl(var(--border)); border-radius:var(--radius); box-shadow:0 8px 24px hsl(222 47% 11% / .14); }
.case-add-menu .case-add-options > button { justify-content:flex-start; text-align:left; min-height:38px; padding:.4rem .6rem; border-radius:calc(var(--radius) - 2px); }
.case-add-menu .case-add-options > button:hover { background:hsl(var(--muted)); }

/* Lot C, items 15 and 32: the small windows opened from a document's row (handover, annex check). */
dialog.row-dialog { width:min(34rem, 94vw); }
dialog.row-dialog .row-dialog-body { max-height:65vh; overflow:auto; }
dialog.row-dialog .annex-checklist { margin:.5rem 0 0; }

/* Lot C, item 33: a finalized investment reads at a glance. */
.state-badge.state-final { background:hsl(142 60% 94%); color:hsl(142 55% 24%); border-color:hsl(142 45% 78%); }

/* Lot C, items 31 and 34: the dossiers of one investment, shown as one dossier. */
.case-chain { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem .5rem; margin:.5rem 0 .75rem; padding:.45rem .6rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--muted) / .45); }
.case-chain-label { color:hsl(var(--muted-foreground)); font-size:.72rem; font-weight:650; letter-spacing:.04em; text-transform:uppercase; margin-right:.25rem; }
.case-chain-arrow { color:hsl(var(--muted-foreground)); }
.case-chain-item { display:inline-flex; flex-direction:column; align-items:flex-start; gap:0; min-height:40px; padding:.25rem .6rem; border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); color:hsl(var(--foreground)); text-align:left; cursor:pointer; }
.case-chain-item:hover { border-color:hsl(var(--primary) / .5); }
.case-chain-item.current { border-color:hsl(var(--primary)); box-shadow:inset 0 0 0 1px hsl(var(--primary)); cursor:default; }
.case-chain-title { font-size:.82rem; font-weight:600; }
.case-chain-meta { font-size:.72rem; color:hsl(var(--muted-foreground)); }
/* Runda 8 (beneficiaries, 29.10): «Toate documentele» of the investment closes the strip; its table opens in a window. */
.case-chain .chain-documents { margin:0 0 0 auto; padding:0; border:0; align-self:center; }/* Runda 9 (QA): not the separator line of the other «Adaugă …» */
.case-chain .chain-documents > summary { min-height:40px; padding:.3rem .8rem; font-size:.85rem; }
.chain-documents-table td { vertical-align:middle; }
.chain-documents-table .chain-col-date, .chain-documents-table .chain-col-number, .chain-documents-table .chain-col-actions a { white-space:nowrap; }
.chain-documents-table .chain-col-case a { white-space:nowrap; }
.chain-documents-table .chain-col-actions { text-align:right; }
.chain-documents-table .chain-col-actions .row-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.3rem; }
/* Runda 16.11 (D-1, D-4): with the column «Anexe verificate» the actions keep room for two buttons on a line («Vezi», «Descarcă»); «Vezi documentul scanat» goes under them. */
@media (min-width:761px) { .chain-documents-table .chain-col-actions { min-width:11.5rem; } .chain-documents-table thead th:nth-child(6) { white-space:normal; min-width:5.5rem; } }
.chain-documents-table .chain-col-actions .button-link { min-height:32px; padding:.2rem .7rem; font-size:.82rem; white-space:nowrap; }
@media (max-width:760px) {
  .chain-documents-table thead { display:none; }
  .chain-documents-table, .chain-documents-table tbody, .chain-documents-table tr { display:block; width:auto; }
  .chain-documents-table tr { padding:.5rem 0; border-bottom:1px solid hsl(var(--border)); }
  .chain-documents-table tbody td { display:flex; gap:.6rem; align-items:baseline; width:auto; padding:.15rem .35rem; border:0; background:none; text-align:left; }
  .chain-documents-table tbody td::before { content:attr(data-label); flex:0 0 4.5rem; color:hsl(var(--muted-foreground)); font-size:.7rem; font-weight:650; letter-spacing:.04em; text-transform:uppercase; }
  .chain-documents-table .chain-col-actions { align-items:center; }
  /* Runda 16.11: the subdossier and its request number wrap on a phone (the number was cut at the edge of the window) */
  .chain-documents-table tbody td.chain-col-subdossier { flex-wrap:wrap; white-space:normal; }
  .chain-documents-table .chain-col-subdossier .cell-sub { white-space:normal; }
  .chain-documents-table .chain-col-actions::before { visibility:hidden; }
  .chain-documents-table .chain-col-actions .row-actions { justify-content:flex-start; }
}
/* Lot C: each cell in its own column (older rules put every child of a row in the first column). */
.cases-page #detail-documents-card li.doc-row > .doc-name { grid-column:1; grid-row:auto; }
.cases-page #detail-documents-card li.doc-row > .doc-number { grid-column:2; grid-row:auto; }
.cases-page #detail-documents-card li.doc-row > .doc-date { grid-column:3; grid-row:auto; }
.cases-page #detail-documents-card li.doc-row > .doc-state { grid-column:4; grid-row:auto; }
.cases-page #detail-documents-card li.doc-row > .doc-annex { grid-column:5; grid-row:auto; }
.cases-page #detail-documents-card li.doc-row > .doc-actions { grid-column:6; grid-row:auto; margin:0; justify-content:flex-end; }
.cases-page #detail-documents-card li.doc-row > .doc-extra { grid-column:1 / -1; grid-row:auto; }
.cases-page #detail-documents-card li.doc-row > .doc-actions > * { min-width:0; }
@media (max-width:760px) {
  .cases-page #detail-documents-card li.doc-row > :is(.doc-name, .doc-actions, .doc-extra) { grid-column:1 / -1; }
  .cases-page #detail-documents-card li.doc-row > .doc-number { grid-column:1; }
  .cases-page #detail-documents-card li.doc-row > .doc-date { grid-column:2; }
  .cases-page #detail-documents-card li.doc-row > .doc-state { grid-column:3; }
  .cases-page #detail-documents-card li.doc-row > .doc-annex { grid-column:1 / -1; }
  .cases-page #detail-documents-card li.doc-row > .doc-actions { justify-content:flex-start; }
}
/* Lot C: fixed column widths, so every row and the heading line up (a «max-content» column differs from row to row). */
#detail-documents-card .doc-table-head, #detail-documents-card .doc-list > li.doc-row, #detail-documents-card .form-list > li.doc-row,
.cases-page #detail-documents-card .doc-list > li.doc-row, .cases-page #detail-documents-card .form-list > li.doc-row { grid-template-columns:minmax(0,1fr) 5rem 6.5rem 9.5rem 6.5rem 21rem; }
@media (max-width:1280px) {
  #detail-documents-card .doc-table-head, #detail-documents-card .doc-list > li.doc-row, #detail-documents-card .form-list > li.doc-row,
  .cases-page #detail-documents-card .doc-list > li.doc-row, .cases-page #detail-documents-card .form-list > li.doc-row { grid-template-columns:minmax(0,1fr) 4.5rem 6rem 8.5rem 6rem 15rem; }
}
@media (max-width:760px) {
  .cases-page #detail-documents-card .doc-list > li.doc-row, .cases-page #detail-documents-card .form-list > li.doc-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
.case-back-nav .case-add-menu { border:0; padding:0; margin-top:0; }

/* Beneficiaries, item 24: a dossier without a term says why, small and grey, in the «Termen» column. */
.case-due.due-reason { color:hsl(var(--muted-foreground)); font-size:.78rem; font-style:italic; white-space:normal; }

/* Beneficiaries, item 6: the earlier versions of a corrected request, under its row. */
.doc-corrections { font-size:.8rem; color:hsl(var(--muted-foreground)); padding:.15rem 0; }
.doc-corrections .link-button { font-size:.8rem; }

/* Round E: the dossier's documents read as a desktop table: one look for every row action, the two «add» buttons on one row. */
@media (min-width: 761px) {
  .cases-page #detail-documents-card li.doc-row .doc-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:.3rem; }
  .cases-page #detail-documents-card li.doc-row .doc-actions > :is(a, button) { min-height:30px; padding:.15rem .6rem; font-size:.8rem; font-weight:550; line-height:1.2;
    border:1px solid hsl(var(--border)); border-radius:calc(var(--radius) - 2px); background:hsl(var(--card)); color:hsl(var(--foreground)); text-decoration:none; white-space:nowrap; display:inline-flex; align-items:center; box-shadow:none; }
  .cases-page #detail-documents-card li.doc-row .doc-actions > :is(a, button):hover { border-color:hsl(var(--primary) / .55); background:hsl(var(--muted) / .5); }
  .cases-page #detail-forms li.document-create-item > details:not([open]) > summary { min-height:36px; padding:.35rem .85rem; font-size:.85rem; }
}
.cases-page #detail-forms li.document-create-item { display:flex; flex-wrap:wrap; align-items:flex-start; gap:.5rem; }
.cases-page #detail-forms li.document-create-item > details { margin:0; }
/* QA 2026-10-28 (round 2): the button pressed keeps its place (one open at a time); its form opens under it, across the row. */
.cases-page #detail-forms li.document-create-item > details[open] { flex-basis:100%; }
/* Round E: the opinions of the dossier as a table: state · opinion and its record · actions. */
.cases-page .case-opinions-items { list-style:none; margin:0; padding:0; border-top:1px solid hsl(var(--border)); }
.cases-page .case-opinions-items > li.case-opinion { display:grid; grid-template-columns:6.75rem minmax(0,1fr) auto; align-items:center; column-gap:.75rem; padding:.45rem .25rem; margin:0; border-bottom:1px solid hsl(var(--border)); }
.cases-page .case-opinions-items > li.case-opinion > .library-badge { justify-self:start; }
.cases-page .case-opinion-info { min-width:0; }
.cases-page .case-opinions-items > li.case-opinion > :is(.case-opinion-menu, .case-opinion-actions) { justify-self:end; }
@media (max-width: 760px) { .cases-page .case-opinions-items > li.case-opinion { grid-template-columns:minmax(0,1fr) auto; row-gap:.25rem; } .cases-page .case-opinions-items > li.case-opinion > .case-opinion-info { grid-column:1 / -1; grid-row:2; } }
/* Round E: the checklists of the steps (annexes, completions) as table rows, not boxes. */
.cases-page .wizard-checklist { gap:0; border-top:1px solid hsl(var(--border)); }
.cases-page .wizard-checklist li { border:0; border-bottom:1px solid hsl(var(--border)); border-radius:0; padding:.4rem .5rem; }
.cases-page .wizard-checklist li.checked { border-color:hsl(var(--border)); background:hsl(var(--primary) / .04); }
.cases-page .wizard-checklist li.wizard-check { align-items:center; }
@media (min-width: 761px) {
  .cases-page .wizard-checklist li.wizard-check input[type="checkbox"] { width:1.15rem; min-width:1.15rem; height:1.15rem; min-height:1.15rem; margin:0; }
}
@media (min-width: 761px) {
  .cases-page .wizard-checklist li.wizard-check label { margin:0; }
  .cases-page .case-opinions-items .case-opinion-menu > summary { min-height:30px; }
}
@media (min-width: 761px) {
  /* Round E: «Consemnează» opens a menu under itself, as in a desktop window; the row keeps its height. */
  .cases-page .case-opinions-items .case-opinion-menu { position:relative; }
  .cases-page .case-opinions-items .case-opinion-menu[open] > .case-opinion-actions { position:absolute; right:0; top:calc(100% + 2px); z-index:20; display:flex; flex-direction:column; align-items:stretch; gap:0;
    min-width:13rem; padding:.3rem 0; background:hsl(var(--card)); border:1px solid hsl(var(--border)); border-radius:var(--radius); box-shadow:0 8px 24px hsl(var(--foreground) / .12); }
  .cases-page .case-opinions-items .case-opinion-menu[open] > .case-opinion-actions > button { justify-content:flex-start; text-align:left; padding:.4rem .8rem; min-height:32px; border-radius:0; }
  .cases-page .case-opinions-items .case-opinion-menu[open] > .case-opinion-actions > button:hover { background:hsl(var(--muted)); text-decoration:none; }
  .cases-page #detail-forms li.document-create-item > details > summary { min-height:36px; padding:.35rem .85rem; font-size:.85rem; }
}
.cases-page #detail-documents-card .doc-corrections a { display:inline; min-height:0; padding:0; border:0; background:none; box-shadow:none; color:hsl(var(--primary)); font-weight:500; text-decoration:underline; text-underline-offset:2px; }
/* Beneficiaries, item 31: the investment a list row stands for. */
.cases-page .case-subline.case-investment { color:hsl(var(--muted-foreground)); font-size:.78rem; }
/* QA 2026-10-28: «Aplică marcaj pe copie» under a file is a small button like the file's other actions. */
.cases-page #detail-documents-card .attachment-mark-tool > summary { display:inline-flex; align-items:center; min-height:30px; padding:.15rem .6rem; font-size:.8rem; font-weight:550; }

/* QA 2026-10-28 (round 2): the dossier's facts stand in its heading — the property and the channel under the type and the
   state, the term (or «Notează termenul») under them —, not alone between the steps and the documents. */
.section-heading .case-summary-line { margin:.2rem 0 0; font-size:.86rem; }
.section-heading .case-quick-actions { margin:.15rem 0 0; gap:.25rem .75rem; font-size:.86rem; }
.section-heading .case-quick-actions:empty { display:none; }
.cases-page .section-heading .case-quick-actions .link-button { min-height:28px; padding:0; }
/* QA 2026-10-28 (round 2): in a narrow dossier (the menu beside a 1024 px window) the actions of a document go under its row,
   so the «Document» column keeps its width instead of breaking the title letter by letter. */
@media (min-width:761px) {
  #detail-documents-card { container-type:inline-size; }
  @container (max-width:52rem) {
    #detail-documents-card .doc-table-head, #detail-documents-card .doc-list > li.doc-row, #detail-documents-card .form-list > li.doc-row,
    .cases-page #detail-documents-card .doc-list > li.doc-row, .cases-page #detail-documents-card .form-list > li.doc-row { grid-template-columns:minmax(0,1fr) 4.5rem 6rem 8.5rem 6rem; }
    #detail-documents-card .doc-table-head > span:last-child { display:none; }
    .cases-page #detail-documents-card li.doc-row > .doc-actions { grid-column:1 / -1; justify-content:flex-end; margin-top:.35rem; }
  }
}
/* QA 2026-10-28 (round 2): the completions asked for, as a short list inside the step's note. */
.cases-page .wizard-gaps > p { margin:0 0 .25rem; }
.cases-page .wizard-gaps > ul { margin:0; padding-left:1.2rem; }
.cases-page .wizard-gaps > ul > li { margin:.1rem 0; }
/* Runda 3 (QA 2026-10-28): beside the menu at 1024 px the «Azi» row keeps «Tipărește lista» on its line. */
@media (min-width:1024px) and (max-width:1279px) {
  .cases-page .case-today { gap:.4rem .6rem; padding-inline:.75rem; }
  .cases-page .case-today-chips { gap:.35rem; }
  .cases-page .case-today-chip { padding:.1rem .55rem; font-size:.8rem; }
}
/* Runda 3 (QA 2026-10-28): export, print and download are outlined buttons on every register tab, as in «Raport». */
.cases-page .registry-export-row { gap:.5rem; }
.cases-page .registry-export-row > :is(a, button) { min-height:36px; padding:.35rem .85rem; font-size:.875rem; }
/* Runda 3 (QA 2026-10-28): a tick in a step's form takes the row's width, so its label reads on one line. */
.cases-page form.wizard-inline .field:has(> .choice-inline) { grid-column:1 / -1; }
.cases-page form.wizard-inline .choice-inline { max-width:none; }

/* Runda 6 (beneficiarii, 29.10): the documents of the dossier one line each, as in a register — a «+» before the name opens the
   row's details in a window, the name takes at most two lines (the whole one in its tooltip), two actions and «⋯» with the others. */
#detail-documents-card li.doc-row > .doc-name { display:grid; grid-template-columns:minmax(0,1fr); align-items:center; row-gap:.1rem; }
#detail-documents-card li.doc-row > .doc-name > * { grid-column:1; min-width:0; }
#detail-documents-card li.doc-row > .doc-name > .doc-details { order:5; justify-self:start; margin-top:.15rem; }
/* Runda 22.11 (dosar, 9): the name is whole, on as many lines as it needs, at any width (it was cut at two lines, three for the request and the act); nothing leaves its column */
#detail-documents-card li.doc-row .doc-title { display:block; overflow:visible; overflow-wrap:anywhere; line-height:1.3; }
#detail-documents > .doc-list > li.doc-row .doc-kind, #detail-forms > .form-list > li.doc-row .doc-kind { display:none; }
#detail-documents-card li.doc-row .working-document-check { margin:0; font-size:.75rem; }
#detail-documents-card details.doc-details { margin:0; padding:0; border:0; background:none; box-shadow:none; }
/* Runda 7.11 (N4): «Detalii» in words, under the name, instead of a lone «+». */
#detail-documents-card details.doc-details > summary.doc-details-toggle { list-style:none; display:inline-flex; align-items:center; width:auto; height:auto; min-height:0; margin:0; padding:.1rem .45rem;
  border:1px solid hsl(var(--border)); border-radius:4px; background:hsl(var(--card)); color:hsl(var(--primary)); font-size:.75rem; font-weight:600; line-height:1.2; cursor:pointer; }
#detail-documents-card details.doc-details > summary.doc-details-toggle::-webkit-details-marker { display:none; }
#detail-documents-card details.doc-details > summary.doc-details-toggle::before, #detail-documents-card details.doc-details > summary.doc-details-toggle::after { content:none !important; display:none !important; }
#detail-documents-card details.doc-details > summary.doc-details-toggle:hover { border-color:hsl(var(--primary)); background:hsl(var(--primary) / .08); }
#detail-documents-card details.doc-details:not([open]):not(:has(.doc-extra > :not([hidden]))) { display:none; } /* Runda 7.11: a row with nothing to show has no empty band */
#detail-documents-card details.doc-details:has([data-reference-status="MISMATCH"]) > summary { border-color:hsl(0 72% 50%); color:hsl(0 72% 42%); background:hsl(0 80% 97%); }
/* Inside the window the details read as short paragraphs, one under the other. */
dialog.section-modal .doc-extra { display:flex; flex-direction:column; gap:.6rem; }
dialog.section-modal .doc-extra > * { margin:0; }
/* Runda 7: a check or a preference with nothing to say stays hidden, whatever its own display. */
.doc-extra [hidden], dialog.section-modal .doc-extra [hidden] { display:none !important; }
dialog.section-modal .doc-extra .reference-check, dialog.section-modal .doc-extra .communication-preference { display:flex; flex-direction:column; gap:.2rem; padding:.55rem .75rem; border-left:3px solid hsl(var(--primary) / .55); background:hsl(var(--muted) / .45); border-radius:0 var(--radius) var(--radius) 0; }
dialog.section-modal .doc-extra .reference-check[data-reference-status="MISMATCH"] { border-left-color:hsl(0 72% 50%); }
#detail-documents-card li.doc-row > .doc-actions > details.action-disclosure { margin:0; }
.cases-page #detail-documents-card li.doc-row > .doc-actions > details.action-disclosure > summary { min-height:30px; padding:.15rem .6rem; font-size:.8rem; font-weight:550; white-space:nowrap;
  border:1px solid hsl(var(--border)); border-radius:calc(var(--radius) - 2px); background:hsl(var(--card)); color:hsl(var(--foreground)); }
#detail-documents-card li.doc-row > .doc-actions { flex-wrap:nowrap; align-items:center; }
#detail-documents-card details.doc-more { position:relative; margin:0; padding:0; border:0; background:none; }
#detail-documents-card details.doc-more > summary { list-style:none; display:inline-flex; align-items:center; justify-content:center; min-width:2.1rem; min-height:30px; margin:0; padding:0 .45rem;
  border:1px solid hsl(var(--border)); border-radius:calc(var(--radius) - 2px); background:hsl(var(--card)); color:hsl(var(--foreground)); font-weight:700; letter-spacing:.06em; line-height:1; cursor:pointer; }
#detail-documents-card details.doc-more > summary::-webkit-details-marker { display:none; }
#detail-documents-card details.doc-more > summary::before, #detail-documents-card details.doc-more > summary::after { content:none !important; display:none !important; }
#detail-documents-card details.doc-more > summary:hover, #detail-documents-card details.doc-more[open] > summary { border-color:hsl(var(--primary) / .55); background:hsl(var(--muted) / .5); }
#detail-documents-card .doc-more-menu { position:absolute; right:0; top:calc(100% + .25rem); z-index:30; display:flex; flex-direction:column; align-items:stretch; min-width:14rem; padding:.35rem;
  border:1px solid hsl(var(--border)); border-radius:var(--radius); background:hsl(var(--card)); box-shadow:0 10px 28px hsl(222 47% 11% / .16); }
.cases-page #detail-documents-card .doc-more-menu > :is(a, button) { display:flex; justify-content:flex-start; width:100%; margin:0; min-height:36px; padding:.35rem .65rem; border:0 !important;
  border-radius:calc(var(--radius) - 2px); background:none !important; box-shadow:none !important; color:hsl(var(--foreground)) !important; text-align:left; font-size:.85rem; font-weight:500; white-space:nowrap; text-decoration:none; }
.cases-page #detail-documents-card .doc-more-menu > :is(a, button):hover { background:hsl(var(--muted)) !important; }
@media (max-width:1440px) {
  #detail-documents-card .doc-table-head, #detail-documents-card .doc-list > li.doc-row, #detail-documents-card .form-list > li.doc-row,
  .cases-page #detail-documents-card .doc-list > li.doc-row, .cases-page #detail-documents-card .form-list > li.doc-row { grid-template-columns:minmax(0,1fr) 4rem 5.75rem 8rem 5.5rem 20.5rem; column-gap:.6rem; }/* Runda 23.11: room for «Vezi documentul», «Vezi documentul scanat» and «⋯» on one line */
}
/* Runda 8: a narrow card (a 1024 px window beside the menu) keeps the «Document» column, its actions under the row; the
   1440 px rule above came after the round 2 container rule and set the five columns back. */
@media (min-width:761px) {
  @container (max-width:52rem) {
    #detail-documents-card .doc-table-head, #detail-documents-card .doc-list > li.doc-row, #detail-documents-card .form-list > li.doc-row,
    .cases-page #detail-documents-card .doc-list > li.doc-row, .cases-page #detail-documents-card .form-list > li.doc-row { grid-template-columns:minmax(0,1fr) 4rem 5.75rem 8rem 5.5rem; }
    #detail-documents-card .doc-table-head > span:last-child { display:none; }
    .cases-page #detail-documents-card li.doc-row > .doc-actions { grid-column:1 / -1; justify-content:flex-end; margin-top:.35rem; }
  }
}
@media (max-width:760px) {
  #detail-documents-card li.doc-row > .doc-actions { flex-wrap:wrap; }
  #detail-documents-card .doc-state-badge { white-space:normal; }
  .cases-page #detail-documents-card .doc-list > li.doc-row, .cases-page #detail-documents-card .form-list > li.doc-row { grid-template-columns:repeat(3,minmax(0,1fr)); }
  /* Runda 7.11 (B1): on a phone the «⋯» menu opens under the row's actions, across their width, so it never leaves the screen. */
  #detail-documents-card li.doc-row > .doc-actions { position:relative; }
  #detail-documents-card details.doc-more { position:static; }
  #detail-documents-card .doc-more-menu { left:0; right:0; min-width:0; max-width:100%; }
  .cases-page #detail-documents-card .doc-more-menu > :is(a, button) { min-height:44px; }
}
/* Runda 6 (beneficiarii, 29.10): each document is clearly a row of its own — alternate rows, a firmer line between them, the row
   under the mouse marked on its left, and the row whose window is open stays marked while the clerk works in it. */
#detail-documents-card :is(.doc-list, .form-list) > li.doc-row { padding-block:.6rem; border-bottom:1px solid hsl(220 14% 84%); }
#detail-documents-card :is(.doc-list, .form-list) > li.doc-row:nth-child(even) { background:hsl(var(--muted) / .4); }
#detail-documents-card :is(.doc-list, .form-list) > li.doc-row:hover { background:hsl(var(--primary) / .05); box-shadow:inset 3px 0 0 hsl(var(--primary) / .45); }
#detail-documents-card :is(.doc-list, .form-list) > li.doc-row:is([data-working], :has(details[open])) { background:hsl(var(--primary) / .09); box-shadow:inset 3px 0 0 hsl(var(--primary)); }

/* Runda 7 (QA): a request started for a known procedure shows only its own part of the «Dosar nou» window. */
#wizard-start.wizard-preset #wizard-procedures, #wizard-start.wizard-preset #wizard-more, #wizard-start.wizard-preset #wizard-procedure-guide,
#wizard-start.wizard-preset .wizard-ex-officio { display:none !important; }
/* Runda 9.11: after a card that asks for an initial dossier the window keeps only that request: no cards, no «Alte proceduri», no
   «Dosar fără cerere»; the title is the request's name, with a sentence and «← Alt tip de cerere» (the way back) above the search. */
#wizard-start.wizard-chosen #wizard-procedures, #wizard-start.wizard-chosen #wizard-more, #wizard-start.wizard-chosen #wizard-procedure-guide,
#wizard-start.wizard-chosen .wizard-ex-officio { display:none !important; }
.wizard-step-head { display:grid; gap:.15rem; }
.wizard-step-head[hidden] { display:none; }
.wizard-step-head > .back-link { justify-self:start; margin:0; }
.wizard-step-head > .help { margin:0; font-size:.95rem; color:hsl(var(--foreground)); }

/* Runda 10 (QA H4-03): module «Urmărirea termenelor» off: no TERMEN column, no «Notează termenul». */
.module-off-deadline :is(th.case-col-due, td.case-col-due, #case-legal-deadlines .link-button[data-due]) { display:none !important; }

/* Runda 17 (01.11): the act handed over is seen («Vezi …») or downloaded for printing, on one line. */
#case-wizard .wizard-files { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem 1rem; }
/* Runda 17: the form of a registered document, moved to «⋯», lines up with the menu's other items. */
.cases-page #detail-documents-card .doc-more-menu > a.doc-open { padding-inline:.65rem; }

/* Runda 18 (ședința din 02.11): «Categoria lucrării» with its «?» on one line; the category taken from the request says so under it. */
#case-legal-profile .case-category-label { display:flex; align-items:center; gap:.4rem; }
#case-legal-profile .case-category-label > label { margin:0; }
#case-cu-category-source { margin:.2rem 0 0; }

/* Runda 18 (ședința din 02.11): the column headers of the list order it; the arrow says the column and the direction. */
.workspace table:is(.case-register, .registry-register) th > button.th-sort { display:inline-flex; align-items:center; gap:.3rem; min-height:0; min-width:0; height:auto; padding:0; border:0; background:none; box-shadow:none; color:inherit; font:inherit; text-transform:inherit; letter-spacing:inherit; cursor:pointer; }
.workspace table:is(.case-register, .registry-register) th > button.th-sort:hover { color:hsl(var(--primary)); background:none; }
.workspace table:is(.case-register, .registry-register) th > button.th-sort::after { content:"↕"; font-size:.8em; opacity:.35; }
.workspace table:is(.case-register, .registry-register) th[aria-sort="ascending"] > button.th-sort::after { content:"▲"; opacity:1; }
.workspace table:is(.case-register, .registry-register) th[aria-sort="descending"] > button.th-sort::after { content:"▼"; opacity:1; }
.workspace table:is(.case-register, .registry-register) th[aria-sort="ascending"] > button.th-sort, .workspace table:is(.case-register, .registry-register) th[aria-sort="descending"] > button.th-sort { color:hsl(var(--primary)); }

/* Runda 9.11: the window that asks for a reason before an act is modified or its handover cancelled (askReason in cases.js); the buttons are those of every question. */
.app-ask-reason .field { display:grid; gap:.3rem; margin-top:.5rem; }
.app-ask-reason textarea { width:100%; box-sizing:border-box; }
.app-ask-reason .inline-error { margin:0; }
