:root{font-family:-apple-system,BlinkMacSystemFont,"Pretendard","Apple SD Gothic Neo","Noto Sans KR",sans-serif;font-size:14px;color:#e8e9e9;background:#111315;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}
.hidden{display:none!important}.shell{min-height:100vh;display:flex}.sidebar{width:232px;flex-shrink:0;min-height:100vh;background:#161819;border-right:1px solid #2b2e30;display:flex;flex-direction:column;padding:30px 17px}.side-heading{display:flex;gap:12px;align-items:center;margin-bottom:62px}.side-heading b{display:block;font-size:15px;letter-spacing:.1px}.side-heading small{display:block;color:#81878a;font-size:9px;letter-spacing:1.5px;margin-top:6px}.brand-mark{width:56px;height:56px;display:grid;place-items:center;border:1px solid #6f7b75;font-size:21px;font-weight:700;letter-spacing:-4px;padding-right:4px;color:#e0e7e0}.brand-mark span{color:#a0b4a5}.brand-mark.small{width:39px;height:39px;font-size:15px;letter-spacing:-3px}.nav-caption,.eyebrow{font-size:10px;letter-spacing:2px;color:#8c9991;font-weight:600}.nav-caption{padding:0 13px;margin-bottom:14px}.sidebar nav{display:grid;gap:5px}.nav-item{width:100%;display:flex;align-items:center;gap:17px;padding:13px 15px;background:none;color:#969e9b;border:0;border-radius:6px;text-align:left}.nav-item span{font-size:17px;width:19px}.nav-item:hover,.nav-item.active{background:#2a2f2d;color:#f4f7f5}.side-bottom{margin-top:auto;padding:19px 12px 0;border-top:1px solid #2b2e30;color:#a6b6aa;font-size:11px}.side-bottom small{display:block;color:#777f7d;margin:9px 0 0 13px}.status-dot{display:inline-block;background:#91bb95;width:6px;height:6px;border-radius:50%;margin-right:5px}.main{min-width:0;flex:1}.topbar{height:76px;border-bottom:1px solid #2b2e30;display:flex;align-items:center;justify-content:space-between;padding:0 6%;gap:12px}.breadcrumb{font-size:11px;letter-spacing:1.4px;color:#808985}.breadcrumb span{color:#4a524e;margin:0 12px}.breadcrumb b{color:#c7d2c9;font-weight:500}.account{display:flex;align-items:center;gap:16px;color:#b3b8b5;font-size:12px}.content{padding:51px 6% 80px;max-width:1480px;margin:auto}.view{min-width:0}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:42px}.page-heading h1{font-size:clamp(26px,3vw,34px);font-weight:600;letter-spacing:-1.1px;margin:12px 0 12px}.page-heading p{font-size:14px;color:#999f9d;margin:0;line-height:1.6}.primary,.secondary,.quiet{border-radius:5px;padding:11px 15px}.primary{background:#9eb5a4;color:#15201a;border:1px solid #a6b8aa;font-weight:650}.primary:hover{background:#bbcebf}.secondary{background:#232727;color:#e5eae6;border:1px solid #464b49}.quiet{color:#a3ada6;background:transparent;border:0;padding:7px}.quiet:hover{color:#fff}.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-bottom:48px}.stat{background:#1b1e1e;border:1px solid #313735;border-radius:7px;padding:28px}.stat small{display:block;color:#93a39b;letter-spacing:1.8px;font-size:10px}.stat strong{display:block;font-size:43px;font-weight:500;letter-spacing:-1px;margin:14px 0}.stat strong.stat-text{font-size:36px}.stat span{color:#88938b;font-size:12px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}.section-heading h2{font-size:18px;font-weight:600}.cards{display:grid;gap:10px;align-content:start}.item-card{border:1px solid #303634;background:#1b1e1e;padding:20px 22px;border-radius:6px;text-align:left;width:100%;color:inherit;transition:border-color .12s}.item-card:hover,.item-card.active{border-color:#92ad9b;background:#202623}.item-card h3{margin:8px 0 10px;font-size:15px;font-weight:600;line-height:1.5;word-break:break-word}.item-card p{color:#929d97;margin:0 0 12px;font-size:12px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.meta{display:flex;flex-wrap:wrap;gap:10px;font-size:11px;color:#89948e}.pill{color:#b4c7b9;background:#303b33;padding:3px 8px;border-radius:3px;font-size:10px}.scope-note{margin-top:45px;border-top:1px solid #313735;padding-top:25px;color:#a6b2a9;font-size:13px}.scope-note p{font-size:12px;line-height:1.8;color:#7c8880}.toolbar{display:flex;gap:10px;margin-bottom:22px}.toolbar input{flex:1}.toolbar select{max-width:170px}.split{display:grid;grid-template-columns:minmax(260px,.9fr) minmax(310px,1.1fr);gap:20px;align-items:start}.detail-panel{border:1px solid #333a35;background:#1c1f1e;border-radius:7px;min-height:350px;padding:28px;overflow-wrap:anywhere}.detail-panel h2{font-size:23px;line-height:1.4;margin:12px 0}.detail-panel .body{white-space:pre-wrap;line-height:1.8;color:#d4ddd5}.detail-panel .subheading{font-size:13px;color:#b1c5b5;margin:26px 0 12px;padding-top:22px;border-top:1px solid #333a35}.detail-panel .memo{padding:11px 0;border-bottom:1px solid #303733;line-height:1.6;font-size:13px;white-space:pre-wrap}.detail-panel .small-time{color:#7f9085;font-size:10px;margin:8px 0}.detail-panel .action-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:20px}.detail-panel select{max-width:100%}.empty{color:#8c978f;text-align:center;padding:85px 10px;line-height:1.7}.tag{font-size:11px;background:#292f2b;color:#adbdaf;padding:4px 8px;border-radius:3px;display:inline-block;margin:3px 5px 3px 0}.tiny-msg{color:#89978d;font-size:12px}.login-screen{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 54% 0%,#27332b 0%,#111315 58%)}.login-panel{width:min(100%,410px);padding:42px;border:1px solid #384239;background:#1a1e1b;border-radius:10px}.login-panel .brand-mark{margin-bottom:28px}.login-panel h1{font-size:27px;font-weight:600;margin:15px 0}.login-panel p{color:#93a097;line-height:1.7;margin-bottom:30px}.login-panel label,.form-panel label{display:block;color:#c8d2c9;font-size:12px;margin:17px 0 9px}.login-panel .full{width:100%;margin-top:25px}.hint{font-size:11px;color:#78867a;margin-top:18px;text-align:center}input,select,textarea{background:#131615;border:1px solid #424941;color:#e5e8e5;border-radius:5px;padding:12px;width:100%;outline:none}input:focus,textarea:focus,select:focus{border-color:#a4bba6;box-shadow:0 0 0 2px #9eb5a418}input::placeholder,textarea::placeholder{color:#707c72}textarea{resize:vertical;line-height:1.7}select{appearance:auto}dialog{max-width:min(92vw,580px);width:100%;padding:0;color:inherit;background:#1e2320;border:1px solid #526255;border-radius:9px;box-shadow:0 20px 80px #0009}dialog::backdrop{background:#060807b8}.form-panel{padding:29px}.dialog-title{display:flex;justify-content:space-between;align-items:start;padding-bottom:12px}.dialog-title h2{margin:10px 0;font-size:22px}.close{border:0;background:transparent;color:#9daaa1;font-size:27px;line-height:1}.form-panel label small{font-weight:400;color:#7e9084;margin-left:7px}.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:28px}.detail-panel .two-controls{display:flex;gap:8px;align-items:center}.detail-panel .two-controls input{min-width:0}#notice{position:fixed;bottom:26px;right:25px;max-width:min(380px,90vw);color:#eaf1eb;background:#3c5342;border:1px solid #6e8873;padding:14px 18px;border-radius:6px;z-index:20;display:none;box-shadow:0 5px 18px #0004;font-size:13px}#notice.error{background:#6d3030;border-color:#a45b55}
@media(max-width:960px){.sidebar{width:182px;padding:20px 10px}.side-heading{gap:7px}.content{padding:38px 5% 65px}.topbar{padding:0 5%}.split{grid-template-columns:1fr}.detail-panel{min-height:230px}.stat{padding:20px}.stat strong{font-size:34px}}
@media(max-width:640px){.shell{display:block}.sidebar{width:100%;min-height:0;padding:14px 15px 10px}.side-heading{margin-bottom:11px}.side-heading small,.nav-caption,.side-bottom{display:none}.sidebar nav{display:flex;gap:5px}.nav-item{justify-content:center;gap:8px;padding:10px 6px;font-size:12px}.topbar{height:54px}.account{gap:8px}.content{padding:31px 17px 60px}.page-heading{align-items:start;margin-bottom:26px}.page-heading .primary{padding:9px 10px;font-size:12px;white-space:nowrap}.page-heading h1{font-size:25px}.page-heading p{font-size:12px}.stat-grid{gap:8px}.stat{padding:13px}.stat strong{font-size:28px}.stat span{font-size:10px}.split{gap:13px}.detail-panel{padding:21px}.toolbar{gap:7px}.toolbar select{max-width:118px}.form-panel{padding:23px}.two{grid-template-columns:1fr}}
/* M2-1 document workspace */
.document-split{grid-template-columns:minmax(230px,.65fr) minmax(430px,1.35fr)}
.document-editor{padding:26px 34px}
.document-editor label{display:block;margin:18px 0 7px;color:#bdcdbf;font-size:12px}
.document-editor input,.document-editor select,.document-editor textarea{font-size:13px}
.document-editor textarea{min-height:68px}
.document-top,.document-footer{display:flex;justify-content:space-between;align-items:center;gap:14px;flex-wrap:wrap}
.document-top .action-row,.document-footer .action-row{margin:0}
.document-footer{border-top:1px solid #3b443c;margin-top:27px;padding-top:20px}
.document-history{margin-top:28px}
.history-row{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px 0;border-bottom:1px solid #323b35;color:#b6c2b7;font-size:12px}
.document-preview{padding:30px 40px;background:#f8f8f6;color:#1d2721;border-radius:4px}
.document-preview .preview-kicker{color:#5d6a62;font-size:11px;letter-spacing:2px}
.document-preview h1{font-size:26px;margin:20px 0 32px}
.document-preview h2{font-size:15px;margin:25px 0 9px;padding:0 0 10px;border-bottom:1px solid #c8cec9}
.document-preview p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.9}
.revision-section{padding:12px 0;border-bottom:1px solid #353c37}
.revision-section h3{font-size:13px;color:#b3c7b8}
.revision-section p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.8}
@media(max-width:1050px){.document-split{grid-template-columns:1fr}.document-editor{padding:24px}}
@media(max-width:640px){.document-editor{padding:18px}.document-preview{padding:16px}.document-footer .action-row{flex-wrap:wrap}}
@media print{
 body.printing-document *{visibility:hidden!important}
 body.printing-document #documentPreview,body.printing-document #documentPreview *{visibility:visible!important}
 body.printing-document #documentPreview{display:block!important;position:absolute;top:0;left:0;width:100%;padding:0;margin:0;background:white;color:black}
 body.printing-document #documentPreview section{break-inside:avoid}
 body.printing-document #documentPreview .preview-controls,body.printing-document #documentPreview .preview-controls *{display:none!important}
 @page{size:A4 portrait;margin:16mm}
}
/* M2-2: tabular production templates */
.document-table-heading{display:flex;align-items:center;justify-content:space-between;margin:28px 0 13px;gap:12px}
.document-table-heading h3{font-size:14px;font-weight:600;margin:0;color:#bdcdbf}
.document-table-wrap{width:100%;overflow-x:auto;border:1px solid #465148;border-radius:5px}
.document-table{width:100%;min-width:900px;border-collapse:collapse;table-layout:fixed}
.document-table th{background:#292e2b;padding:10px 7px;text-align:left;color:#bfcabf;font-size:11px;border-bottom:1px solid #4f5a50}
.document-table th:last-child{width:92px}
.document-table td{border-bottom:1px solid #303a33;border-right:1px solid #303a33;padding:4px;vertical-align:top}
.document-table td textarea{width:100%;min-height:70px;border:none;background:#202622;resize:vertical;padding:8px;line-height:1.5;font-size:12px}
.document-row-actions{white-space:normal;text-align:center}
.document-row-actions .quiet{padding:5px 7px;font-size:11px}
.document-preview-overflow{overflow-x:auto}
.document-preview-table{border-collapse:collapse;width:100%;font-size:11px;table-layout:fixed}
.document-preview-table th,.document-preview-table td{border:1px solid #b4c0b6;padding:8px;vertical-align:top;white-space:pre-wrap;overflow-wrap:anywhere}
.document-preview-table th{background:#e9efea}
@media print{
 body.printing-document #documentPreview{font-size:9px}
 body.printing-document .document-preview-overflow{overflow:visible}
 body.printing-document .document-preview-table{font-size:8px}
 body.printing-document .document-preview-table thead{display:table-header-group}
 body.printing-document .document-preview-table tr{break-inside:avoid}
}
/* M2-3: attach private references to scenes without changing the six working columns */
.reference-manager{margin:18px 0 20px;border:1px solid #455449;padding:14px;border-radius:5px;background:#232923}
.reference-manager>summary,.document-output-options>summary{cursor:pointer;font-size:13px;font-weight:650;color:#c9d7cb}
.reference-manager .tiny-msg{margin:10px 0;color:#97ab9b}
.reference-form{display:grid;grid-template-columns:1.2fr .7fr 1.5fr;gap:7px;margin:12px 0}
.reference-form input,.reference-form select{width:100%;min-width:0;font-size:12px}
.reference-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px;max-height:160px;overflow:auto}
.reference-card{display:flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid #3d4b41;border-radius:4px;max-width:280px}
.reference-card strong,.reference-card small{display:block;word-break:break-word}
.reference-card small{font-size:10px;color:#a4b6a5}
.reference-card a{font-size:11px;color:#aad7af}
.reference-pills{display:flex;flex-wrap:wrap;gap:4px;max-width:150px}
.ref-pill{display:flex;align-items:center;gap:4px;font-size:10px;max-width:150px;border:1px solid #3f5646;padding:2px;border-radius:3px;overflow-wrap:anywhere}
.ref-thumb{width:42px;height:42px;object-fit:cover;border-radius:3px}
.document-row-references{width:155px;min-width:155px}
.document-row-references select{max-width:145px;margin:5px 0;font-size:11px}
.document-data-row td textarea{min-height:80px}
.document-output-options{padding:10px 0;margin:12px 0;border-bottom:1px solid #465148}
.width-settings{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0}
.width-settings label{display:block;font-size:11px}
.width-settings input{margin-top:3px;width:100%}
.preview-ref-image{width:95px;max-width:100%;height:auto;border-radius:2px;display:block;margin:5px 0}
@media(max-width:720px){.reference-form,.width-settings{grid-template-columns:1fr 1fr}.reference-list{max-height:240px}}
@page pwPortrait { size:A4 portrait; margin:16mm }
@page pwLandscape { size:A4 landscape; margin:12mm }
@media print{
 body.printing-document #documentPreview{page:pwPortrait}
 body.printing-document #documentPreview.page-landscape{page:pwLandscape}
 body.printing-document .preview-ref-image{width:20mm}
 body.printing-document #documentPreview .document-preview-table tr{break-inside:avoid}
}

/* M3-1 private video review */
.review-split{grid-template-columns:minmax(225px,.55fr) minmax(430px,1.45fr)}
.review-create{border:1px solid #38443b;background:#212723;padding:18px;border-radius:6px;display:grid;grid-template-columns:2fr 1fr auto;align-items:end;gap:10px;margin-bottom:20px}
.review-create label{display:block;color:#b3c5b8;font-size:11px;margin-bottom:8px}
.review-create button{height:45px}
.review-player{width:100%;background:#090b0a;aspect-ratio:16/9;max-height:540px;border-radius:4px;margin:16px 0 6px}
.review-detail-info{color:#a9b9aa;font-size:12px;margin:8px 0}
.review-video-picker{margin:10px 0 4px}
.review-upload{border:1px solid #3b473e;border-radius:5px;background:#222824;padding:14px;margin:20px 0;display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.review-upload input{flex:1;min-width:170px;max-width:350px}
.review-comment-form{display:flex;gap:8px;align-items:start;margin:14px 0}
.review-comment-form textarea{flex:1;min-height:76px}
.review-time{background:#29372d;border:1px solid #45564b;color:#c3ddc6;padding:7px 9px;border-radius:4px;white-space:nowrap}
.review-comment{border-top:1px solid #34423a;padding:13px 0}
.review-comment-head{display:flex;align-items:center;gap:10px;justify-content:space-between}
.review-comment p{white-space:pre-wrap;font-size:13px;line-height:1.65;overflow-wrap:anywhere}
.review-comment select{max-width:143px;font-size:11px;padding:7px}
.review-versions{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.review-versions select{max-width:225px}
.review-section-heading{font-size:13px;color:#bdd3c1;border-top:1px solid #3b463e;padding-top:20px;margin-top:23px}
.review-approved{border:1px solid #5c8067;background:#263d2d;padding:10px;border-radius:5px;color:#c5e4cc;font-size:12px}
@media(max-width:1050px){.review-split{grid-template-columns:1fr}}
@media(max-width:650px){.review-create{grid-template-columns:1fr}.review-comment-form{flex-wrap:wrap}}

/* M3-2 guest review link controls, kept separate from guest layout */
.review-share-section{margin:22px 0 10px;padding:14px;border:1px solid #475b4c;border-radius:5px;background:#1b241d}
.review-share-section>summary{cursor:pointer;color:#bfd9c6;font-size:13px;font-weight:650}
.review-share-form{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:12px 0}
.review-share-form>input{min-width:150px;max-width:250px;flex:1}
.review-share-form>select{max-width:105px}
.review-share-form .share-check{font-size:12px;white-space:nowrap;display:flex;align-items:center;gap:4px;color:#c3d3c6}
.review-share-form .share-check input{width:auto}
.share-created{border:1px solid #54785f;padding:12px;margin:8px 0;border-radius:4px}
.share-created input{width:100%;margin-bottom:8px;color:#c6e0cc}
.review-share-list h4,.share-approvals h4{font-size:12px;color:#b6cab8;margin:19px 0 8px}
.share-list-row{display:flex;gap:8px;justify-content:space-between;align-items:center;padding:9px 0;border-top:1px solid #344238;color:#afbfaf;font-size:12px;overflow-wrap:anywhere}
.share-approvals .share-list-row{display:block}
.review-comment-name{font-size:11px;color:#abc6b1;margin-right:auto}
@media(max-width:640px){.review-share-form{align-items:stretch}.review-share-form>input{max-width:100%;width:100%}.share-list-row{flex-wrap:wrap}}

/* M3-3 marker-only XML: standalone timeline metadata and export */
.review-xml-section{margin:18px 0;padding:14px;border:1px solid #526653;border-radius:6px;background:#1d271f}
.review-xml-section summary{font-size:13px;color:#d5e6da;font-weight:650;cursor:pointer}
.review-xml-section .xml-box{margin-top:12px;display:flex;flex-direction:column;gap:8px}
.review-xml-section input[type=file]{width:100%;max-width:580px;color:#cadccf}
.review-xml-section .xml-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.review-xml-section .xml-actions select{width:auto;min-width:145px}
.review-xml-section .xml-meta{font-size:12px;color:#aac6b1;line-height:1.6}
.review-xml-section .xml-caveat{font-size:11px;color:#c9bfa8;line-height:1.6}
/* M4-1 production board: same dark tokens and responsive behavior */
.production-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.production-toolbar label{font-size:12px;color:var(--muted,#aaa)}
.production-toolbar select{min-width:200px;max-width:360px}
.production-board{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;margin-top:18px;align-items:start}
.production-board .detail-panel{min-width:0;min-height:180px}
.production-list{display:grid;gap:12px;margin-top:10px}
.production-row{padding:14px;border:1px solid #373a3c;border-radius:10px;background:#1c1f20;overflow-wrap:anywhere}
.production-row-head{display:flex;align-items:center;gap:10px;justify-content:space-between;margin-bottom:8px}
.production-row-head b{font-size:14px}
.production-note{font-size:13px;white-space:pre-wrap;line-height:1.5;color:#bbb;margin:8px 0}
.production-row .action-row{margin:10px 0 0}
.production-history{border-top:1px solid #424547;padding:10px 0;margin:14px 0}
.production-history h3{font-size:13px;margin:0 0 8px}
.production-history .tiny-msg{padding:4px 0}
.check-inline{display:flex;align-items:center;gap:10px;margin:15px 0}
.check-inline input{width:auto}
@media(max-width:980px){.production-board{grid-template-columns:1fr}}
.production-board .section-heading h2{white-space:nowrap;flex:none}
.production-board .section-heading select{width:auto;min-width:130px;max-width:190px}

/* M4-2 resource catalog and allocations */
.resource-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.resource-toolbar label{font-size:12px;color:var(--muted,#aaa)}
.resource-toolbar select{min-width:220px;max-width:400px}
.resource-filter{margin:16px 0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.resource-filter input[type=search]{flex:1;min-width:180px}
.resource-filter select{min-width:130px}
.resource-inline{font-size:12px;color:#b4c3b7;display:flex;align-items:center;gap:7px;white-space:normal}
.resource-inline input[type=checkbox]{width:auto;min-width:auto;accent-color:#a8c8aa}
.resource-check{padding:12px 0}
.resource-board .detail-panel{min-height:280px}
@media(max-width:720px){.resource-toolbar select,.resource-filter input[type=search]{width:100%;max-width:none}.resource-filter select{min-width:0}}

/* M4-2r1: separate owned inventory, project rentals and allocation history */
.resource-tabs{display:flex;gap:5px;flex-wrap:wrap;margin:18px 0 12px;border-bottom:1px solid #343c39;padding-bottom:9px}
.resource-tabs .resource-tab{background:transparent;color:#b7c2bb;border:1px solid #3d4540;border-radius:7px;padding:9px 13px;font-size:12px}
.resource-tabs .resource-tab.active{background:#2b3c32;color:#e2f2e5;border-color:#78957f}
.resource-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}
.resource-metric{padding:14px 16px;border:1px solid #414a44;border-radius:8px;background:#1d2420;min-height:90px}
.resource-metric small{display:block;color:#afc1b2;font-size:11px}.resource-metric strong{display:block;margin:5px 0;font-size:23px}.resource-metric span{font-size:11px;color:#aab4ae}
.resource-panel{min-height:220px}.resource-panel-heading{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:20px 0 15px}
.resource-panel-heading h2{font-size:17px;margin:0 0 6px}.resource-panel-heading p{font-size:12px;color:#a9b6ac;margin:0}
.resource-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr));gap:12px;align-items:start}
.resource-cards .production-row{min-height:145px}.resource-stock{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0;font-size:12px;color:#c1d8c5}
.resource-stock b{color:#ecf5ec;font-size:15px}.resource-stock .stock-none{color:#f0b5a4}
.resource-legacy{margin-top:24px;padding:15px;border:1px solid #3e4841;border-radius:7px}.resource-legacy summary{cursor:pointer;font-weight:600;color:#b3c5b6}
.resource-legacy p{font-size:12px;color:#aab5ac}.resource-legacy .resource-cards{margin-top:13px}
.resource-toolbar input[type=date]{min-width:150px;width:auto;max-width:180px}
@media(max-width:740px){.resource-metrics{grid-template-columns:1fr 1fr}.resource-panel-heading{align-items:start;flex-direction:column}.resource-toolbar input[type=date]{max-width:none;width:100%}}
@media(max-width:440px){.resource-metrics{grid-template-columns:1fr}.resource-tabs .resource-tab{flex:1 1 42%}}

/* M4-2r2: compact owned inventory and genuinely separate personnel/location catalogs. */
.resource-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.resource-cards .production-row{min-height:0;padding:12px;display:flex;flex-direction:column;gap:6px;overflow-wrap:anywhere}
.resource-cards .production-row-head{gap:6px;align-items:center}
.resource-cards .production-row-head b{font-size:13px}
.resource-cards .resource-stock{gap:6px 10px;margin:4px 0;font-size:11px}
.resource-cards .resource-stock b{font-size:13px}
.resource-cards .production-note{font-size:11px;margin:2px 0}
.resource-cards .action-row{margin-top:auto;gap:5px}
.resource-cards .action-row button{padding:6px 9px;font-size:11px}
.resource-danger{color:#ffb4a9!important;border-color:#a8564e!important}
.resource-toolbar input[type=time]{min-width:100px;width:110px;max-width:125px}
@media(max-width:940px){.resource-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:570px){.resource-cards{grid-template-columns:1fr}.resource-toolbar input[type=time]{width:100%;max-width:none}}

/* M4-2r2 project weekly agenda, with distinct morning/afternoon/evening entries. */
.production-week-toolbar{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin:18px 0 10px}
.production-week-toolbar h2{font-size:15px;margin:0 auto 0 0}
.production-week-toolbar input{width:145px}
.production-week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin:8px 0 20px}
.production-week-day{min-width:0;min-height:116px;padding:9px;border:1px solid #3b4540;border-radius:8px;background:#181d1b}
.production-week-day-title{font-weight:600;font-size:11px;color:#c4d3c7;margin-bottom:9px}
.production-week-empty{font-size:12px;color:#646d68;text-align:center}
.production-week-event{display:flex;flex-direction:column;text-align:left;gap:3px;max-width:100%;width:100%;margin:5px 0;padding:7px 6px;background:#2b3d32;color:#d7e6db;border:1px solid #49624e;border-radius:5px;font-size:11px;word-break:break-word}
.production-week-event:hover{border-color:#a0c0a7}
.production-week-time{font-size:10px;font-weight:700;color:#b9dfbc}
@media(max-width:1050px){.production-week-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:650px){.production-week-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.project-status-control{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:14px 0 18px}.project-status-control select{max-width:190px}

/* M4-3 internal finance, segregated from guest views */
.finance-toolbar{align-items:center}.finance-toolbar label{font-size:12px;color:#9fac9f}.finance-toolbar select{max-width:380px;flex:1}
.finance-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px;margin:20px 0 25px}
.finance-metric{padding:19px 17px;background:#1d231f;border:1px solid #37463a;border-radius:6px}
.finance-metric small{color:#9aac9a;display:block;font-size:11px}.finance-metric strong{display:block;font-size:23px;margin:12px 0 5px;letter-spacing:-.7px;word-break:break-word}
.finance-metric span{font-size:11px;color:#929f93}.finance-panel{margin-top:23px}.finance-list{display:grid;gap:9px}
.finance-record{border:1px solid #344337;background:#1a201c;border-radius:6px;padding:14px 18px;display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.finance-record-main{flex:1;min-width:220px}.finance-record strong{display:block;margin:5px 0 8px;font-size:14px}.finance-record small{color:#a2b2a4}.finance-record .finance-values{font-size:12px;line-height:1.8;color:#cbdacc}.finance-record .finance-actions{display:flex;gap:6px;flex-wrap:wrap}
.finance-record .finance-actions button{padding:8px 10px;font-size:12px}.finance-note{font-size:11px;color:#899b8b;margin:9px 0}
.finance-form{max-width:720px}.finance-quote-form{max-width:850px}.finance-quote-lines-head{display:flex;justify-content:space-between;align-items:center;margin:12px 0}
.finance-quote-lines{display:grid;gap:8px;max-height:320px;overflow-y:auto}.finance-quote-line{display:grid;grid-template-columns:minmax(130px,2fr) 70px 125px 145px 36px;gap:6px;align-items:center}
.finance-quote-line input,.finance-quote-line select{width:100%;min-width:0}.finance-quote-line button{padding:7px}
@media(max-width:1100px){.finance-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.finance-metrics{grid-template-columns:1fr}.finance-quote-line{grid-template-columns:1fr 80px}.finance-quote-line select{grid-column:1/3}.finance-toolbar{flex-wrap:wrap}}

/* M4-4: scene-by-scene field record and edit handoff */
.fieldwork-toolbar{align-items:center;flex-wrap:wrap}.fieldwork-toolbar label{font-size:12px;color:#a3b3a7}.fieldwork-toolbar select{width:min(100%,420px);max-width:420px}
.fieldwork-new{border:1px solid #35473b;background:#1b2320;border-radius:7px;padding:23px;margin:12px 0 22px}
.fieldwork-new h2{margin:0 0 14px;font-size:19px}.fieldwork-new label{display:block;font-size:12px;color:#b9c9bc;margin:12px 0 6px}.fieldwork-new .action-row{display:flex;gap:8px;margin-top:16px}
.fieldwork-split{grid-template-columns:minmax(220px,.65fr) minmax(400px,1.35fr)}
.fieldwork-stats{display:flex;flex-wrap:wrap;gap:7px;margin:18px 0 24px}.fieldwork-stat{font-size:11px;padding:7px 9px;background:#2a352e;border:1px solid #3b5140;border-radius:4px;color:#d3e0d4}
.fieldwork-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.fieldwork-fields .field-control:last-child{grid-column:1/-1}
.field-control{display:flex;flex-direction:column;gap:7px;min-width:0}.field-control>span{font-size:11px;color:#a7baa9}.field-control input,.field-control textarea,.field-control select{width:100%;min-width:0;font-size:12px}
.fieldwork-shot{border:1px solid #37463c;border-radius:7px;background:#1b2420;padding:14px 16px;margin:10px 0}
.fieldwork-shot-head{display:flex;justify-content:space-between;gap:10px}.fieldwork-planned{padding:9px 0 13px;font-size:11px;color:#a7b8aa;line-height:1.65;border-bottom:1px solid #304037}
.fieldwork-shot-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:13px 0}.fieldwork-shot>button{margin-top:7px}
.fieldwork-footer{display:flex;gap:8px;flex-wrap:wrap;margin-top:25px;border-top:1px solid #39433a;padding-top:17px}
@media(max-width:1080px){.fieldwork-split{grid-template-columns:1fr}}@media(max-width:600px){.fieldwork-fields,.fieldwork-shot-grid{grid-template-columns:1fr}}

/* M4-5 opportunity inbox and independent editable briefs */
.opp-subtitle{font-size:13px;color:#b7cbbb;margin:0 0 14px}
.opp-block{border-top:1px solid #35473b;padding:18px 0;margin-top:20px}
.opp-block h3{font-size:14px;margin:0 0 12px;color:#c6dace}
.opp-data-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
.opp-data-grid label,.opp-edit label{display:block;font-size:12px;color:#b9cbbb;min-width:0}
.opp-data-grid input,.opp-data-grid select,.opp-edit input,.opp-edit textarea,.opp-edit select{width:100%;margin-top:6px}
.opp-edit{display:grid;gap:12px}
.opp-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.opp-record{background:#1d2620;border:1px solid #364b3b;border-radius:5px;margin:8px 0;padding:12px;overflow-wrap:anywhere}
.opp-record p{white-space:pre-wrap;margin:8px 0;line-height:1.6;color:#c5d2c7}
.opp-record small{color:#9cad9e}
.opp-record a{color:#b9d5bc;overflow-wrap:anywhere}
.opp-inline{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;margin:10px 0;align-items:end}
.opp-inline select{width:100%}
.opp-inline button{min-height:40px}
.opp-fields{display:grid;gap:12px}
.opp-fields label{display:block;color:#b4c9b9;font-size:12px}
.opp-fields input,.opp-fields textarea,.opp-fields select{display:block;width:100%;margin-top:6px}
.opp-fields textarea{min-height:88px}
.opp-requirement{border:1px solid #3c4c41;border-radius:6px;padding:12px;margin:10px 0}
.opp-requirement textarea{display:block;width:100%;margin:6px 0}
.opp-requirement select{min-width:145px}
@media(max-width:720px){.opp-data-grid{grid-template-columns:1fr}.opp-inline{grid-template-columns:1fr}.opp-form{max-height:90vh;overflow-y:auto}}
/* M5-1: project archive summaries */
.archive-toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.archive-toolbar select{min-width:220px;max-width:480px}
.archive-counts{display:flex;gap:8px;flex-wrap:wrap;margin:22px 0}
.archive-count{border:1px solid #445047;background:#28302a;border-radius:4px;padding:8px 11px;color:#cbd8cc;font-size:12px}
.archive-warning{margin:20px 0 10px;color:#e2c9a0;font-size:13px;line-height:1.7}
@media(max-width:640px){.archive-toolbar select{min-width:0;flex:1 1 100%}}

/* UX-P0-1 isolated UI restructuring; no database schema changes. */
.page-heading h1{font-size:clamp(30px,3.5vw,40px);letter-spacing:-1.3px}
.sidebar .nav-item{min-height:42px}
input:not([type=checkbox]):not([type=radio]):not([type=file]),select,button.primary,button.secondary{min-height:44px}
button.primary,button.secondary{display:inline-flex;align-items:center;justify-content:center;gap:6px}
.toolbar,.production-toolbar,.resource-toolbar,.finance-toolbar{align-items:center;flex-wrap:wrap}
.toolbar select{min-height:44px}.toolbar label{white-space:nowrap}
.idea-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.idea-card-grid .item-card{min-height:180px;display:flex;flex-direction:column;align-items:stretch}
.idea-card-grid .list-sequence{font-size:12px;font-weight:700;color:#adcbb3;margin-bottom:6px}
.idea-card-grid .item-card h3{font-size:16px}
.list-controls{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;margin:10px 0 16px;color:#b8c5bd;font-size:12px}
.list-controls label{display:flex;align-items:center;gap:8px}.list-controls select{width:auto;min-width:94px}
.pager{display:flex;gap:12px;align-items:center;justify-content:center;margin:22px 0;font-size:12px;color:#aab9af}
.wide-dialog{width:min(95vw,960px);max-width:960px;max-height:92vh;overflow-y:auto}
.wide-dialog .detail-panel{border:0;border-radius:0;min-height:200px}
.dialog-view-bar{position:sticky;z-index:1;top:0;display:flex;align-items:center;justify-content:space-between;background:#222a24;border-bottom:1px solid #39453d;padding:13px 22px;font-size:11px;letter-spacing:1.5px;color:#bccfbe}
.project-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}
.project-list-rows{gap:8px}.project-list-rows .item-card{padding:16px 20px}
.project-list-rows .item-card p{margin-bottom:3px}
.view-switch{display:flex;gap:7px}.view-switch button.active{background:#40584a;color:#fff;border-color:#8caf98}
.workspace-back{margin:0 0 15px}.project-hub{max-width:none}.project-hub h2{font-size:26px}
.project-hub-tabs,.project-context-tabs{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:20px 0}
.project-hub-tabs button{flex:1 1 136px;min-width:125px}
.stage-track{display:flex;align-items:stretch;gap:0;margin:18px 0 22px;max-width:860px}
.stage-node{flex:1;min-width:0;position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;color:#748178;font-size:10px;text-align:center}
.stage-node:not(:last-of-type):after{content:'';position:absolute;left:50%;width:100%;top:6px;height:2px;background:#48554b;z-index:0}
.stage-node.reached:not(:last-of-type):after{background:#7aaf8c}
.stage-dot{height:14px;width:14px;display:block;background:#48534b;border:2px solid #76847a;border-radius:50%;z-index:1}
.stage-node.reached .stage-dot{background:#91bba1;border-color:#b1dcc0}
.stage-node.current .stage-name{color:#d8f1df;font-weight:700}
.stage-exception{color:#e5bc84;font-weight:600;font-size:12px;padding-left:8px}
.project-context{border:1px solid #526957;background:#1e2a21;padding:15px 20px;margin-bottom:28px;border-radius:8px}
.project-context-head{display:flex;gap:13px;align-items:center;flex-wrap:wrap}
.project-context-head strong{font-size:15px;margin-right:auto}
.project-context-tabs{margin:12px 0 0;gap:5px}
.project-context-tabs button{border:1px solid #516457;border-radius:5px;color:#bbd0c0;background:transparent;padding:9px 12px;font-size:12px}
.project-context-tabs button:hover,.project-context-tabs button.active{background:#42624d;color:white}
.mini-projects{display:grid;gap:3px;margin-top:12px}
.mini-project{display:flex;justify-content:space-between;gap:9px;align-items:center;background:none;border:0;border-bottom:1px solid #354038;color:#e0ebe3;text-align:left;padding:9px 0;font-size:12px}
.mini-project small{color:#a9c6ae;font-size:10px;white-space:nowrap}
@media(min-width:1500px){.idea-card-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1090px){.idea-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:710px){.idea-card-grid,.project-card-grid{grid-template-columns:1fr}.stage-name{font-size:9px}.project-context-head strong{width:100%}.project-context-tabs{overflow-x:auto;flex-wrap:nowrap}.project-context-tabs button{white-space:nowrap}.stat-grid{grid-template-columns:1fr}.project-hub-tabs button{flex:1 1 40%}}

.dashboard-lower{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,1fr);gap:26px;align-items:start;margin-bottom:30px}
.dashboard-lower .cards{gap:7px}.dashboard-lower .item-card{padding:12px 16px}
.dashboard-calendar{padding:16px;background:#1b211e;border:1px solid #39433c;border-radius:9px}
.calendar-nav{display:flex;align-items:center;gap:10px}.calendar-nav strong{font-size:13px;min-width:100px;text-align:center}
.month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.month-weekday{color:#b9cabd;font-size:11px;text-align:center;padding:7px 0}
.month-cell{border:1px solid #354139;background:#171b19;border-radius:5px;min-height:60px;padding:5px;min-width:0}
.month-day{color:#c1cfc5;font-size:11px}.month-count{display:block;width:100%;border:1px solid #5c8166;border-radius:3px;background:#35533c;color:#d2ead5;font-size:10px;padding:4px;margin-top:6px;text-align:center}
.month-blank{min-height:60px}.dashboard-calendar>.tiny-msg{margin:11px 0 0;line-height:1.6}
@media(max-width:1040px){.dashboard-lower{grid-template-columns:1fr}}
@media(max-width:630px){.month-cell{min-height:48px;padding:3px}.month-day{font-size:10px}.month-count{font-size:9px;padding:3px 1px}}

/* UX-P1: semantic importance distinct from genre */
.rank-label {display:inline-flex;align-items:center;border:1px solid var(--line,#393d45);border-radius:99px;padding:2px 8px;font-size:12px;font-weight:650;white-space:nowrap}
.rank-1,.rank-2 {color:#b4bac4}
.rank-3 {color:#95baf2}
.rank-4 {color:#e7c486}
.rank-5 {color:#f4ab89;border-color:#ae7960}
.workflow-editor {display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:16px 0;padding:12px;border:1px solid var(--line,#393d45);border-radius:9px}
.workflow-editor select {flex:1 1 145px;min-width:130px}
.link-row,.trash-row {display:flex;align-items:center;justify-content:space-between;gap:12px}
.danger-outline {color:#f4adad;border-color:#835353}
.trash-items {display:grid;gap:10px;max-height:62vh;overflow:auto;padding-bottom:12px}
.trash-row {padding:12px;border-bottom:1px solid var(--line,#393d45)}
@media(max-width:670px){.workflow-editor {display:grid;grid-template-columns:1fr 1fr}.trash-row {align-items:flex-start}}

/* UX-P2 lite: fieldwork date-based browser, finance split, review cards. */
.fieldwork-browser {display:grid;gap:14px;align-content:start;min-width:0}
.field-mini-calendar {border:1px solid #39433c;background:#1b211e;border-radius:8px;padding:12px}
.field-mini-calendar .calendar-nav {justify-content:center;margin-bottom:9px}
.field-mini-calendar .month-grid {gap:2px}
.field-mini-calendar .month-blank {min-height:28px}
.field-day {min-width:0;min-height:31px;border:1px solid #354139;border-radius:4px;background:#171b19;color:#d2dcd5;font-size:11px;padding:2px;position:relative}
.field-day small{position:absolute;right:1px;bottom:1px;background:#4f8061;color:#fff;border-radius:99px;min-width:11px;height:11px;line-height:11px;font-size:8px}
.field-day.has-shoot {border-color:#649b77}
.field-day.active {background:#496b54;border-color:#b9ebc5;color:#fff}
#fieldCalendarReset {margin-top:10px;width:100%}
.cash-switch {margin:0 0 14px}
.review-card-list .item-card {display:flex;flex-direction:column;align-items:flex-start;gap:9px;padding:15px 17px}
/* Wrap inputs in conventional grid flow to keep controls aligned without row collision. */
.review-create-grid {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:10px}
.review-input-group {display:flex;flex-direction:column;gap:6px;min-width:0}
.review-create-grid label {font-size:12px;color:var(--muted)}
.review-create-grid input,.review-create-grid select {width:100%;min-width:0;min-height:40px}
.review-create-grid button {grid-column:1/-1;justify-self:end}
@media(max-width:800px){.review-create-grid{grid-template-columns:1fr}.review-create-grid button{grid-column:auto;justify-self:stretch}}

.opp-detail-tabs{display:flex;flex-wrap:wrap;gap:7px;margin:15px 0 20px;padding-bottom:11px;border-bottom:1px solid #3c4b40}
.opp-detail-tabs button{flex:1 1 105px;min-width:96px;padding:9px 10px;font-size:12px}
.opp-detail-tabs button.active{background:#405a46;color:#fff;border-color:#9fceb1}
.opp-pane{display:grid;gap:16px;min-width:0}
.opp-pane.hidden{display:none}

.production-calendar-modes{margin:12px 0 16px}
.production-month-section{border:1px solid #39433c;border-radius:9px;background:#1b211e;padding:18px;margin:12px 0 20px}
.production-month-section .calendar-nav{justify-content:center;margin:0 0 14px}
.production-month-section .month-cell{min-height:115px}
.production-month-day{display:flex;flex-direction:column;align-items:stretch;gap:4px}
.production-day-button{background:none;border:0;align-self:flex-start;color:#dfebe0;font-size:12px;font-weight:700;padding:3px 5px;border-radius:4px}
.production-day-button:hover{background:#3b6047}
.production-month-item{width:100%;font-size:10px;padding:5px;border:1px solid #4d7b56;border-radius:4px;background:#314a37;color:#e6f3e7;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.production-month-item.task{border-color:#87704c;background:#51432b;color:#f2e2c8}
@media(max-width:760px){.production-month-section{padding:8px}.production-month-section .month-cell{min-height:75px}.production-month-item{font-size:9px;padding:4px 2px}}
/* Keep paused/archived as an operating-state note, not an eighth stage. */
.stage-track{position:relative;margin-top:28px}
.stage-node:nth-of-type(7)::after{display:none}
.stage-exception{position:absolute;right:0;top:-24px;font-size:11px;line-height:16px;padding:1px 6px;border-radius:4px;background:#352d21;border:1px solid #6b5637;white-space:nowrap}

/* UX-P2: unified document/review browsing and deep-work dialogs. */
.document-toolbar{gap:10px}
.document-toolbar #documentSearch{min-width:190px;max-width:none}
.document-toolbar select{max-width:195px;min-width:135px}
.document-toolbar label{font-size:12px;color:#a8b9ae}
.document-list-rows{grid-template-columns:1fr;gap:8px}
.document-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.document-list-item{display:flex;flex-direction:column;gap:8px;min-height:96px}
.document-list-item h3{margin:0;font-size:15px;line-height:1.5}
.document-list-item .document-list-heading{display:flex;align-items:center;gap:12px}
.document-list-item .meta{margin-top:auto}
.document-list-item p{margin:0}
.document-card-grid .document-list-item{min-height:176px}
.document-card-grid .document-list-heading{flex-direction:column;align-items:flex-start;gap:7px}
.workspace-dialog{max-height:94dvh;max-width:min(96vw,1160px);width:96vw;overflow-y:auto;overscroll-behavior:contain;border-radius:10px}
.workspace-dialog .dialog-view-bar{position:sticky;top:0;z-index:5;padding:14px 24px;background:#212923}
.workspace-dialog .detail-panel{border:0;border-radius:0;min-height:0;box-shadow:none}
.document-workspace-dialog{max-width:min(96vw,1320px)}
.document-workspace-dialog .document-editor{padding:24px clamp(18px,3vw,42px) 45px}
.document-workspace-dialog .document-editor #documentForm{max-width:100%}
.review-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.review-card-grid .review-card{min-height:144px;display:flex;flex-direction:column;gap:9px;align-items:flex-start}
.review-card-grid .review-card h3{margin:3px 0 0;font-size:15px}
.review-card-grid .review-card .meta{margin-top:auto}
.review-create-dialog{max-width:min(92vw,700px);width:92vw}
.review-create-dialog .review-create{margin:0;border:none;background:none;padding:22px 24px 26px}
.review-create-dialog .review-create-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.review-create-dialog .review-create-grid>button{grid-column:1/-1}
.review-workspace-dialog{max-width:min(96vw,1140px)}
.review-workspace-dialog #reviewDetail{padding:24px clamp(17px,3vw,40px) 46px}
.review-workspace-dialog #reviewDetail h2{margin:0 0 9px;font-size:23px}
.review-workspace-dialog .review-upload{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 14px;align-items:center;margin:16px 0 19px;padding:17px}
.review-upload-label{grid-column:1/-1;color:#bacdc0;font-size:12px}
.review-workspace-dialog .review-upload input[type=file]{width:100%;max-width:none;min-width:0}
.review-workspace-dialog .review-upload .tiny-msg{grid-column:1/-1;line-height:1.7}
.review-workspace-dialog .review-versions{margin:14px 0 8px;gap:12px}
.review-workspace-dialog .review-versions label{white-space:nowrap;font-size:12px;color:#c1cfc4}
.review-workspace-dialog .review-video-picker{width:min(100%,440px);max-width:440px}
.review-workspace-dialog .review-player{display:block;max-height:550px;margin:14px auto}
.review-workspace-dialog .review-comment-form{align-items:stretch}
.review-workspace-dialog .review-comment-form textarea{min-width:0}
.review-workspace-dialog .share-list-row{gap:15px}
@media(min-width:1500px){.document-card-grid,.review-card-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1080px){.document-card-grid,.review-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){
 .document-card-grid,.review-card-grid{grid-template-columns:1fr}
 .document-toolbar input,.document-toolbar select{max-width:none;flex:1 1 100%;width:100%}
 .document-toolbar label{flex:0 0 auto}
 .workspace-dialog{width:98vw;max-width:98vw;max-height:96dvh}
 .review-create-dialog .review-create-grid{grid-template-columns:1fr}
 .review-workspace-dialog .review-upload{grid-template-columns:1fr}
 .review-workspace-dialog .review-upload button{width:100%}
 .review-workspace-dialog .review-comment-form{flex-wrap:wrap}
 .review-workspace-dialog .review-comment-form button[type=submit]{width:100%}
}
@media print{
 body.printing-document #documentDetailDialog{position:static;display:block!important;overflow:visible;max-height:none;max-width:none;width:100%;padding:0;border:none;background:transparent;box-shadow:none}
 body.printing-document #documentDetailDialog .dialog-view-bar{display:none!important}
 body.printing-document #documentDetail{padding:0!important;overflow:visible!important}
 body.printing-document #documentPreview{position:static;max-width:none;width:100%}
}

/* UX-P3: project-centered opportunity browsing and actual activity timeline */
.activity-list{display:grid;gap:7px}
.activity-row{display:flex;gap:13px;align-items:center;width:100%;text-align:left;border:1px solid #39493d;border-radius:7px;background:#1b2420;color:#d8e3da;padding:12px 14px;min-width:0}
button.activity-row:hover,button.activity-row:focus-visible{border-color:#8fb99a;background:#28382c}
.activity-kind{width:90px;flex:0 0 90px;color:#a6c8b2;font-size:11px;font-weight:650}
.activity-text{display:grid;gap:3px;min-width:0;flex:1}
.activity-text strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}
.activity-text small{color:#94a99b;font-size:11px}
.activity-row time{font-size:11px;color:#b1bdaf;white-space:nowrap}
.activity-dialog{max-width:min(92vw,930px)}
.activity-dialog-content{padding:20px clamp(14px,3vw,34px) 35px}
.opp-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.opp-list-rows{grid-template-columns:1fr;gap:8px}
.opp-card-grid .opp-card{min-height:154px}
.opp-list-rows .opp-card{display:grid;grid-template-columns:minmax(160px,1fr) minmax(200px,2fr);gap:6px 24px;min-height:82px;align-items:center}
.opp-list-rows .opp-card .meta{grid-column:1;grid-row:1/3;margin:0}
.opp-list-rows .opp-card h3{grid-column:2;grid-row:1;margin:0}
.opp-list-rows .opp-card p{grid-column:2;grid-row:2;margin:0}
.opp-card h3{margin:10px 0;font-size:15px}
.opp-card p{font-size:12px;color:#b8c9bc}
.opp-context-note{padding:12px 16px;background:#27392c;border:1px solid #477455;border-radius:7px;color:#d4ead8;margin-bottom:15px;font-size:12px}
.opportunity-workspace-dialog{max-width:min(96vw,1180px)}
.opportunity-workspace-dialog #oppDetail{padding:22px clamp(16px,3vw,44px) 40px;min-height:0;box-shadow:none;border:0}
.opportunity-workspace-dialog #oppDetail>h2{font-size:23px;margin:8px 0 16px}
.opportunity-workspace-dialog .opp-edit{max-width:950px}
.opportunity-workspace-dialog .opp-detail-tabs{position:sticky;top:48px;z-index:4;background:#202821;padding-top:12px}
@media(min-width:1500px){.opp-card-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:1080px){.opp-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.opp-card-grid{grid-template-columns:1fr}.opp-list-rows .opp-card{display:block}.activity-kind{flex-basis:70px;width:70px}.activity-row{gap:8px}.activity-row time{font-size:10px}}

/* UX-P4 — project browser, project-scaled layout and editable weekly schedule */
.project-search-toolbar{display:grid;grid-template-columns:minmax(210px,2fr) repeat(3,minmax(125px,1fr));gap:10px;margin:10px 0 16px}
.project-search-toolbar input,.project-search-toolbar select{width:100%;min-width:0;min-height:42px}
.project-list-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.project-list-actions>label{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.project-list-actions select{min-height:38px}
.production-week-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:16px 0 10px;flex-wrap:wrap}
.production-week-head{min-width:220px;flex:1}
.production-week-head h2{font-size:16px;margin:0 0 6px;font-weight:650}
.production-week-head .tiny-msg{margin:0;line-height:1.6}
.production-week-controls{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.production-week-controls button{min-height:38px;white-space:nowrap}
#productionWeekPick{min-width:140px;font-variant-numeric:tabular-nums}
.production-week-day{min-height:150px;padding:10px;border-radius:9px}
.production-week-day.is-today{border-color:#759980;box-shadow:inset 0 0 0 1px #5e80674d}
.production-day-trigger{display:block;width:100%;height:auto;background:transparent;border:0;border-radius:4px;padding:3px 2px;text-align:left;font-size:12px;font-weight:650;color:#c4d3c7;cursor:pointer}
.production-day-trigger:hover,.production-day-trigger:focus-visible{background:#28342b;color:#e7f3e9;outline:1px solid #5e8067}
.production-day-trigger:after{content:' +';float:right;color:#94b79c;font-size:15px}
.production-quick-actions{display:flex;gap:4px;margin:8px 0 6px}
.production-quick-actions.hidden{display:none!important}
.production-quick-actions button{padding:6px 5px;min-height:32px;min-width:0;flex:1;font-size:11px;border-radius:5px}
button.production-week-empty{display:block;width:100%;margin:8px 0 6px;padding:9px 4px;background:#202b23;border:1px dashed #4a6850;border-radius:6px;font-size:10px;line-height:1.4;color:#aac9b1;cursor:pointer}
button.production-week-empty:hover{background:#2d4435;border-color:#84af8e;color:#e0eee3}
.production-week-task{background:#292c30;border-color:#555e65;color:#e0e6ef}
.production-week-task .production-week-time{color:#b5c6db}
.week-picker-dialog{max-width:min(92vw,440px)}
.week-picker-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:12px 0 18px}
.week-picker-toolbar strong{font-size:15px}
.week-picker-toolbar button{min-width:38px;height:38px}
.week-picker-grid{grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.week-picker-grid .month-blank{min-height:40px}
.week-picker-day{display:block;min-width:0;width:100%;min-height:42px;border:1px solid #3d5143;background:#202922;border-radius:7px;color:#d7e4d9;font-variant-numeric:tabular-nums;font-size:13px}
.week-picker-day:hover,.week-picker-day:focus-visible{border-color:#a6c6aa;background:#2b4030}
.week-picker-day.is-today{border-color:#769d83}
.week-picker-day.selected{background:#4c6753;color:#f4fff6;border-color:#a1beaa;font-weight:700}
@media(max-width:1080px){.project-search-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.project-search-toolbar input{grid-column:1/-1}}
@media(max-width:720px){.project-search-toolbar{grid-template-columns:1fr}.project-search-toolbar input{grid-column:auto}.production-week-toolbar{align-items:stretch}.production-week-controls{justify-content:flex-start}.project-list-actions{justify-content:flex-start}}

/* UX-P5: searchable project selector and optional large date picker */
.project-lookup-launch,.date-lookup-launch{flex:0 0 auto;min-height:44px;white-space:nowrap;font-size:12px;padding:9px 13px}
.project-lookup-launch{color:#c9e2d0;border-color:#51675a}
.lookup-dialog{max-width:min(92vw,720px);width:100%;max-height:88vh;overflow-y:auto}
.lookup-body{padding:20px 24px 24px}
.lookup-body>input[type=search]{width:100%;margin:0 0 12px}
.lookup-results{display:grid;gap:7px;margin-top:10px;min-height:130px}
.project-lookup-option{text-align:left;border:1px solid #46534a;border-radius:7px;background:#202821;color:#eef4ed;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;width:100%;min-height:54px;cursor:pointer}
.project-lookup-option:hover,.project-lookup-option:focus-visible{border-color:#8cb79a;background:#2d3b31}
.project-lookup-option .tiny-msg{text-align:right;flex:0 0 auto}
.date-lookup-grid{grid-template-columns:repeat(7,minmax(0,1fr));gap:5px;margin-top:12px}
.date-lookup-day{border:1px solid #3a483e;border-radius:7px;background:#202821;color:#e6f0e9;min-height:49px;width:100%;cursor:pointer}
.date-lookup-day.selected{background:#56735b;border-color:#a6caaa;color:#fff;font-weight:700}
.date-lookup-day:disabled{opacity:.28;cursor:not-allowed}
.date-lookup-day:not(:disabled):hover,.date-lookup-day:not(:disabled):focus-visible{border-color:#a6caaa;background:#355440}
/* Keep selects usable while adding explicit search/date actions. */
.production-toolbar select,.resource-toolbar select,.finance-toolbar select,.fieldwork-toolbar select,.archive-toolbar select{min-width:170px;max-width:340px}
.opp-inline .project-lookup-launch,.two-controls .project-lookup-launch{width:auto;min-width:75px}
.document-editor .project-lookup-launch{margin-top:7px}
@media(max-width:640px){.lookup-body{padding:14px}.project-lookup-option{align-items:flex-start;flex-direction:column}.project-lookup-option .tiny-msg{text-align:left}.date-lookup-day{min-height:40px;padding:3px}.production-toolbar select,.resource-toolbar select,.finance-toolbar select,.fieldwork-toolbar select,.archive-toolbar select{min-width:0;max-width:none;flex:1 1 170px}}

.project-lookup-field,.date-lookup-field{display:inline-flex;align-items:center;gap:7px;min-width:0;vertical-align:middle}
.project-lookup-field>select,.date-lookup-field>input[type=date]{flex:1 1 150px;min-width:0;width:100%}
.project-lookup-field{flex:1 1 240px;max-width:520px}
.project-lookup-field .project-lookup-launch,.date-lookup-field .date-lookup-launch{flex:0 0 auto}
.opp-edit .project-lookup-field,.document-editor .project-lookup-field{width:100%;max-width:none;margin-top:6px}
.document-editor .project-lookup-field .project-lookup-launch{margin-top:0}
.date-lookup-field{width:100%}
.toolbar .date-lookup-field{width:auto;max-width:270px}
.opp-edit .date-lookup-field{width:100%}
@media(max-width:640px){.project-lookup-field{max-width:none;flex:1 1 100%}.toolbar .date-lookup-field{width:100%;max-width:none}}

/* UX-P6: common keyboard focus, coherent form heights, mobile dialog layout */
:root{--ux-focus:#a4d5b3}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{
 outline:2px solid var(--ux-focus);outline-offset:3px
}
[role="navigation"] button:focus-visible,.project-lookup-option:focus-visible{outline:2px solid var(--ux-focus);outline-offset:2px}
dialog .form-panel :is(input:not([type=checkbox]):not([type=radio]),select){min-height:44px;max-width:100%}
dialog .dialog-actions{align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:10px}
dialog .dialog-view-bar{position:sticky;top:0;z-index:6;min-height:54px;align-items:center}
.project-context-head>button{min-height:38px}
.project-context-tabs button{min-height:38px}
.project-context strong{overflow-wrap:anywhere}
.date-lookup-day:focus-visible{outline:2px solid var(--ux-focus);outline-offset:1px;z-index:1}
@media(max-width:640px){
 dialog:not(.workspace-dialog){max-width:calc(100vw - 20px)}
 dialog .dialog-actions{justify-content:stretch}
 dialog .dialog-actions :is(button,[role=button]){flex:1 1 auto;min-height:44px}
 .project-context-tabs{scroll-padding-inline:8px}
 .dialog-view-bar button{flex:0 0 auto}
}
@media(prefers-reduced-motion:reduce){.item-card,.nav-item,dialog button{transition:none!important}}

/* BEGIN REL-GATE01-R1-UXNAV-20261118 */
/* The legacy wrapper was permanently marked hidden; expose its existing button
   only while the project detail view is active. */
#projectWorkspace:not(.hidden) > .workspace-back {
  display: flex !important;
  justify-content: flex-start;
  align-items: center;
  margin: 0 0 14px;
}
/* END REL-GATE01-R1-UXNAV-20261118 */
