﻿:root{--navy:#17324d;--navy-2:#244b6f;--blue:#1769aa;--blue-hover:#0f578f;--green:#087f5b;--red:#b42318;--ink:#17212b;--muted:#657384;--line:#d9e0e7;--soft:#f3f6f8;--card:#fff;--shadow:0 1px 3px rgba(16,24,40,.08),0 8px 24px rgba(16,24,40,.05)}
*{box-sizing:border-box}html{font-size:16px}body{margin:0;background:#eef2f5;color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Yu Gothic UI","Meiryo",sans-serif;line-height:1.55}.site-header{position:sticky;top:0;z-index:20;background:var(--navy);color:#fff;box-shadow:0 2px 8px rgba(0,0,0,.16)}.nav-shell{max-width:1600px;min-height:64px;margin:auto;padding:0 28px;display:flex;align-items:center;gap:28px}.brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-size:18px;font-weight:700;white-space:nowrap}.brand-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;background:#fff;color:var(--navy);font-size:13px;letter-spacing:.04em}.main-nav{display:flex;align-self:stretch;align-items:stretch;gap:2px;min-width:0}.main-nav a{display:flex;align-items:center;padding:0 12px;color:#dce8f3;text-decoration:none;font-size:14px;font-weight:600;border-bottom:3px solid transparent;white-space:nowrap}.main-nav a:hover{background:rgba(255,255,255,.08);color:#fff}.main-nav a.active{background:rgba(255,255,255,.1);color:#fff;border-bottom-color:#70c5ff}.user-menu{margin-left:auto;display:flex;align-items:center;gap:12px;white-space:nowrap}.user-name{color:#dce8f3;font-size:14px}.user-menu form{margin:0}.nav-logout{border:1px solid rgba(255,255,255,.45);background:transparent;color:#fff;height:34px;padding:0 12px;border-radius:6px;font-weight:600;cursor:pointer}.nav-logout:hover{background:#fff;color:var(--navy)}
.page-shell{max-width:1520px;margin:0 auto;padding:32px 34px 56px}.page-header{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:20px}.page-header h1{margin:0}.page-subtitle{margin:5px 0 0;color:var(--muted)}h1{font-size:28px;line-height:1.25;letter-spacing:.01em}h2{font-size:20px;margin:0 0 16px}h3{font-size:17px}a{color:#1769aa}.card{background:var(--card);border:1px solid #e1e7ed;border-radius:10px;box-shadow:var(--shadow);padding:24px;margin-bottom:22px}.card-header{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px}.card-header h2{margin:0}.section-note,.muted{color:var(--muted);font-size:14px}.message,.notice{padding:12px 16px;border:1px solid #b8ddc9;border-radius:8px;background:#ecf8f1;color:#15603f;margin-bottom:18px}.notice.readonly{border-color:#b8cce0;background:#edf4fb;color:#244b6f}
.actions,.toolbar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:16px 0}.actions form,.toolbar form{display:inline-flex;margin:0}.button,button{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:8px 16px;border:1px solid transparent;border-radius:7px;background:var(--blue);color:#fff;text-decoration:none;font:inherit;font-size:14px;font-weight:700;line-height:1.2;cursor:pointer;white-space:nowrap}.button:hover,button:hover{background:var(--blue-hover);color:#fff}.button.secondary,button.secondary{background:#fff;border-color:#bfcad5;color:#2c4358}.button.secondary:hover,button.secondary:hover{background:#f5f8fa}.button.subtle,button.subtle{background:#eef3f7;color:#354b5f}.button.issue,button.issue{background:var(--green)}.button.issue:hover,button.issue:hover{background:#06694b}.danger,.button.danger,button.danger{background:var(--red)}.danger:hover,.button.danger:hover,button.danger:hover{background:#912018}.button.small,button.small{min-height:32px;padding:5px 10px;font-size:13px}.text-link{font-weight:650;text-decoration:none}.text-link:hover{text-decoration:underline}
.table-wrap{width:100%;overflow-x:auto;border:1px solid var(--line);border-radius:8px;background:#fff}table{width:100%;border-collapse:separate;border-spacing:0}th,td{padding:12px 13px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}th{background:#edf2f6;color:#30465a;font-size:13px;font-weight:750;white-space:nowrap}tr:last-child td{border-bottom:0}tbody tr:hover td{background:#f8fbfd}.num{text-align:right!important;font-variant-numeric:tabular-nums;white-space:nowrap}.nowrap{white-space:nowrap}.truncate{max-width:300px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.empty{text-align:center;color:var(--muted);padding:32px}.badge{display:inline-flex;align-items:center;min-height:26px;padding:3px 9px;border-radius:999px;background:#e7f1fa;color:#175784;font-size:13px;font-weight:750;white-space:nowrap}.badge.success{background:#e7f6ef;color:#08704f}.badge.neutral{background:#edf0f3;color:#526170}.totals{width:min(100%,520px);margin:20px 0 0 auto;border:1px solid var(--line);border-radius:8px;overflow:hidden}.totals th{width:54%}.totals td{text-align:right;font-weight:700;font-variant-numeric:tabular-nums}.totals tr:last-child th,.totals tr:last-child td{background:#e8f1f8;font-size:17px;color:#183c5d}
.form-card{max-width:920px}.form-grid p,.card>form>p{display:grid;grid-template-columns:220px minmax(0,1fr);align-items:start;gap:16px;margin:0;padding:10px 0}.form-grid label,.card>form>p label{font-weight:700;padding-top:8px;color:#34495d}.helptext{grid-column:2;color:var(--muted);font-size:13px}input,select,textarea{width:100%;max-width:100%;min-height:40px;padding:8px 10px;border:1px solid #b9c5d0;border-radius:6px;background:#fff;color:var(--ink);font:inherit}input[type=checkbox]{width:18px;min-height:18px}textarea{min-height:84px;resize:vertical}input:focus,select:focus,textarea:focus{outline:3px solid rgba(23,105,170,.16);border-color:#4289bf}.errorlist{grid-column:2;margin:0;padding-left:20px;color:#b42318}.required label:after,label.required:after{content:" 必須";color:#b42318;font-size:11px}.filter-bar{display:grid;grid-template-columns:minmax(260px,2fr) repeat(3,minmax(160px,1fr)) auto;gap:10px;align-items:center}.filter-bar.compact{grid-template-columns:minmax(260px,1fr) auto}.pagination{display:flex;justify-content:center;align-items:center;gap:18px;margin-top:20px}.metric-grid{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px}.metric{padding:16px;border:1px solid var(--line);border-radius:8px;background:#f8fafc}.metric-label{display:block;color:var(--muted);font-size:13px;margin-bottom:4px}.metric-value{display:block;font-size:21px;font-weight:750;text-align:right;font-variant-numeric:tabular-nums}.document-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.login-shell{max-width:460px;margin:70px auto}.login-shell .brand-login{text-align:center;margin-bottom:24px}.login-shell .brand-login .brand-mark{margin:0 auto 10px;width:46px;height:46px}.login-shell form p{display:block;padding:7px 0}.login-shell form label{display:block;padding:0 0 6px}.login-shell button{width:100%;margin-top:10px}.item-table input,.item-table select,.item-table textarea{min-width:92px;font-size:13px}.item-table textarea{min-width:180px}.item-table td{padding:8px}.item-table{min-width:1380px}.summary-strip{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.summary-strip .badge{font-size:14px}.inline-list{margin:8px 0;padding-left:20px}
@media(max-width:1400px){.nav-shell{padding:0 18px;gap:14px}.main-nav a{padding:0 8px;font-size:13px}.brand{font-size:16px}.user-menu{gap:8px}.page-header{flex-wrap:wrap}.page-shell{padding-left:24px;padding-right:24px}}
@media(max-width:1200px){.nav-shell{padding:0 18px;gap:14px}.main-nav a{padding:0 8px;font-size:13px}.brand span:last-child{display:none}.page-shell{padding:26px 22px 46px}.filter-bar{grid-template-columns:repeat(2,minmax(220px,1fr))}.metric-grid{grid-template-columns:repeat(2,1fr)}}

/* Quote editor Phase 1: customer/quote selection and safe revision loading. */
.quote-editor-selector{display:grid;gap:12px}.quote-editor-customer-search{display:flex;align-items:end;gap:8px}.quote-editor-customer-search label{display:grid;flex:1;gap:4px;font-weight:700}.quote-editor-customer-results{display:flex;flex-wrap:wrap;gap:7px}.quote-editor-customer-results a{padding:7px 10px;border:1px solid var(--line);border-radius:6px;background:#f8fafc;text-decoration:none}.quote-editor-current-customer{display:flex;align-items:center;gap:12px;padding-top:10px;border-top:1px solid var(--line)}.quote-editor-current-customer span{color:var(--muted);font-size:13px}.quote-editor-current-customer .button{margin-left:auto}.quote-editor-workspace{display:grid;grid-template-columns:minmax(520px,1fr) minmax(440px,.85fr);gap:16px;align-items:start}.quote-editor-facts{display:grid;grid-template-columns:max-content minmax(100px,1fr) max-content minmax(100px,1fr);gap:7px 12px;margin:0 0 14px}.quote-editor-facts dt{color:var(--muted);font-weight:700}.quote-editor-facts dd{margin:0}.quote-editor-revision-info small{display:block}.quote-editor-preview{min-width:0;overflow:auto;border:1px solid var(--line);border-radius:8px;background:#dde3e8}.quote-editor-preview iframe{display:block;width:100%;aspect-ratio:210/297;min-height:620px;border:0;background:#fff}@media(max-width:1100px){.quote-editor-workspace{grid-template-columns:1fr}.quote-editor-preview iframe{min-height:760px}}
.quote-editor-page{overflow-x:hidden}.quote-editor-page .page-shell{max-width:none;padding:8px 10px 12px}.quote-editor-page .page-header{align-items:center;margin-bottom:6px}.quote-editor-page .page-header h1{font-size:20px}.quote-editor-page .page-subtitle{margin-top:2px;font-size:11px}.quote-editor-page .page-header .summary-strip{display:none}.quote-editor-selector{grid-template-columns:minmax(0,42%) minmax(0,58%);gap:8px;padding:8px 10px;margin-bottom:6px}.quote-editor-customer-search{align-items:end;min-width:0}.quote-editor-customer-search label{gap:2px;font-size:11px}.quote-editor-customer-search input{height:38px;min-height:38px;padding:5px 8px;font-size:12px}.quote-editor-customer-search .button,.quote-editor-customer-search button{height:32px;min-height:32px;padding:4px 10px;font-size:11px}.quote-editor-current-customer{min-width:0;padding:0 0 0 12px;border-top:0;border-left:1px solid var(--line)}.quote-editor-customer-identity{display:grid;min-width:0;gap:1px}.quote-editor-customer-identity span{font-size:10px}.quote-editor-customer-identity strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.quote-editor-customer-meta{display:flex;align-items:center;gap:7px;margin-left:auto;color:var(--muted);font-size:10px;white-space:nowrap}.quote-editor-customer-meta .badge{min-height:20px;padding:1px 6px;font-size:10px}.quote-editor-current-customer .button{margin-left:4px}.quote-editor-customer-results{grid-column:1/-1;max-height:94px;overflow:auto;padding-top:6px;border-top:1px solid var(--line)}.quote-editor-customer-results a{padding:4px 7px;font-size:11px}.quote-editor-toolbar{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:5px 7px;align-items:end;padding:7px 9px;margin-bottom:6px}.quote-editor-toolbar label{display:grid;gap:2px;font-size:10px;font-weight:700}.quote-editor-toolbar input,.quote-editor-toolbar select{height:31px;min-height:31px;padding:3px 6px;font-size:11px}.quote-editor-identity{display:none}.quote-editor-fixed{grid-column:1/2;display:flex;align-items:center;gap:10px;min-width:0;font-size:10px;white-space:nowrap}.quote-editor-toolbar>.actions{grid-column:2/-1;display:flex;align-items:center;justify-content:flex-end;gap:5px;margin:0}.quote-editor-toolbar>.actions .button,.quote-editor-toolbar>.actions button{height:29px;min-height:29px;padding:3px 9px;border-radius:5px;font-size:11px}.quote-editor-toolbar.is-readonly dl{grid-column:1/-1;display:grid;grid-template-columns:repeat(8,max-content);gap:3px 10px;align-items:center;margin:0;font-size:11px}.quote-editor-toolbar.is-readonly dl dd{margin:0;font-weight:700}.quote-editor-main{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;height:calc(100vh - 226px);min-height:500px}.quote-editor-left-stack{display:grid;grid-template-rows:minmax(0,58fr) minmax(0,42fr);gap:8px;min-width:0;min-height:0}.quote-editor-main.is-readonly{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.quote-editor-main.is-readonly .quote-editor-left-stack{grid-template-rows:minmax(0,1fr)}.quote-editor-catalog-pane,.quote-editor-preview{display:grid;grid-template-rows:27px minmax(0,1fr);min-width:0;min-height:0;height:100%;overflow:hidden;border:1px solid var(--line);border-radius:6px;background:#dde3e8}.quote-editor-pane-heading{display:flex;align-items:center;padding:3px 7px;border-bottom:1px solid var(--line);background:#edf2f6}.quote-editor-pane-heading h2{margin:0;font-size:12px}.quote-editor-catalog-pane iframe,.quote-editor-preview iframe{display:block;width:100%;height:100%;min-height:0;border:0;background:#fff}.quote-editor-items-pane{min-width:0;min-height:0;height:100%;overflow:auto;margin:0;padding:6px}.quote-editor-items-pane .card-header{margin-bottom:4px}.quote-editor-items-pane .card-header h2{font-size:13px}.quote-editor-items-pane .card-header span{font-size:11px}.quote-editor-item-header,.quote-editor-item{display:grid;grid-template-columns:minmax(140px,1.9fr) 52px repeat(4,minmax(68px,1fr));gap:4px;align-items:center}.quote-editor-item-header{position:sticky;top:-6px;z-index:2;padding:4px;background:#e7edf3;font-size:12px;font-weight:600}.quote-editor-item{padding:4px 0;border-bottom:1px solid var(--line);font-size:12px}.quote-editor-item input{height:26px;min-height:26px;padding:2px 4px;text-align:right;font-size:12px}.quote-editor-item b{text-align:right;font-variant-numeric:tabular-nums}.quote-editor-item-name{min-width:0;overflow:hidden;text-overflow:ellipsis}.quote-editor-item-name small{display:block;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}.quote-editor-totals{display:grid;grid-template-columns:repeat(4,1fr);gap:4px;position:sticky;bottom:-6px;padding:5px 3px;background:#edf3f7;border-top:1px solid var(--line);font-size:12px}.quote-editor-totals span{display:grid;gap:1px}.quote-editor-totals b{text-align:right}.quote-editor-main:not(:has(.quote-editor-left-stack)){grid-template-rows:minmax(0,58fr) minmax(0,42fr)}.quote-editor-main:not(:has(.quote-editor-left-stack))>.quote-editor-catalog-pane{grid-column:1;grid-row:1}.quote-editor-main:not(:has(.quote-editor-left-stack))>.quote-editor-items-pane{grid-column:1;grid-row:2}.quote-editor-main:not(:has(.quote-editor-left-stack))>.quote-editor-preview{grid-column:2;grid-row:1/3}.quote-editor-main:not(:has(.quote-editor-left-stack))>.quote-editor-catalog-pane,.quote-editor-main:not(:has(.quote-editor-left-stack))>.quote-editor-preview{display:block}.editor-catalog-page .main-nav,.editor-catalog-page .user-menu,.editor-catalog-page .brand,.editor-catalog-page .excel-master-header{display:none}.editor-catalog-page .nav-shell{min-height:0;height:0}.editor-catalog-page .page-shell{padding:4px}.editor-catalog-page .master-filters{grid-template-columns:minmax(170px,1.5fr) minmax(125px,1fr) auto}.editor-catalog-page .master-filters>label:not(.master-search):not(:has(#payment-term-simulator)){display:none}.editor-catalog-page .master-table-wrap{height:calc(100vh - 145px);min-height:220px}.editor-catalog-page .master-row-action{display:none}.editor-catalog-page .master-table{min-width:2370px}@media(max-width:1199px){.quote-editor-selector{grid-template-columns:1fr}.quote-editor-current-customer{padding:7px 0 0;border-top:1px solid var(--line);border-left:0}.quote-editor-main,.quote-editor-main.is-readonly{grid-template-columns:1fr;height:auto}.quote-editor-left-stack{height:900px}.quote-editor-preview{height:900px}.quote-editor-toolbar{grid-template-columns:repeat(2,minmax(150px,1fr))}.quote-editor-fixed,.quote-editor-toolbar>.actions{grid-column:1/-1}.quote-editor-toolbar>.actions{justify-content:flex-start}}@media(max-width:700px){.quote-editor-customer-meta{display:none}.quote-editor-left-stack{height:760px}.quote-editor-preview{height:760px}}
.quote-editor-header{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;min-height:44px}.quote-editor-header-title{align-self:center;min-width:0}.quote-editor-header-customer{position:relative;display:flex;align-items:center;gap:8px;min-width:0;flex-wrap:nowrap}.quote-editor-header-customer .quote-editor-customer-search{display:flex;align-items:center;flex:1 1 auto;min-width:0}.quote-editor-header-customer .quote-editor-customer-search label{display:flex;align-items:center;flex:1 1 auto;gap:6px;min-width:0;white-space:nowrap}.quote-editor-header-customer .quote-editor-customer-search input{flex:0 1 280px;width:280px;min-width:0}.quote-editor-header-customer .quote-editor-customer-search button,.quote-editor-header-customer .quote-editor-customer-search .button{flex:0 0 auto}.quote-editor-header-customer .quote-editor-current-customer{flex:0 0 auto;height:38px;padding-left:8px;white-space:nowrap}.quote-editor-header-customer .quote-editor-customer-identity{display:flex;align-items:center;gap:3px}.quote-editor-header-customer .quote-editor-customer-identity span::after{content:"："}.quote-editor-header-customer .quote-editor-current-customer .button{flex:0 0 auto;margin-left:4px}.quote-editor-header-customer .quote-editor-customer-results{position:absolute;top:calc(100% + 4px);right:0;left:0;z-index:15;max-height:180px;padding:7px;border:1px solid var(--line);border-radius:6px;background:#fff;box-shadow:var(--shadow)}.quote-editor-toolbar{grid-template-columns:repeat(4,minmax(120px,1fr)) auto}.quote-editor-toolbar>.actions{grid-column:5;align-self:end;flex-wrap:nowrap}.quote-editor-main{height:calc(100vh - 192px)}@media(max-width:1199px){.quote-editor-header{grid-template-columns:1fr}.quote-editor-header-customer{display:grid;grid-template-columns:1fr}.quote-editor-header-customer .quote-editor-customer-search{flex-wrap:wrap}.quote-editor-header-customer .quote-editor-current-customer{height:auto;padding:7px 0 0;border-top:1px solid var(--line);border-left:0}.quote-editor-header-customer .quote-editor-customer-results{position:static;grid-column:1;max-height:120px}.quote-editor-main{height:auto}}

/* Primary business lists: slightly roomier than the 10px product master. */
.quote-list-card,.standard-list-card{padding:14px}.quote-list-table,.standard-list-table{font-size:12px;line-height:1.35}.quote-list-table th,.quote-list-table td,.standard-list-table th,.standard-list-table td{padding:7px 9px}.quote-list-table th,.standard-list-table th{font-size:12px}.quote-list-table td,.standard-list-table td{font-weight:400}.quote-list-table .badge,.standard-list-table .badge{min-height:24px;padding:2px 8px;font-size:12px}.quote-list-table td:last-child strong{font-weight:700}.standard-list-table .actions{gap:6px;margin:0}.xtool-price-summary{margin:0 0 10px}.xtool-price-tabs{margin-bottom:10px;border-bottom:1px solid #aeb8c1}

/* Product and price master: Excel-compatible price sheet */
body.product-master-page{overflow-x:hidden;background:#e9edf1}.product-master-page .page-shell{max-width:none;width:100%;padding:12px 12px 32px}.excel-master-page{min-width:0}.excel-master-header{margin:0 0 7px}.excel-master-header h1{font-size:22px}.excel-master-header .page-subtitle{font-size:12px}.master-filter-card{padding:7px 8px;margin-bottom:5px;border:1px solid #aeb8c1;background:#f7f8f9}.master-filters{display:grid;grid-template-columns:minmax(250px,1.7fr) repeat(5,minmax(145px,1fr)) 105px auto;gap:5px;align-items:end}.master-filters label{display:grid;gap:2px;color:#283746;font-size:10px;font-weight:700}.master-filters input,.master-filters select{font-size:11px;min-height:29px;height:29px;padding:3px 5px;border-radius:2px}.master-filter-actions{display:flex;gap:4px}.master-filter-actions .button,.master-filter-actions button{min-height:29px;height:29px;padding:3px 9px;border-radius:2px;font-size:11px}.manufacturer-tabs{display:flex;align-items:flex-end;gap:3px;min-height:34px;padding:4px 7px 0;margin:0;border:1px solid #aeb8c1;border-bottom:0;background:#eef3f8;overflow-x:auto}.manufacturer-tab{display:inline-flex;align-items:center;height:29px;padding:4px 13px;border:1px solid #aeb8c1;border-bottom-color:#7f8b95;border-radius:3px 3px 0 0;background:#fff;color:#24415d;text-decoration:none;font-size:11px;font-weight:700;white-space:nowrap}.manufacturer-tab:hover{background:#e7f1fb;color:#174f82}.manufacturer-tab.active{border-color:#1769aa;border-bottom-color:#1769aa;background:#1769aa;color:#fff}.master-inline-status{min-height:23px;padding:2px 6px;color:#405467;font-size:11px}.master-inline-status.error{color:#9f1c14}.master-table-card{margin:0;padding:0;background:#fff;border:1px solid #8d9aa5}.master-sheet-title{display:flex;justify-content:space-between;align-items:center;height:27px;padding:3px 7px;background:#d9e2f3;border-bottom:1px solid #8d9aa5;font-size:11px}.master-scroll-top{height:14px;overflow-x:auto;overflow-y:hidden;border-bottom:1px solid #aeb8c1;background:#f2f2f2}.master-scroll-top>div{height:1px}.master-table-wrap{max-width:100%;height:calc(100vh - 225px);min-height:480px;overflow:auto;background:#fff}.master-table{min-width:2490px;width:max-content;font-family:"Meiryo UI",Meiryo,sans-serif;font-size:10px;line-height:1.15;table-layout:fixed;border-collapse:separate;border-spacing:0}.master-table.mode-xtool{min-width:1790px}.master-table th{position:sticky;top:0;z-index:8;height:35px;padding:3px 5px;background:#d9e2f3;color:#172533;border-right:1px solid #9ca8b2;border-bottom:1px solid #7f8b95;white-space:normal;text-align:center;font-size:10px;font-weight:700;box-shadow:none}.master-table td{height:25px;max-height:25px;padding:2px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;border-right:1px solid #c8cfd5;border-bottom:1px solid #c8cfd5;background:#fff}.master-table tbody tr:nth-child(even) td{background:#fafafa}.master-table tbody tr:hover td{background:#fff2cc}.master-table .sticky-col{position:sticky;z-index:5;background:#fff;box-shadow:1px 0 0 #8d9aa5}.master-table tbody tr:nth-child(even) .sticky-col{background:#fafafa}.master-table tbody tr:hover .sticky-col{background:#fff2cc}.master-table th.sticky-col{z-index:12;background:#d9e2f3}.sticky-model{left:0;width:340px;min-width:340px;max-width:340px}.spec-col{width:250px;min-width:250px;max-width:250px}.master-table th:nth-child(n+4){min-width:112px}.master-table .editable-cell{cursor:cell;background:#fffde7}.master-table .calculated-cell{background:#eaf2f8;color:#263746}.master-table tbody tr:nth-child(even) .calculated-cell{background:#e4edf4}.master-table .input-head{background:#fff2cc}.master-table .calc-head{background:#d9eaf7}.master-table .price-head{background:#c6e0b4}.master-table .profit-head{background:#f8cbad}.master-table .simulation-sale-cell{background:#e2f0d9!important;font-weight:700}.master-table .gross-output,.master-table .margin-output{background:#fce4d6!important;font-weight:700}.master-table .override-cell{background:#ffe699!important}.master-table .needs-review .sticky-col{background:#fde9e7}.inline-editor{width:100%;min-width:75px;height:22px;min-height:22px;padding:1px 3px;border:2px solid #217346;border-radius:0;font:10px "Meiryo UI",Meiryo,sans-serif}.master-table .col-excel,.master-table .col-xtool{display:none}.mode-basic .col-excel,.mode-cost .col-excel,.mode-profit .col-excel,.mode-import .col-excel,.mode-ues .col-excel,.mode-all .col-excel,.mode-all .col-xtool,.mode-xtool .col-xtool{display:table-cell}.simulation-locked{background:#e2f0d9!important;color:#263746}.pagination{margin:7px 0;padding-bottom:7px;font-size:11px}
@media(max-width:1500px){.product-master-page .page-shell{padding:8px}.master-filters{grid-template-columns:minmax(220px,1.5fr) repeat(3,minmax(135px,1fr)) 95px}.master-table-wrap{height:calc(100vh - 255px)}}

/* Product master comparison view: client-only column sizing and emphasis. */
.master-sheet-title{height:31px}
.master-view-tools{display:flex;align-items:center;gap:9px;color:#405467}
.master-view-tools button{min-height:23px;height:23px;padding:2px 8px;border:1px solid #7f8b95;border-radius:2px;background:#fff;color:#24415d;font-size:10px;cursor:pointer}
.master-view-tools button:hover{background:#eef5fb}
.master-table-wrap{height:calc(100vh - 229px)}
.master-table th{padding-right:18px}
.master-table td,.master-table .simulation-sale-cell,.master-table .gross-output,.master-table .margin-output{font-weight:400}
.column-header-label{display:block;overflow:hidden;text-overflow:ellipsis}
.master-sort-link{color:inherit;text-decoration:none;white-space:nowrap}.master-sort-link:hover,.master-sort-link.active{color:#0b568f;text-decoration:underline;text-underline-offset:2px}
.column-bold-toggle{position:absolute;right:4px;top:3px;z-index:2;display:flex;align-items:center;justify-content:center;width:13px;height:13px;border:1px solid #87939e;border-radius:2px;background:#fff;color:#4a5967;font:700 9px/1 Arial,sans-serif;cursor:pointer}
.column-bold-toggle input{position:absolute;width:1px;height:1px;opacity:0}
.column-bold-toggle:has(input:checked){background:#1769aa;border-color:#1769aa;color:#fff}
.column-bold-toggle:has(input:disabled){background:#217346;border-color:#217346;color:#fff;cursor:default}
.column-resize-handle{position:absolute;top:0;right:-4px;z-index:3;width:8px;height:100%;cursor:col-resize;touch-action:none}
.column-resize-handle:hover,.is-resizing-master-column .column-resize-handle{border-right:2px solid #1769aa}
.is-resizing-master-column{cursor:col-resize!important;user-select:none}
.master-table tbody td.column-bold{font-weight:700}
.master-table tbody tr.is-selected td{background:#eaf3f8!important;font-weight:700}
.master-table tbody tr.is-selected .sticky-col{background:#eaf3f8!important}
.master-table .support-section-row th{position:static;height:24px;padding:4px 10px;background:#edf2f7;color:#334155;text-align:left;font-size:10px;border-top:1px solid #cbd5e1;border-bottom:1px solid #cbd5e1}
.master-table .support-product-row td{border-bottom-color:#d8dee6}
.product-master-page .master-row-action{width:64px;min-width:64px;text-align:center}
.master-row-selection-controls,.master-row-selection-controls>div{display:flex;align-items:center;gap:5px}.master-row-selection-controls button{height:22px;min-height:22px;padding:1px 7px;font-size:10px}.master-row-selection-controls #master-row-select-count{min-width:72px;color:#334155;font-weight:700}.master-row-select-checkbox{display:none;width:16px;height:16px;min-height:16px;margin:0 6px 0 0;padding:0;vertical-align:middle;accent-color:#1769aa}.master-table.is-row-selecting .master-row-select-checkbox{display:inline-block}.master-table.is-row-selecting .editable-cell{cursor:pointer}.master-table tbody tr.is-delete-selected td,.master-table tbody tr.is-delete-selected .sticky-col{background:#e5f1fb!important}.product-master-delete-backdrop{position:fixed;inset:0;z-index:1100;display:grid;place-items:center;padding:20px;background:rgba(20,35,48,.48)}.product-master-delete-backdrop[hidden]{display:none}.product-master-delete-dialog{box-sizing:border-box;width:min(560px,100%);max-height:calc(100vh - 40px);padding:16px;overflow:auto}.product-master-delete-dialog h2{margin:0 0 7px;font-size:18px}.product-master-delete-dialog p{margin:0 0 7px;font-size:13px}.product-master-delete-dialog ul{max-height:220px;margin:0 0 10px;padding:7px 7px 7px 28px;overflow:auto;border:1px solid var(--line);border-radius:6px;background:#f8fafc;font-size:12px}.product-master-delete-dialog .delete-block-reason{white-space:pre-line}.product-master-delete-dialog .actions{justify-content:flex-end;margin:10px 0 0}.product-master-page button.danger{border-color:#a82822;background:#b9342d;color:#fff}.product-master-page button.danger:hover{background:#98271f}.product-master-page button.danger:disabled{border-color:#cfd5da;background:#dfe3e6;color:#7b8791}
.master-table .sku-column{display:none!important}
.builder-add-column{width:54px!important;min-width:54px!important;max-width:54px!important;text-align:center!important;background:#eef5fb!important}
.builder-add-column input{display:block;width:14px;height:14px;min-height:14px;margin:0 auto;padding:0}

@media(max-width:1500px){.master-view-tools>span:first-child{display:none}.master-table-wrap{height:calc(100vh - 259px)}}

/* Product master primary controls only. */
.master-filters{grid-template-columns:minmax(280px,420px) minmax(180px,230px) auto;justify-content:start}
.series-tabs{min-height:31px;padding-top:2px;background:#f7f9fb}
.tab-row-label{display:inline-flex;align-items:center;flex:0 0 auto;height:29px;padding:4px 6px;color:#607487;font-size:10px;font-weight:700;white-space:nowrap}
.series-tabs .tab-row-label{height:27px}
.series-tabs .manufacturer-tab{height:27px;font-weight:600}
@media(max-width:1500px){.master-filters{grid-template-columns:minmax(260px,380px) minmax(170px,220px) auto}}
.master-table .manual-product-row{display:none}.master-table .manual-product-row.is-open{display:table-row}.master-table .manual-product-row td{background:#eef8f1!important}.manual-product-input{width:100%;min-width:70px;height:22px;min-height:22px;padding:1px 3px;border:1px solid #4f8a62;border-radius:0;font:10px "Meiryo UI",Meiryo,sans-serif}.manual-product-row .master-row-action{white-space:normal}.manual-product-row .master-row-action button{display:block;width:100%;padding:1px 2px;margin:1px 0;font-size:9px}
.master-table .manual-product-row td{background:#eef8f1!important}.manual-product-input{width:100%;min-width:70px;height:22px;min-height:22px;padding:1px 3px;border:1px solid #4f8a62;border-radius:0;font:10px "Meiryo UI",Meiryo,sans-serif}.manual-product-row .master-row-action{white-space:normal}.manual-product-row .master-row-action button{display:block;width:100%;padding:1px 2px;margin:1px 0;font-size:9px}

/* Keep product-master controls visible while only the price grid scrolls. */
body.product-master-page{height:100vh;overflow:hidden}
.product-master-page .page-shell{display:flex;flex-direction:column;height:calc(100vh - 64px);min-height:0;padding-bottom:12px}
.excel-master-page{display:flex;flex:1 1 auto;flex-direction:column;min-height:0}
.master-controls-region{flex:0 0 auto}
.master-table-card{display:flex;flex:1 1 auto;flex-direction:column;min-height:0}
.master-price-scroll-region{flex:1 1 auto;height:auto;min-height:0;overflow-x:auto;overflow-y:auto;overscroll-behavior:contain}
.master-sticky-header thead th{position:sticky;top:0;z-index:8}
.master-sticky-header thead th.sticky-col{z-index:12}
.master-table-card>.pagination{flex:0 0 auto}
.excel-master-header{align-items:center}.product-master-quote-create{flex:0 0 auto;white-space:nowrap}.product-master-quote-backdrop{position:fixed;inset:0;z-index:1000;display:grid;place-items:center;padding:24px;background:rgba(20,35,48,.42)}.product-master-quote-dialog{box-sizing:border-box;width:min(720px,100%);max-height:calc(100vh - 48px);margin:0;padding:16px;overflow:auto}.product-master-quote-dialog .card-header{align-items:flex-start}.product-master-quote-dialog .card-header p{margin:3px 0 0}.product-master-customer-search{display:flex;align-items:end;gap:8px;margin-bottom:10px}.product-master-customer-search label{display:grid;flex:1;gap:3px;font-size:12px;font-weight:700}.product-master-customer-search input[type=search]{width:100%}.product-master-customer-list{max-height:400px;margin-bottom:8px;overflow:auto;border:1px solid var(--line);border-radius:7px}.product-master-customer-row{display:flex;align-items:center;gap:10px;min-height:50px;padding:7px 11px;border-bottom:1px solid var(--line);text-align:left;cursor:pointer}.product-master-customer-row:last-child{border-bottom:0}.product-master-customer-row:hover{background:#edf5fb}.product-master-customer-row:has(input[type=radio]:checked){background:#e7f2fb}.product-master-customer-row input[type=radio]{flex:0 0 auto;width:16px;height:16px;min-height:16px;margin:0;padding:0;transform:none;accent-color:var(--blue)}.product-master-customer-row span{display:grid;min-width:0;gap:1px;text-align:left;line-height:1.25}.product-master-customer-row strong{font-size:14px;font-weight:600}.product-master-customer-row small{color:var(--muted);font-size:12px}.product-master-selected-customer{display:flex;align-items:center;min-height:30px;margin-bottom:7px;padding:5px 9px;border-radius:6px;background:#f1f5f8;font-size:12px}.product-master-selected-customer strong{font-size:13px}.product-master-quote-dialog .actions{justify-content:flex-end;gap:7px;margin:7px 0 0}.product-master-quote-dialog .actions .button,.product-master-quote-dialog .actions button{height:34px;min-height:34px;padding:5px 11px;font-size:12px}

/* Customer index and safe-delete controls. */
.customer-search{display:flex;align-items:center;gap:8px;margin-bottom:10px}.customer-search input[type=search]{max-width:420px}.kana-tabs{display:flex;gap:4px;overflow-x:auto;margin-bottom:10px;padding:5px;border:1px solid var(--line);border-radius:8px;background:#fff}.kana-tab{flex:0 0 auto;min-width:42px;padding:6px 10px;border-radius:5px;color:#24415d;text-align:center;text-decoration:none;font-size:13px;font-weight:700;white-space:nowrap}.kana-tab:hover{background:#e7f1fb}.kana-tab.active{background:var(--blue);color:#fff}.delete-confirm-card{max-width:820px}.delete-target{padding:14px;border:1px solid var(--line);border-radius:7px;background:#f8fafc}.delete-related-summary{display:grid;grid-template-columns:minmax(150px,auto) minmax(0,1fr);gap:1px;border:1px solid var(--line);border-radius:7px;overflow:hidden;background:var(--line)}.delete-related-summary dt,.delete-related-summary dd{min-width:0;margin:0;padding:10px 12px;background:#fff}.delete-related-summary dt{font-weight:700}.document-file-name{overflow-wrap:anywhere}.force-delete-panel{margin-top:18px;padding:16px;border:2px solid #c9362d;border-radius:8px;background:#fff8f7}.force-delete-panel input{display:block;width:min(420px,100%);margin:8px 0 14px}.delete-block-reason{padding:12px 14px;border:1px solid #efb6b2;border-radius:7px;background:#fff1f0;color:#8f1d17;font-weight:700}@media(max-width:640px){.delete-related-summary{grid-template-columns:1fr}.delete-related-summary dd{border-top:0}}
.customer-index-table th:first-child,.customer-index-table td:first-child{width:65%}.customer-index-table th:last-child,.customer-index-table td:last-child{width:35%;min-width:390px}.customer-index-table .actions{flex-wrap:nowrap;margin:0}
.postal-lookup-controls{display:inline-flex;margin-left:.5rem;vertical-align:middle}.postal-lookup-results{margin:-.25rem 0 .75rem;padding:.65rem .75rem;border:1px solid #d8dee8;border-radius:6px;background:#f8fafc}.postal-lookup-results p{margin:0 0 .4rem}.postal-lookup-results.error{color:#9f1d20;border-color:#efc4c5;background:#fff7f7}.postal-lookup-candidates{display:flex;flex-wrap:wrap;gap:.4rem}@media(max-width:600px){.postal-lookup-controls{display:flex;margin:.4rem 0 0}.postal-lookup-candidates{flex-direction:column;align-items:stretch}}
.form-card:has(.customer-form){padding:14px}.customer-form{display:grid;gap:12px}.customer-form-section{border:1px solid var(--line);border-radius:8px;padding:12px}.customer-form-section h2{font-size:1.05rem;margin:0 0 8px}.customer-fields-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}.customer-field{display:grid;gap:3px;align-content:start}.customer-field-address{grid-column:1/-1}.customer-field-is_active{align-content:end}.customer-form input[type=text],.customer-form input[type=email],.customer-form select{box-sizing:border-box;height:36px;min-height:36px;padding:6px 9px}.customer-field textarea{width:100%;min-height:64px;padding:7px 9px}.postal-entry-row{display:flex;gap:8px;align-items:center}.postal-entry-row input{flex:1;min-width:0}.destination-choice-row{display:flex;align-items:center;min-height:36px;gap:18px}.destination-choice-row h2{flex:0 0 74px;margin:0}.destination-choice{min-width:0}.destination-choice ul{display:flex;align-items:center;gap:18px;list-style:none;margin:0;padding:0}.destination-choice li{margin:0}.destination-choice label{display:flex;align-items:center;gap:6px;line-height:1.25;white-space:nowrap}.destination-choice input[type=radio]{width:16px;height:16px;margin:0;transform:none}.destination-choice .errorlist{margin:4px 0 0}.destination-fields{margin-top:8px}.destination-fields[hidden]{display:none}@media(max-width:800px){.customer-fields-grid{grid-template-columns:1fr}.customer-field-address{grid-column:auto}.destination-choice-row{align-items:flex-start;gap:10px}.destination-choice-row h2{flex-basis:62px}.destination-choice ul{flex-wrap:wrap;gap:8px 14px}}
/* Internal DRAFT profitability table; never rendered in document templates. */
.quote-editor-totals{grid-template-columns:repeat(3,minmax(0,1fr))}
.quote-editor-toolbar{grid-template-columns:minmax(180px,210px) minmax(145px,170px) minmax(145px,170px) minmax(110px,135px) minmax(150px,1fr) auto}.quote-editor-toolbar>.actions{grid-column:6}.quote-editor-notes{min-width:0}@media(max-width:1199px){.quote-editor-toolbar{grid-template-columns:repeat(2,minmax(150px,1fr))}.quote-editor-toolbar>.actions{grid-column:1/-1}}
.quote-editor-command-bar{display:grid;grid-template-columns:minmax(360px,46%) minmax(0,1fr);gap:10px;align-items:center;margin-bottom:5px;padding:5px 8px}.quote-editor-title-field{display:grid;grid-template-columns:82px minmax(0,1fr);align-items:center;gap:6px;min-width:0}.quote-editor-title-field label{font-size:10px;font-weight:700;color:#34495d}.quote-editor-title-field input{height:30px;min-height:30px;padding:3px 6px;font-size:11px}.quote-editor-title-field strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quote-editor-primary-actions{justify-content:flex-end;flex-wrap:nowrap;gap:5px;min-width:0;margin:0}.quote-editor-primary-actions form{display:inline-flex;margin:0}.quote-editor-primary-actions .button,.quote-editor-primary-actions button{height:29px;min-height:29px;padding:3px 9px;border-radius:5px;font-size:11px}.quote-editor-primary-actions [role="status"]{min-width:0;margin-left:2px;color:#415466;font-size:11px;white-space:nowrap}.quote-editor-primary-actions [role="status"].error{color:#b42318}.quote-editor-toolbar{grid-template-columns:minmax(180px,210px) minmax(135px,150px) minmax(145px,170px) minmax(145px,170px) minmax(105px,125px) minmax(240px,1fr);gap:4px 7px;align-items:end;margin-bottom:5px;padding:5px 8px}.quote-editor-toolbar label{gap:1px}.quote-editor-main{height:calc(100vh - 185px)}@media(max-width:1199px){.quote-editor-command-bar{grid-template-columns:1fr}.quote-editor-primary-actions{justify-content:flex-start;flex-wrap:wrap}.quote-editor-toolbar{grid-template-columns:repeat(2,minmax(150px,1fr))}.quote-editor-notes{grid-column:1/-1}}@media(max-width:700px){.quote-editor-title-field{grid-template-columns:1fr;gap:2px}.quote-editor-toolbar{grid-template-columns:1fr}}
/* Revision detail uses the same editor / internal-profit / A4-preview direction as the quote builder. */
.quote-preview-actions{position:sticky;top:0;z-index:6;display:flex;justify-content:flex-end;gap:6px;margin:0;padding:6px 8px;border-bottom:1px solid #aeb8c1;background:#f8fafc}
.revision-top-panel{margin-bottom:4px}.revision-top-panel form{margin:0}.revision-page-header{align-items:center;gap:10px;margin-bottom:4px}.revision-page-heading{display:flex;align-items:center;gap:8px;min-width:230px}.revision-page-heading h1{white-space:nowrap}.revision-header-actions{min-width:0;margin-left:auto;padding:0;justify-content:flex-end}.revision-header-actions form{display:inline-flex;margin:0}.revision-header-actions [role="status"]{max-width:180px;overflow:hidden;text-overflow:ellipsis}.revision-top-layout{display:block}.revision-form-grid.quote-editor-toolbar{grid-template-columns:repeat(7,minmax(110px,1fr));gap:4px 7px;margin:0;padding:4px 8px 5px}.revision-field{display:grid;gap:1px;align-content:start}.revision-form-grid .revision-field[hidden]{display:none!important}.revision-field label{font-size:10px;font-weight:700;color:#34495d}.revision-form-grid .revision-field input,.revision-form-grid .revision-field select{min-height:29px;height:29px;padding:3px 6px;font-size:11px}.revision-form-grid .revision-field textarea{min-height:32px;height:32px;padding:3px 6px;font-size:11px;line-height:1.3;resize:vertical}.revision-field-notes{grid-column:1/-1}.revision-field.hidden-field{display:none}.revision-form-grid>.revision-save-actions{grid-column:1/-1}.revision-action-bar{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:6px;margin:0;padding:3px 6px 4px}.revision-form-grid.quote-editor-toolbar>.revision-action-bar{flex-wrap:wrap}.revision-action-bar form{display:inline-flex;margin:0}.revision-action-bar .button,.revision-action-bar button{white-space:nowrap}.revision-action-divider{align-self:stretch;width:1px;min-height:22px;margin:1px 2px;background:#c6d0d9}.revision-save-actions [role="status"]{margin-left:2px;font-size:11px;color:#415466}.revision-save-actions [role="status"].error{color:#b42318}.revision-workspace{min-width:0}.revision-preview-pane{display:grid;grid-template-columns:minmax(560px,1.1fr) minmax(600px,1fr);grid-template-rows:auto minmax(0,1fr) auto;min-width:0;max-height:calc(100vh - 195px);overflow:auto;border:1px solid #9eabb6;background:#dfe5ea}.revision-profit-items{grid-column:1;grid-row:1/3;min-width:0;padding:7px;background:#f7f9fb;border-right:1px solid #aeb8c1;overflow:auto}.revision-profit-header,.revision-profit-item-edit{display:grid;grid-template-columns:minmax(210px,1fr) 58px 88px 88px 88px 62px;gap:7px;align-items:center}.revision-profit-header{position:sticky;top:0;z-index:2;padding:7px 5px;background:#e9eef3;color:#526170;font-size:10px;font-weight:700}.revision-profit-item-edit{padding:8px 5px;border-bottom:1px solid #d8e0e7;font-size:11px}.revision-profit-item-edit:last-child{border-bottom:0}.revision-profit-name{min-width:0;overflow:hidden;text-overflow:ellipsis;font-weight:700}.revision-profit-name small{display:block;color:#64748b;font-size:10px;font-weight:400;white-space:normal}.revision-profit-item-edit input{box-sizing:border-box;width:100%;min-width:0;height:30px;padding:4px 5px;text-align:right;font-size:11px}.revision-profit-item-edit b{text-align:right;font-variant-numeric:tabular-nums}.revision-profit-item-edit .negative{color:#b42318}.revision-profit-totals{grid-column:1;grid-row:3;display:grid;grid-template-columns:repeat(4,1fr);gap:6px 12px;padding:9px;background:#fff;border-top:1px solid #aeb8c1;border-right:1px solid #aeb8c1;font-size:11px}.revision-profit-totals span{display:flex;justify-content:space-between;gap:5px}.revision-profit-totals b{font-variant-numeric:tabular-nums}.revision-preview-frame{grid-column:2;grid-row:2/4;display:block;width:100%;height:calc(100vh - 245px);min-height:560px;border:0;background:#e5e7eb}.revision-readonly-summary{margin:0 0 3px;padding:5px 8px 6px}.revision-readonly-summary .card-header{min-height:19px;margin-bottom:3px}.revision-readonly-summary .card-header h2{font-size:14px;line-height:1.2}.revision-readonly-summary .section-note{font-size:10px}.revision-readonly-summary dl{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:4px 6px;margin:0}.revision-summary-item{display:flex;min-width:0;align-items:baseline;justify-content:space-between;gap:6px;padding:3px 6px;border-radius:4px;background:#f5f8fa}.revision-readonly-summary dt{color:#536575;font-size:10px;font-weight:700;white-space:nowrap}.revision-readonly-summary dd{min-width:0;margin:0;overflow:hidden;text-align:right;text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:700}
.revision-profit-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 2px 7px}.revision-profit-toolbar strong{font-size:13px}.revision-product-picker{height:430px;margin:0 0 10px}.revision-profit-totals{grid-template-columns:repeat(3,minmax(0,1fr));gap:0;padding:0;border:1px solid #aeb8c1}.revision-profit-totals span{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:5px;min-height:34px;padding:6px 8px;border-right:1px solid #aeb8c1;border-bottom:1px solid #aeb8c1}.revision-profit-totals span:nth-child(3n){border-right:0}.revision-profit-totals span:nth-last-child(-n+3){border-bottom:0}.revision-profit-totals b{text-align:right}
@media(max-width:1250px){.revision-form-grid.quote-editor-toolbar{grid-template-columns:repeat(4,minmax(120px,1fr))}.revision-readonly-summary dl{grid-template-columns:repeat(3,minmax(140px,1fr))}.revision-preview-pane{grid-template-columns:minmax(510px,1fr) minmax(520px,.9fr)}.revision-profit-header,.revision-profit-item-edit{grid-template-columns:minmax(175px,1fr) 52px repeat(3,78px) 58px}}
@media(max-width:1050px){.revision-form-grid.quote-editor-toolbar{grid-template-columns:repeat(2,minmax(120px,1fr))}.revision-readonly-summary dl{grid-template-columns:repeat(2,minmax(140px,1fr))}.revision-preview-pane{max-height:none;grid-template-columns:minmax(500px,1fr) minmax(500px,1fr)}.revision-preview-frame{height:720px}}
.quote-catalog-page .main-nav,.quote-catalog-page .user-menu,.quote-catalog-page .brand{display:none}.quote-catalog-page .nav-shell{min-height:0;height:0}.quote-catalog-page .page-shell{max-width:none;padding:6px}.quote-catalog{display:grid;gap:7px}.quote-catalog-filters{display:grid;grid-template-columns:minmax(220px,1.5fr) minmax(150px,1fr) minmax(170px,1fr) auto auto;gap:6px;align-items:end;padding:7px;border:1px solid #aeb8c1;background:#f7f8f9}.quote-catalog-filters label{display:grid;gap:2px;font-size:10px;font-weight:700}.quote-catalog-filters input,.quote-catalog-filters select{height:30px;min-height:30px;padding:3px 5px;font-size:11px}.quote-catalog-filters .button,.quote-catalog-filters button{height:30px;min-height:30px}.quote-catalog-table-wrap{height:calc(100vh - 125px);min-height:300px;overflow:auto;border:1px solid #8d9aa5;background:#fff}.quote-catalog-table{width:100%;border-collapse:collapse;font-size:11px}.quote-catalog-table th{position:sticky;top:0;z-index:2;padding:6px;background:#d9e2f3;border:1px solid #aeb8c1}.quote-catalog-table td{padding:6px;border:1px solid #d1d8df}.quote-catalog-table th:first-child,.quote-catalog-table td:first-child{width:52px;text-align:center}#quote-catalog-status{min-height:22px;color:#405467;font-size:11px}#quote-catalog-status.error{color:#9f1c14}

/* Quote list search and bulk deletion. */
.quote-search-bar{display:grid;grid-template-columns:minmax(280px,1fr) auto auto;gap:10px;align-items:center;margin-bottom:14px}.quote-bulk-actions{display:flex;align-items:center;gap:12px;margin-bottom:12px}.quote-bulk-actions button:disabled{border-color:#cfd5da;background:#dfe3e6;color:#7b8791;cursor:not-allowed}.quote-select-column{width:48px;text-align:center!important}.quote-select-column input{display:block;width:18px;height:18px;min-height:18px;margin:0 auto;padding:0;accent-color:#1769aa}@media(max-width:720px){.quote-search-bar{grid-template-columns:1fr auto}.quote-search-bar input{grid-column:1/-1}}
.quote-list-page .quote-bulk-force-delete-backdrop{position:fixed;inset:0;z-index:1100;display:grid;place-items:center;padding:20px;background:rgba(20,35,48,.48)}.quote-list-page .quote-bulk-force-delete-backdrop[hidden]{display:none}.quote-list-page .quote-bulk-force-delete-dialog{box-sizing:border-box;width:min(560px,100%);padding:18px}.quote-list-page .quote-bulk-force-delete-dialog h2{margin:0 0 10px}.quote-list-page .quote-bulk-force-delete-dialog p{margin:0 0 10px}.quote-list-page .quote-bulk-force-delete-dialog label{display:block;margin:14px 0 6px}.quote-list-page .quote-bulk-force-delete-dialog .actions{justify-content:flex-end;margin-bottom:0}
.quote-list-page .message{white-space:pre-line}
.business-document-list-page .business-document-filters{display:grid;grid-template-columns:minmax(260px,1fr) 160px 160px auto auto;gap:10px;align-items:center;margin-bottom:14px}@media(max-width:850px){.business-document-list-page .business-document-filters{grid-template-columns:1fr 1fr}.business-document-list-page .business-document-filters input{grid-column:1/-1}}

.master-table .override-release{min-height:18px;height:18px;padding:1px 4px;border:1px solid #8b6914;border-radius:2px;background:#fff8dc;color:#654b00;font-size:9px}.master-table .override-release:hover{background:#fff1b8;color:#493600}
.master-table .override-cell .badge.warning{background:#fff1b8;color:#654b00}.xtool-cost-confirm-dialog dl{display:grid;grid-template-columns:auto 1fr;gap:7px 14px;margin:14px 0}.xtool-cost-confirm-dialog dt{color:var(--muted);font-weight:700}.xtool-cost-confirm-dialog dd{margin:0;text-align:right;font-weight:700}.xtool-cost-recalculate-choice{display:flex;align-items:flex-start;gap:8px;padding:10px;border:1px solid var(--line);border-radius:6px;background:#f8fafc}.xtool-cost-recalculate-choice input{flex:0 0 auto;width:17px;height:17px;min-height:17px;margin:2px 0 0;padding:0}

/* Product master readability: keep the existing dense layout and column widths. */
.product-master-page .master-filters label{font-size:12px}
.product-master-page .master-filters input,.product-master-page .master-filters select{height:30px;min-height:30px;font-size:12px}
.product-master-page .master-filter-actions .button,.product-master-page .master-filter-actions button{height:30px;min-height:30px;font-size:11.5px}
.product-master-page .manufacturer-tabs .tab-row-label,.product-master-page .manufacturer-tab{font-size:12px}
.product-master-page .manufacturer-tab{height:29px;padding-right:12px;padding-left:12px}
.product-master-page .series-tabs .manufacturer-tab{height:27px}
.product-master-page .master-inline-status,.product-master-page .master-sheet-title{font-size:12px}
.product-master-page .master-table{font-size:12px;line-height:1.25}
.product-master-page .master-table th{height:36px;padding-top:3px;padding-bottom:3px;font-size:12px;font-weight:600}
.product-master-page .master-table td{height:27px;max-height:27px;padding-top:2px;padding-bottom:2px}
.product-master-page .master-table .badge{min-height:20px;padding:1px 5px;font-size:11px}
.product-master-page .inline-editor{height:24px;min-height:24px;font:12px/1.2 "Meiryo UI",Meiryo,sans-serif}
.product-master-page .master-row-selection-controls button,.product-master-page .master-view-tools>button{height:23px;min-height:23px;font-size:11.5px}
.product-master-page .master-table .override-release{height:20px;min-height:20px;font-size:11.5px}
.product-master-page .master-table [data-override-state] .cell-display{display:flex;width:100%;min-height:20px;align-items:center;justify-content:flex-start;gap:4px;text-align:left}
.product-master-page .master-table [data-override-state] .badge{box-sizing:border-box;flex:0 0 54px;justify-content:center;line-height:1}
.product-master-page .master-table [data-override-state] .override-release{display:inline-flex;flex:0 1 auto;align-items:center;justify-content:center;line-height:1;white-space:nowrap}

/* Draft revision editor uses the same full-width two-column density as quote creation. */
@media(min-width:1200px){.revision-editor-page .revision-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,58fr) minmax(0,42fr) auto;gap:8px;height:calc(100vh - 195px);min-height:500px}.revision-editor-page .revision-product-picker{grid-column:1;grid-row:1;height:100%;margin:0}.revision-editor-page .revision-preview-pane{display:contents}.revision-editor-page .revision-profit-items{grid-column:1;grid-row:2;min-height:0;border:1px solid #aeb8c1}.revision-editor-page .revision-profit-totals{grid-column:1;grid-row:3;border:1px solid #aeb8c1}.revision-editor-page .revision-preview-frame{grid-column:2;grid-row:1/4;width:100%;height:100%;min-height:0;border:1px solid var(--line)}.revision-editor-page .revision-workspace.is-readonly{grid-template-rows:minmax(0,1fr) auto}.revision-editor-page .revision-workspace.is-readonly .revision-profit-items{grid-row:1}.revision-editor-page .revision-workspace.is-readonly .revision-profit-totals{grid-row:2}.revision-editor-page .revision-workspace.is-readonly .revision-preview-frame{grid-row:1/3}}

.product-master-page .product-master-quote-actions{display:flex;align-items:center;gap:8px}.product-master-page .product-master-quote-actions .button{flex:0 0 auto;white-space:nowrap}

.quote-title-editor{display:grid;grid-template-columns:90px minmax(260px,1fr);align-items:center;gap:8px;padding:7px 10px;margin-bottom:6px}.quote-title-editor label,.revision-quote-title-field label,.revision-quote-title-field>span{font-size:11px;font-weight:700;color:#34495d}.quote-title-editor input,.revision-quote-title-field input{width:100%;min-width:0;height:31px;min-height:31px;padding:4px 7px;font-size:12px}.quote-title-editor.is-readonly strong{min-width:0;overflow-wrap:anywhere}.revision-quote-title-field{display:grid;grid-template-columns:90px minmax(260px,1fr);align-items:center;gap:8px;width:46%;max-width:680px;padding:3px 8px 2px}.revision-quote-title-field strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-quote-table .customer-quote-name{min-width:260px;max-width:560px;white-space:normal;overflow-wrap:anywhere;word-break:break-word}.customer-quote-table td:last-child{white-space:nowrap}.quote-editor-page .quote-editor-main{height:calc(100vh - 238px)}
@media(min-width:1200px){.revision-editor-page .revision-workspace{height:var(--revision-workspace-height,calc(100dvh - 235px));min-height:0;overflow:hidden}.revision-editor-page .revision-profit-items{overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.revision-editor-page .revision-preview-frame{overflow:auto}}
@media(max-width:1199px){.revision-editor-page .revision-workspace{display:grid;gap:8px;height:auto;min-height:0;overflow:visible}.revision-editor-page .revision-product-picker{height:min(430px,42dvh);min-height:260px;margin:0}.revision-editor-page .revision-preview-pane{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(260px,42dvh) auto minmax(620px,82dvh);max-height:none;overflow:visible}.revision-editor-page .revision-profit-items{grid-column:1;grid-row:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;border:1px solid #aeb8c1}.revision-editor-page .revision-profit-totals{grid-column:1;grid-row:2}.revision-editor-page .revision-preview-frame{grid-column:1;grid-row:3;width:100%;height:100%;min-height:620px;border:1px solid var(--line)}}
@media(max-width:1199px){.revision-page-header{align-items:flex-start;flex-wrap:wrap}.revision-header-actions{width:100%;margin-left:0;justify-content:flex-start}.revision-quote-title-field{width:100%}}
@media(max-width:700px){.quote-title-editor,.revision-quote-title-field{grid-template-columns:1fr;gap:3px}.revision-page-heading{width:100%;min-width:0;justify-content:space-between}.revision-header-actions{gap:4px}.revision-readonly-summary dl{grid-template-columns:1fr}.revision-action-divider{display:none}.customer-quote-table .customer-quote-name{min-width:220px}}
.quote-editor-page .quote-editor-main{height:calc(100vh - 185px)}@media(max-width:1199px){.quote-editor-page .quote-editor-main{height:auto}}

/* Revision header: number, title and actions on row one; conditions on row two. */
.revision-page-header{display:grid;grid-template-columns:max-content minmax(300px,400px) minmax(0,1fr);align-items:center;gap:6px 8px}.revision-header-field{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:4px;min-width:0}.revision-header-field>span{color:#34495d;font-size:10px;font-weight:700;white-space:nowrap}.revision-header-field input{box-sizing:border-box;width:100%;min-width:0;height:30px;min-height:30px;padding:3px 6px;overflow-x:auto;font-size:11px}.revision-header-field strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.revision-header-title{min-width:300px}.revision-header-actions{width:auto;justify-self:end;flex-wrap:nowrap}.revision-top-panel{margin-bottom:4px}.revision-form-grid.quote-editor-toolbar{grid-template-columns:repeat(6,minmax(110px,1fr));padding:3px 8px 4px}.revision-readonly-summary{padding:3px 8px 4px}.revision-readonly-summary dl{grid-template-columns:repeat(6,minmax(110px,1fr))}.revision-product-picker{grid-template-rows:32px minmax(0,1fr)}.revision-product-notes{box-sizing:border-box;display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:6px;height:32px;margin:0;padding:3px 7px}.revision-product-notes>span{color:#34495d;font-size:10px;font-weight:700;white-space:nowrap}.revision-product-notes input{box-sizing:border-box;width:100%;min-width:0;height:24px;min-height:24px;margin:0;padding:1px 6px;font-size:11px;line-height:20px}
@media(max-width:1199px){.revision-page-header{grid-template-columns:max-content minmax(260px,1fr)}.revision-header-title{grid-column:2}.revision-header-actions{grid-column:1/-1;width:100%;justify-self:start;flex-wrap:wrap}.revision-form-grid.quote-editor-toolbar{grid-template-columns:repeat(2,minmax(120px,1fr))}}
@media(max-width:700px){.revision-page-header{grid-template-columns:minmax(0,1fr)}.revision-page-heading,.revision-header-title,.revision-header-actions{grid-column:1}.revision-header-title{min-width:0}.revision-header-field{grid-template-columns:62px minmax(0,1fr)}.revision-readonly-summary dl{grid-template-columns:1fr}}

/* Product registration keeps product identity and first-price inputs readable without using admin. */
.product-create-form{max-width:1280px;margin:0 auto}.product-create-section{padding:16px;margin-bottom:14px}.product-create-section .card-header{margin-bottom:12px}.product-create-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:12px 14px}.product-create-field{min-width:0}.product-create-field>label{display:inline-block;margin:0 5px 4px 0;font-size:12px;font-weight:700;color:#34495d}.product-create-field input:not([type=checkbox]),.product-create-field select,.product-create-field textarea{box-sizing:border-box;width:100%;min-width:0}.product-create-field textarea{resize:vertical}.product-create-field-name,.product-create-field-specification,.product-create-field-official_product_url{grid-column:span 2}.product-create-field-specification{grid-row:span 2}.product-create-field-is_active{display:flex;align-items:center;gap:6px;padding-top:25px}.product-create-field-is_active input{width:auto}.required-label{display:inline-block;padding:1px 4px;border-radius:3px;background:#fff0f0;color:#a12622;font-size:10px;vertical-align:1px}.product-create-field.has-error input,.product-create-field.has-error select,.product-create-field.has-error textarea{border-color:#c0392b;background:#fff8f7}.product-create-field .errorlist{margin:4px 0 0;padding:0;list-style:none;color:#b42318;font-size:12px}.product-create-price-note{margin:12px 0 0}.product-create-actions{max-width:1280px;margin:0 auto 24px}.product-create-actions button[disabled]{cursor:wait;opacity:.65}
.product-price-preview-results{display:grid;grid-template-columns:repeat(8,minmax(110px,1fr));gap:1px;margin:14px 0 0;background:#ccd6e0;border:1px solid #ccd6e0}.product-price-preview-results div{min-width:0;background:#fff}.product-price-preview-results dt{padding:5px 7px;background:#edf2f7;color:#425466;font-size:11px}.product-price-preview-results dd{margin:0;padding:7px;text-align:right;font-weight:700}.product-price-preview-results output:not([data-pricing-preview-output="gross_profit"]):not([data-pricing-preview-output="profit_margin"]):not(:empty):not([data-empty=true])::after{content:"円"}.product-price-preview-results output.is-loss{color:#b42318}.product-price-preview-status{min-height:1.4em;margin:6px 0 0}.product-price-preview-status.is-error{color:#b42318}
@media(max-width:900px){.product-create-grid{grid-template-columns:repeat(2,minmax(150px,1fr))}.product-price-preview-results{grid-template-columns:repeat(3,minmax(120px,1fr))}}
@media(max-width:600px){.product-create-header{align-items:flex-start;gap:8px}.product-create-grid{grid-template-columns:minmax(0,1fr)}.product-create-field-name,.product-create-field-specification,.product-create-field-official_product_url{grid-column:auto}.product-price-preview-results{grid-template-columns:repeat(2,minmax(120px,1fr))}}
