/* Shared interface layer. Business-specific styles remain in app.css. */
:root {
    --bg: #f4f5f7;
    --surface: #fff;
    --surface-soft: #f8f9fb;
    --line: #e0e4e8;
    --line-strong: #bdc5cd;
    --text: #252b32;
    --muted: #606b77;
    --primary: #176e63;
    --primary-dark: #10564d;
    --danger: #b33340;
    --radius: 6px;
    --sidebar: 228px;
}
body { font-family: "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.5; letter-spacing: 0; }
.ticket-privacy-option { min-width: 0; padding: 15px 17px; border: 1px solid #d3dfeb; border-radius: 9px; background: #f4f7fc; }
.ticket-privacy-option > .checkbox { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: #294760; font-weight: 650; }
.ticket-privacy-option > .checkbox input { flex: none; width: 17px; height: 17px; min-height: 17px; padding: 0; margin: 3px 0 0; }
.ticket-privacy-option .checkbox > span { display: flex; align-items: center; gap: 7px; }
.ticket-privacy-option .lucide { flex: none; width: 17px; height: 17px; }
.ticket-privacy-option p { margin: 9px 0 0; color: #4c6074; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.ticket-privacy-option:has(input:checked) { border-color: #6d94b8; background: #edf3fb; }
.ticket-audience-summary { margin-top: 14px; padding-top: 13px; border-top: 1px solid #cddbe8; }
.ticket-audience-summary > strong { display: block; color: #294760; font-size: 13px; }
.ticket-audience-summary > ul + p + strong { margin-top: 12px; }
.ticket-privacy-details { margin-top: 12px; color: #4c6074; font-size: 13px; }
.ticket-privacy-details > summary { cursor: pointer; }
.ticket-audience-summary ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.ticket-audience-summary li { max-width: 100%; padding: 5px 9px; border: 1px solid #cddbe8; border-radius: 7px; background: #fff; color: #294760; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.ticket-private-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: 1px solid #d8e2ec; border-radius: 5px; background: #f1f5fa; color: #496580; vertical-align: middle; cursor: help; }
.ticket-private-badge:hover, .ticket-private-badge:focus-visible { border-color: #aabed1; background: #e8eff7; color: #294e72; }
.ticket-private-badge:focus-visible { outline: 2px solid #496580; outline-offset: 3px; }
.ticket-private-badge .lucide { flex: none; width: 12px; height: 12px; }
.ticket-title-cell .ticket-private-badge { margin-left: 4px; }
.ticket-private-tooltip { position: fixed; z-index: 1000; max-width: calc(100vw - 20px); padding: 7px 11px; border: 1px solid #3b5268; border-radius: 7px; background: #294055; color: #fff; box-shadow: 0 4px 14px #20354a26; font-size: 12px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
.ticket-private-tooltip::after { content: ""; position: absolute; left: var(--arrow-left); bottom: -5px; width: 8px; height: 8px; background: #294055; transform: translateX(-50%) rotate(45deg); }
.ticket-private-tooltip[data-side="below"]::after { top: -5px; bottom: auto; }
.site-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 20px; max-width: 1640px; margin: 0 0 0 var(--sidebar); padding: 16px 36px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.site-footer a { color: var(--primary); font-weight: 650; }
.auth-shell .site-footer { max-width: 1120px; margin: 0 auto; }
.privacy-page { max-width: 1000px; margin: 0 auto; }
.privacy-notice { padding: 14px 17px; border-left: 4px solid #a87519; border-radius: 5px; background: #fff7e7; color: #5f471f; }
.privacy-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0; }
.privacy-nav a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; }
.privacy-section { margin: 0 0 14px; padding: 22px 25px; border: 1px solid var(--line); border-radius: 9px; background: #fff; scroll-margin-top: 80px; }
.privacy-section h2 { margin: 0 0 11px; font-size: 19px; }
.privacy-section h3 { margin: 0 0 11px; font-size: 18px; }
.privacy-section p { margin: 0 0 11px; line-height: 1.7; }
.privacy-section p:last-child { margin-bottom: 0; }
.privacy-section ul { margin: 0 0 11px; padding-left: 21px; line-height: 1.7; }
.privacy-section li + li { margin-top: 8px; }
.privacy-section a { text-decoration: underline; }
.legal-summary { margin: 10px 0 26px; }
.legal-summary a { padding: 10px 14px; font-weight: 700; }
.legal-chapter { margin: 0 0 36px; scroll-margin-top: 80px; }
.legal-chapter-head { display: flex; align-items: center; gap: 14px; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.legal-chapter-head h2 { margin: 0 0 3px; font-size: 23px; }
.legal-chapter-head p { margin: 0; color: var(--muted); font-size: 13px; }
.legal-chapter-number { display: grid; place-items: center; flex: 0 0 38px; height: 38px; border-radius: 9px; background: #e4f2ed; color: var(--primary); font-weight: 800; }
.legal-subnav { margin: 0 0 18px; }
/* Copropriété information hub */
.copro-head { max-width: 1120px; margin-inline: auto; }
.copro-search { max-width: 1120px; margin: 0 auto 23px; }
.copro-search > label { display: block; margin-bottom: 7px; }
.copro-search-controls { display: flex; align-items: stretch; gap: 8px; }
.copro-search-field { position: relative; flex: 1; min-width: 0; }
.copro-search-field .lucide { position: absolute; top: 50%; left: 13px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.copro-search-field input { width: 100%; height: 42px; padding-left: 40px !important; }
.copro-search-results { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.copro-search.is-live button[type=submit] { display: none; }
.copro-search [hidden], .copro-empty[hidden], .copro-card[hidden], .copro-order-hint[hidden], .copro-page-order[hidden] { display: none !important; }
.copro-order-hint, .dashboard-copro-order-hint { display: flex; align-items: center; gap: 7px; max-width: 1120px; margin: 0 auto 13px; color: var(--muted); font-size: 13px; }
.copro-order-hint .lucide, .dashboard-copro-order-hint .lucide { width: 15px; height: 15px; }
.copro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 20px; max-width: 1120px; margin: 0 auto 30px; align-items: stretch; }
.copro-card, .copro-new, .copro-empty { border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow: hidden; }
.copro-card { display: flex; flex-direction: column; min-width: 0; }
.copro-card.is-editing { grid-column: 1 / -1; }
.copro-card.is-hidden { opacity: .7; border-style: dashed; }
.copro-card.is-expired { border-color: #e5c7cb; background: #fffafb; }
.copro-card-photo { display: block; width: 100%; height: 175px; margin-top: 16px; border-radius: 6px; object-fit: cover; }
.copro-card-content { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 22px; }
.copro-card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.copro-card-heading h2 { margin: 0; font-size: 20px; }
.copro-card-icon { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; flex: none; background: #e8f3f0; color: var(--primary); }
.copro-hidden-label { display: inline-block; padding: 3px 7px; margin-bottom: 8px; border-radius: 4px; background: #fff3dd; color: #785613; font-size: 12px; }
.copro-validity { display: inline-flex; align-items: center; align-self: flex-start; gap: 5px; margin-bottom: 10px; padding: 4px 7px; border-radius: 4px; background: #eef4fb; color: #3a5978; font-size: 12px; font-weight: 600; }
.copro-validity.is-expired { background: #fff0f1; color: var(--danger); }
.copro-validity .lucide { width: 13px; height: 13px; }
.copro-rich-content { color: var(--text); font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.copro-rich-content a { color: var(--primary); text-decoration: underline; }
.copro-rich-content ul, .copro-rich-content ol { padding-left: 22px; margin: 8px 0; }
.copro-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.copro-card-actions form { margin: 0; }
.copro-card-actions .copro-delete-button { color: var(--danger); }
.copro-card-actions .copro-delete-button:hover { border-color: var(--danger); background: #fff2f2; }
.copro-card-actions .icon-button { border: 1px solid var(--line); background: #fff; color: var(--text); }
.copro-card-actions .icon-button:disabled, .dashboard-copro-actions .icon-button:disabled { opacity: .35; cursor: default; }
.copro-edit-panel { padding: 20px 22px 24px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.copro-edit-panel[hidden] { display: none; }
.copro-new { max-width: 1120px; margin: 28px auto; padding: 24px; }
.copro-new h2 { margin: 0 0 6px; }
.copro-new > p { margin: 0 0 18px; }
.copro-empty { max-width: 1120px; margin: 0 auto 25px; padding: 55px 25px; text-align: center; color: var(--muted); }
.copro-empty .lucide { width: 36px; height: 36px; color: var(--primary); }
.copro-empty h2 { margin: 12px 0 4px; color: var(--text); }
.copro-empty p { margin: 0; }
.copro-form { display: grid; gap: 17px; }
.copro-form label { display: grid; gap: 6px; }
.copro-form-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(150px, 1fr); gap: 14px; }
.copro-form input[type=file] { width: 100%; }
.copro-form small { color: var(--muted); font-weight: 400; }
.copro-editor-block { min-width: 0; }
.copro-editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 6px; border: 1px solid var(--line); border-radius: 6px 6px 0 0; background: #f5f7f8; }
.copro-editor-toolbar button { min-width: 34px; min-height: 34px; padding: 5px 8px; border: 1px solid transparent; background: transparent; color: var(--text); }
.copro-editor-toolbar button:hover { border-color: var(--line); background: #fff; }
.copro-editor-toolbar label { display: flex; align-items: center; gap: 5px; padding: 0 4px; }
.copro-editor-toolbar select { min-height: 32px; padding: 4px 6px; }
.copro-editor-toolbar input[type=color] { width: 36px; height: 32px; padding: 2px; }
.copro-editor { min-height: 150px; padding: 13px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 6px 6px; background: #fff; line-height: 1.6; outline: none; overflow-wrap: anywhere; }
.copro-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 2px #d7ebe6; }
.copro-editor:empty::before { content: attr(data-empty); color: #7c8792; }
.copro-remove-photo { display: flex !important; align-items: center; gap: 8px !important; }
.copro-form-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.copro-display-options { display: grid; gap: 9px; padding: 15px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.copro-display-options label { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--text); }
.copro-display-options .field-note { margin: 0 0 0 25px; font-weight: 400; }
.copro-publish-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.copro-publish-badges span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; background: #e8f3f0; color: #176e63; font-size: 12px; font-weight: 600; }
.copro-publish-badges .lucide { width: 13px; height: 13px; }
.dashboard-home .page-head { margin-bottom: 25px; }
.dashboard-home .dashboard-calendar { margin-bottom: 30px; }
.dashboard-home .dashboard-calendar .section-heading h2 { display: flex; align-items: center; gap: 8px; font-size: 20px; }
.dashboard-home .dashboard-calendar .section-heading h2 .lucide { color: var(--primary); }
.dashboard-home .dashboard-calendar-layout { grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); gap: 38px; }
.dashboard-home .dashboard-upcoming h3 { font-size: 16px; }
.dashboard-copro-heading { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0 0 16px; }
.dashboard-copro-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 21px; }
.dashboard-copro-heading h2 .lucide { color: var(--primary); }
.dashboard-copro-heading p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.dashboard-copro-heading > a { display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 650; text-decoration: none; }
.dashboard-copro-heading > a .lucide { width: 15px; height: 15px; }
.dashboard-copro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.dashboard-copro-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--line); border-radius: 9px; background: #fff; overflow: hidden; }
.dashboard-copro-card > img { width: 100%; height: 150px; object-fit: cover; }
.dashboard-copro-card-content { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 19px; }
.dashboard-copro-card-title { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.dashboard-copro-card-title > span { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 7px; background: #e8f3f0; color: var(--primary); }
.dashboard-copro-card-title h3 { margin: 0; font-size: 17px; }
.dashboard-copro-card .copro-rich-content { max-height: 165px; overflow: hidden; font-size: 14px; line-height: 1.6; }
.dashboard-copro-card-content > a { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: auto; padding-top: 17px; color: var(--primary); font-size: 13px; font-weight: 650; text-decoration: none; }
.dashboard-copro-card-content > a .lucide { width: 15px; height: 15px; }
.dashboard-copro-order-hint { margin: -5px 0 12px; }
.dashboard-copro-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--line); }
.dashboard-copro-actions form { margin: 0; }
.dashboard-copro-actions .icon-button { border: 1px solid var(--line); background: #fff; color: var(--text); }
.dashboard-copro-empty { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 8px; background: #fff; color: var(--muted); }
.dashboard-copro-empty p { margin: 0; }
.dashboard-copro-empty a { margin-left: auto; color: var(--primary); font-weight: 650; }
.copro-announcement { width: min(94vw, 610px); max-height: min(88dvh, 800px); padding: 0; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 25px 75px #152b2b55; overflow: auto; }
.copro-announcement::backdrop { background: #142c32aa; }
.copro-announcement-photo { display: block; width: 100%; max-height: 235px; object-fit: cover; }
.copro-announcement-body { padding: 28px; }
.copro-announcement-eyebrow { display: inline-flex; align-items: center; gap: 7px; color: var(--primary); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.copro-announcement-eyebrow .lucide { width: 16px; height: 16px; }
.copro-announcement h2 { margin: 10px 0 15px; font-size: 25px; line-height: 1.25; }
.copro-announcement .copro-rich-content { margin-bottom: 24px; }
.copro-announcement form { display: flex; justify-content: flex-end; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 800px) { .dashboard-home .dashboard-calendar-layout { grid-template-columns: 1fr; gap: 22px; } }
@media (max-width: 620px) { .copro-announcement-body { padding: 20px; } .copro-announcement form button { width: 100%; } .dashboard-copro-empty a { margin-left: 0; } }
@media (max-width: 620px) { .copro-form-top { grid-template-columns: 1fr; } .copro-card-content, .copro-edit-panel, .copro-new { padding: 17px; } .copro-search-controls { flex-wrap: wrap; } .copro-search-field { flex-basis: 100%; } .copro-search-controls > button, .copro-search-controls > a { flex: 1; } }
body::before { display: none; }
h1 { font-size: 28px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
h2 { font-size: 18px; font-weight: 650; }
h3 { font-size: 16px; font-weight: 650; }
button, .button { min-height: 38px; gap: 8px; padding: 8px 13px; font-size: 14px; font-weight: 600; white-space: normal; }
button:hover, .button:hover { transform: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #76b8ed; outline-offset: 3px; }
input, select, textarea { min-width: 0; font-size: 14px; font-weight: 400; padding: 9px 11px; }
input:not([type=checkbox]):not([type=radio]), select { min-height: 40px; }
input[type=checkbox], input[type=radio] { width: 16px; height: 16px; accent-color: var(--primary); flex: 0 0 auto; }
input[type=file]::file-selector-button { border: 1px solid var(--line); background: var(--surface-soft); color: var(--text); border-radius: 4px; padding: 7px 12px; margin-right: 12px; cursor: pointer; font: inherit; }
label, .field-label { font-size: 13px; color: #48535f; font-weight: 600; }
.field-note { font-size: 13px; }
.lucide { width: 18px; height: 18px; stroke-width: 1.8; flex-shrink: 0; vertical-align: middle; }
.icon-button { width: 34px; height: 34px; min-height: 34px; padding: 7px; flex: 0 0 auto; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 200; padding: 12px; background: #fff; }
.skip-link:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.search-control input { padding-left: 38px; }
.diagnostic-panel { padding: 18px 0; border: 0; border-block: 1px solid var(--line); border-radius: 0; background: transparent; }
body[data-page="tickets-create"] .page-head, .ticket-create-form { width: 100%; max-width: 1000px; margin-inline: auto; }
.app-shell .topbar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); min-height: 100dvh; padding: 28px 16px 16px; display: flex; flex-direction: column; align-items: stretch; gap: 28px; border: 0; border-right: 1px solid var(--line); background: #fff; box-shadow: none; backdrop-filter: none; z-index: 40; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 36px; border-radius: 7px; background: var(--primary); color: #fff; }
.brand-mark .lucide { width: 23px; height: 23px; }
.app-shell .nav { flex-direction: column; gap: 5px; flex: 0 0 auto; }
.app-shell .nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; font-weight: 500; border-radius: 5px; }
.app-shell .nav a[aria-current=page] { background: #e8f3f0; color: #145e55; font-weight: 650; box-shadow: inset 3px 0 var(--primary); }
.app-shell .nav a:hover { background: var(--surface-soft); }
.app-shell .logout { margin-top: 0; flex-direction: column; align-items: stretch; gap: 10px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.account-link { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.account-link > .lucide { margin-top: 5px; width: 25px; height: 25px; color: var(--muted); }
.account-link small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.logout-button { justify-content: flex-start; background: transparent; border-color: transparent; color: var(--muted); }
.mobile-menu-toggle { display: none; }
.app-shell .page { width: auto; max-width: 1640px; margin: 0 0 0 var(--sidebar); padding: 36px 36px 60px; min-width: 0; }
.impersonation-bar { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-left: var(--sidebar); padding: 10px 36px; border-bottom: 1px solid #e3c36e; background: #fff5d6; color: #574719; }
.impersonation-bar > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.impersonation-bar span { display: block; }
.impersonation-bar strong { margin-right: 8px; }
.impersonation-bar form { flex: 0 0 auto; }
.impersonation-bar button { border-color: #c99f35; background: #fff; color: #574719; }
.page-head, .ticket-head { align-items: center; gap: 20px; margin-bottom: 28px; }
.page-head p, .ticket-head p { margin: 6px 0 0; font-size: 14px; }
.page-actions { flex-wrap: wrap; justify-content: flex-end; }
.page-head > div, .ticket-head > div, .grid > *, .dashboard-grid > *, .workflow-workspace > * { min-width: 0; }
.form.wide, .details, .comments, .status-form, .filters, .table-wrap { box-shadow: none; }
.form.wide { padding: 24px; }
.grid { gap: 16px 20px; }
.details, .comments { padding: 22px 0; border: 0; border-radius: 0; border-top: 1px solid var(--line); background: transparent; }
.section-heading { padding-bottom: 12px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.section-heading h2, .section-heading h3 { margin: 0; }
.summary-grid, .compact-summary { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; margin: 0 0 24px; border-bottom: 1px solid var(--line); background: transparent; }
.summary-card { border: 0; border-left: 1px solid var(--line); background: transparent; padding: 8px 22px 20px; border-radius: 0; box-shadow: none; min-height: 90px; color: var(--text); }
.summary-card:first-child { border-left: 0; padding-left: 0; }
.summary-card span { font-size: 12px; font-weight: 500; text-transform: none; }
.summary-card strong { font-size: 30px; font-weight: 600; }
.summary-card.is-warning, .summary-card.is-danger { background: transparent; border-color: var(--line); }
.summary-card.is-warning strong { color: #9b6406; }
.summary-card.is-danger strong { color: var(--danger); }
.dashboard-grid { gap: 28px; }
.compact-ticket, .metric-list > div { padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.compact-ticket a { font-weight: 600; }
.compact-ticket > div { min-width: 0; overflow-wrap: anywhere; }
.compact-ticket-list, .metric-list { gap: 0; }
.metric-list span { font-weight: 400; }
.metric-list strong { font-size: 18px; font-weight: 600; }
.badge, .soft-label { font-size: 12px; font-weight: 600; padding: 4px 8px; line-height: 1.5; min-height: 0; border-radius: 4px; white-space: normal; text-align: left; }
.badge { background: #e9edf1; color: #4e5e6e; }
.status-nouveau { background: #e7effc; color: #305b9e; }
.status-en_cours { background: #fff0d2; color: #865c0b; }
.status-resolu { background: #dff2e9; color: #23674c; }
.status-clos { background: #e9edf1; color: #58616d; }
.priority-haute, .priority-urgente { background: #fce7e8; color: #a32e3a; }
.ticket-filters { border: 0; background: transparent; padding: 0 0 20px; grid-template-columns: repeat(4, minmax(0, 1fr)) auto; gap: 12px; align-items: end; }
.ticket-filters .filter-search { grid-column: 1 / -1; }
.ticket-filters .filter-search input, .user-search input { padding-left: 38px; }
.search-control { position: relative; display: block; }
.search-control > .lucide { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.user-search { padding: 0 0 20px; border: 0; box-shadow: none; background: transparent; display: flex; align-items: end; gap: 20px; }
.user-search label { flex: 1; }
#user-search-count, .result-count { color: var(--muted); font-size: 12px; white-space: nowrap; }
.result-count { margin: 0 0 10px; }
.table-wrap { padding: 0; width: 100%; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table { table-layout: fixed; width: 100%; min-width: 0; font-size: 13px; border-collapse: collapse; }
th { background: #edf0f3; color: #4c5865; font-size: 11px; font-weight: 650; padding: 12px; letter-spacing: 0; text-transform: none; text-align: left; }
td { padding: 14px 12px; vertical-align: top; overflow-wrap: anywhere; }
tbody tr:hover { background: #f9fbfc; }
td a:not(.button) { font-weight: 500; }
.muted-line, .cell-secondary { color: var(--muted); display: block; font-size: 12px; margin-top: 3px; }
.ticket-table th:first-child { width: 27%; }
.ticket-table th:nth-child(7), .ticket-table th:nth-child(8) { width: 10%; }
.ticket-id { color: var(--muted); font-size: 12px; margin-right: 5px; }
.ticket-table { font-size: 14px; line-height: 1.5; }
.ticket-table th { padding: 14px 12px; font-size: 12px; }
.ticket-table td { padding: 17px 12px; font-size: 14px; }
.ticket-table .ticket-title-cell a { font-size: 15px; line-height: 1.4; }
.ticket-table .ticket-id { font-size: 13px; }
.ticket-table .cell-secondary, .ticket-table .ticket-title-cell small { font-size: 13px; line-height: 1.45; }
.ticket-table .badge, .ticket-table .soft-label { font-size: 13px; }
.ticket-table [data-ticket-row] { cursor: pointer; transition: background-color .15s ease, box-shadow .15s ease; }
.ticket-table [data-ticket-row]:hover, .ticket-table [data-ticket-row]:focus-visible { background: #edf7f3; box-shadow: inset 3px 0 var(--primary); }
.ticket-table [data-ticket-row]:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.ticket-table [data-ticket-row]:hover .ticket-title-cell a { text-decoration: underline; }
.users-table th, .users-table td { width: auto !important; padding: 14px 12px; }
.users-table-wrap { overflow-x: auto; }
.users-table { min-width: 1380px; }
.users-table th:nth-child(1) { width: 15% !important; }
.users-table th:nth-child(2) { width: 19% !important; }
.users-table th:nth-child(3) { width: 12% !important; }
.users-table th:nth-child(4) { width: 10% !important; }
.users-table th:nth-child(5) { width: 12% !important; }
.users-table th:nth-child(6) { width: 7% !important; }
.users-table th:nth-child(7), .users-table th:nth-child(8) { width: 10% !important; }
.users-table th:last-child { width: 64px !important; }
.users-table td { font-weight: 400; font-size: 13px; }
.users-table .cell-roles { overflow-wrap: normal; word-break: normal; }
.users-table .cell-last-login, .users-table .cell-terms-accepted { white-space: normal; overflow-wrap: normal; word-break: normal; line-height: 1.45; }
.users-table .cell-last-login time, .users-table .cell-terms-accepted time { display: block; }
.user-consent-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; max-width: 1000px; margin: 0 0 18px; padding: 16px 20px; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 7px; background: #fff; }
.user-consent-card h2 { margin: 0 0 3px; font-size: 17px; }
.user-consent-card p { margin: 0; color: var(--muted); font-size: 13px; }
.user-consent-card strong { display: block; }
@media (max-width: 700px) { .user-consent-card { align-items: flex-start; flex-direction: column; } }
.users-table .cell-action .button { width: 34px; min-width: 34px; padding: 7px; min-height: 34px; }
.user-search label, .user-search input, .user-search span { font-weight: 400; }
.user-search label { font-weight: 600; }
.ticket-create-form .actions[data-ticket-actions] { position: static; margin: 8px 0 0; padding: 16px 0 0; background: transparent; backdrop-filter: none; flex-direction: row; flex-wrap: wrap; }
.ticket-create-form .actions[data-ticket-actions] button, .ticket-create-form .actions[data-ticket-actions] .button { width: auto; }
.ticket-create-form .grid:not(:has(> :not([hidden]))) { display: none; }
.empty { padding: 28px 14px; font-size: 14px; text-align: center; }
.details dl { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 24px; }
.details dl > div { padding: 0; background: transparent; border: 0; border-radius: 0; min-width: 0; }
dt { font-size: 12px; color: var(--muted); }
dd { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.prediagnostic-summary { border: 0; border-left: 3px solid #8dafab; padding: 14px 18px; background: #eaf3f1; border-radius: 0; }
.description { margin-top: 24px; }
.description p, .comment p { overflow-wrap: anywhere; }
.ticket-meta { gap: 8px; align-items: center; justify-content: flex-end; }
.ticket-id-heading { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.ticket-overview { padding-top: 20px; }
.ticket-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ticket-info-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ticket-info-card h3 { margin: 0 0 17px; padding-bottom: 13px; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.35; }
.ticket-layout .ticket-overview .ticket-info-card dl, .ticket-overview .ticket-info-card dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 20px; margin: 0; }
.details .ticket-info-card dl > div { min-height: 0; }
.ticket-info-card dt { margin-bottom: 5px; font-size: 12px; font-weight: 600; }
.ticket-info-card dd { margin: 0; font-size: 15px; line-height: 1.45; font-weight: 600; }
.ticket-story-section { margin-bottom: 16px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ticket-story-section .section-heading { margin-bottom: 16px; }
.ticket-story-section .section-heading h2 { font-size: 18px; }
.details .ticket-answer-list { display: block; margin: 0; }
.details .ticket-answer-list > div { display: grid; grid-template-columns: minmax(180px, 42%) minmax(0, 1fr); gap: 16px; min-height: 0; padding: 12px 0; border-bottom: 1px solid #e9eff1; }
.details .ticket-answer-list > div:first-child { padding-top: 0; }
.details .ticket-answer-list > div:last-child { padding-bottom: 0; border-bottom: 0; }
.ticket-answer-list dt { color: var(--text); font-size: 14px; font-weight: 600; line-height: 1.5; }
.ticket-answer-list dd { margin: 0; font-size: 14px; font-weight: 500; line-height: 1.5; }
.ticket-description > p { margin: 0; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.ticket-description-editor, .ticket-description-history { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.ticket-description-editor summary, .ticket-description-history summary { width: fit-content; color: var(--primary); font-size: 14px; font-weight: 700; cursor: pointer; }
.ticket-description-editor form { display: grid; gap: 10px; margin-top: 16px; }
.ticket-description-editor label { font-weight: 600; }
.ticket-description-editor textarea { width: 100%; min-height: 140px; resize: vertical; line-height: 1.6; }
.ticket-description-editor button { justify-self: start; }
.ticket-description-editor .field-note { margin: 0; }
.ticket-description-history ol { display: grid; gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.ticket-description-history li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: #f8faf9; }
.ticket-description-history-meta { margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 600; }
.ticket-description-history li p { margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
@media (max-width: 900px) { .ticket-info-grid { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
    .ticket-info-card, .ticket-story-section { padding: 17px 16px; }
    .details .ticket-answer-list > div { grid-template-columns: 1fr; gap: 4px; }
}
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 30px; align-items: start; }
.ticket-layout.no-sidebar { grid-template-columns: 1fr; }
.ticket-layout > * { min-width: 0; }
.ticket-layout .details dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ticket-sidebar { padding-top: 22px; }
.ticket-sidebar .status-form { display: grid; grid-template-columns: 1fr; }
.ticket-sidebar .status-form label { min-width: 0; }
.ticket-status-panel .status-form { padding: 0; margin: 0; border: 0; background: transparent; }
.ticket-sidebar .reminder-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.ticket-sidebar .reminder-form label { min-width: 0; }
.ticket-sidebar .reminder-form > button { grid-column: 1 / -1; }
.ticket-sidebar .section-heading { border: 0; }
.ticket-sidebar .recipient-list { grid-template-columns: 1fr; }
.ticket-sidebar .multi-picker-panel { position: static; box-shadow: none; margin-top: 6px; }
.ticket-management { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 16px 0; }
.ticket-management > * { min-width: 0; }
.disclosure { border: 1px solid var(--line); border-radius: 6px; background: var(--surface); margin-bottom: 16px; }
.disclosure > summary { padding: 14px 16px; font-weight: 600; cursor: pointer; }
.disclosure > :not(summary) { margin: 0; padding: 16px; border: 0; box-shadow: none; }
.notification-preview { border-left: 3px solid var(--primary); }
.recipient-list { margin-top: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.recipient-chip { padding: 10px 12px; border-radius: 4px; background: #f5f8f8; overflow-wrap: anywhere; }
.recipient-chip strong { font-weight: 600; }
.status-form { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; padding: 18px; margin-bottom: 16px; }
.status-form label { flex: 1; min-width: min(100%, 200px); }
.assignment-form { display: grid; grid-template-columns: 1fr 1fr; }
.assignment-form .field-note, .assignment-form > button { grid-column: 1 / -1; }
.reminder-form { grid-template-columns: 1fr 1fr; }
.reminder-message { grid-column: 1 / -1; }
.comments .comment { padding: 16px 0 16px 26px; margin: 0; }
.comment header { font-size: 13px; gap: 12px; }
.comment header strong { font-weight: 600; }
.ticket-comments .comment header { align-items: baseline; flex-wrap: wrap; font-size: 15px; }
.ticket-comments .comment header strong { color: var(--text); font-weight: 700; }
.ticket-comments .comment header span { font-size: 13px; }
.ticket-comments .comment p { font-size: 16px; line-height: 1.6; }
.comment-author { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.comment-source { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 12px; background: #e6f2ed; color: #216952; font-size: 11px; font-weight: 600; }
.comment-source svg { width: 13px; height: 13px; }
.ticket-comments .comment-body { max-width: 85ch; overflow-wrap: anywhere; }
.comment-original { margin: 12px 0 0; color: var(--muted); }
.comment-original > summary { cursor: pointer; font-size: 12px; color: var(--primary); }
.ticket-comments .comment-original > p { max-height: 280px; overflow: auto; margin: 10px 0 0; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font-size: 13px; overflow-wrap: anywhere; }
.settings-tabs { position: static; top: auto; padding: 0; gap: 4px; border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0; background: transparent; overflow-x: visible; flex-wrap: wrap; margin-bottom: 24px; }
.settings-tab { background: transparent; border: 0; border-radius: 0; min-height: 44px; padding: 10px 14px; color: var(--muted); }
.settings-tab.is-active { color: var(--primary); background: transparent; box-shadow: inset 0 -2px var(--primary); }
.settings-tab.is-active .badge { color: var(--primary); background: #deede9; }
.settings-panel.form.wide, .settings-panel.settings-test { border: 0; background: transparent; padding: 0; }
.settings-panel fieldset { padding: 18px; background: var(--surface); }
.settings-panel .page-head { margin-bottom: 0; }
.settings-panel legend { color: var(--text); font-size: 14px; }
.reference-block { padding: 0; border: 0; background: transparent; }
.problem-category-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin: 0; padding: 0; }
.problem-category-tabs .settings-tab { display: inline-flex; gap: 7px; white-space: normal; }
.problem-create-card { border: 1px solid var(--line); border-radius: 6px; background: #fff; margin: 0 0 12px; }
.problem-create-card > summary { padding: 14px 18px; color: var(--primary); }
.problem-create-card > summary small { display: none; }
.problem-create-card .problem-type-form { padding: 18px; }
.problem-context-texts { margin: 14px 0; }
.problem-context-texts[open] { max-height: 560px; overflow-y: auto; overscroll-behavior: contain; }
.problem-context-texts[open] > summary { position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--line); background: #fff; }
.problem-editor-inspector-panel > .problem-context-texts:first-child { margin-top: 0; border-color: #b8d7ce; box-shadow: 0 3px 12px rgba(22, 95, 82, .06); }
.problem-editor-inspector-panel > .problem-context-texts:first-child > summary { color: var(--primary); font-weight: 700; background: #eff8f5; }
.problem-context-texts > summary { flex-direction: row; justify-content: flex-start; align-items: center; min-height: 44px; padding: 10px 12px; text-align: left; }
.problem-context-texts > .field-note { margin: 14px 16px 0; }
.problem-context-texts .grid { margin: 0; padding: 14px 16px 16px; }
.problem-context-texts label { min-width: 0; }
.problem-context-texts [data-display-text-search] { position: sticky; top: 57px; z-index: 1; margin: 14px 16px 4px; width: calc(100% - 32px); background: #fff; }
.problem-context-texts .display-text-group { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.problem-context-texts .display-text-group[hidden] { display: none; }
.problem-context-texts .display-text-group h4 { margin: 12px 0 4px; font-size: .95rem; }
.problem-context-texts .display-text-group .grid { padding: 10px 0 0; }
.problem-editor-inspector .problem-reference-config, .problem-editor-inspector .reference-file-drop { min-width: 0; }
.problem-editor-inspector .reference-file-drop input[type=file] { width: 100%; max-width: 100%; }
.problem-editor-inspector .reference-import-summary, .problem-editor-inspector .reference-update-actions { flex-wrap: wrap; }
.problem-editor-inspector .reference-import-summary strong { min-width: 0; overflow-wrap: anywhere; }
.problem-group > .section-heading { margin-top: 16px; }
.category-admin { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 0; margin-bottom: 10px; }
.category-admin > summary { padding: 14px 16px; gap: 12px; }
.category-admin[open] > summary { border-bottom: 1px solid var(--line); background: #f7faf9; }
.problem-summary-main > span { font-size: 15px; font-weight: 600; }
.problem-summary-main small { font-size: 12px; font-weight: 400; }
.category-form { padding: 18px; }
.editor-tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.editor-tabs button { border: 0; border-radius: 0; background: transparent; color: var(--muted); }
.editor-tabs button[aria-selected=true] { color: var(--primary); box-shadow: inset 0 -2px var(--primary); }
.problem-editor-workspace { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.problem-editor-main { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.problem-editor-main > * { min-width: 0; }
.problem-editor-general, .problem-editor-access { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #f8faf9; scroll-margin-top: 20px; }
.problem-editor-general > h3, .problem-editor-access > h3 { margin: 0 0 4px; font-size: 18px; }
.problem-editor-step-help { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.problem-editor-general .problem-editor-inspector-panel { display: grid; gap: 14px; }
.problem-editor-access .problem-editor-inspector-panel { display: grid; gap: 14px; }
.problem-editor-general .problem-editor-inspector-panel > *, .problem-editor-access .problem-editor-inspector-panel > * { min-width: 0; }
.problem-editor-general .problem-reference-config { display: none; }
.problem-editor-inspector { position: static; width: 100%; min-width: 0; max-height: none; overflow: visible; margin: 0; padding: 18px; border: 1px solid #c8d7d5; border-radius: 8px; background: #f7fafc; scroll-margin-top: 20px; }
.problem-editor-backdrop { display: none; }
.problem-editor-inspector-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 4px; padding: 0; border: 0; background: transparent; }
.problem-editor-inspector-head h3 { margin: 0; font-size: 18px; }
.problem-editor-inspector .workflow-workspace { grid-template-columns: minmax(0, 1fr); }
.problem-editor-inspector .workflow-overview { display: none; }
.problem-editor-inspector .workflow-palette { display: flex; }
.problem-editor-inspector .workflow-start, .problem-editor-inspector .workflow-end { display: none; }
.problem-editor-inspector .workflow-empty { display: grid; }
.problem-editor-inspector .workflow-empty[hidden] { display: none; }
.problem-editor-inspector .workflow-canvas { padding: 0; border: 0; background: transparent; }
.problem-editor-inspector .question-list { display: grid; gap: 14px; }
.problem-editor-inspector .question-row { display: block; min-width: 0; border: 1px solid #cbdbe8; border-radius: 7px; background: #fff; box-shadow: none; scroll-margin-top: 20px; }
.problem-editor-inspector .question-row::after { display: none; }
.problem-editor-inspector .question-row.is-editor-active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(24, 109, 96, .14); }
.problem-editor-inspector .question-builder { margin: 0; }
.problem-editor-inspector .workflow-builder-head { flex-wrap: wrap; }
.problem-editor-inspector .workflow-palette { flex-wrap: wrap; }
.problem-editor-inspector .workflow-question { min-width: 0; }
.problem-editor-inspector .workflow-question-head { flex-wrap: wrap; padding: 12px 16px; border: 1px solid #cbdbe8; border-radius: 7px 7px 0 0; background: #eaf3fa; }
.problem-editor-inspector .workflow-question-title { flex-basis: 50%; }
.problem-editor-inspector .workflow-drag-handle, .problem-editor-inspector .workflow-required-badge { display: none; }
.problem-editor-inspector .workflow-question-settings { grid-template-columns: minmax(0, 1fr); padding: 20px; border: 1px solid #cbdbe8; border-top: 0; border-radius: 0 0 7px 7px; background: #f5f9fd; }
.problem-editor-inspector .workflow-section-title { grid-column: 1 / -1; margin: 0 0 2px; color: #285574; font-size: 14px; }
.problem-editor-inspector .workflow-reference-config, .problem-editor-inspector .workflow-required-control { grid-column: 1 / -1; }
.settings-panel .problem-editor-inspector .workflow-reference-config .problem-reference-config { padding: 18px; border: 1px solid #b6d7c8; border-radius: 7px; background: #edf8f2; }
.problem-editor-inspector .workflow-reference-config .problem-reference-config > legend { padding: 0 8px; color: #1b604d; font-weight: 700; }
.problem-editor-inspector .workflow-reference-config .reference-file-drop { background: #fff; border-color: #a4c8b6; }
.problem-editor-inspector .branch-builder { margin-top: 16px; padding: 18px; border: 1px solid #ead7b2; border-radius: 7px; background: #fff8ed; }
.problem-editor-inspector .branch-builder-head { display: grid; justify-content: start; gap: 3px; }
.problem-editor-inspector .branch-builder-head strong { color: #79521e; font-size: 14px; }
.problem-editor-inspector .branch-builder-head span { display: block; color: #7a6a53; }
.problem-editor-inspector .branch-editor-row { border-color: #eadfca; background: #fff; }
.problem-editor-inspector .branch-editor-row { grid-template-columns: minmax(0, 1fr) 30px; gap: 8px; padding: 10px; }
.problem-editor-inspector .branch-editor-row .multi-picker-panel { position: static; margin-top: 6px; box-shadow: none; }
.problem-editor-inspector .branch-editor-row > .branch-answer { grid-column: 1; }
.problem-editor-inspector .branch-editor-row > label { grid-column: 1 / -1; }
.problem-editor-inspector .branch-editor-row > [data-branch-remove] { grid-column: 2; grid-row: 1; }
.problem-editor-inspector .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.problem-editor-inspector .grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.problem-editor-inspector input, .problem-editor-inspector select, .problem-editor-inspector textarea { max-width: 100%; }
.problem-editor-inspector-panel[hidden] { display: none; }
.editor-panel[data-problem-preview] { padding: 2px 0 18px; scroll-margin-top: 20px; }
.resident-preview-heading { margin-bottom: 16px; }
.resident-preview-heading h3 { margin: 0 0 4px; font-size: 18px; }
.resident-preview-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.resident-preview-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.resident-preview-toolbar > button, .resident-preview-add-menu > summary { display: inline-flex; align-items: center; min-height: 36px; padding: 7px 11px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--primary); font-size: 13px; font-weight: 600; cursor: pointer; }
.resident-preview-add-menu > summary { background: var(--primary); border-color: var(--primary); color: #fff; list-style: none; }
.resident-preview-add-menu > summary::-webkit-details-marker { display: none; }
.resident-preview-add-menu { position: relative; }
.resident-preview-add-choices { position: absolute; top: calc(100% + 4px); left: 0; z-index: 5; display: grid; min-width: min(310px, 82vw); padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 10px 25px rgba(31, 42, 36, .12); }
.resident-preview-add-choices button { display: grid; justify-content: flex-start; gap: 2px; border: 0; background: #fff; color: var(--text); font-size: 13px; text-align: left; }
.resident-preview-add-choices button small { color: var(--muted); font-size: 11px; font-weight: 400; }
.resident-preview-add-choices button:hover { background: #eaf4f1; }
.resident-preview-add-choices button:disabled { opacity: .5; cursor: not-allowed; }
.resident-preview-question-tools { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin: 0 0 10px; }
.resident-preview-question-tools button { min-height: 30px; padding: 4px 8px; border: 1px solid var(--line); background: #fff; color: var(--primary); font-size: 12px; }
.resident-preview-question-tools .resident-preview-configure { border-color: #9cc9bd; background: #edf7f4; font-weight: 700; }
.resident-preview-question-heading { margin-bottom: 16px; }
.resident-preview-question-heading h3 { margin: 0 0 4px; font-size: 17px; }
.resident-preview-question-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.resident-preview-empty { display: grid; justify-items: start; gap: 7px; margin: 0 0 18px; padding: 20px; border: 1px dashed #a9c9bf; border-radius: 7px; background: #f3faf7; }
.resident-preview-empty strong { font-size: 15px; }
.resident-preview-empty p { margin: 0 0 5px; color: var(--muted); font-size: 13px; }
.resident-preview-empty button { background: var(--primary); border-color: var(--primary); color: #fff; }
.resident-preview-question-tools .resident-preview-remove { color: var(--danger); }
.resident-preview-canvas { width: 100%; min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(31, 42, 36, .035); }
.resident-preview-form-head { margin-bottom: 20px; }
.resident-preview-form-head h2 { margin: 0 0 4px; font-size: 24px; }
.resident-preview-form-head .resident-preview-line { color: var(--muted); }
.resident-preview-section { margin: 0 0 18px; padding: 18px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.resident-preview-section > h3 { margin: 0 0 12px; }
.resident-preview-context, .resident-preview-ticket-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.problem-editor-main .resident-preview-context > div:last-child { grid-column: 1 / -1; }
@media (min-width: 1600px) {
    .resident-preview-ticket-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .problem-editor-main .resident-preview-context { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .problem-editor-main .resident-preview-context > div:last-child { grid-column: auto; }
    .problem-editor-inspector .workflow-question-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.resident-preview-context > div, .resident-preview-ticket-fields > div { min-width: 0; }
.resident-preview-line, .resident-preview-field-label { margin-bottom: 5px; color: #48535f; font-size: 13px; font-weight: 600; }
.resident-preview-context + .resident-preview-line { margin-top: 14px; }
.resident-preview-fake-input { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 8px 11px; border: 1px solid #d5dce2; border-radius: 5px; background: #fff; color: var(--text); font-weight: 400; }
.resident-preview-fake-input.is-textarea { min-height: 80px; align-items: flex-start; }
.resident-preview-required { display: inline-flex; align-items: center; gap: 6px; margin-top: 7px; color: var(--muted); font-size: 12px; font-weight: 500; }
.resident-preview-required input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.standard-field-rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; }
.standard-field-rule { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 5px; background: #fbfcfc; }
.standard-field-rule label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.standard-field-rule input[type=checkbox] { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.standard-field-required { white-space: nowrap; color: var(--muted); }
.standard-field-required:has(input:checked) { color: var(--primary); font-weight: 600; }
.standard-field-required:has(input:disabled) { opacity: .45; }
.field-visibility { min-width: 0; padding: 10px 12px; border: 1px solid #cbdedc; border-radius: 6px; background: #f0f7f6; }
.standard-field-rule > .field-visibility { flex-basis: 100%; }
.field-visibility > summary { cursor: pointer; color: var(--primary); font-size: 13px; font-weight: 600; }
.field-visibility[open] > summary { margin-bottom: 12px; }
.field-visibility > label, .standard-field-rule .field-visibility > label, .field-visibility > .field-label { display: block; margin-bottom: 8px; font-size: 13px; }
.field-visibility select { width: 100%; margin-top: 8px; }
.field-visibility .multi-picker { margin-top: 8px; }
.field-visibility .multi-picker-panel { position: static; max-height: 240px; box-shadow: none; }
.field-visibility .field-note { margin: 8px 0 0; line-height: 1.5; }
.field-visibility-button { display: inline-block; margin-top: 8px; padding: 5px 8px; font-size: 12px; color: var(--primary); border: 1px solid #cbdedc; border-radius: 5px; background: #f0f7f6; }
.field-note.field-error { color: var(--danger); font-weight: 600; }
[data-standard-field].is-required > span:first-child::after,
[data-standard-field].is-required > legend::after,
[data-standard-field].is-required > strong:first-of-type::after { content: ' *'; color: var(--danger); }
.resident-preview-field-settings { min-height: 26px; padding: 2px 6px; border: 0; background: transparent; color: var(--primary); font-size: 12px; }
.resident-preview-notice, .resident-preview-result { margin-top: 14px; padding: 12px 14px; border-left: 3px solid var(--primary); border-radius: 0 5px 5px 0; background: #edf7f3; color: #205e4f; font-weight: 600; }
.resident-preview-result { display: flex; align-items: flex-start; gap: 10px; font-size: 16px; line-height: 1.5; }
.resident-preview-result::before, .resident-preview-status[data-verification-state="reference_found"]::before { content: "✓"; display: grid; flex: 0 0 20px; place-items: center; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: #2b8065; color: #fff; font-size: 11px; font-weight: 700; }
.resident-preview-question { margin: 0 0 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.resident-preview-question:last-of-type { border-bottom: 0; }
.resident-preview-progress { margin-bottom: 10px; color: var(--muted); font-size: 12px; }
.resident-preview-question-title { margin-bottom: 10px; font-weight: 650; }
.resident-preview-question-title > .resident-preview-editable + .resident-preview-editable { margin-left: 6px; color: var(--muted); font-size: 12px; }
.resident-preview-lookup { padding: 0; border: 0; background: transparent; }
.resident-preview-state-row { display: flex; align-items: center; gap: 9px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.resident-preview-state-row select { width: auto; min-height: 32px; padding: 4px 8px; font-size: 12px; }
.resident-preview-state-visibility { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-size: 12px; cursor: pointer; }
.resident-preview-state-visibility input { width: auto; min-height: 0; margin: 0; }
.resident-preview-status { margin-top: 10px; font-size: 14px; }
.resident-preview-status[data-verification-state="reference_found"], .resident-preview-status[data-verification-state="reference_missing"], .resident-preview-status[data-verification-state="reference_unavailable"] { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 12px 14px; border-left: 3px solid var(--primary); border-radius: 0 5px 5px 0; background: #edf7f3; color: #205e4f; font-size: 16px; font-weight: 600; line-height: 1.5; }
.resident-preview-status[data-verification-state="reference_missing"], .resident-preview-status[data-verification-state="reference_unavailable"] { border-left-color: #ac7934; background: #fff5e8; color: #765528; }
.resident-preview-status[data-box-style-key] { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 12px 14px; border-left: 3px solid var(--box-accent); border-radius: 0 5px 5px 0; font-size: 16px; font-weight: 600; line-height: 1.5; }
.resident-preview-status[data-verification-state="reference_missing"]::before, .resident-preview-status[data-verification-state="reference_unavailable"]::before { content: "!"; display: grid; flex: 0 0 20px; place-items: center; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: #ac7934; color: #fff; font-size: 11px; font-weight: 700; }
.resident-preview-result[data-message-symbol]::before,
.resident-preview-status[data-message-symbol]::before,
.resident-preview-notice[data-message-symbol]::before { content: attr(data-message-symbol); display: grid; flex: 0 0 20px; place-items: center; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; background: var(--box-accent); color: #fff; font-size: 12px; font-weight: 700; }
.resident-preview-result[data-message-symbol=""]::before,
.resident-preview-status[data-message-symbol=""]::before,
.resident-preview-notice[data-message-symbol=""]::before { display: none; }
.resident-preview-notice[data-message-symbol] { display: flex; align-items: flex-start; gap: 10px; }
.resident-preview-result[data-box-style-key], .resident-preview-status[data-box-style-key], .resident-preview-notice[data-box-style-key] { position: relative; }
.resident-preview-result[data-box-style-key], .resident-preview-status[data-box-style-key], .resident-preview-notice[data-box-style-key] { cursor: pointer; }
.resident-preview-result[data-box-style-key]:hover, .resident-preview-status[data-box-style-key]:hover, .resident-preview-notice[data-box-style-key]:hover { outline: 1px solid var(--box-accent); outline-offset: 2px; }
.resident-preview-result .resident-preview-inline-editor, .resident-preview-status .resident-preview-inline-editor, .resident-preview-notice .resident-preview-inline-editor { cursor: text; }
.resident-preview-box-editor { position: relative; flex: 0 0 auto; margin-left: auto; align-self: flex-start; color: var(--text); font-size: 12px; font-weight: 500; white-space: normal; }
.resident-preview-box-editor[open] { z-index: 30; }
.category-admin:has(.resident-preview-box-editor[open]),
.problem-create-card:has(.resident-preview-box-editor[open]),
.question-builder:has(.resident-preview-box-editor[open]) { overflow: visible; }
.question-row:has(.resident-preview-box-editor[open]),
.branch-editor-row:has(.resident-preview-box-editor[open]) { position: relative; z-index: 20; }
.resident-preview-box-editor > summary { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 5px; background: #fff; cursor: pointer; list-style: none; }
.resident-preview-box-editor > summary::-webkit-details-marker { display: none; }
.resident-preview-box-controls { position: absolute; z-index: 12; top: 34px; right: 0; display: grid; grid-template-columns: repeat(2, minmax(110px, 1fr)); gap: 8px; width: min(310px, 80vw); padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: 0 10px 28px rgba(20,45,38,.17); }
.resident-preview-box-editor.opens-up .resident-preview-box-controls { top: auto; bottom: 34px; }
.resident-preview-box-controls label { display: grid; gap: 4px; color: var(--text); font-size: 12px; }
.resident-preview-box-controls input[type=color] { width: 100%; height: 34px; padding: 2px; }
.resident-preview-box-controls select { width: 100%; min-height: 34px; padding: 4px; }
.resident-preview-box-hint { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.resident-preview-box-reset, .message-style-reset { grid-column: 1 / -1; justify-self: start; padding: 6px 9px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--primary); cursor: pointer; font-size: 12px; font-weight: 600; }
.resident-preview-box-reset:hover, .message-style-reset:hover { background: #edf7f3; }
.message-style-library { margin-top: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; background: #f8fbfa; }
.message-style-library > summary { cursor: pointer; color: var(--primary); font-size: 14px; font-weight: 700; }
.message-style-library > .field-note { margin: 10px 0; }
.message-style-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; }
.message-style-panel { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.message-style-panel > summary { padding: 10px 12px; cursor: pointer; font-size: 13px; font-weight: 600; }
.message-style-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 0 12px 12px; }
.message-style-controls label { display: grid; gap: 4px; font-size: 12px; }
.message-style-controls input[type=color] { width: 100%; height: 35px; padding: 2px; }
.message-style-controls select { width: 100%; min-height: 35px; padding: 4px; }
.resident-preview-options { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.resident-preview-option { padding: 4px 9px; border-radius: 5px; background: #eef3f3; }
.resident-preview-select-arrow { color: var(--muted); }
.resident-preview-branch-messages { margin-top: 12px; border-top: 1px solid var(--line); }
.resident-preview-branch-messages summary { padding: 8px 0; color: var(--primary); cursor: pointer; font-size: 12px; }
.resident-preview-branch-message { padding: 7px 0; font-size: 12px; }
.resident-preview-actions { display: flex; justify-content: flex-end; margin-top: 14px; }
.resident-preview-button { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 12px; border-radius: 5px; background: var(--primary); color: #fff; font-weight: 600; }
.resident-preview-button .resident-preview-pencil { color: #fff; border-color: rgba(255,255,255,.45); }
.resident-preview-editable { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; vertical-align: middle; }
.resident-preview-value { min-width: 0; overflow-wrap: anywhere; white-space: pre-line; }
.resident-preview-pencil { display: inline-grid; place-items: center; width: 22px; height: 22px; min-height: 22px; padding: 0; border: 1px solid #bfd2ce; border-radius: 5px; background: transparent; color: var(--primary); font-size: 14px; font-weight: 700; line-height: 1; flex: 0 0 auto; }
.resident-preview-pencil:hover { background: #e4f2ef; }
.resident-preview-inline-editor { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: min(280px, 100%); }
.resident-preview-inline-editor input, .resident-preview-inline-editor textarea { flex: 1 1 180px; min-width: 0; width: min(360px, 100%); }
.resident-preview-inline-editor:has(.resident-preview-rich-editor) { display: flex; flex-direction: column; align-items: stretch; width: min(700px, 100%); min-width: min(420px, 100%); max-width: 100%; padding: 10px; border: 1px solid #bfd2ce; border-radius: 7px; background: #f7fbfa; color: #20302d; font-weight: 400; }
.resident-preview-format-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 7px; padding-bottom: 9px; border-bottom: 1px solid #dbe8e4; font: 12px Arial, sans-serif; }
.resident-preview-format-toolbar label { display: inline-flex; align-items: center; gap: 5px; color: #38504a; }
.resident-preview-format-toolbar select { width: auto; min-height: 32px; padding: 4px 7px; font: inherit; }
.resident-preview-format-toolbar input[type="color"] { flex: none; width: 35px; min-width: 35px; height: 31px; padding: 2px; cursor: pointer; }
.resident-preview-format-toolbar button { min-height: 32px; padding: 4px 8px; border: 1px solid #bfd2ce; border-radius: 5px; background: #fff; color: #155e54; font: 600 12px Arial, sans-serif; }
.resident-preview-format-toolbar button:hover { background: #e7f4f0; }
.resident-preview-rich-editor { box-sizing: border-box; width: 100%; min-height: 76px; max-height: 300px; overflow-y: auto; padding: 9px 10px; border: 1px solid #cadbd6; border-radius: 5px; background: #fff; color: #20302d; font-weight: 400; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; cursor: text; }
.resident-preview-rich-editor:focus { outline: 2px solid #228477; outline-offset: 1px; }
.resident-preview-rich-editor[aria-invalid="true"] { border-color: #b33636; }
.resident-preview-edit-actions { display: inline-flex; gap: 5px; }
.resident-preview-edit-actions button { min-height: 32px; padding: 4px 9px; font-size: 12px; }
.resident-preview-save { background: var(--primary); color: #fff; border-color: var(--primary); }
.resident-preview-cancel { background: #fff; color: var(--muted); border-color: var(--line); }
@media (max-width: 1320px) {
    .problem-editor-main { grid-template-columns: minmax(0, 1fr); }
    .problem-editor-main > [data-problem-preview] { order: -1; }
}
@media (max-width: 700px) {
    .resident-preview-canvas { padding: 15px; }
    .resident-preview-section { padding: 13px; }
    .resident-preview-context, .resident-preview-ticket-fields { grid-template-columns: 1fr; }
    .resident-preview-state-row { flex-wrap: wrap; }
    .problem-editor-inspector .grid.two, .problem-editor-inspector .grid.three { grid-template-columns: minmax(0, 1fr); }
    .problem-editor-general, .problem-editor-access { padding: 14px; }
    .problem-editor-inspector { padding: 10px; }
    .problem-editor-inspector-head { margin: -10px -10px 12px; padding: 12px 10px; }
    .problem-editor-inspector .workflow-question-head, .problem-editor-inspector .workflow-question-settings, .problem-editor-inspector .branch-builder { padding: 12px; }
    .settings-panel .problem-editor-inspector .workflow-reference-config .problem-reference-config { padding: 10px; }
    .problem-editor-inspector .workflow-reference-config .reference-file-drop { padding: 10px; }
}
.editor-panel { display: grid; gap: 20px; min-width: 0; }
/* One visual canvas: the question preview and its rules share a persistent card. */
.problem-editor-visual { gap: 24px; }
.problem-editor-visual [hidden] { display: none !important; }
.problem-editor-visual .problem-editor-main { display: block; }
.problem-editor-visual .problem-editor-general { background: #f6f8fa; border-color: #dce3e8; }
.problem-editor-visual .problem-editor-general .assignment-box { background: #fff; }
.problem-editor-visual .resident-preview-heading { margin: 0; padding: 6px 0 4px; }
.problem-editor-visual .resident-preview-heading h3 { font-size: 23px; margin: 3px 0 7px; }
.problem-editor-eyebrow { color: var(--primary); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; font-weight: 750; }
.problem-editor-visual .resident-preview-toolbar { margin-top: 18px; }
.problem-editor-visual .resident-preview-canvas { padding: 0; border: 0; background: transparent; box-shadow: none; }
.problem-editor-visual .resident-preview-form-head { padding: 24px; margin: 0; border: 1px solid #dbe5e1; border-radius: 10px 10px 0 0; background: #fff; }
.problem-editor-visual .resident-preview-form-head + .resident-preview-section { border-radius: 0 0 10px 10px; border-top: 0; padding: 20px 24px; background: #fff; }
.problem-editor-visual .resident-preview-form-head { border-radius: 10px; margin-bottom: 14px; }
.problem-editor-visual .resident-preview-form-head + .resident-preview-section { border: 1px solid #cde2d9; border-radius: 10px; background: #f4faf7; }
.problem-editor-stage-heading { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid #d8e6e0; }
.problem-editor-stage-number { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 14px; font-weight: 750; }
.problem-editor-stage-heading h3 { margin: 0 0 3px; font-size: 18px; line-height: 1.3; }
.problem-editor-stage-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.problem-editor-visual .problem-editor-stage-questions { padding: 22px 24px; border: 1px solid #d6e0eb; border-radius: 10px; background: #f4f7fb; }
.problem-editor-visual .problem-editor-stage-questions > .problem-editor-stage-heading { border-bottom-color: #d9e3ee; }
.problem-editor-visual .problem-editor-stage-questions > .problem-editor-stage-heading .problem-editor-stage-number { background: #4a6988; }
.problem-editor-visual .problem-editor-stage-ticket { padding: 22px 24px; border: 1px solid #e8ddc8; border-radius: 10px; background: #fffaf1; }
.problem-editor-visual .problem-editor-stage-ticket > .problem-editor-stage-heading { border-bottom-color: #e9dec9; }
.problem-editor-visual .problem-editor-stage-ticket > .problem-editor-stage-heading .problem-editor-stage-number { background: #a57737; }
.problem-editor-visual .resident-preview-final-action { justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; padding: 17px 20px; border: 1px solid #bddbd0; border-radius: 10px; background: #edf8f3; }
.resident-preview-final-caption { color: #205e4f; font-size: 13px; font-weight: 700; }
.problem-editor-visual .resident-preview-context { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.problem-editor-visual .resident-preview-context > div:last-child { grid-column: auto; }
.problem-editor-visual .resident-preview-section:has(> .problem-editor-inspector) { padding: 22px 24px; border: 1px solid #d6e0eb; background: #f4f7fb; }
.problem-editor-visual .problem-editor-inspector { padding: 0; border: 0; background: transparent; }
.problem-editor-visual .problem-editor-inspector-head { margin: 25px 0 4px; padding: 0; }
.problem-editor-visual .problem-editor-inspector .workflow-palette { display: none; }
.problem-editor-visual .problem-editor-inspector .question-list { gap: 22px; }
.problem-editor-visual .problem-editor-inspector .question-row { border: 1px solid #cfded8; border-radius: 10px; overflow: visible; background: #fff; }
.problem-editor-visual .problem-editor-inspector .workflow-question-head { border: 0; border-bottom: 1px solid #dae6e1; border-radius: 10px 10px 0 0; background: #edf5f2; padding: 12px 18px; }
.problem-editor-visual .problem-editor-inspector .workflow-question-title { flex-basis: auto; }
.problem-question-columns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr); align-items: start; }
.problem-question-columns > * { min-width: 0; }
.problem-editor-visual .problem-question-columns > .resident-preview-question { padding: 24px; margin: 0; border: 0; }
.problem-question-preview-caption { margin-bottom: 18px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
.problem-question-rules { padding: 18px; background: #f7f9fb; border-left: 1px solid #e2e8ed; border-radius: 0 0 10px 0; }
.problem-editor-visual .problem-question-rules .workflow-question-settings { display: grid; grid-template-columns: minmax(0, 1fr); gap: 13px; padding: 0; border: 0; background: transparent; }
.problem-editor-visual .problem-text-source { display: none; }
.problem-editor-visual .problem-question-rules .workflow-required-control { min-height: 0; padding: 0; }
.problem-editor-visual .problem-question-rules .branch-builder { margin: 20px 0 0; padding: 14px; border-color: #e7ddc9; background: #fffaf0; }
.problem-editor-visual .problem-question-rules .branch-editor-row { padding: 12px; }
.problem-editor-visual .problem-question-rules .branch-assignment-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.problem-editor-visual .problem-question-rules .grid.two, .problem-editor-visual .problem-question-rules .grid.three { grid-template-columns: minmax(0, 1fr); }
.problem-editor-visual .problem-question-rules .reference-column-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.problem-editor-visual .problem-question-rules [data-branch-message-wrap] { font-size: 12px; color: var(--muted); }
.problem-branch-text { display: flex; align-items: flex-start; gap: 9px; position: relative; margin-top: 7px; padding: 12px; border: 1px solid #dce4e0; border-left: 3px solid var(--box-accent, #2b8065); border-radius: 0 6px 6px 0; background: #fff; color: var(--text); font-size: 14px; line-height: 1.5; cursor: pointer; }
.problem-branch-text:hover { outline: 1px solid var(--box-accent, #2b8065); outline-offset: 2px; }
.problem-branch-text[data-message-symbol]::before { content: attr(data-message-symbol); display: grid; flex: 0 0 20px; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; background: var(--box-accent); color: #fff; font-size: 12px; font-weight: 700; }
.problem-branch-text[data-message-symbol=""]::before { display: none; }
.problem-branch-text > .resident-preview-editable { min-width: 0; flex: 1 1 auto; }
.problem-editor-visual .resident-preview-editable { border-radius: 4px; }
.problem-editor-visual .resident-preview-value[role=button] { cursor: text; border-radius: 3px; transition: background-color .15s; }
.problem-editor-visual .resident-preview-value[role=button]:hover { background: #e2f2ec; box-shadow: 0 0 0 4px #e2f2ec; }
.problem-editor-visual .resident-preview-value[role=button]:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
.problem-editor-visual .resident-preview-pencil { width: 26px; height: 26px; min-height: 26px; border-color: transparent; background: #eef6f3; }
.problem-editor-visual .resident-preview-editable.is-editing { display: flex; width: 100%; min-width: 0; }
.problem-editor-visual .resident-preview-inline-editor { display: flex; flex-direction: column; align-items: stretch; min-width: 0; width: 100%; max-width: 100%; padding: 12px; border: 1px solid #7ab6a6; border-radius: 8px; background: #f8fcfa; box-shadow: 0 3px 14px #174c3810; color: var(--text); font-size: 13px; font-weight: 400; }
.problem-editor-visual .resident-preview-inline-editor input, .problem-editor-visual .resident-preview-inline-editor textarea { flex: initial; width: 100%; }
.problem-editor-visual .resident-preview-inline-editor input[type=color] { width: 34px; }
.resident-preview-editor-label { color: #256656; font-size: 12px; font-weight: 700; }
.resident-preview-editor-hint { display: block; width: 100%; padding: 8px 10px; border-left: 3px solid #76a99b; border-radius: 0 4px 4px 0; background: #edf7f4; color: #315f53; font-size: 12px; line-height: 1.45; }
.resident-preview-editor-status { color: var(--muted); font-size: 11px; line-height: 1.4; }
.workflow-options-field small { display: block; padding: 8px 10px; border-left: 3px solid #76a99b; border-radius: 0 4px 4px 0; background: #edf7f4; color: #315f53; font-size: 12px; line-height: 1.45; }
.problem-editor-visual .resident-preview-rich-editor { min-height: 92px; font-size: 14px; }
.problem-editor-visual .resident-preview-format-toolbar { gap: 6px; }
.problem-editor-visual .resident-preview-edit-actions { flex-wrap: wrap; }
.resident-preview-reset { background: transparent; color: var(--muted); }
.problem-editor-visual .problem-editor-access { background: #f4f8fa; }
.problem-text-library { margin: 0; padding: 22px; border: 1px solid #dae3e7; border-radius: 10px; background: #f8fafb; }
.problem-text-library > h3 { margin: 0 0 5px; font-size: 19px; }
.problem-text-library > .field-note { margin: 0 0 16px; }
.problem-text-library .search-control { display: block; margin-bottom: 16px; }
.problem-text-library [data-display-text-search] { position: static; width: 100%; margin: 0; }
.problem-text-results { max-height: 560px; overflow-y: auto; scrollbar-gutter: stable; padding-right: 7px; }
.problem-text-library .display-text-group { padding: 0 0 20px; border: 0; }
.problem-text-library .display-text-group h4 { margin: 0; padding: 12px 0; color: #355c50; }
.problem-text-library [data-display-text-field] { min-width: 0; padding: 14px; border: 1px solid #dce5e0; border-radius: 8px; background: #fff; }
.problem-text-card-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.problem-text-card-heading strong { font-size: 12px; font-weight: 600; color: var(--muted); }
.problem-text-origin { color: #2e7964; font-size: 10px; white-space: nowrap; }
.problem-text-library .resident-preview-editable { font-size: 14px; }
.problem-text-library .resident-preview-value { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.problem-text-library .resident-preview-inline-editor .resident-preview-value { display: block; }
@media (max-width: 1100px) {
    .problem-question-columns { grid-template-columns: minmax(0, 1fr); }
    .problem-question-rules { border-left: 0; border-top: 1px solid #e2e8ed; border-radius: 0 0 10px 10px; }
}
@media (max-width: 700px) {
    .problem-editor-visual .resident-preview-context { grid-template-columns: minmax(0, 1fr); }
    .problem-editor-visual .resident-preview-form-head, .problem-editor-visual .resident-preview-form-head + .resident-preview-section, .problem-editor-visual .resident-preview-section:has(> .problem-editor-inspector), .problem-editor-visual .problem-editor-stage-ticket, .problem-editor-visual .problem-question-columns > .resident-preview-question, .problem-question-rules, .problem-text-library { padding: 16px; }
    .problem-editor-visual .resident-preview-final-action { align-items: stretch; }
    .problem-editor-visual .resident-preview-heading h3 { font-size: 20px; }
    .problem-editor-visual .problem-question-rules .reference-column-list { grid-template-columns: minmax(0, 1fr); }
    .problem-text-results { max-height: 480px; }
}
.editor-savebar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; padding: 14px 0 0; border-top: 1px solid var(--line); margin-top: 12px; }
.editor-savebar .save-state { margin-right: auto; color: var(--muted); font-size: 12px; }
.editor-savebar .save-state.is-dirty { color: #956006; }
.editor-savebar .save-state.is-saving { color: var(--primary); }
.editor-savebar .save-state.is-error { color: var(--danger); }
.category-form[data-problem-autosave] > .editor-savebar { position: sticky; bottom:10px; z-index:6; margin-top:12px; padding:10px 14px; border:1px solid var(--line); border-radius:6px; background:rgba(255,255,255,.97); box-shadow:0 6px 22px rgba(31,42,36,.09); backdrop-filter:blur(8px); }
.problem-actions { padding: 0 18px 16px; justify-content: flex-end; }
.workflow-builder { border: 0; padding: 0; background: transparent; }
.workflow-builder-head { display: none; }
.workflow-palette { display: flex; flex-wrap: wrap; padding: 0 0 16px; gap: 7px; border: 0; background: transparent; position: static; }
.workflow-palette-label { width: 100%; font-size: 12px; color: var(--muted); }
.workflow-tool { min-height: 36px; padding: 7px 10px; gap: 7px; font-size: 12px; background: #fff; }
.workflow-workspace { display: block; }
.workflow-canvas { padding: 18px; border: 1px solid var(--line); border-radius: 6px; background-color: #f4f7f8; background-image: none; min-height: 0; }
.workflow-overview { position: static; margin-top: 16px; border: 0; border-top: 1px solid var(--line); padding: 14px 0 0; background: transparent; }
.workflow-overview-head { cursor: pointer; }
.workflow-question { border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: none; }
.workflow-question-head { display: flex; gap: 8px; align-items: center; padding: 12px; }
.workflow-question-title { flex: 1; min-width: 0; white-space: normal; overflow: visible; text-overflow: clip; font-size: 14px; font-weight: 600; }
button.workflow-question-title { padding: 0; min-height: 30px; border: 0; background: transparent; text-align: left; justify-content: flex-start; }
.workflow-step-number { width: 24px; height: 24px; font-size: 12px; flex: 0 0 auto; }
.workflow-required-badge { font-size: 10px; font-weight: 500; }
.workflow-question-settings { padding: 18px; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
.workflow-label-field { grid-column: 1 / -1; }
.workflow-question-settings select { width: 100%; }
.question-move { display: flex; gap: 2px; }
.question-move button { width: 28px; min-height: 28px; height: 28px; padding: 4px; }
.branch-builder { padding: 16px 18px; background: #f9fafb; border-top: 1px solid var(--line); }
.branch-builder-head span { display: none; }
.branch-editor-row { grid-template-columns: minmax(160px, 1fr) minmax(220px, 1.4fr) 32px; padding: 12px; gap: 12px; }
.branch-answer { white-space: normal; overflow: visible; text-overflow: clip; padding: 0; background: none; font-size: 13px; font-weight: 600; }
.branch-editor-row select { min-width: 0; }
.branch-detail-field { grid-column: 1 / -1; }
.problem-reference-config [data-reference-columns] { gap: 18px; }
.problem-reference-config { background: #fff; }
.workflow-terminal span { border-radius: 5px; font-size: 12px; padding: 6px 12px; }
.workflow-empty { min-height: 100px; }
.multi-picker { position: relative; min-width: 0; font-weight: 400; }
.multi-picker > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #fff; cursor: pointer; list-style: none; }
.multi-picker > summary::-webkit-details-marker { display: none; }
.multi-picker[open] > summary { border-color: var(--primary); }
.multi-picker-panel { position: absolute; z-index: 30; inset: calc(100% + 5px) 0 auto; min-width: 0; background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; padding: 10px; box-shadow: 0 10px 26px #252b3220; }
.multi-picker-list { display: grid; gap: 2px; max-height: 220px; overflow-y: auto; margin-top: 6px; }
.multi-picker-list label { display: flex; align-items: center; gap: 9px; padding: 9px 6px; font-weight: 400; border-radius: 4px; color: var(--text); overflow-wrap: anywhere; }
.multi-picker-list label:hover { background: var(--surface-soft); }
.multi-picker-list input { margin: 0; }
.resident-picker { border: 0; padding: 0; background: transparent; }
.resident-toggle { justify-content: flex-start; font-weight: 400; text-align: left; }
.resident-dropdown { position: absolute; inset: 100% 0 auto; }
.resident-option-manual { border-top: 1px solid var(--line); color: var(--primary); }
.manual-resident-fields { display: grid; gap: 12px; margin-top: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 6px; background: #f6faf8; }
.manual-resident-fields .field-note { margin: 0; }
.manual-resident-fields .grid { margin: 0; }
.prediagnostic { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: transparent; padding: 20px 0; }
.create-progress { display: flex; gap: 18px; list-style: none; padding: 0; margin: 0 0 24px; flex-wrap: wrap; color: var(--muted); font-size: 12px; counter-reset: stage; }
.create-progress li { display: flex; align-items: center; gap: 7px; }
.create-progress li::before { counter-increment: stage; content: counter(stage); display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; width: 22px; height: 22px; font-size: 11px; }
.create-progress li[aria-current=step] { color: var(--primary); font-weight: 650; }
.create-progress li[aria-current=step]::before { background: var(--primary); color: #fff; border-color: var(--primary); }
.drop-zone { border: 1px dashed #a6b6c2; background: #f7fafc; padding: 22px; border-radius: 6px; }
.ticket-create-form .drop-zone { justify-items: center; text-align: center; }
.photo-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px; }
.photo-camera-button { display: none; }
@media (max-width: 900px), (pointer: coarse) {
    .photo-camera-button { display: inline-flex; }
    .ticket-create-form .photo-actions { width: 100%; }
}
@media (max-width: 700px) { .ticket-create-form .photo-actions { flex-direction: column; align-items: stretch; } }
.auth-shell { background: #f4f5f7; }
.auth-shell .topbar { position: static; justify-content: center; padding: 32px; border: 0; background: transparent; box-shadow: none; }
.auth-panel { margin: 48px auto; padding: 32px; box-shadow: 0 10px 34px #252b3209; }
.auth-panel h1 { font-size: 25px; margin-bottom: 8px; }
.auth-panel > p { margin-bottom: 24px; color: var(--muted); }
.auth-links { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.auth-links a, .auth-back { color: var(--primary); font-weight: 650; }
.auth-back { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 24px; font-size: 14px; text-decoration: none; }
.auth-back svg { width: 16px; height: 16px; }
.auth-help { margin: 22px 0 0 !important; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.auth-kicker { display: inline-block; margin-bottom: 12px; color: var(--primary); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.auth-kicker-error { color: var(--danger); }
.auth-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 24px; padding: 20px; border: 1px solid #e6b9bd; border-left: 4px solid var(--danger); border-radius: 6px; background: #fffafa; }
.danger-zone h2 { margin: 0 0 5px; font-size: 17px; color: var(--danger); }
.danger-zone p { margin: 0; color: var(--muted); }
.danger-zone form { flex: 0 0 auto; }
.owner-link-field { padding: 16px; border-left: 4px solid var(--primary); border-radius: 6px; background: #f3faf7; }
.owner-link-field[hidden] { display: none !important; }
.registration-panel { max-width: 560px; }
.registration-terms { align-items: flex-start; padding: 13px 15px; border: 1px solid var(--line); border-radius: 7px; background: #f6faf8; font-size: 14px; line-height: 1.5; }
.registration-terms input { flex: 0 0 auto; margin-top: 3px; }
.registration-terms a { color: var(--primary); text-decoration: underline; }
.legal-accept-page { max-width: 720px; margin: 0 auto; }
.legal-accept-form { padding: 24px; }
.legal-accept-form h2 { margin: 0 0 10px; font-size: 20px; }
.legal-accept-form p { line-height: 1.6; }
.legal-accept-form > p a { color: var(--primary); font-weight: 700; text-decoration: underline; }
.verification-code { text-align: center; font-size: 26px; font-weight: 750; letter-spacing: 8px; font-variant-numeric: tabular-nums; }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 44px; }
.password-control button { position: absolute; right: 4px; top: 4px; background: transparent; border: 0; }
.modal-panel { max-height: calc(100dvh - 40px); overflow-y: auto; }
.form-section-heading { margin: 8px 0 0; padding: 0 0 12px; border-bottom: 1px solid var(--line); font-size: 16px; }
body[data-page=profile-edit] > main > .form.wide, body[data-page=users-form] > main > .form.wide { border: 0; padding: 0; background: transparent; }
body[data-page=profile-edit] main fieldset, body[data-page=users-form] main fieldset { background: #fff; padding: 18px; }
.role-grid > label, .check-row { display: flex; align-items: center; gap: 8px; }
.role-grid > label input, .check-row input { width: 16px; margin: 0; }
.category-access-list { display: grid; gap: 14px; margin-top: 18px; }
.category-access-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.category-access-head { display: flex; align-items: start; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.category-access-head h3 { margin: 0 0 6px; font-size: 16px; }
.category-access-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.category-access-actions form { margin: 0; }
.category-access-form { margin-top: 14px; }
.category-access-form fieldset { margin: 0 0 12px; padding: 12px; }
.category-access-form .role-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.category-access-form .field-note { margin: 10px 0 0; }
.mail-history-panel { min-width: 0; }
.mail-history-panel .page-head { margin-bottom: 18px; }
.mail-history-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.mail-history-filters label { display: grid; gap: 5px; min-width: min(270px, 100%); font-size: 13px; font-weight: 600; }
.mail-history-filters button { min-height: 39px; }
.mail-history-table-wrap { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mail-history-table { width: 100%; min-width: 780px; border-collapse: collapse; text-align: left; }
.mail-history-table th, .mail-history-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.mail-history-table th { background: #f3f6f6; font-size: 12px; }
.mail-history-table td { font-size: 13px; line-height: 1.5; }
.mail-history-table tbody tr:last-child td { border-bottom: 0; }
.mail-history-table td small { display: block; color: var(--muted); }
.mail-history-status { display: inline-block; padding: 4px 8px; border-radius: 5px; font-weight: 700; }
.mail-history-status.is-sent { background: #e6f4ed; color: #0d6b50; }
.mail-history-status.is-received { background: #eaf1fb; color: #315d87; }
.mail-history-status.is-failed { background: #fbeae8; color: #a92836; }
.mail-history-pages { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 16px; font-size: 13px; }
@media (max-width: 700px) {
    .mail-history-table { min-width: 0; }
    .mail-history-table.responsive-table tr { grid-template-columns: minmax(0, 1fr); }
    .mail-history-table.responsive-table td { grid-column: 1 / -1; min-width: 0; overflow-wrap: anywhere; }
}
.rights-table { min-width: 920px; }
.rights-table .rights-ticket-scope { min-width: 190px; }
.rights-table .rights-ticket-scope select { width: 100%; min-width: 170px; }
@media (min-width: 1800px) { .app-shell .page { margin-right: auto; } }
@media (max-width: 1200px) {
    :root { --sidebar: 208px; }
    .app-shell .page { padding: 28px 24px 48px; }
    .page-head { align-items: flex-start; flex-wrap: wrap; }
    .details dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ticket-filters { grid-template-columns: repeat(2, minmax(0, 1fr)) auto; }
    .ticket-table th, .ticket-table td { padding: 14px 9px; }
    .ticket-layout { grid-template-columns: minmax(0, 1fr) 275px; gap: 20px; }
    .ticket-layout .details dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    .site-footer { margin-left: 0; padding: 16px 20px 24px; }
    .danger-zone { align-items: stretch; flex-direction: column; }
    .danger-zone form, .danger-zone .button-danger { width: 100%; }
    .app-shell .topbar { position: sticky; top: 0; width: 100%; min-height: 62px; height: auto; padding: 12px 20px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
    .mobile-menu-toggle { display: inline-flex; }
    .app-shell .nav, .app-shell .logout { display: none; width: 100%; }
    .app-shell.menu-open .nav { display: flex; margin-top: 12px; flex-wrap: wrap; }
    .app-shell.menu-open .logout { display: flex; margin-top: 14px; flex-direction: row; align-items: center; justify-content: space-between; }
    .app-shell .page { margin: 0; padding: 24px 20px 48px; }
    .impersonation-bar { top: 62px; margin-left: 0; padding: 10px 20px; }
    .dashboard-grid { gap: 20px; }
    .settings-tabs { gap: 0; }
    .settings-tab { padding: 10px 12px; }
    .ticket-management { grid-template-columns: 1fr; }
}
@media (max-width: 1200px) {
    .rights-table, .rights-table tbody { display: block; min-width: 0; width: 100%; }
    .rights-table thead { display: none; }
    .rights-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
    .rights-table td { display: block; width: auto; min-width: 0; padding: 0; border: 0; text-align: left; white-space: normal; }
    .rights-table td:first-child { grid-column: 1 / -1; font-weight: 700; }
    .rights-table .rights-ticket-scope { grid-column: 1 / -1; min-width: 0; }
    .rights-table .rights-ticket-scope select { min-width: 0; }
    .rights-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 500; }
}
@media (max-width: 700px) {
    h1 { font-size: 24px; }
    .app-shell .page { padding: 22px 16px 40px; }
    .impersonation-bar { align-items: stretch; flex-direction: column; padding: 10px 16px; gap: 8px; }
    .impersonation-bar > div { align-items: flex-start; }
    .impersonation-bar form, .impersonation-bar button { width: 100%; }
    .page-head, .ticket-head { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
    .page-actions { justify-content: flex-start; }
    .form.wide { padding: 18px; }
    .summary-grid, .compact-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .summary-card { padding: 10px 14px 16px; min-height: 80px; }
    .summary-card:first-child { padding-left: 14px; }
    .summary-card:nth-child(odd) { border-left: 0; }
    .summary-card strong { font-size: 26px; }
    .grid.two, .grid.three, .dashboard-grid, .assignment-form { grid-template-columns: 1fr; }
    .details dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ticket-filters { grid-template-columns: 1fr 1fr; }
    .ticket-filters > .button { grid-column: 1 / -1; justify-self: start; }
    .user-search { flex-wrap: wrap; gap: 8px; }
    .user-search label { flex-basis: 100%; }
    .table-wrap { overflow: visible; background: transparent; border: 0; }
    .responsive-table, .responsive-table tbody { display: block; }
    .responsive-table thead { display: none; }
    .responsive-table tr { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin-bottom: 12px; gap: 12px; }
    .responsive-table td { display: block; width: auto !important; padding: 0; border: 0; white-space: normal; }
    .responsive-table td:first-child { grid-column: 1 / -1; font-size: 15px; }
    .responsive-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
    .responsive-table td.cell-action { grid-column: 2; justify-self: end; align-self: end; }
    .responsive-table .empty { grid-column: 1 / -1; padding: 12px; }
    .ticket-meta { justify-content: flex-start; }
    .ticket-layout { grid-template-columns: 1fr; }
    .ticket-sidebar { padding-top: 0; }
    .workflow-canvas { padding: 10px; }
    .workflow-question-head { padding: 10px; flex-wrap: wrap; }
    .workflow-question-title { flex-basis: 55%; }
    .workflow-required-badge { margin-left: auto; }
    .workflow-question-settings { padding: 14px; grid-template-columns: 1fr; }
    .workflow-reference-config, .workflow-required-control { grid-column: 1 / -1; }
    .branch-builder { padding: 12px; }
    .branch-editor-row { grid-template-columns: minmax(0, 1fr) 30px; }
    .branch-editor-row > .branch-answer { grid-column: 1; }
    .branch-editor-row > label { grid-column: 1 / -1; }
    .branch-editor-row > [data-branch-remove] { grid-column: 2; grid-row: 1; }
    .branch-detail-field { grid-column: 1 / -1; }
    .category-form, .problem-create-card .problem-type-form { padding: 14px; }
    .problem-summary-meta { flex-wrap: wrap; }
    .editor-tabs button { padding: 9px 10px; font-size: 13px; }
    .settings-panel fieldset { padding: 14px; }
    .reference-grid { grid-template-columns: 1fr; }
    .settings-panel[data-settings-panel="refs"] .reference-block { max-height: none; }
    .reference-row { gap: 10px; }
    .reference-row span { min-width: 0; overflow-wrap: anywhere; }
    .reference-row button { width: auto; max-width: 48%; flex: 0 0 auto; }
    .workflow-tool { flex: 1 1 130px; }
    .multi-picker-panel { position: static; margin-top: 6px; box-shadow: none; }
    .auth-panel { margin: 24px auto; padding: 24px; }
    .create-progress { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Registration form configuration */
.registration-standard-list, .registration-custom-list { display: grid; gap: 10px; }
.registration-standard-row { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 18px; align-items: center; min-height: 46px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface-soft); }
.registration-standard-row .checkbox { margin: 0; white-space: nowrap; }
.registration-custom-field { position: relative; display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(150px, .7fr) minmax(220px, 1fr) auto 38px; gap: 12px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.registration-custom-field > label { margin: 0; }
.registration-custom-field > .checkbox { align-self: center; }
.registration-custom-field .icon-button { align-self: end; }
.registration-extra-fields { display: grid; gap: 14px; margin: 2px 0; }
.registration-answer-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--line); }
.registration-answer-list > div { min-width: 0; padding: 12px; background: #fff; }
.registration-answer-list dt { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.registration-answer-list dd { margin: 0; overflow-wrap: anywhere; }
.registration-approval-settings { display: grid; gap: 14px; }
.registration-approval-settings > .checkbox { margin: 0; }
.registration-recipient-picker { max-width: 680px; margin-top: 7px; }
.registration-recipient-picker .multi-picker-list span { display: grid; gap: 2px; min-width: 0; }
.registration-recipient-picker .multi-picker-list small { color: var(--muted); overflow-wrap: anywhere; }
.registration-review-banner { display: flex; justify-content: space-between; gap: 24px; align-items: center; margin-bottom: 20px; padding: 20px; border: 1px solid #dfc78f; border-left: 4px solid #bd741d; border-radius: 6px; background: #fff8e7; }
.registration-review-banner h2 { margin: 8px 0 4px; font-size: 19px; }
.registration-review-banner p { margin: 0; color: #6f5a34; }
.registration-review-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: 0 0 auto; }
.registration-review-actions form { margin: 0; }
@media (max-width: 900px) {
    .registration-custom-field { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .registration-custom-field .registration-options { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .registration-standard-row { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
    .registration-standard-row > strong { grid-column: 1 / -1; }
    .registration-custom-field, .registration-answer-list { grid-template-columns: 1fr; }
    .registration-custom-field .registration-options { grid-column: auto; }
    .registration-review-banner { display: grid; }
    .registration-review-actions, .registration-review-actions form, .registration-review-actions button { width: 100%; }
}
/* Calendar */
/* Dashboard calendar */
.dashboard-calendar { margin-bottom: 24px; }
.dashboard-calendar > .section-heading { align-items: end; }
.dashboard-calendar > .section-heading > div { display: grid; gap: 3px; }
.dashboard-calendar > .section-heading h2, .dashboard-calendar > .section-heading p { margin: 0; }
.dashboard-calendar > .section-heading p { color: var(--muted); font-size: 12px; }
.dashboard-calendar-layout { display: grid; grid-template-columns: minmax(310px, .8fr) minmax(380px, 1.2fr); gap: 28px; padding-top: 4px; }
.mini-calendar { min-width: 0; }
.mini-calendar-weekdays, .mini-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mini-calendar-weekdays span { padding: 7px 0; text-align: center; color: var(--muted); font-size: 10px; font-weight: 700; }
.mini-calendar-grid { gap: 4px; }
.mini-calendar-grid > span, .mini-calendar-day { position: relative; display: grid; place-items: center; aspect-ratio: 1.2; min-height: 32px; border-radius: 4px; color: var(--muted); font-size: 12px; text-decoration: none; }
.mini-calendar-day.is-today { box-shadow: inset 0 0 0 1px var(--primary); color: var(--primary); font-weight: 700; }
.mini-calendar-day.has-events { background: #e5f1ed; color: #174d43; font-weight: 700; }
.mini-calendar-day.has-events:hover { background: #d5e9e3; }
.mini-calendar-day i { position: absolute; right: 3px; bottom: 2px; display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 9px; font-style: normal; }
.dashboard-upcoming { min-width: 0; }
.dashboard-upcoming h3 { margin: 0 0 8px; font-size: 14px; }
.dashboard-upcoming > a { display: grid; grid-template-columns: 46px minmax(0, 1fr) 18px; gap: 12px; align-items: center; min-height: 54px; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.dashboard-upcoming > a:last-child { border-bottom: 0; }
.dashboard-upcoming time { display: grid; text-align: center; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.dashboard-upcoming time strong { color: var(--primary); font-size: 20px; line-height: 1; }
.dashboard-upcoming > a > span { display: grid; gap: 3px; min-width: 0; }
.dashboard-upcoming > a > span strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.dashboard-upcoming small { color: var(--muted); }
.dashboard-upcoming svg { width: 16px; color: var(--primary); }
@media (max-width: 900px) { .dashboard-calendar-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
    .dashboard-calendar { padding: 18px; }
    .dashboard-calendar > .section-heading { align-items: flex-start; }
    .dashboard-calendar-layout { gap: 22px; }
    .mini-calendar-grid > span, .mini-calendar-day { min-height: 34px; }
    .dashboard-upcoming > a { grid-template-columns: 42px minmax(0, 1fr) 18px; }
}

/* Dashboard readability */
.dashboard-page .page-head { margin-bottom: 22px; }
.dashboard-page .dashboard-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 28px; border: 0; }
.dashboard-page .dashboard-summary .summary-card { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-height: 124px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 3px 12px rgba(30, 48, 55, .035); text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.dashboard-page .dashboard-summary .summary-card:hover { border-color: #a9cbc4; box-shadow: 0 7px 20px rgba(30, 48, 55, .075); transform: translateY(-2px); }
.dashboard-page .dashboard-summary .summary-card span { color: #4f5d69; font-size: 13px; font-weight: 600; }
.dashboard-page .dashboard-summary .summary-card strong { color: var(--text); font-size: 34px; line-height: 1; font-variant-numeric: tabular-nums; }
.dashboard-page .dashboard-summary .summary-card small { margin-top: auto; color: var(--muted); font-size: 12px; }
.dashboard-page .dashboard-summary .summary-card.is-warning { border-color: #ead9b5; background: #fffdf8; }
.dashboard-page .dashboard-summary .summary-card.is-warning strong { color: #9b6406; }
.dashboard-page .dashboard-summary .summary-card.is-danger { border-color: #edced2; background: #fffafb; }
.dashboard-page .dashboard-summary .summary-card.is-danger strong { color: var(--danger); }
.dashboard-section-intro { margin-bottom: 12px; }
.dashboard-section-intro h2 { margin: 0; font-size: 19px; }
.dashboard-section-intro p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.dashboard-page .dashboard-grid { gap: 16px; margin-bottom: 16px; }
.dashboard-page .dashboard-grid > .details, .dashboard-page > .dashboard-calendar, .dashboard-page > .dashboard-recent { min-width: 0; margin: 0; padding: 20px 22px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.dashboard-page .section-heading { min-height: 38px; padding-bottom: 12px; margin-bottom: 6px; }
.dashboard-page .section-heading h2 { font-size: 17px; }
.dashboard-page .section-heading a { flex: 0 0 auto; font-size: 13px; font-weight: 600; }
.dashboard-count { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; margin-left: 5px; padding: 0 6px; border-radius: 6px; background: #edf2f3; color: #4e5e6e; font-size: 12px; font-weight: 700; vertical-align: 2px; font-variant-numeric: tabular-nums; }
.dashboard-action-grid .details:first-child .dashboard-count { background: #fff0f1; color: var(--danger); }
.dashboard-page .compact-ticket { min-height: 64px; padding: 12px 0; }
.dashboard-page .compact-ticket:last-child, .dashboard-page .metric-list > div:last-child { border-bottom: 0; }
.dashboard-page .compact-ticket a { color: var(--text); font-size: 14px; line-height: 1.35; }
.dashboard-page .compact-ticket a:hover { color: var(--primary); }
.dashboard-page .compact-ticket small { margin-top: 4px; font-size: 12px; line-height: 1.45; }
.dashboard-page .compact-ticket > .badge { flex: 0 0 auto; }
.dashboard-page .empty { margin: 0; padding: 25px 10px; }
.dashboard-page > .dashboard-calendar { margin-bottom: 16px; }
.dashboard-page .dashboard-calendar-layout { grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); gap: 34px; padding-top: 10px; }
.dashboard-page .mini-calendar-grid > span, .dashboard-page .mini-calendar-day { aspect-ratio: auto; min-height: 36px; }
.dashboard-page .dashboard-upcoming > a { min-height: 62px; }
.dashboard-page .dashboard-upcoming > a > span strong { font-size: 14px; }
.dashboard-page .dashboard-metrics-grid .metric-list > div { min-height: 52px; }
.dashboard-page .dashboard-metrics-grid .metric-list span { color: #495762; font-weight: 500; overflow-wrap: anywhere; }
.dashboard-page .dashboard-metrics-grid .metric-list strong { color: var(--primary); font-size: 18px; font-variant-numeric: tabular-nums; }
.dashboard-page > .dashboard-recent { margin-top: 16px; }
@media (max-width: 800px) {
    .dashboard-page .dashboard-calendar-layout { grid-template-columns: 1fr; gap: 20px; }
    .dashboard-page .mini-calendar { max-width: 360px; }
}
@media (max-width: 700px) {
    .dashboard-page .dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 24px; }
    .dashboard-page .dashboard-summary .summary-card { min-height: 116px; padding: 14px; }
    .dashboard-page .dashboard-summary .summary-card strong { font-size: 30px; }
    .dashboard-page .dashboard-grid > .details, .dashboard-page > .dashboard-calendar, .dashboard-page > .dashboard-recent { padding: 17px 16px; }
    .dashboard-page .dashboard-grid { gap: 12px; margin-bottom: 12px; }
    .dashboard-page .dashboard-calendar-layout { gap: 24px; }
    .dashboard-page .section-heading { align-items: center; gap: 8px; }
    .dashboard-page .section-heading h2 { font-size: 16px; }
    .dashboard-page .compact-ticket { align-items: flex-start; }
    .dashboard-page .compact-ticket > .badge { max-width: 84px; }
}
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.dashboard-page.dashboard-home > .dashboard-copro-info { margin-bottom: 30px; }
.dashboard-page.dashboard-home > .dashboard-calendar { margin-bottom: 0; }
.dashboard-page.dashboard-home .dashboard-calendar-layout { grid-template-columns: minmax(250px, 340px) minmax(0, 1fr); gap: 38px; }
@media (max-width: 800px) { .dashboard-page.dashboard-home .dashboard-calendar-layout { grid-template-columns: 1fr; gap: 22px; } }
.calendar-panel, .calendar-upcoming, .event-main, .event-sidebar > section { background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.calendar-toolbar { display: grid; grid-template-columns: 40px auto 40px 1fr; align-items: center; gap: 8px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.calendar-toolbar h2 { margin: 0; min-width: 180px; text-align: center; font-size: 19px; }
.calendar-toolbar .calendar-today { justify-self: end; }
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.calendar-weekdays { border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.calendar-weekdays span { padding: 10px; text-align: center; }
.calendar-day { min-width: 0; min-height: 124px; padding: 9px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-day.is-outside { background: var(--surface-soft); }
.calendar-day > time { display: grid; place-items: center; width: 27px; height: 27px; margin-bottom: 6px; color: var(--muted); font-size: 12px; }
.calendar-day.is-today > time { border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; }
.calendar-day-events { display: grid; gap: 5px; }
.calendar-event { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 5px; align-items: center; min-height: 30px; padding: 6px 7px; border-left: 3px solid #397e70; border-radius: 3px; background: #eaf4f1; color: #174d43; font-size: 11px; line-height: 1.2; text-decoration: none; }
.calendar-event:hover { background: #dceee8; }
.calendar-event strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.calendar-event svg { width: 13px; height: 13px; }
.calendar-event.is-registered { border-left-color: #b66a18; background: #fff4df; color: #70430f; }
.calendar-upcoming { padding: 18px; }
.calendar-upcoming h2 { margin: 0 0 14px; font-size: 17px; }
.calendar-announcement-details { margin: 18px 0; padding: 14px 16px; border: 1px solid #d5e4dd; border-radius: 8px; background: #f1f7f4; }
.calendar-announcement-details p { display: flex; align-items: flex-start; gap: 10px; margin: 0; color: #37584a; line-height: 1.6; }
.calendar-announcement-details p + p { margin-top: 10px; }
.calendar-announcement-details .lucide { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--primary); }
.calendar-announcement .copro-rich-content { overflow-wrap: anywhere; }
.calendar-announcement form button { white-space: normal; }
.upcoming-event { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.upcoming-event:last-child { border-bottom: 0; }
.upcoming-event > time { display: grid; text-align: center; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.upcoming-event > time strong { color: var(--primary); font-size: 23px; line-height: 1; }
.upcoming-event > span { display: grid; gap: 4px; min-width: 0; }
.upcoming-event > span strong { font-size: 13px; overflow-wrap: anywhere; }
.upcoming-event small { color: var(--muted); }
.calendar-event-form { display: grid; gap: 18px; border: 0; padding: 0; background: transparent; }
.calendar-event-form fieldset { margin: 0; padding: 18px; background: #fff; }
.event-detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.event-main { overflow: hidden; }
.event-date-banner { display: flex; flex-wrap: wrap; gap: 18px 28px; padding: 18px 20px; border-bottom: 1px solid var(--line); background: #f5f9f8; }
.event-date-banner span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.event-date-banner svg { width: 17px; color: var(--primary); }
.event-description, .event-registrations { padding: 22px; }
.event-description h2, .event-registrations h2, .registration-card h2 { margin: 0 0 14px; font-size: 17px; }
.event-description p { margin: 0; line-height: 1.65; }
.event-registrations { border-top: 1px solid var(--line); }
.registration-row { display: flex; justify-content: space-between; gap: 20px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.registration-row > span { display: grid; gap: 5px; min-width: 0; }
.registration-row small { color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.event-sidebar { display: grid; gap: 14px; }
.registration-card { padding: 20px; }
.registration-card form { display: grid; gap: 12px; margin-top: 16px; }
.registration-card form button { width: 100%; }
.event-reminder { display: flex; align-items: flex-start; gap: 10px; padding: 14px; border: 1px solid #dfc78f; border-radius: 6px; background: #fff8e7; color: #704b10; font-size: 13px; }
.event-reminder svg { width: 17px; flex: 0 0 auto; }
.event-sidebar > form button { width: 100%; }
@media (max-width: 1100px) { .calendar-layout { grid-template-columns: 1fr; } .calendar-upcoming { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; } .calendar-upcoming h2 { grid-column: 1 / -1; } }
@media (max-width: 800px) { .event-detail-layout { grid-template-columns: 1fr; } }
@media (max-width: 700px) {
    .calendar-panel { border: 0; background: transparent; }
    .calendar-toolbar { grid-template-columns: 40px 1fr 40px; padding: 10px 0 16px; border: 0; }
    .calendar-toolbar .calendar-today { grid-column: 1 / -1; justify-self: center; }
    .calendar-weekdays { display: none; }
    .calendar-grid { display: block; }
    .calendar-day, .calendar-day:nth-child(7n) { display: grid; grid-template-columns: 46px minmax(0, 1fr); min-height: 0; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
    .calendar-day.is-outside, .calendar-day:not(:has(.calendar-event)) { display: none; }
    .calendar-day > time { width: 38px; height: auto; margin: 0; font-size: 15px; font-weight: 700; }
    .calendar-day.is-today > time { min-height: 38px; }
    .calendar-day-events { gap: 8px; }
    .calendar-event { min-height: 46px; padding: 10px; font-size: 13px; }
    .calendar-event strong { white-space: normal; }
    .calendar-upcoming { grid-template-columns: 1fr; }
    .event-date-banner { display: grid; gap: 12px; }
}
