.pilot-auth{min-height:100vh;display:grid;place-items:center;padding:25px;background:linear-gradient(135deg,#24282c 0%,#495057 100%)}
.pilot-card{width:min(100%,530px);background:white;padding:28px;border-radius:22px;box-shadow:0 18px 80px #0003}.pilot-card h1{margin:25px 0 8px}.pilot-card p{color:#69717b;line-height:1.65}
.pilot-card label,.formgrid label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#454b52;margin:10px 0}.pilot-card label input,.formgrid label input{font-weight:400}
.pilot-alert{padding:13px;border-radius:10px;background:#f5f0e5;border:1px solid #eadbc0;color:#604922;margin:12px 0;font-size:12px;line-height:1.5}
.pilot-error{padding:12px 14px;border-radius:10px;background:#f9eeee;color:#8e3131;margin:12px 0;font-size:13px}
.pilot-success{padding:12px 14px;border-radius:10px;background:#eaf4ec;color:#2f6039;margin:12px 0;font-size:13px}
.pilot-foot{color:#a0a7ad;font-size:11px;margin:12px 0 0}
.pilot-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:8px 0 24px}.pilot-kpi{padding:19px 18px;border-radius:14px;background:white;border:1px solid #e6e8e9;box-shadow:0 2px 12px #2221}.pilot-kpi>span{display:block;color:#707880;font-size:12px}.pilot-kpi strong{font-size:31px;display:block;margin:8px 0 2px}.pilot-kpi small{font-size:10px;color:#8e969e}
.pilot-section{background:white;border:1px solid #e5e8eb;border-radius:15px;padding:19px;margin-bottom:18px}.pilot-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:13px}.pilot-title h2{font-size:17px;margin:0}.pilot-list{display:grid;gap:8px}.pilot-item{width:100%;border:1px solid #eceeef;border-radius:12px;background:white;padding:13px 15px;display:flex;align-items:center;justify-content:space-between;text-align:left;gap:10px;cursor:pointer}.pilot-item:hover{background:#f6f7f8}.pilot-item strong{display:block;font-size:13px}.pilot-item small{display:block;color:#899098;margin-top:5px;font-size:11px}.pilot-row{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.pilot-row.end{justify-content:flex-end}.pilot-actions{display:flex;gap:7px;flex-wrap:wrap}.pilot-badge{border:1px solid #dfe3e6;border-radius:99px;padding:5px 8px;font-size:10px;font-weight:700;background:#f2f4f5}.pilot-badge.good{background:#e7f1e8;color:#365d3d}.pilot-tabrow{display:flex;gap:6px;overflow:auto;align-items:center;margin:12px 0 21px;border-bottom:1px solid #e3e5e7}.pilot-tab{background:transparent;border:0;border-bottom:2px solid transparent;padding:12px 14px;font-size:12px;font-weight:700;color:#7b838b;white-space:nowrap}.pilot-tab.active{border-bottom-color:#2a3036;color:#242a30}.pilot-pre{white-space:pre-wrap;background:#f5f6f7;padding:14px;border-radius:9px;font-size:12px;line-height:1.6;overflow:auto;max-height:45vh}.pilot-select{max-width:230px}.pilot-fieldset{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.pilot-fieldset .full{grid-column:1/-1}.pilot-fieldset label{display:block;color:#596169;font-size:12px;font-weight:700}.pilot-fieldset input,.pilot-fieldset select,.pilot-fieldset textarea{margin-top:6px}.pilot-inline{display:flex;gap:10px;flex-wrap:wrap;align-items:center}.pilot-inline>input{max-width:340px}.pilot-link{background:none;border:0;padding:0;text-decoration:underline;color:#414a53;cursor:pointer;font-size:12px}.pilot-overlay{position:fixed;z-index:50;inset:0;background:#0b1018aa;display:grid;place-items:center;padding:15px}.pilot-modal{border-radius:18px;background:white;max-height:90vh;overflow:auto;padding:22px;max-width:680px;width:100%}.pilot-modal h2{margin-bottom:16px}.pilot-modal footer{display:flex;gap:9px;justify-content:flex-end;margin-top:15px}
.pilot-empty{padding:20px 10px;color:#7c858d;font-size:13px;line-height:1.7}.pilot-muted{color:#747d86;font-size:12px;line-height:1.6}.pilot-drop{border:2px dashed #bcc3ca;border-radius:13px;padding:25px;text-align:center;background:#fafbfc;margin-bottom:12px}.pilot-drop.drag{background:#e9edf0;border-color:#5f6973}
#toast{position:fixed;bottom:24px;right:20px;z-index:100;max-width:min(440px,95vw)}#toast>.msg{background:#24282d;color:white;padding:12px 17px;border-radius:12px;box-shadow:0 5px 25px #0003;font-size:13px}
@media(max-width:1024px){.pilot-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.pilot-grid{grid-template-columns:repeat(2,1fr)}.pilot-fieldset{grid-template-columns:1fr}.pilot-card{padding:20px}.pilot-modal{padding:16px}.pilot-kpi{padding:15px}.pilot-item{align-items:flex-start}}

/* Shared subcontractor importer */
.starter-list{max-height:44vh;overflow-y:auto;margin:14px 0;border:1px solid #e5e8eb;border-radius:12px}
.starter-row{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid #edf0f2;cursor:pointer}
.starter-row:last-child{border-bottom:0}.starter-row:hover{background:#f7f8f9}
.starter-row input{width:18px;height:18px;flex-shrink:0;accent-color:#2e343a}
.starter-row strong{display:block;font-size:13px}.starter-row small{display:block;color:#6c757e;font-size:11px;margin-top:4px;line-height:1.45}
@media(max-width:700px){.starter-list{max-height:49vh}.starter-row{padding:10px}.pilot-modal .pilot-inline{gap:5px}}
/* Document intelligence: calm, readable states */
.reader-file{cursor:default;align-items:center}
.reader-file>span:first-child{min-width:0;overflow-wrap:anywhere}
.reader-file .pilot-actions{flex-shrink:0}
.reader-status{display:inline-flex;margin-top:2px;margin-right:6px;padding:2px 8px;border-radius:99px;border:1px solid #dbe0e4;font-size:10px;font-weight:700;color:#626b73;background:#f6f7f8}
.reader-status.indexed{background:#e6f2e9;color:#215c35;border-color:#c4e2cc}
.reader-status.needs_review,.reader-status.unsupported{background:#f1f2f4;color:#69727b}
.reader-status.failed{background:#fff1ed;color:#943d2e;border-color:#f2cabb}
.reader-warning{padding:14px;background:#fff4e8;border:1px solid #f0cfaa;border-radius:10px;margin-bottom:12px;font-size:13px}
.reader-progress{color:#3c4650;font-size:12px;font-weight:600;min-height:23px;margin:10px 0}
.reader-search{display:flex;align-items:center;gap:9px;margin:16px 0}.reader-search input{flex:1;min-width:0}
.reader-hit{border:1px solid #e3e6e8;border-radius:12px;padding:16px;margin:12px 0;background:#fbfcfd}
.reader-hit>b{display:inline-block;margin-right:8px;font-size:13px}
.reader-hit pre{font-family:inherit;white-space:pre-wrap;word-wrap:break-word;font-size:12px;line-height:1.6;color:#3d4854;max-height:360px;overflow:auto;border-left:3px solid #a7afb7;padding-left:12px;margin:12px 0}
.reader-hit .button{margin-top:4px}
@media(max-width:700px){.reader-search{flex-direction:column;align-items:stretch}.reader-file{align-items:flex-start;flex-direction:column}.reader-file .pilot-actions{width:100%}.reader-file .pilot-actions .button{flex:1}}
/* Document Reader Upgrade — project file index and source search */
.reader-file { align-items:center; gap:12px; }
.reader-file > span { min-width:0; flex:1; }
.reader-file strong { overflow-wrap:anywhere; }
.reader-file .pilot-actions { display:flex; gap:6px; flex:0 0 auto; flex-wrap:wrap; }
.reader-status { display:inline-block; border:1px solid #cdd2d5; color:#3d444a; background:#f5f6f7; padding:3px 8px; border-radius:40px; font-size:11px; font-weight:700; margin-right:5px; }
.reader-status.indexed { background:#e9f5ee; color:#176543; border-color:#b9dac5; }
.reader-status.needs_review,.reader-status.failed { background:#fff2e2; color:#7b4b08; border-color:#e6cfaa; }
.reader-progress { color:#374151; font-size:13px; min-height:1.5em; margin:8px 0 14px; }
.reader-search { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:12px 0 18px; }
.reader-search input { flex:1 1 240px; min-width:0; width:auto; }
.reader-warning { padding:12px 14px; border:1px solid #ddb97d; border-radius:10px; background:#fff5e7; color:#6d480c; line-height:1.5; }
.reader-hit { background:#fbfbfc; padding:15px; border:1px solid #e2e5e7; border-radius:12px; margin:12px 0; min-width:0; }
.reader-hit>b { display:inline-block; overflow-wrap:anywhere; margin-right:7px; }
.reader-hit pre { font:12px/1.55 ui-monospace,Consolas,Monaco,monospace; white-space:pre-wrap; overflow-wrap:anywhere; max-width:100%; max-height:360px; overflow:auto; margin:10px 0; }
@media (max-width:620px) { .reader-file {align-items:flex-start; flex-direction:column; } .reader-search .button {width:100%;} .reader-hit {padding:10px;} }
/* Auto File Upgrade — organized trade folders and explicit price review */
.file-folders{display:grid;gap:12px;margin-top:15px}
.file-folder{border:1px solid #dfe3e6;border-radius:13px;background:#fff;overflow:hidden}
.file-folder>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;padding:17px 18px;background:#f5f6f7;color:#252a2e}
.file-folder>summary::-webkit-details-marker{display:none}
.file-folder>summary::after{content:'▾';font-size:13px;color:#6b737b}
.file-folder[open]>summary{border-bottom:1px solid #e5e9ec}
.file-folder .pilot-list{padding:10px}
.file-folder .reader-file{margin-bottom:2px}
.file-move{display:grid;gap:4px;color:#596169;font-size:10px;font-weight:700;min-width:140px}
.file-move select{max-width:200px;font-size:11px;padding:7px;border:1px solid #d8dcdf;border-radius:8px;background:white;color:#30363b}
.file-excerpt{font-size:11px;color:#68727a;margin-top:6px}
.file-excerpt>summary{cursor:pointer;text-decoration:underline}
.file-excerpt pre{white-space:pre-wrap;font:11px/1.4 inherit;max-height:180px;overflow:auto;background:#f7f8f9;border-radius:8px;padding:8px;color:#40464b}
.subheader{font-size:13px;color:#30363d;margin:22px 0 10px}
@media(max-width:720px){.file-folder>summary{padding:14px 13px}.file-folder .pilot-list{padding:5px}.file-move{width:100%}.file-move select{max-width:none}.pilot-title{align-items:flex-start;flex-wrap:wrap}.pilot-title>.pilot-actions{width:100%}.pilot-title>.pilot-actions .button{flex:1 1 160px}}
