:root{font-family:'Malgun Gothic','Apple SD Gothic Neo',Arial,sans-serif;color:#1b2f47;background:#f2f5f9;font-synthesis:none;line-height:1.5}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{border:1px solid #ccd7e4;background:#fff;color:#244262;padding:9px 14px;border-radius:7px;cursor:pointer;white-space:nowrap}button:hover{background:#edf3fa}button:disabled{opacity:.45;cursor:not-allowed}button.primary{background:#2466ac;border-color:#2466ac;color:#fff}button.primary:hover{background:#19558f}button.quiet{background:none;border-color:transparent;color:#677d96}button.compact{padding:5px 10px;font-size:14px}input,select,textarea{border:1px solid #cad6e2;border-radius:6px;background:#fff;color:#213b56;padding:9px 10px;min-width:0}input:focus,select:focus,textarea:focus,button:focus-visible{outline:2px solid #6b9ed4;outline-offset:2px}input:disabled{background:#f0f4f8;color:#52677e}input[type=checkbox]{accent-color:#2466ac;width:16px;height:16px}select{appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235d7590' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}h1,h2,h3,p{margin-top:0}h1{font-size:30px;margin-bottom:0;letter-spacing:-1px}h2{font-size:19px;letter-spacing:-.5px;margin-bottom:10px}h3{font-size:17px;margin-bottom:10px}p{margin-bottom:14px}small{display:block;font-weight:normal;color:#708199}.muted,.helper{color:#697e95;font-size:14px}.shell{display:flex;min-height:100vh}aside{position:fixed;left:0;top:0;width:226px;height:100vh;background:#142e4c;color:#fff;padding:30px 18px;z-index:3}.brand{display:flex;align-items:center;gap:12px;font-size:19px;font-weight:700;letter-spacing:-.5px}.logo-mark{display:grid;place-items:center;flex:none;width:42px;height:45px;border-radius:9px;background:#3a78b9;color:#fff;font-family:Arial,sans-serif;font-size:29px;font-weight:bold}.brand small{font-size:13px;color:#abc0d6;margin-top:3px}.nav-label{font-size:11px;letter-spacing:1.5px;color:#829ebd;margin:48px 13px 15px}nav button{display:block;width:100%;background:transparent;color:#c5d5e7;border-color:transparent;text-align:left;margin-bottom:7px;padding:13px 16px}nav button.active,nav button:hover{color:#fff;background:#294e73}.side-footer{position:absolute;bottom:30px;left:30px;color:#9eb6ce;font-size:14px}.side-footer small{font-size:12px;margin-top:6px;color:#88a2be}main{margin-left:226px;width:calc(100% - 226px);padding:30px 32px}header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:24px}.eyebrow{font-size:11px;color:#7188a2;letter-spacing:1.7px;margin-bottom:5px}.account,.actions{display:flex;gap:10px;align-items:center}.account{font-size:14px}.badge{display:inline-block;border-radius:5px;background:#e5edf7;color:#3e638b;font-size:12px;font-weight:500;padding:4px 9px;vertical-align:middle;white-space:nowrap}.badge.green{background:#e3f2ea;color:#34765a}.notice{font-size:14px;border-radius:7px;padding:12px 16px;margin-bottom:20px;background:#e7eff9;color:#3a618b;min-height:45px}.notice.warn{background:#fff0d7;color:#885c1e}.notice.error{background:#fce8e6;color:#a43d37}.toolbar{display:flex;justify-content:space-between;gap:18px;margin-bottom:25px}.period-label{display:flex;align-items:center;gap:12px;font-size:14px;font-weight:600}.period-label select{font-size:14px;min-width:315px;font-weight:normal}.cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin-bottom:24px}.cards article{background:#fff;border:1px solid #dce5ee;border-radius:10px;padding:20px 22px}.cards article>span{font-size:14px;color:#637b95}.cards strong{font-size:29px;font-weight:700;display:flex;align-items:baseline;gap:7px;margin-top:10px;font-variant-numeric:tabular-nums;letter-spacing:-.6px}.cards small{font-size:14px}.danger{color:#b6473e}section{background:#fff;border:1px solid #dce5ee;border-radius:10px;padding:22px;margin-bottom:20px}.section-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.section-heading .muted{font-size:13px;margin-bottom:19px}.filters{display:flex;gap:17px;align-items:center;margin-bottom:18px;flex-wrap:wrap}.filters input[type=search]{width:242px;font-size:14px}.check-label{display:flex;gap:7px;align-items:center;font-size:14px;white-space:nowrap}.filters .helper{margin-left:auto;font-size:12px}.table-scroll{overflow:auto;max-width:100%}.inventory-scroll{max-height:61vh;border:1px solid #e1e8f0;border-radius:5px}table{width:100%;border-collapse:collapse;font-size:14px;font-variant-numeric:tabular-nums}th,td{padding:12px;border-bottom:1px solid #e2e9f1;text-align:left;white-space:nowrap}th{background:#f1f5fa;color:#526d8a;font-weight:600;position:sticky;top:0;z-index:2;font-size:13px}td small{font-size:12px;margin-top:3px}.inventory{min-width:1770px}.inventory td:not(:first-child){text-align:right}.inventory th:not(:first-child){text-align:center}.inventory .item-name{min-width:205px;position:sticky;left:0;z-index:1;background:#fff;border-right:1px solid #e7ecf3}.inventory td input{width:93px;font-size:14px;text-align:right;padding:7px;border:1px solid #e0e7ee}.inventory td input::placeholder{font-size:12px;color:#91a0b0}.calculated{background:#edf4fc}.difference{color:#b4483f;background:#fff2ed;font-weight:600}footer{margin-top:18px;display:flex;justify-content:space-between;align-items:center;color:#75889e;font-size:12px}.inline-form{display:flex;gap:14px;flex-wrap:wrap;align-items:flex-end;margin:20px 0}.inline-form label,.stacked-form label{display:flex;flex-direction:column;gap:7px;font-size:14px;color:#526b85}.inline-form input{max-width:210px}.inline-form select{max-width:310px}.inline-form label input[name=qty]{width:120px}.inline-form label input[name=memo]{width:220px}.inline-form+button{margin-bottom:16px}.wrap{white-space:normal;min-width:180px;max-width:350px;overflow-wrap:anywhere}.callout{padding:15px;background:#eef4fb;border-left:3px solid #79a3cc;font-size:14px;color:#4c6d90;margin-bottom:20px}hr{border:0;border-top:1px solid #e4eaf1;margin:26px 0}.restore-button{margin-left:12px}.boot{text-align:center;margin:12vh auto;max-width:550px;padding:25px}.boot .logo-mark{margin:0 auto 20px}.empty{text-align:center;padding:45px 20px 55px}.empty .actions{justify-content:center}.empty-icon{font-size:38px;color:#88a6c5;margin-bottom:12px}.empty h3{font-size:21px}.auth-page{min-height:100vh;display:grid;place-items:center;padding:35px;background:linear-gradient(135deg,#eff4fa,#e3edf8)}.auth-card{background:#fff;width:min(470px,100%);padding:38px;border:1px solid #d9e4ef;border-radius:15px;box-shadow:0 15px 55px #12355712}.auth-card .brand{margin-bottom:30px;color:#264360}.auth-card .brand small{color:#8194a8}.auth-card h1{font-size:25px;margin-bottom:10px}.auth-form,.stacked-form{display:flex;flex-direction:column;gap:16px;margin-top:25px}.auth-form label{font-size:14px;display:flex;flex-direction:column;gap:7px}.auth-form input{width:100%}.auth-form .primary{margin-top:2px}.auth-error{color:#b3433a;font-size:14px;margin:0;white-space:pre-wrap}.auth-foot{font-size:12px;color:#8b9bad;text-align:center;margin:25px 0 0}.overlay{position:fixed;inset:0;z-index:10;background:#102b4890;display:grid;place-items:center;padding:25px}.modal{width:min(780px,100%);max-height:90vh;overflow:auto;background:#fff;padding:27px;border-radius:12px;box-shadow:0 20px 60px #00162d30}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:10px}.modal-head h2{font-size:21px}.modal textarea{width:100%;margin:15px 0;resize:vertical;white-space:pre;font-family:Consolas,'Malgun Gothic',monospace;font-size:14px}.modal .actions.end{justify-content:flex-end}.paste-target{display:flex;gap:12px;align-items:center;font-size:14px}.paste-preview{max-height:275px;overflow:auto;margin-bottom:17px}.paste-preview .muted{color:#39755b}.history-detail{max-height:60vh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;background:#f2f6fa;padding:15px;border-radius:5px}tr[hidden]{display:none}
@media(max-width:1100px){aside{width:185px;padding:26px 14px}main{margin-left:185px;width:calc(100% - 185px);padding:25px 22px}.brand{font-size:17px}.brand small{font-size:12px}.section-heading{flex-direction:column}.section-heading .muted{margin-bottom:0}.section-heading .actions{margin-bottom:16px}.cards{gap:12px}.cards article{padding:17px}.cards strong{font-size:25px}.toolbar{flex-wrap:wrap}.filters .helper{margin-left:0}}@media(max-width:760px){aside{position:static;width:100%;height:auto;padding:18px}.shell{display:block}.brand{margin-bottom:15px}.nav-label,.side-footer{display:none}nav{display:flex;flex-wrap:wrap;gap:5px}nav button{width:auto;padding:8px 11px;margin:0;font-size:14px}main{width:100%;margin:0;padding:19px 15px}.cards{grid-template-columns:repeat(2,minmax(0,1fr))}header{align-items:flex-start;gap:10px}.account{flex-wrap:wrap;justify-content:flex-end;max-width:150px;gap:6px}.account .quiet{font-size:12px;padding:4px}.eyebrow{font-size:10px}h1{font-size:26px}.period-label{display:block;width:100%}.period-label select{display:block;margin-top:7px;min-width:0;width:100%}.toolbar .actions{width:100%}.toolbar .primary{margin-left:auto}section{padding:17px}.filters{gap:12px}.filters input[type=search]{width:100%}.restore-button{margin:12px 0 0}.auth-card{padding:28px}.inline-form label{width:100%}.inline-form input,.inline-form select{max-width:none;width:100%}.modal{padding:20px}.modal .actions{flex-wrap:wrap}}

/* Material order drag target and insertion position. */
#material-list tbody tr{cursor:grab}
#material-list tbody tr.material-dragging{opacity:.4;background:#e8f1fc}
#material-list tbody tr.drop-before>td{box-shadow:inset 0 3px #2466ac}
#material-list tbody tr.drop-after>td{box-shadow:inset 0 -3px #2466ac}
.material-order{white-space:nowrap;min-width:90px}
.material-drag-handle{padding:4px 8px;margin-right:9px;font-size:22px;line-height:1;letter-spacing:-3px;border-color:transparent;background:transparent;color:#69829d;cursor:grab;user-select:none}
.material-drag-handle:hover{background:#e8f1fc;border-color:#bdd0e6}
.material-drag-handle:active{cursor:grabbing}
.order-number{font-variant-numeric:tabular-nums;color:#627a95;display:inline-block;min-width:2ch}

.survey-cancel{color:#a3433b;border-color:#dcbdb8}.badge.cancelled{background:#edf0f4;color:#6b7480}

/* Multi-row material selection is local UI state; order is saved normally. */
#material-list tbody tr.material-selected>td{background-color:#eaf3ff}
#material-list tbody tr.material-selected.material-dragging>td{background-color:#dceaff}
.material-select-cell{width:44px;text-align:center;user-select:none}
.material-selection-toolbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#f2f7fd;border:1px solid #dce7f5;border-radius:7px;padding:10px 13px;margin-bottom:13px;font-size:14px}
.material-selection-toolbar strong{color:#2e5f95;white-space:nowrap}
.material-selection-toolbar .muted{margin:0;font-size:13px}

.material-delete{color:#a3433b;border-color:#dcbdb8}
.material-filter-toolbar{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;padding:13px;margin:14px 0;background:#f7f9fc;border:1px solid #dce3ee;border-radius:7px}
.material-filter-toolbar label{display:flex;flex-direction:column;gap:5px;font-size:13px;min-width:130px;max-width:260px}
.material-filter-toolbar select{width:100%;min-width:130px}
.material-filter-toolbar strong{font-size:13px;color:#52657b;align-self:center;margin-left:auto;white-space:nowrap}
#material-list [hidden]{display:none!important}

.cards .quantity-increase{color:#28714d}.inventory .survey-row-actions{text-align:center;min-width:82px}
.material-price-cell{min-width:118px}.material-price-input{display:block;width:112px;max-width:100%;padding:7px 8px;text-align:right;font-variant-numeric:tabular-nums;background:#f8fbff;border-color:#b8cce2}.material-price-input:focus{background:#fff}.material-price-input::placeholder{color:#879bb0;font-size:12px}
