
/* Django adapters: designer CSS remains unchanged. */
.dt-wordmark{display:flex;gap:8px;align-items:center;font-size:16px;font-weight:600;color:var(--text-strong);text-decoration:none;white-space:nowrap}.dt-logo{display:grid;place-items:center;width:28px;height:28px;background:var(--royal);color:#fff;font-family:var(--font-mono);font-size:11px;border-radius:4px}.dt-top-user{font-size:11px;color:var(--text-muted);white-space:nowrap}.dt-profile,.dt-project-menu{position:relative}.dt-profile>summary,.dt-project-menu>summary{list-style:none;cursor:pointer}.dt-profile>summary::-webkit-details-marker,.dt-project-menu>summary::-webkit-details-marker{display:none}.dt-profile-button{border:0;padding:0;background:none}.dt-popover{position:absolute;top:calc(100% + 10px);right:0;min-width:240px;max-width:90vw;background:var(--bg-surface);border:1px solid var(--border-subtle);box-shadow:var(--shadow-lg);border-radius:8px;z-index:60;padding:6px}.dt-project-menu .dt-popover{left:0;right:auto}.menu-item{display:flex;align-items:center;gap:10px;width:100%;border:0;background:none;color:var(--text-body);padding:9px 12px;text-align:left;text-decoration:none;font-size:12px;cursor:pointer}.menu-item:hover{background:var(--bg-hover)}.dt-form-stack{display:grid;gap:18px}.ctl input:not([type=checkbox]):not([type=radio]),.ctl select,.ctl textarea{width:100%}.field .ctl textarea{min-height:90px;resize:vertical}.field .ctl ul{list-style:none;padding:0;margin:0}.ctl:has(input[type=checkbox]),.ctl:has(input[type=radio]){background:none;border:0;display:block;min-height:auto}.err ul,.errorlist{margin:0;padding-left:18px}.dt-form-stack>.btn{justify-self:start}.auth-card{width:min(420px,calc(100vw - 32px));margin:auto;padding:30px;border:1px solid var(--border-subtle);border-radius:10px;background:var(--bg-surface);box-shadow:var(--shadow-sm)}.auth-card h1{font-size:22px;margin:26px 0 8px}.auth-sub,.auth-foot{font-size:12px;color:var(--text-muted);margin-bottom:24px}.auth-foot{margin:20px 0 0}.dt-auth.show{display:flex;align-items:center;justify-content:center;min-height:100dvh}.dt-auth main{width:100%}.iconbtn,.btn,.chip{cursor:pointer}a.btn{text-decoration:none}button:disabled{opacity:.5;cursor:default}.dt-table-link{color:inherit;text-decoration:none}.dt-table-link:hover{color:var(--accent-500)}.dt-wrap{overflow-x:auto}.dt-nowrap{white-space:nowrap}.dt-preview{max-width:540px}.dt-reasons{display:flex;gap:6px;flex-wrap:wrap}.dt-reasons label{padding:5px 9px;border:1px solid var(--border-subtle);border-radius:20px;font-size:11px;cursor:pointer}.dt-reasons label:has(input:checked){background:var(--accent-100);border-color:var(--accent-500)}.dt-reasons input{accent-color:var(--accent-500)}.dt-toast-action{border:0;background:none;color:var(--accent-500);font-weight:600;cursor:pointer}.dt-loading{display:none}.htmx-request .dt-loading{display:inline-block}.dt-legacy{font-size:12px}.dt-legacy .panel{display:block;height:auto;background:var(--bg-surface);border:1px solid var(--border-subtle);border-radius:8px;margin-bottom:20px}.dt-legacy .pad{padding:20px}.dt-legacy .heading{display:flex;justify-content:space-between;gap:12px;margin-bottom:24px}.dt-legacy h1{font-size:22px}.dt-legacy h2{font-size:16px;margin:0 0 16px}.dt-legacy .meta{font-size:11px;color:var(--text-muted)}.dt-legacy .muted{color:var(--text-muted)}.dt-legacy .actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.dt-legacy .person-response{border-bottom:1px solid var(--border-subtle);padding:12px 0}.dt-legacy .wording{white-space:pre-wrap;overflow-wrap:anywhere}.dt-legacy .arabic{direction:rtl;font-family:'Noto Sans Arabic',Tahoma,sans-serif}.dt-legacy .fields,.dt-legacy .two-col{display:grid;grid-template-columns:1fr 1fr;gap:20px}.dt-legacy .toolbar{flex-wrap:wrap}.dt-legacy .bottom{display:none}.dt-legacy button:not(.btn),.dt-legacy .button{padding:7px 12px;border:1px solid var(--border-default);border-radius:5px;background:var(--bg-surface);color:var(--text-body);font:inherit;cursor:pointer}.dt-legacy .primary{background:var(--accent-500)!important;color:var(--text-on-accent)!important}.dt-legacy input:not([type=checkbox]):not([type=radio]),.dt-legacy select,.dt-legacy textarea{width:100%;padding:8px;border:1px solid var(--border-default);border-radius:4px;background:var(--bg-surface);color:var(--text-body);font:inherit}.dt-legacy form{display:grid;gap:12px}.dt-legacy .toolbar{display:flex}.dt-legacy table{width:100%}.dt-unanswered{color:var(--text-muted)}.dt-item-row:focus-visible{outline:2px solid var(--accent-500);outline-offset:-2px}.dt-issue-controls{display:grid;gap:12px}.dt-issue-controls select{width:100%}.dt-dialog-form{display:contents}.dt-inline-form{display:inline-flex;gap:8px}.dt-back{font-size:12px;color:var(--text-muted);display:inline-flex;gap:6px;align-items:center;text-decoration:none}.dt-ack-list{display:grid;gap:14px;margin:20px 0}.dt-ack-list label{display:flex;gap:10px;align-items:start}.dt-project-menu .chip{max-width:360px}.dt-project-menu .chip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dt-next-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.dt-reply{display:grid;gap:10px}.dt-reply textarea{width:100%;min-height:72px}.dt-reply button{justify-self:end}.dt-code{font:11px var(--font-mono);overflow-wrap:anywhere}.dt-own-response{font-size:11px}.dt-form-page{max-width:850px}.dt-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.dt-checklist-head{display:flex;gap:8px;align-items:center}.dt-checklist-head .badge{flex-shrink:0}.dt-kpis .kpi{text-decoration:none;color:inherit}.dt-actions-column{text-align:left!important}.dt-actions-column .btn{justify-content:flex-start}.dt-metadata{font-size:11px;color:var(--text-muted)}.dt-wide-table{min-width:820px}
@media(max-width:768px){.dt-top-user{display:none}.dt-project-menu .chip{max-width:190px}.dt-card-grid{grid-template-columns:1fr}.dt-legacy .fields,.dt-legacy .two-col{grid-template-columns:1fr}.topbar{gap:10px}.dt-wordmark{font-size:14px}.dt-legacy .heading{flex-wrap:wrap}.dt-legacy .toolbar label{min-width:130px}}
@media(max-width:480px){.dt-project-menu .chip{max-width:128px}.dt-project-menu .chip>.dt-muted{display:none}.dt-logo{width:24px;height:24px}.dt-wordmark{font-size:13px}.dt-popover{min-width:210px}.pacts{flex-wrap:wrap}.rdrawer{max-width:100vw!important}.kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.dt-reasons label{min-height:36px}.dt-next-controls{gap:4px}.dt-next-controls .btn{font-size:11px}}
.dt-drawer-section{margin-bottom:22px}.dt-drawer-section h2{font-size:13px;font-weight:600;margin:0 0 10px}.dt-member-response{padding:10px 0;border-bottom:1px solid var(--border-subtle)}.dt-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0}.dt-inline-drawer{max-width:760px;margin:20px auto;border:1px solid var(--border-default);border-radius:8px}.dt-inline-drawer .rdrawer-body{overflow:visible}.dt-check{display:flex;gap:8px;align-items:flex-start;margin:12px 0;font-size:12px}.dt-setup-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.dt-action-menu{position:relative}.dt-action-menu .dt-popover{inset-inline-end:0;z-index:40}.dt-toast{background:var(--bg-surface);border:1px solid var(--border-default);border-radius:8px;box-shadow:var(--shadow-lg);padding:12px 16px;display:flex;align-items:center;gap:16px}.dt-form-stack [hidden]{display:none!important}button:disabled{opacity:.5;cursor:not-allowed}.htmx-request button{opacity:.6}.dt-kpis{grid-template-columns:repeat(auto-fit,minmax(135px,1fr))}.lnav.is-collapsed{width:48px;min-width:48px}.lnav.is-collapsed .lbl,.lnav.is-collapsed .ln-grp{display:none}.dt-ref{display:block}.dt-actions-column{text-align:left}#mount>.notice{margin-bottom:14px}
@media(max-width:768px){.dt-setup-grid{grid-template-columns:1fr}.modal-host{padding:12px}.modal{max-height:92vh}.dt-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.rdrawer-foot{flex-wrap:wrap}.toolbar{flex-wrap:wrap}.pacts{flex-wrap:wrap}.dt-wide-table{min-width:900px}}
.field select{width:100%;min-height:34px;padding:7px 11px;background:var(--bg-app);border:1px solid var(--border-default);border-radius:var(--radius-md);color:var(--text-strong);font:inherit;font-size:13px}.rdrawer{width:560px}.modal-host{z-index:80}.dt-form-stack form{display:grid;gap:14px}.dt-form-stack .field:has(input[name=reasons]) .ctl{display:flex;flex-wrap:wrap;gap:6px}.dt-form-stack .field:has(input[name=reasons]) label:not(.lbl){display:flex;align-items:center;gap:6px;border:1px solid var(--border-subtle);padding:5px 9px;border-radius:20px;font-size:12px}.dt-form-stack .field:has(input[name=reasons]) label:has(input:checked){background:var(--accent-100);border-color:var(--accent-500)}
@media(max-width:768px){.kpis.dt-kpis:has(>:nth-child(n):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}.toolbar .dt-fsel{min-width:0;width:auto;max-width:100%}.rdrawer{width:100vw;max-width:100vw}.dt-next{flex-wrap:wrap}}
.dt-busy{pointer-events:none;opacity:.7}.dt-form-stack form .btn{justify-self:start}.field .ctl>div:has(input[type=checkbox]){display:flex;flex-wrap:wrap;gap:6px}.field .ctl label{line-height:1.5}
.modal-host:not(.show),.rdrawer:not(.show){visibility:hidden}
.card-head h2{font-size:12.5px;font-weight:600;color:var(--text-strong);margin:0;flex:1}.dt-drawer-section>.field+.field{margin-top:12px}.dt-form-stack form .modal-foot .btn{justify-self:auto}.modal-body .field+.field{margin-top:14px}
.dt-undo-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:8px}.rdrawer>.dt-undo-form{padding:8px 18px;border-top:1px solid var(--border-subtle)}
@media(max-width:480px){.modal-body .dt-list li{grid-template-columns:1fr}.modal-body .dt-pair{grid-template-columns:1fr}}

/* Keep long Django forms inside the handoff modal, with actions always reachable. */
.modal>form{display:flex;flex-direction:column;min-height:0;flex:1;overflow:hidden}
.modal>form>.modal-body{min-height:0;overflow-y:auto;flex:1}
.modal-head,.modal-foot{flex-shrink:0}
.dt-form-stack>.field+.field{margin-top:0}
.dt-item-form,.dt-checklist-form{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.dt-item-form>.field{grid-column:1/-1}
.dt-item-form>.field[data-field=ref],.dt-item-form>.field[data-field=kind],.dt-item-form>.field[data-field=area],.dt-item-form>.field[data-field=status]{grid-column:auto}
.dt-checklist-form>.field[data-field=project],.dt-checklist-form>.dt-kind,.dt-checklist-form>.notice{grid-column:1/-1}
@media(max-width:480px){.dt-item-form,.dt-checklist-form{grid-template-columns:1fr}.modal-host{padding:12px}.modal{max-height:calc(100dvh - 24px)}.modal-head .iconbtn,.modal-foot .btn,.lnav .ln-item,.lnav .ln-toggle{min-height:44px}.dt-form-stack .field:has(input[type=checkbox]) label:not(.lbl){min-height:44px;display:inline-flex;align-items:center}}

.dt-pair{grid-template-columns:repeat(2,minmax(0,1fr))}.dt-pair>div{min-width:0;overflow-wrap:anywhere}.dt-itemcell .dt-en,.dt-itemcell .dt-ar{white-space:normal;overflow-wrap:anywhere}

@media(max-width:900px){.dt-pair{grid-template-columns:1fr}}

.dt-legacy .heading h1{font-size:18px;margin:0}.dt-legacy .heading{padding-bottom:20px;border-bottom:1px solid var(--border-subtle)}.dt-legacy .heading p{font-size:13px;margin:8px 0 0}.dt-legacy form>button{justify-self:start}

/* Keep the sign-in identity and action centered within the card. */
.auth-card{width:min(420px,100%)}
.auth-card>.dt-wordmark{justify-content:center}
.auth-card>h1,.auth-card>.auth-sub,.auth-card>.auth-foot{text-align:center}
.auth-card>.dt-form-stack>.btn{justify-self:stretch;justify-content:center;width:100%;min-height:44px}

/* Small register and form refinements, scoped to the Django views. */
.dt-setup-grid{margin-top:20px;align-items:start;grid-template-columns:repeat(2,minmax(0,1fr))}
.dt-member-progress{margin-bottom:16px}
.dt-filterbar{align-items:flex-end}
.dt-filter-label{display:flex;flex-direction:column;gap:5px;min-width:0;color:var(--text-muted);font-size:11px}
.dt-filterbar .dt-fsel,.dt-filterbar>.btn{height:32px}
.dt-filterbar .dt-fsel{max-width:100%}
.dt-wrap.scroll-x .dt-issue-table tbody td:first-child,.dt-issue-table thead th:first-child{min-width:44px;width:44px;text-align:center}
.dt-row-actions{display:flex;align-items:center;gap:6px}
.dt-action-menu>summary,.dt-audit-details>summary{list-style:none;justify-content:center}
.dt-action-menu>summary::-webkit-details-marker,.dt-audit-details>summary::-webkit-details-marker{display:none}
.dt tbody tr:has(.dt-action-menu[open]) td{vertical-align:top}
.dt-action-menu[open] .dt-popover{position:static;width:240px;min-width:0;max-width:none;margin-top:8px;box-shadow:none;white-space:normal}
.dt-audit-details[open] .dt-code{margin-top:8px;white-space:normal;max-width:360px}
@media(max-width:768px){.dt-setup-grid{grid-template-columns:1fr}.dt-kpis>.kpi:last-child:nth-child(odd){grid-column:1/-1}}
@media(max-width:480px){.dt-filterbar .dt-filter-label{flex:1 1 120px}.dt-filterbar .dt-fsel{width:100%;height:44px}.toolbar .btn,.toolbar .search,.toolbar .search input,.toolbar>.dt-fsel,.phead .btn,.dt-wrap .btn,.dt-wrap .menu-item{min-height:44px}.dt-filterbar>.btn{height:44px}.dt-foot{flex-wrap:wrap}}

/* Reclaim the navigation grid column when the icon rail is collapsed. */
body[data-shell="l1"] .body:has(>.lnav.is-collapsed){grid-template-columns:48px minmax(0,1fr)}
