:root{--navy:#183153;--blue:#1d70b8;--bg:#f5f7fa;--line:#d9e0e8;--muted:#617083;--danger:#b42318}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:#172b4d;font-family:-apple-system,BlinkMacSystemFont,"Noto Sans JP","Yu Gothic",sans-serif;line-height:1.5}.site-header{min-height:60px;background:var(--navy);padding:0 4vw;display:flex;align-items:center;justify-content:space-between;color:#fff}.brand{font-size:1.1rem;font-weight:700;color:#fff;text-decoration:none}.site-header nav{display:flex;align-items:center;gap:1rem;font-size:.9rem}.site-header nav a{color:#dbeafe;text-decoration:none}.site-header nav .active{color:#fff;font-weight:700}.page{max-width:1280px;margin:0 auto;padding:2rem 4vw}.page-title,.section-head{display:flex;align-items:center;justify-content:space-between;gap:1rem}.page h1{margin:0;font-size:1.7rem}.muted{color:var(--muted);margin:.25rem 0}.button{display:inline-block;border:1px solid #aab7c5;background:#fff;border-radius:6px;padding:.55rem .9rem;color:#183153;text-decoration:none;font:inherit;cursor:pointer}.button.primary{background:var(--blue);border-color:var(--blue);color:#fff}.button.ghost{background:transparent}.button:disabled{opacity:.55;cursor:not-allowed}.filter-panel,.field-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;align-items:end;background:#fff;border:1px solid var(--line);padding:1rem;border-radius:8px;margin:1.5rem 0}.filter-panel{grid-template-columns:repeat(4,minmax(120px,1fr)) auto auto}label{display:block;font-size:.86rem;font-weight:600}input,select,textarea{width:100%;margin-top:.3rem;padding:.55rem .6rem;border:1px solid #aab7c5;border-radius:5px;background:#fff;font:inherit;color:inherit}textarea{min-height:82px;resize:vertical}.table-wrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:8px}table{width:100%;border-collapse:collapse;min-width:820px}th,td{padding:.7rem .8rem;border-bottom:1px solid var(--line);text-align:left;font-size:.9rem}th{background:#edf3f8;white-space:nowrap}.status{min-height:1.5em}.alert{padding:.7rem .9rem;border-radius:6px}.error{background:#fef3f2;color:var(--danger)}.warning{background:#fffaeb;color:#8a5a00}.tabs{display:flex;gap:.25rem;border-bottom:2px solid var(--line);margin-top:1rem;overflow:auto}.tab{border:0;background:none;padding:.8rem 1rem;white-space:nowrap;font:inherit;cursor:pointer}.tab.active{border-bottom:3px solid var(--blue);color:var(--blue);font-weight:700}.tab-panel{display:none;background:#fff;border:1px solid var(--line);border-top:0;padding:1.25rem;border-radius:0 0 8px 8px}.tab-panel.active{display:block}.field-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin:0;background:transparent;border:0;padding:0}.field-grid .wide{grid-column:span 2}.summary-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:1rem}.summary-cards article{background:#fff;border:1px solid var(--line);padding:.85rem;border-radius:8px}.summary-cards small{display:block;color:var(--muted)}.summary-cards strong{font-size:1.25rem}.purchase-card{border:1px solid var(--line);border-radius:8px;padding:1rem;margin-bottom:1rem;background:#fafcff}.purchase-card h3{margin:0}.purchase-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.form-actions{display:flex;gap:.75rem;margin-top:1.25rem}.login-page{min-height:100vh;display:grid;place-items:center}.login-card{width:min(420px,calc(100% - 2rem));padding:2.25rem;background:#fff;border-radius:10px;box-shadow:0 8px 30px #18315320}.login-card h1{margin:.1rem 0}.stack{display:grid;gap:1rem;margin-top:1.5rem}.eyebrow{color:var(--blue);font-weight:700;letter-spacing:.08em;font-size:.8rem}@media(max-width:720px){.site-header{padding:1rem;align-items:flex-start;gap:.75rem}.site-header nav{gap:.65rem;flex-wrap:wrap}.page{padding:1.25rem 1rem}.filter-panel,.field-grid{grid-template-columns:1fr 1fr}.filter-panel .button{width:100%}.summary-cards{grid-template-columns:1fr 1fr}.field-grid .wide{grid-column:span 2}}@media(max-width:460px){.site-header{display:block}.site-header nav{margin-top:.5rem}.filter-panel,.field-grid{grid-template-columns:1fr}.field-grid .wide{grid-column:span 1}.summary-cards{grid-template-columns:1fr}.page-title{align-items:flex-start}.page-title .button{white-space:nowrap}}
:root{--report-space:1rem}.report-links{display:flex;gap:.7rem;align-items:center;flex-wrap:wrap}.report-links a{color:var(--blue);font-size:.9rem}.report-page .filter-panel{grid-template-columns:repeat(2,minmax(150px,1fr)) auto auto 1fr}.report-page td:nth-last-child(-n+4),.report-page th:nth-last-child(-n+4){text-align:right}@media(max-width:720px){.report-page .filter-panel{grid-template-columns:1fr 1fr}.report-page .report-links{grid-column:span 2}}@media(max-width:460px){.report-page .filter-panel{grid-template-columns:1fr}.report-page .report-links{grid-column:span 1}}
:root{--dashboard-space:1rem}.dashboard-grid{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,1fr);gap:1rem;margin:1rem 0}.dashboard-panel{background:#fff;border:1px solid var(--line);border-radius:8px;padding:1rem;margin:1rem 0}.dashboard-grid .dashboard-panel{margin:0}.dashboard-panel h2{font-size:1.1rem;margin:0 0 .75rem}.dashboard-panel canvas{max-height:320px}.dashboard-kpis{grid-template-columns:repeat(6,1fr);margin:1rem 0}.dashboard-kpis article{min-width:0}@media(max-width:900px){.dashboard-grid{grid-template-columns:1fr}.dashboard-kpis{grid-template-columns:repeat(3,1fr)}}
.pipeline-page td:nth-child(n+3),.pipeline-page th:nth-child(n+3){text-align:right}.pipeline-page td:nth-child(-n+2),.pipeline-page th:nth-child(-n+2){text-align:left}.pipeline-totals{grid-template-columns:repeat(4,1fr);margin:1rem 0}@media(max-width:720px){.pipeline-totals{grid-template-columns:1fr 1fr}}
.pipeline-page tr.subtotal th,.pipeline-page tr.subtotal td{background:#1d70b8;color:#fff;font-weight:700;border-top:2px solid #155a91;border-bottom:2px solid #155a91}.pipeline-page tr.manager-heading th{background:#1d70b8;color:#fff}
.pipeline-page td.strong-value,.pipeline-page th.strong-value{font-weight:800}
.pipeline-page tr.department-total th,.pipeline-page tr.department-total td{background:#fff3cd;color:#4d3b00;font-weight:800;border-top:3px solid #d6a800;border-bottom:3px solid #d6a800}.pipeline-page td.negative,.pipeline-page tr.subtotal td.negative,.pipeline-page tr.department-total td.negative{color:#d92d20!important}
.pipeline-page .client-display{line-height:1.25}.pipeline-page .client-display small{display:block;margin-top:.16rem;color:var(--muted);font-size:.86em}
.pipeline-page{max-width:1600px;padding-left:1.25rem;padding-right:1.25rem}.pipeline-summary-table{min-width:0;table-layout:fixed}.pipeline-summary-table th,.pipeline-summary-table td{padding:.48rem .35rem;font-size:.78rem;line-height:1.3;white-space:normal;overflow-wrap:anywhere}.pipeline-summary-table th:nth-child(1),.pipeline-summary-table td:nth-child(1){width:8%}.pipeline-summary-table th:nth-child(2),.pipeline-summary-table td:nth-child(2){width:16%}.pipeline-summary-table th:nth-child(n+3):nth-child(-n+6),.pipeline-summary-table td:nth-child(n+3):nth-child(-n+6){width:6%}.pipeline-summary-table th:nth-child(7),.pipeline-summary-table td:nth-child(7){width:8%}.pipeline-summary-table th:nth-child(8),.pipeline-summary-table td:nth-child(8){width:6%}.pipeline-summary-table th:nth-child(9),.pipeline-summary-table td:nth-child(9),.pipeline-summary-table th:nth-child(10),.pipeline-summary-table td:nth-child(10){width:5%}.pipeline-summary-table th:nth-child(11),.pipeline-summary-table td:nth-child(11){width:6%}.pipeline-summary-table th:nth-child(12),.pipeline-summary-table td:nth-child(12){width:8%}.pipeline-summary-table th:nth-child(13),.pipeline-summary-table td:nth-child(13){width:6%}.pipeline-summary-table th:nth-child(14),.pipeline-summary-table td:nth-child(14){width:8%}
.print-heading{display:none}@media print{@page{size:A3 portrait;margin:8mm}body{background:#fff}.site-header,.pipeline-page>.page-title,.pipeline-page>.filter-panel,.pipeline-page>.status,.gap-panel{display:none!important}.pipeline-page{max-width:none;padding:0;margin:0}.print-target{margin:0;padding:0;border:0;box-shadow:none}.print-target>.print-heading{display:flex;align-items:flex-end;justify-content:space-between;margin:0 0 5mm}.print-heading h1{font-size:18pt}.print-heading p{font-size:8pt;margin:0}.print-target>h2,.print-target>h3{display:none}.print-target .table-wrap{overflow:visible;border:0}.pipeline-summary-table{width:100%;min-width:0;table-layout:fixed}.pipeline-summary-table th,.pipeline-summary-table td{padding:1.5mm .8mm;font-size:6.6pt;line-height:1.2;overflow-wrap:anywhere}.pipeline-summary-table tr{break-inside:avoid;page-break-inside:avoid}.pipeline-summary-table thead{display:table-header-group}}
.entry-box,.client-group{background:#fff;border:1px solid var(--line);border-radius:8px;padding:1.25rem;margin-top:1rem}.entry-box h2,.client-group h2{font-size:1.1rem;margin:0 0 1rem}.entry-box summary{font-weight:700;cursor:pointer}.entry-box[open] summary{margin-bottom:1rem}.client-group .table-wrap{border:0;border-radius:0}.empty-message{padding:1rem;margin:0}.field-output{align-self:end;padding:.55rem .6rem;min-height:2.5rem;background:#f5f7fa;border-radius:5px;color:var(--muted)}#estimated-wrap[hidden]{display:none}
.unified-item-line{border:1px solid var(--line);border-radius:8px;padding:1rem;margin:1rem 0;background:#fafcff}.unified-item-line h3{margin:0 0 .75rem}.special-options{border:1px solid var(--line);border-radius:6px;padding:.65rem .8rem;display:flex;gap:1rem;flex-wrap:wrap}.special-options legend{font-size:.86rem;font-weight:700;padding:0 .35rem}.special-options label{display:flex;align-items:center;gap:.35rem}.special-options input[type=checkbox]{width:auto;margin:0}
.client-monthly-plan-panel .table-wrap{overflow-x:auto}.client-monthly-plan-panel table{min-width:940px;font-size:.82rem}.client-monthly-plan-panel th,.client-monthly-plan-panel td{padding:.38rem .45rem;white-space:nowrap}.client-monthly-plan-panel th:nth-child(2),.client-monthly-plan-panel td:nth-child(2){white-space:normal;min-width:160px}.client-monthly-plan-panel th:nth-child(3),.client-monthly-plan-panel td:nth-child(3){white-space:normal;min-width:120px}.client-monthly-plan-panel select,.client-monthly-plan-panel input[type="number"]{min-width:118px;font-size:.82rem;padding:.3rem .4rem}.client-monthly-plan-panel .manager-heading th{padding:.42rem .5rem;font-size:.86rem}@media(max-width:900px){.client-monthly-plan-panel table{min-width:840px;font-size:.78rem}.client-monthly-plan-panel th,.client-monthly-plan-panel td{padding:.32rem .36rem}.client-monthly-plan-panel select,.client-monthly-plan-panel input[type="number"]{min-width:104px;font-size:.78rem}}
.pipeline-summary-table select,.pipeline-summary-table input[type="number"]{min-width:0;margin:0;padding:.28rem .32rem;font-size:.74rem}
.button.danger{border-color:#b42318;color:#b42318}.sales-processed{display:inline-block;color:#1f7a3d;font-weight:700;white-space:nowrap}
.report-tabs{margin-bottom:0}.report-tab-content{margin-top:0;border-top-left-radius:0}.report-tab-content[hidden],[data-report-action][hidden]{display:none!important}@media print{.report-tabs{display:none!important}}
@media print{#inline-plan-add{display:none!important}}

/* 積上表・GAP一覧を除く画面は、一覧性を優先して表示密度を高める。 */
@media (min-width:721px){
  .page:not(.pipeline-page){max-width:1440px;padding:1.2rem 2.5vw}
  .page:not(.pipeline-page) .page-title{margin-bottom:.5rem}
  .page:not(.pipeline-page) .page-title h1{font-size:1.45rem}
  .page:not(.pipeline-page) .muted{font-size:.84rem}
  .page:not(.pipeline-page) .filter-panel{gap:.65rem;padding:.65rem .8rem;margin:.8rem 0}
  .page:not(.pipeline-page) .field-grid{gap:.65rem}
  .page:not(.pipeline-page) label{font-size:.8rem}
  .page:not(.pipeline-page) input,.page:not(.pipeline-page) select,.page:not(.pipeline-page) textarea{margin-top:.2rem;padding:.4rem .5rem;font-size:.88rem}
  .page:not(.pipeline-page) textarea{min-height:64px}
  .page:not(.pipeline-page) .button{padding:.4rem .65rem;font-size:.86rem}
  .page:not(.pipeline-page) .form-actions{gap:.5rem;margin-top:.8rem}
  .page:not(.pipeline-page) .tabs{margin-top:.6rem}
  .page:not(.pipeline-page) .tab{padding:.55rem .75rem}
  .page:not(.pipeline-page) th,.page:not(.pipeline-page) td{padding:.42rem .5rem;font-size:.82rem}
  .page:not(.pipeline-page) .table-wrap{border-radius:6px}
  .page:not(.pipeline-page) .entry-box,.page:not(.pipeline-page) .client-group{padding:.85rem;margin-top:.7rem}
  .page:not(.pipeline-page) .summary-cards{gap:.65rem}
  .page:not(.pipeline-page) .summary-cards article{padding:.65rem}
}
.project-detail-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.65rem}.production-assignee-list{display:grid;gap:.45rem}.production-assignee-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem;align-items:end}.production-assignee-row .button{padding:.45rem .65rem}.production-assignee-row label{min-width:0}.unified-item-line .detail-row{display:grid;gap:.55rem;margin-top:.55rem;align-items:end}.unified-item-line .detail-row-sales{grid-template-columns:1.35fr repeat(3,minmax(0,1fr))}.unified-item-line .detail-row-supplier{grid-template-columns:1fr 2fr}.unified-item-line .detail-row-purchase{grid-template-columns:repeat(3,minmax(0,1fr))}.unified-item-line .detail-row-special{grid-template-columns:2fr 1fr;align-items:center}.unified-item-line .detail-row input,.unified-item-line .detail-row select{padding:.38rem .45rem;font-size:.8rem}.unified-item-line .detail-row label,.unified-item-line .detail-row legend{font-size:.78rem}.unified-item-line input[readonly]{background:#edf3f8;font-weight:700}@media(max-width:800px){.project-detail-grid,.unified-item-line .detail-row-sales{grid-template-columns:1fr 1fr}.unified-item-line .detail-row-supplier,.unified-item-line .detail-row-purchase,.unified-item-line .detail-row-special{grid-template-columns:1fr}}@media(max-width:460px){.project-detail-grid,.unified-item-line .detail-row-sales{grid-template-columns:1fr}}
.paired-entry-grid{display:grid;gap:.35rem;margin-top:.5rem}.paired-entry-row{display:grid;grid-template-columns:4rem minmax(5rem,.8fr) minmax(6rem,1fr) minmax(6rem,1fr) minmax(12rem,1.7fr);gap:.55rem;align-items:end}.paired-entry-heading{align-items:center;padding:.35rem .5rem;background:#eef3f8;border-radius:6px;color:#475569;font-size:.76rem;font-weight:700}.paired-entry-side{display:flex;align-items:center;justify-content:center;min-height:2.45rem;border-radius:6px;background:#f1f5f9;color:#334155}.paired-entry-purchase{padding:.4rem .5rem;background:#f8fafc;border-radius:8px}.paired-entry-sales{padding:.4rem .5rem;background:#fff;border:1px solid #e2e8f0;border-radius:8px}.paired-entry-row label{display:grid;gap:.25rem;min-width:0;font-size:.78rem;font-weight:600}.paired-entry-row input,.paired-entry-row select{width:100%;min-width:0;padding:.45rem;font-size:.88rem}.paired-entry-row input[readonly]{background:#eaf0f6;font-weight:700}.paired-entry-meta{display:grid;grid-template-columns:1fr 1fr;gap:.45rem}.paired-entry-meta label{font-size:.72rem}.paired-entry-meta input{font-size:.8rem}.unified-item-line .detail-row-special{display:grid;grid-template-columns:minmax(12rem,1.2fr) minmax(12rem,1fr) minmax(9rem,.8fr);gap:.6rem;align-items:center;margin-top:.65rem}.unified-item-line .advance-payment-choice{display:flex;align-items:center;gap:.45rem}.unified-item-line .advance-payment-choice input{width:auto}.unified-item-line .special-options{margin:0}.unified-item-line .special-amount-wrap{min-width:0}@media(max-width:900px){.paired-entry-row{grid-template-columns:3.5rem repeat(3,minmax(5rem,1fr))}.paired-entry-heading{display:none}.paired-entry-meta{grid-column:2/-1}.paired-entry-sales>label:last-child{grid-column:2/-1}.unified-item-line .detail-row-special{grid-template-columns:1fr 1fr}.unified-item-line .special-amount-wrap{grid-column:2}}
 .unified-item-line .supplier-master-wrap[hidden]{display:none!important}.paired-entry-heading span:first-child{grid-column:1}.paired-entry-heading span:nth-child(2){grid-column:2}.paired-entry-heading span:nth-child(3){grid-column:3}.paired-entry-heading span:nth-child(4){grid-column:4}.paired-entry-heading span:nth-child(5){grid-column:5}
 .paired-description{display:grid;grid-template-columns:minmax(0,3fr) minmax(8rem,1fr);gap:.7rem;margin:.6rem 0}.paired-description label{display:grid;gap:.25rem;font-size:.8rem}.paired-description textarea{min-height:3.5rem;resize:vertical}.paired-description input{padding:.45rem}.paired-entry-grid{max-width:100%}@media(max-width:560px){.paired-description{grid-template-columns:1fr 1fr;gap:.5rem}.paired-entry-row{gap:.35rem;grid-template-columns:3.1rem repeat(3,minmax(4.2rem,1fr))}.paired-entry-row input,.paired-entry-row select{padding:.35rem;font-size:.8rem}.unified-item-line .detail-row-special{grid-template-columns:1fr}.unified-item-line .special-amount-wrap{grid-column:auto}}
 .estimate-header-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem;align-items:end}.estimate-header-grid .wide{grid-column:span 2}.estimate-edit .entry-box,.estimate-page .entry-box{background:#fff;border:1px solid var(--line);border-radius:8px;padding:1.1rem;margin:1rem 0}.estimate-edit .entry-box h2{margin:0 0 .9rem;font-size:1.15rem}.estimate-summary{margin:1rem 0}.estimate-status{max-width:260px}.estimate-item-line h3{display:flex;align-items:center;justify-content:space-between}.estimate-candidate-list{margin:.7rem 0;border:1px solid var(--line);border-radius:7px;background:#f8fafc;padding:.65rem}.estimate-candidate-list summary{cursor:pointer;font-weight:700}.estimate-candidate{display:grid;grid-template-columns:1fr 1.3fr 1.2fr .8fr 1.2fr 1.2fr auto auto;gap:.5rem;align-items:end;padding:.7rem 0;border-bottom:1px solid #d9e0e8}.estimate-candidate:last-child{border-bottom:0}.estimate-candidate label{font-size:.76rem}.estimate-candidate input,.estimate-candidate select{padding:.4rem;font-size:.82rem}.estimate-candidate .candidate-adopt{display:flex;gap:.3rem;align-items:center;white-space:nowrap}.estimate-candidate .candidate-adopt input{width:auto}.estimate-candidate .candidate-note{min-width:0}.estimate-page table{min-width:980px}.estimate-page td:last-child{white-space:nowrap}.paired-entry-meta [data-selected-label]{align-self:center;font-size:.8rem}.paired-entry-meta .estimate-add-candidate{white-space:nowrap}@media(max-width:1000px){.estimate-candidate{grid-template-columns:repeat(4,minmax(0,1fr))}.estimate-candidate .candidate-note{grid-column:span 2}}@media(max-width:720px){.estimate-header-grid{grid-template-columns:1fr 1fr}.estimate-header-grid .wide{grid-column:span 2}.estimate-candidate{grid-template-columns:1fr 1fr}.estimate-candidate .candidate-note{grid-column:span 2}.estimate-summary{grid-template-columns:1fr 1fr}.estimate-edit .form-actions{flex-wrap:wrap}}
/* Spreadsheet-style project detail entry: one item per row with purchase/sales values stacked in cells. */
.spreadsheet-wrap{width:100%;overflow:auto;border:1px solid #cbd5e1;border-radius:8px;background:#fff;max-height:72vh}.project-entry-sheet{width:100%;min-width:1480px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:.8rem}.project-entry-sheet th,.project-entry-sheet td{padding:.4rem;border-right:1px solid #d8e0e8;border-bottom:1px solid #d8e0e8;vertical-align:middle}.project-entry-sheet th{position:sticky;top:0;z-index:2;background:#eaf0f6;text-align:left;color:#334155;line-height:1.25}.project-entry-sheet th small{font-weight:400;color:#64748b}.project-entry-sheet th:nth-child(1){width:46px}.project-entry-sheet th:nth-child(2){width:240px}.project-entry-sheet th:nth-child(3){width:165px}.project-entry-sheet th:nth-child(4){width:140px}.project-entry-sheet th:nth-child(5){width:78px}.project-entry-sheet th:nth-child(6){width:60px}.project-entry-sheet th:nth-child(7),.project-entry-sheet th:nth-child(8){width:140px}.project-entry-sheet th:nth-child(9){width:205px}.project-entry-sheet th:nth-child(10){width:210px}.project-entry-sheet tbody tr:nth-child(even){background:#f8fafc}.project-entry-sheet tbody tr[hidden]{display:none}.project-entry-sheet tbody tr:focus-within{background:#fff8db}.project-entry-sheet input,.project-entry-sheet select{display:block;width:100%;min-width:0;min-height:2.2rem;padding:.35rem .4rem;border:1px solid #cbd5e1;border-radius:4px;font:inherit;background:#fff}.project-entry-sheet input[readonly]{background:#eef2f7;font-weight:700;text-align:right}.project-entry-sheet input:focus,.project-entry-sheet select:focus{outline:2px solid #3976bb;outline-offset:-1px}.project-entry-sheet .sheet-row-number{position:sticky;left:0;z-index:1;width:46px;text-align:center;background:#f1f5f9;font-weight:700}.project-entry-sheet tbody tr:nth-child(even) .sheet-row-number{background:#edf2f7}.project-entry-sheet .sheet-row-number input[type=hidden]{display:none}.project-entry-sheet .sheet-description{position:sticky;left:46px;z-index:1;background:#fff}.project-entry-sheet tbody tr:nth-child(even) .sheet-description{background:#f8fafc}.project-entry-sheet tbody tr:focus-within .sheet-row-number,.project-entry-sheet tbody tr:focus-within .sheet-description{background:#fff8db}.project-entry-sheet .sheet-pair{display:grid;gap:3px}.project-entry-sheet .sheet-pair label{display:grid;grid-template-columns:2.7rem minmax(0,1fr);gap:3px;align-items:center}.project-entry-sheet .sheet-pair label>span{font-size:.68rem;color:#475569}.project-entry-sheet .sheet-pair input{font-variant-numeric:tabular-nums}.project-entry-sheet .supplier-master-wrap[hidden]{display:none!important}.project-entry-sheet .detail-row-special{display:grid;grid-template-columns:1fr;gap:.25rem;margin:0}.project-entry-sheet .detail-row-special .advance-payment-choice{display:flex;align-items:center;gap:.3rem;font-size:.7rem}.project-entry-sheet .detail-row-special input[type=checkbox]{display:inline-block;width:auto;min-height:auto;margin:0}.project-entry-sheet .special-options{display:flex;align-items:center;gap:.4rem;margin:0;padding:.2rem .35rem;min-width:0}.project-entry-sheet .special-options legend{font-size:.67rem;padding:0 .2rem}.project-entry-sheet .special-options label{display:flex;align-items:center;gap:.2rem;font-size:.68rem;white-space:nowrap}.project-entry-sheet .special-amount-wrap{display:block;font-size:.67rem}.project-entry-sheet .special-amount-wrap[hidden]{display:none!important}.spreadsheet-actions{display:flex;justify-content:flex-end;margin:.6rem 0}.spreadsheet-actions .button{min-width:140px}@media(max-width:700px){.spreadsheet-wrap{max-height:65vh}.project-entry-sheet{min-width:1420px}.spreadsheet-actions{position:sticky;right:0}}
/* Spreadsheet-style estimate entry: item, text and image rows follow the supplied quote form. */
.estimate-sheet-section .section-head{align-items:flex-start}.estimate-sheet-actions{display:flex;gap:.5rem;flex-wrap:wrap;justify-content:flex-end}.estimate-spreadsheet-wrap{max-height:72vh}.estimate-entry-sheet{width:100%;min-width:1560px;table-layout:fixed;border-collapse:separate;border-spacing:0;font-size:.8rem}.estimate-entry-sheet th,.estimate-entry-sheet td{padding:.4rem;border-right:1px solid #d8e0e8;border-bottom:1px solid #d8e0e8;vertical-align:middle}.estimate-entry-sheet th{position:sticky;top:0;z-index:2;background:#eaf0f6;text-align:left;color:#334155;line-height:1.25}.estimate-entry-sheet th small{font-weight:400;color:#64748b}.estimate-entry-sheet th:nth-child(1){width:48px}.estimate-entry-sheet th:nth-child(2),.estimate-entry-sheet th:nth-child(3){width:250px}.estimate-entry-sheet th:nth-child(4){width:155px}.estimate-entry-sheet th:nth-child(5){width:95px}.estimate-entry-sheet th:nth-child(6){width:85px}.estimate-entry-sheet th:nth-child(7),.estimate-entry-sheet th:nth-child(8){width:155px}.estimate-entry-sheet th:nth-child(9){width:110px}.estimate-entry-sheet th:nth-child(10){width:170px}.estimate-entry-sheet input,.estimate-entry-sheet select{display:block;width:100%;min-width:0;min-height:2.2rem;padding:.35rem .4rem;border:1px solid #cbd5e1;border-radius:4px;font:inherit;background:#fff}.estimate-entry-sheet input[readonly]{background:#eef2f7;font-weight:700;text-align:right}.estimate-entry-sheet tbody.estimate-line-group:nth-of-type(even) tr.estimate-item-line{background:#f8fafc}.estimate-entry-sheet tr.estimate-item-line:focus-within{background:#fff8db}.estimate-row-number{text-align:center;font-weight:700;background:#f1f5f9}.estimate-sheet-pair{display:grid;gap:3px}.estimate-sheet-pair label{display:grid;grid-template-columns:3.5rem minmax(0,1fr);gap:3px;align-items:center;font-size:.68rem;color:#475569}.estimate-row-actions{display:flex;gap:.3rem;align-items:center}.estimate-row-actions .button,.estimate-sheet-actions .button,.estimate-entry-sheet .button{padding:.35rem .5rem;font-size:.75rem;white-space:nowrap}.estimate-item-line.is-text-row td{background:#fcfcfd}.estimate-images-row td,.estimate-candidates-row td{padding:.3rem .5rem;background:#fff}.estimate-image-list{display:flex;gap:.65rem;align-items:flex-start;flex-wrap:wrap}.estimate-image-chip{width:150px;margin:0;padding:.35rem;border:1px solid var(--line);border-radius:6px;background:#fff}.estimate-image-chip img{display:block;width:100%;height:90px;object-fit:contain;background:#f8fafc}.estimate-image-chip figcaption{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.7rem;color:var(--muted)}.estimate-image-chip button{width:100%;margin-top:.25rem}.estimate-candidate-list{margin:.1rem 0;border:0;border-radius:0;background:transparent;padding:0}.estimate-candidate-list summary{font-size:.75rem;color:#475569}.estimate-candidate-list[open]{padding:.4rem;background:#f8fafc}.estimate-entry-sheet .estimate-candidate{grid-template-columns:1fr 1.2fr 1.1fr .8fr 1.1fr 1.2fr auto auto}.estimate-entry-sheet .estimate-candidate label{display:grid;gap:.2rem;font-size:.7rem}.estimate-entry-sheet .estimate-candidate input,.estimate-entry-sheet .estimate-candidate select{padding:.35rem;font-size:.75rem}.estimate-entry-sheet .estimate-candidate .candidate-adopt{display:flex;align-items:center;white-space:nowrap}.estimate-entry-sheet .estimate-candidate .candidate-adopt input{width:auto;min-height:auto}.estimate-entry-sheet [hidden]{display:none!important}@media(max-width:720px){.estimate-sheet-section .section-head{display:block}.estimate-sheet-actions{justify-content:flex-start;margin:.5rem 0}.estimate-spreadsheet-wrap{max-height:65vh}.estimate-entry-sheet{min-width:1560px}.estimate-entry-sheet .estimate-candidate{grid-template-columns:repeat(4,minmax(130px,1fr))}}
.estimate-entry-sheet .estimate-candidate{grid-template-columns:minmax(120px,.9fr) minmax(220px,1.8fr) minmax(110px,.8fr) minmax(120px,.9fr) minmax(140px,1fr) auto auto}.estimate-entry-sheet .estimate-candidate [name=lead_time]{display:none}.estimate-entry-sheet .candidate-supplier input{width:100%}.estimate-entry-sheet .candidate-amount input{background:#eef2f7;font-weight:700;text-align:right}.estimate-entry-sheet .estimate-candidate-list summary{font-weight:700}.estimate-entry-sheet .estimate-candidate-list[open]{padding:.5rem;background:#f8fafc}.estimate-line-profit{padding-top:.25rem;text-align:right;font-size:.72rem;color:#475569}.estimate-line-profit strong{font-size:.86rem;color:#0f172a}.estimate-entry-sheet .estimate-add-candidate{min-width:6.5rem}@media(max-width:720px){.estimate-entry-sheet .estimate-candidate{grid-template-columns:repeat(4,minmax(130px,1fr))}.estimate-entry-sheet .estimate-candidate .candidate-note{grid-column:span 2}}
/* 2026-10-14 estimate supplier slots and per-row insert controls */
.estimate-entry-sheet{min-width:1600px}
.estimate-entry-sheet th:nth-child(1){width:48px}
.estimate-entry-sheet th:nth-child(2){width:200px}
.estimate-entry-sheet th:nth-child(3){width:160px}
.estimate-entry-sheet th:nth-child(4){width:125px}
.estimate-entry-sheet th:nth-child(5){width:68px}
.estimate-entry-sheet th:nth-child(6){width:60px}
.estimate-entry-sheet th:nth-child(7){width:105px}
.estimate-entry-sheet th:nth-child(8){width:115px}
.estimate-entry-sheet th:nth-child(9){width:78px}
.estimate-entry-sheet th:nth-child(10),.estimate-entry-sheet th:nth-child(11),.estimate-entry-sheet th:nth-child(12){width:180px}
.estimate-entry-sheet th:nth-child(13){width:190px}
.estimate-supplier-slot{vertical-align:top!important;background:#fbfdff}
.estimate-entry-sheet .estimate-supplier-slot .estimate-candidate{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.3rem;align-items:center;padding:.3rem 0;border:0}
.estimate-entry-sheet .estimate-supplier-slot .candidate-top{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.3rem;align-items:center}
.estimate-entry-sheet .estimate-supplier-slot .candidate-supplier,.estimate-entry-sheet .estimate-supplier-slot .candidate-inventory{min-width:0;display:grid;gap:.15rem;font-size:.68rem}
.estimate-entry-sheet .estimate-supplier-slot .candidate-adopt{display:flex;gap:.15rem;align-items:center;font-size:.68rem;white-space:nowrap}
.estimate-entry-sheet .estimate-supplier-slot .candidate-adopt input{width:auto;min-height:auto;margin:0}
.estimate-entry-sheet .estimate-supplier-slot .candidate-amount{grid-column:1;display:grid!important;gap:.15rem;font-size:.68rem}
.estimate-entry-sheet .estimate-supplier-slot .candidate-amount input{font-size:.78rem;text-align:right;font-weight:700}
.estimate-entry-sheet .estimate-supplier-slot .estimate-remove-candidate{grid-column:2;padding:.25rem .35rem;font-size:.65rem}
.estimate-entry-sheet .estimate-candidates-row .estimate-candidate{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem;max-width:620px;padding:.45rem;border-bottom:1px solid #d9e0e8;background:#fff}
.estimate-entry-sheet .estimate-candidates-row .candidate-top{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem;align-items:center}
.estimate-entry-sheet .estimate-candidates-row .candidate-supplier,.estimate-entry-sheet .estimate-candidates-row .candidate-inventory{display:grid;gap:.2rem;font-size:.75rem}
.estimate-entry-sheet .estimate-candidates-row .candidate-adopt{display:flex;gap:.25rem;align-items:center;white-space:nowrap}
.estimate-entry-sheet .estimate-candidates-row .candidate-amount{display:grid!important;gap:.2rem;font-size:.75rem}
.estimate-entry-sheet .estimate-candidates-row .candidate-amount input{max-width:220px;text-align:right}
.estimate-entry-sheet .estimate-candidates-row .estimate-remove-candidate{grid-column:2;grid-row:1/3;align-self:center}
.estimate-entry-sheet .estimate-row-insert-actions td{padding:.25rem .4rem;background:#f1f5f9}
.estimate-entry-sheet .estimate-row-insert-actions .button{padding:.3rem .5rem;font-size:.72rem}
.estimate-entry-sheet .estimate-line-profit{font-size:.68rem}
.estimate-entry-sheet .estimate-sheet-pair label{grid-template-columns:minmax(0,1fr);font-size:.66rem}
@media(max-width:720px){.estimate-entry-sheet{min-width:1600px}}

.estimate-tax-choice{display:grid;gap:.2rem;font-size:.7rem;min-width:0}.estimate-tax-choice input{min-width:0}.estimate-item-line.is-subtotal-row td{background:#eef3f8;font-weight:600}.project-entry-sheet .sheet-tax-choice{display:grid;gap:.2rem;font-size:.68rem}.project-entry-sheet .sheet-tax-choice input{font-size:.72rem}.estimate-row-actions{flex-direction:column;align-items:stretch}.estimate-row-actions .estimate-remove-line{width:100%}

/* Compact amount entry and denser estimate/project sheets. */
.project-entry-sheet{font-size:.7rem;min-width:1320px}.project-entry-sheet th,.project-entry-sheet td{padding:.3rem}.project-entry-sheet input,.project-entry-sheet select{min-height:1.9rem;padding:.25rem .3rem;font-size:.7rem}.project-entry-sheet .sheet-pair label{grid-template-columns:2.2rem minmax(0,1fr)}
.estimate-entry-sheet{font-size:.7rem;min-width:1440px}.estimate-entry-sheet th,.estimate-entry-sheet td{padding:.3rem}.estimate-entry-sheet input,.estimate-entry-sheet select{min-height:1.9rem;padding:.25rem .3rem;font-size:.7rem}.estimate-entry-sheet th:nth-child(2){width:180px}.estimate-entry-sheet th:nth-child(3){width:140px}.estimate-entry-sheet th:nth-child(7){width:95px}.estimate-entry-sheet th:nth-child(8){width:105px}.estimate-entry-sheet th:nth-child(9){width:72px}.estimate-entry-sheet th:nth-child(10),.estimate-entry-sheet th:nth-child(11),.estimate-entry-sheet th:nth-child(12){width:155px}.estimate-entry-sheet .estimate-supplier-slot .candidate-supplier{font-size:0!important}.estimate-entry-sheet .estimate-supplier-slot .candidate-supplier .candidate-label-title{display:none}.estimate-entry-sheet .estimate-supplier-slot .candidate-supplier:before{font-size:.68rem;font-weight:700;color:#334155}.estimate-entry-sheet [data-supplier-slot="0"] .candidate-supplier:before{content:"仕入先1"}.estimate-entry-sheet [data-supplier-slot="1"] .candidate-supplier:before{content:"仕入先2"}.estimate-entry-sheet [data-supplier-slot="2"] .candidate-supplier:before{content:"仕入先3"}
.estimate-image-list{display:grid;grid-auto-flow:column;grid-template-rows:repeat(2,minmax(0,auto));grid-auto-columns:110px;gap:.4rem;overflow-x:auto;max-height:190px;padding:.2rem}.estimate-image-chip{width:106px;padding:.25rem}.estimate-image-chip img{height:64px}.estimate-image-chip button{padding:.25rem;font-size:.65rem}
