/* AMI BUILDTECH v2.9.178 — scoped Project register & Settings UI */
#content:has(.ami2912-project-reg-head){min-width:0;max-width:100%;overflow-x:clip}
.ami2912-project-reg-head{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.ami2912-project-reg-head h2{font-size:clamp(20px,2vw,25px);line-height:1.2;margin:3px 0}
.ami2912-project-reg-head .project-reg-head-actions{display:flex;align-items:center;flex-wrap:wrap;gap:7px;max-width:100%}
.ami2912-project-reg-head .project-reg-head-actions .btn{min-height:36px;padding:7px 11px;font-size:12px}
.project-reg-card{width:100%;max-width:100%;min-width:0;box-sizing:border-box;container-name:amiProjectRegister;container-type:inline-size;overflow:visible}
.project-reg-card .project-reg-toolbar{min-width:0;gap:10px;align-items:center}
.project-reg-card #project-reg-search{width:min(370px,100%);max-width:100%!important;min-width:0}
.project-reg-card #project-reg-table{min-width:0;width:100%;max-width:100%}
.ami178-table-caption{display:flex;align-items:center;flex-wrap:wrap;gap:4px;color:var(--muted,#60748a);font-size:11px;margin:0 0 9px;line-height:1.5}
.ami2912-project-reg-table{width:100%;max-width:100%;min-width:0;overflow-x:auto;overflow-y:visible;border:1px solid var(--line,#dce5ee);border-radius:10px;scrollbar-width:thin;overscroll-behavior-x:contain}
.ami2912-project-reg-table .table{width:100%;min-width:0;table-layout:fixed;border-collapse:separate;border-spacing:0}
.ami2912-project-reg-table .table th,.ami2912-project-reg-table .table td{white-space:normal!important;overflow-wrap:anywhere;word-break:normal;line-height:1.35;vertical-align:middle;font-size:12px;padding:10px 8px;text-align:left;box-sizing:border-box}
.ami2912-project-reg-table .table th{background:#eef4fc;color:#1d4168;border-bottom:1px solid #cbdcec;font-weight:800;z-index:2}
.ami2912-project-reg-table .table td{background:var(--card,#fff);color:var(--text,#18324d);border-bottom:1px solid var(--line,#e2eaf4)}
.ami2912-project-reg-table .table tbody tr:nth-child(even) td{background:var(--surface-2,#f8fbff)}
.ami2912-project-reg-table .table tbody tr:last-child td{border-bottom:0}
.ami2912-project-reg-table .proj-col-project_no{width:100px;font-variant-numeric:tabular-nums}
.ami2912-project-reg-table .proj-col-project_name{width:20%;font-weight:750}
.ami2912-project-reg-table .proj-col-client{width:17%}
.ami2912-project-reg-table .proj-col-status{width:94px}
.ami2912-project-reg-table .proj-col-progress{width:94px}
.ami2912-project-reg-table .proj-col-action{width:164px}
.ami2912-project-reg-table .proj-col-road,.ami2912-project-reg-table .proj-col-roads{min-width:135px}
.ami2912-project-reg-table .project-row-actions{display:flex;align-items:center;justify-content:flex-start;gap:4px;flex-wrap:wrap;position:static!important;min-width:0;width:100%}
.ami2912-project-reg-table .project-row-actions .btn{font-size:11px;min-height:28px;min-width:0;padding:5px 7px;line-height:1.15;margin:0;white-space:nowrap}
.ami2912-project-reg-table .project-progress{height:5px;min-width:0}
.ami2912-project-reg-table .proj-col-progress small{display:block;margin-top:4px;font-size:11px}
.ami178-project-cards{display:none;gap:10px}
.ami178-project-card{background:var(--card,#fff);border:1px solid var(--line,#dce6f1);border-radius:13px;padding:13px;min-width:0;box-shadow:0 2px 9px #102b4808}
.ami178-card-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}
.ami178-number{color:var(--primary,#2563eb);font-size:11px;font-weight:850;font-variant-numeric:tabular-nums}
.ami178-project-card h3{font-size:15px;line-height:1.35;margin:8px 0 11px;overflow-wrap:anywhere;color:var(--text,#142f51)}
.ami178-project-card dl{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;margin:0 0 12px}
.ami178-project-card dl>div{min-width:0;overflow-wrap:anywhere}
.ami178-project-card dt{font-size:10px;color:var(--muted,#62758b);margin-bottom:3px}
.ami178-project-card dd{font-size:12px;font-weight:700;margin:0;color:var(--text,#1a3859)}
.ami178-progress{height:6px;border-radius:99px;background:#e5eef9;overflow:hidden;margin-bottom:12px}
.ami178-progress span{display:block;height:100%;background:var(--primary,#2563eb);border-radius:inherit}
.ami178-card-actions{display:flex;flex-wrap:wrap;gap:7px}
.ami178-card-actions .btn{flex:1 1 75px;min-width:0;min-height:36px;font-size:12px;padding:6px 8px}
.ami178-mobile-empty{text-align:center;color:var(--muted,#64748b);padding:20px}
/* Module topbar: Settings is the last, right-aligned Admin action, never hidden outside screen. */
.ami72-module-topbar [data-ami72-page="project-master"]{margin-left:auto;background:#eaf2ff!important;color:#174e93!important;border:1px solid #bcd5ff!important;font-weight:800}
.ami72-module-topbar [data-ami72-page="project-master"].active{background:#1f5cad!important;border-color:#1f5cad!important;color:#fff!important}
/* Project settings workspace: summaries, shortcuts, legible controls and audit. */
.pm176-shell{min-width:0;max-width:1450px}
.pm178-overview{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.pm178-overview>div{display:flex;flex-direction:column;gap:8px;min-width:0;background:var(--card,#fff);border:1px solid var(--line,#d9e5f2);padding:14px;border-radius:12px;box-shadow:0 2px 10px #12345606}
.pm178-overview small{font-size:10px;font-weight:850;letter-spacing:.045em;color:var(--muted,#69809a)}
.pm178-overview strong{font-size:clamp(14px,1.45vw,20px);line-height:1.2;color:var(--text,#153657);overflow-wrap:anywhere}
.pm178-links{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-bottom:13px}
.pm178-links .btn{min-height:36px;padding:7px 12px;font-size:12px;border-color:#cbdcf1}
.pm178-links #pm178-open-project{background:#e9f7f0;color:#08784b;border-color:#bfe6d1}
.pm178-links #pm178-open-audit{margin-left:auto}
.pm176-tabs{min-width:0;gap:6px}
.pm176-tabs .btn{font-size:12px;min-height:36px;padding:8px 10px}
.pm176-panel{min-width:0;overflow-wrap:anywhere}
.pm176-panel .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.pm176-panel .table{min-width:480px}
.pm176-panel .table th,.pm176-panel .table td{white-space:normal;vertical-align:middle;overflow-wrap:anywhere;min-width:0;font-size:12px}
.pm176-panel .table td:last-child .btn{margin:2px 4px 2px 0}
.pm178-reset{background:#f7f9fd!important;color:#2e5079!important;border-color:#cbd9e9!important}
.pm178-audit-results{min-width:0;overflow-wrap:anywhere}
.pm178-audit-results .table{min-width:680px}
html[data-theme="dark"] .ami2912-project-reg-table .table th{background:#1e3756;color:#e6f2ff;border-color:#405c7d}
html[data-theme="dark"] .ami2912-project-reg-table .table tbody tr:nth-child(even) td{background:var(--surface-2,#203047)}
html[data-theme="dark"] .ami72-module-topbar [data-ami72-page="project-master"]{background:#203954!important;color:#cde4ff!important;border-color:#436792!important}
html[data-theme="dark"] .ami72-module-topbar [data-ami72-page="project-master"].active{background:#2563eb!important;color:#fff!important}
@container amiProjectRegister (max-width:900px){
 .ami2912-project-reg-table{display:none}
 .ami178-project-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,270px),1fr))}
 .ami178-table-caption span{display:none}
}
@media (max-width:1020px){
 .pm178-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pm176-hero{padding:17px}
 .ami72-module-topbar [data-ami72-page="project-master"]{margin-left:0}
}
@media (max-width:760px){
 .ami2912-project-reg-head .project-reg-head-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .ami2912-project-reg-head .project-reg-head-actions .btn{min-width:0;white-space:normal;padding:8px 5px}
 .project-reg-card{padding:12px}
 .project-reg-card .project-reg-toolbar{flex-wrap:wrap}
 .project-reg-card .project-reg-toolbar .spacer{display:none}
 .project-reg-card #project-reg-search{flex:1 0 100%;width:100%;max-width:100%!important}
 .ami2912-project-reg-table{display:none}
 .ami178-project-cards{display:grid;grid-template-columns:1fr}
 .ami178-table-caption span{display:none}
 .ami72-module-topbar{overflow-x:auto;overscroll-behavior-x:contain}
 .ami72-module-topbar [data-ami72-page="project-master"]{flex:0 0 auto;margin-left:0}
 .pm178-overview{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pm178-overview>div{padding:11px}
 .pm178-overview strong{font-size:15px}
 .pm178-links #pm178-open-audit{margin-left:0}
 .pm176-panel{padding:14px!important}
}
@media (max-width:420px){.ami178-project-card dl{grid-template-columns:1fr 1fr}.pm178-links .btn{flex:1 1 110px}.pm178-overview strong{font-size:13px}.pm176-tabs .btn{font-size:11px}}
@media print{.ami178-project-cards,.pm178-links,.pm176-tabs{display:none!important}.ami2912-project-reg-table{display:block!important;overflow:visible!important}}

/* v2.9.179 — Project bulk selector and compact, keyboard-accessible editor. */
.ami2912-project-reg-table .ami179-select-col{width:44px!important;min-width:44px!important;max-width:44px!important;text-align:center!important;padding:8px 4px!important}
.ami179-select-col input[type=checkbox],.ami179-card-select input[type=checkbox]{width:17px;height:17px;accent-color:#2563eb;cursor:pointer}
.ami179-card-select{display:inline-flex;align-items:center;gap:5px;font-size:11px;color:var(--muted,#536982);white-space:nowrap;margin-right:auto}
.ami178-card-heading:has(.ami179-card-select){flex-wrap:wrap;justify-content:flex-start}
.ami178-card-heading:has(.ami179-card-select)>.badge{margin-left:auto}
#project-bulk-btn{background:#e9f4ff;border:1px solid #a7c9f6;color:#15508f;font-weight:800}
#project-bulk-btn:disabled{opacity:.52;cursor:not-allowed}
.ami179-bulk-form{display:grid;gap:10px;max-height:min(78vh,780px);overflow-y:auto;padding:2px 5px 10px}
.ami179-bulk-form>.muted{font-size:12px;line-height:1.5;margin:2px 0}
.ami179-bulk-row{display:grid;grid-template-columns:minmax(155px,200px) minmax(0,1fr);gap:12px;align-items:center;padding:9px 11px;border:1px solid var(--line,#dfe6f1);border-radius:9px;background:var(--card,#fff);min-width:0}
.ami179-bulk-row>span{display:flex;align-items:center;gap:7px;white-space:normal;font-size:12px;font-weight:750}
.ami179-bulk-row input[type=checkbox]{width:17px;height:17px;flex:0 0 17px;accent-color:#2563eb}
.ami179-bulk-row input:not([type=checkbox]),.ami179-bulk-row select,.ami179-bulk-row textarea{max-width:100%;min-width:0;width:100%;box-sizing:border-box;padding:9px;font-size:13px;min-height:38px;border:1px solid var(--line,#cbd7e5);border-radius:7px;background:var(--card,#fff);color:var(--text,#193453)}
.ami179-bulk-row :disabled{opacity:.5;cursor:not-allowed}
.ami179-bulk-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;position:sticky;bottom:0;background:var(--card,#fff);padding:10px 0;border-top:1px solid var(--line,#dfe6f1)}
.pm179-advanced-toggle{display:flex;align-items:center;gap:9px;margin:14px 0;padding:10px 12px;background:var(--surface-2,#f3f7fe);border:1px solid var(--line,#d8e5f5);border-radius:9px;color:var(--text,#254663);font-size:12px;font-weight:700}
.pm179-advanced-toggle input{width:17px;height:17px;accent-color:#2563eb}
@media(max-width:600px){.ami179-bulk-row{grid-template-columns:1fr;gap:7px}.ami179-bulk-actions>.btn{flex:1 1 110px}.ami178-card-heading .ami178-number{margin-left:0}}
