:root{font-family:"Yu Gothic UI","Hiragino Kaku Gothic ProN",Meiryo,sans-serif;color:#172d40;background:#f2f5f8;font-size:16px;font-synthesis:none;--blue:#164f77;--line:#dce4ea;--muted:#5a6e80}*{box-sizing:border-box}body{margin:0}button,input,select,textarea{font:inherit}button{cursor:pointer;min-height:44px;border:0;border-radius:7px;padding:10px 16px;font-weight:600}button:disabled{opacity:.55;cursor:wait}a{color:inherit}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #e7ac43;outline-offset:2px}#app{display:flex;min-height:100vh}aside{background:#122d42;color:#e7eff5;width:224px;flex-shrink:0;padding:34px 20px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{font-weight:700;font-size:25px;text-decoration:none;letter-spacing:.06em;padding:0 12px}.brand span{display:block;font-size:12px;font-weight:400;letter-spacing:.08em;margin-top:7px;color:#b6cad8}nav{display:grid;gap:7px;margin-top:46px}.nav{text-align:left;background:transparent;color:#bfcfda;border-left:3px solid transparent;border-radius:0 6px 6px 0}.nav:hover{background:#25465e}.nav.active{background:#294e69;color:white;border-left-color:#f0b75b}.aside-foot{margin-top:auto;font-size:12px;line-height:1.8;color:#aabfce;padding:10px}.workspace{min-width:0;flex:1}header{display:flex;align-items:center;gap:14px;border-bottom:1px solid var(--line);padding:18px 36px;background:#fff;min-height:76px}header .secondary{margin-left:auto}.badge{display:inline-block;background:#e7eff5;color:#244e6e;border-radius:4px;padding:6px 10px;font-size:13px;font-weight:700;white-space:nowrap}.header-note{font-size:13px;color:var(--muted)}main{max-width:1380px;margin:auto;padding:36px}.page-title{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:28px}.eyebrow{font-size:11px;letter-spacing:.15em;color:var(--muted);font-weight:600;margin:0 0 10px}h1{font-size:28px;letter-spacing:.02em;margin:0 0 12px}h2{font-size:19px;margin:0}h3{font-size:17px;margin:0 0 8px}p{line-height:1.75;margin:8px 0}.muted{color:var(--muted);font-size:14px}.primary{background:var(--blue);color:white}.primary:hover{background:#0e3c5d}.secondary{border:1px solid #cdd9e2;background:white;color:#27465e}.secondary:hover{background:#eef4f7}.actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:18px;margin-bottom:28px}.stats section{background:white;border:1px solid var(--line);border-radius:10px;padding:20px 24px}.stats span{font-size:14px;color:var(--muted)}.stats strong{font-size:32px;display:block;margin-top:12px;font-weight:650}.stats small{font-size:14px;font-weight:400;margin-left:8px}.panel{background:#fff;border:1px solid var(--line);border-radius:10px;padding:24px;min-width:0}.section-title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:20px}.section-title .muted{font-size:13px}.order-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(170px,.8fr) auto;gap:20px;align-items:center;padding:24px 0;border-top:1px solid var(--line)}.date{display:block;color:var(--muted);font-size:13px;margin-bottom:10px}.order-row p{font-size:14px;color:var(--muted);margin:4px 0 10px}.tag{font-size:12px;border-radius:4px;background:#e3f2ec;color:#236446;display:inline-block;padding:4px 8px;margin-right:6px}.tag.neutral{background:#edf1f5;color:#526777}.tag.warning{background:#fff1d7;color:#77531b}.order-prices{display:grid;gap:8px;font-size:14px}.order-prices b{font-size:20px}.order-prices small{color:var(--muted)}footer{padding:14px 36px 26px;font-size:12px;color:var(--muted)}.empty{text-align:center;padding:54px 15px;color:var(--muted)}.empty .actions{justify-content:center;margin:22px 0 16px}.empty small{display:block;line-height:1.8}.master-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:20px 0;border-bottom:1px solid var(--line)}.master-row:last-child{border-bottom:0}.product-layout{display:grid;grid-template-columns:285px minmax(0,1fr);gap:22px}.product-picker{align-self:start;padding:20px}.product-option{display:block;text-align:left;background:transparent;border:1px solid transparent;width:100%;margin-top:10px;padding:16px 12px}.product-option span{display:block;font-size:13px;color:var(--muted);margin-top:8px;font-weight:400}.product-option.selected{background:#ecf3f8;border-color:#a9c7dd}.spec{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:24px 0}.spec dt{color:var(--muted);font-size:13px;margin-bottom:6px}.spec dd{margin:0;font-size:15px;line-height:1.8;overflow-wrap:anywhere}.wide{grid-column:1/-1}.divider{border-top:1px solid var(--line);padding-top:24px;margin-top:28px}.lot{border:1px solid var(--line);border-radius:8px;padding:18px;margin:16px 0}.price-row{border-top:1px solid var(--line);padding:16px 0;display:flex;justify-content:space-between;gap:16px;align-items:center;font-size:14px}.price-row .tag{margin-left:8px}.price-row .actions{justify-content:flex-end}.pre{white-space:pre-wrap;overflow-wrap:anywhere}.backup{max-width:800px}.backup p{margin:16px 0}label{display:flex;flex-direction:column;gap:8px;font-size:14px;font-weight:600}input,select,textarea{width:100%;border:1px solid #bdccd8;border-radius:6px;padding:11px 12px;min-height:44px;background:white;color:#172d40}textarea{resize:vertical}input[readonly],select:disabled{background:#edf1f4}dialog{border:0;border-radius:12px;padding:28px;width:min(680px,calc(100% - 28px));max-height:90vh;box-shadow:0 24px 100px #0e243866;color:inherit}dialog::backdrop{background:#112f4666}dialog .close{background:transparent;font-size:25px;color:var(--muted);padding:0 10px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.check{display:flex;flex-direction:row;align-items:flex-start;line-height:1.7}.check input{width:20px;min-height:20px;height:20px;margin:3px 5px 0 0;flex-shrink:0}.form-actions{display:flex;justify-content:flex-end;gap:12px;border-top:1px solid var(--line);padding-top:22px;margin-top:24px}.help{font-size:14px;color:var(--muted);background:#f1f5f8;border-radius:6px;padding:12px;margin:0 0 20px}.form-grid .help{margin:0}.review{background:#edf4f9;border:1px solid #cbdce8;padding:18px;border-radius:8px}.review b{font-size:21px}.review small{display:block;margin-top:8px;color:var(--muted)}.previous{border-top:1px solid #cbdce8;margin-top:14px;padding-top:14px;color:var(--muted);font-size:14px;line-height:1.8}.login{margin:10vh auto;align-self:flex-start;background:white;border:1px solid var(--line);border-radius:12px;max-width:580px}.login h1{margin-top:24px}.login button{margin:20px 0}#notice{display:none;position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#183d56;color:white;box-shadow:0 5px 24px #0002;padding:14px 20px;max-width:calc(100% - 24px);width:max-content;border-radius:8px;z-index:1000;font-size:14px;line-height:1.6}#notice.show{display:block}#notice.error{background:#962e36}.loading{margin:40px}
@media(max-width:1100px){.order-row{grid-template-columns:1fr 1fr}.order-row>.actions{grid-column:1/-1}.product-layout{grid-template-columns:230px minmax(0,1fr)}aside{width:190px;padding:28px 12px}main{padding:26px}.price-row{align-items:flex-start;flex-direction:column}.page-title{align-items:flex-start}}
@media(max-width:760px){#app{display:block}aside{position:static;width:100%;height:auto;padding:18px 16px}.brand{font-size:21px;padding:0}.brand span{display:none}nav{display:flex;overflow-x:auto;margin-top:18px;gap:4px}.nav{white-space:nowrap;font-size:14px;padding:10px 12px;border-left:0;border-bottom:3px solid transparent;border-radius:4px}.nav.active{border-bottom-color:#f0b75b}.aside-foot{display:none}header{padding:12px 16px;min-height:56px;gap:10px;flex-wrap:wrap}.header-note{font-size:12px}main{padding:24px 16px}.page-title{flex-direction:column;gap:12px;margin-bottom:22px}h1{font-size:25px}.page-title .muted{margin-bottom:0}.stats{gap:8px;margin-bottom:20px}.stats section{padding:14px 10px}.stats span{font-size:12px}.stats strong{font-size:25px}.panel{padding:18px}.section-title{flex-wrap:wrap;gap:10px}.order-row{grid-template-columns:1fr;gap:16px}.order-row>.actions{grid-column:auto}.order-prices{gap:6px}.product-layout{grid-template-columns:1fr;gap:16px}.product-picker{max-height:320px;overflow:auto}.spec{gap:18px 12px}.lot{padding:12px}.form-grid{grid-template-columns:1fr;gap:16px}dialog{padding:20px;max-height:92dvh}.actions button{font-size:14px}footer{padding:12px 16px 80px}.empty{padding:30px 4px}.login{margin:32px 16px}#notice{bottom:12px}.backup input{margin-bottom:14px}}
/* Order and ledger extension: readable compact tables, horizontal scroll confined to tables. */
.filters{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin-bottom:26px;padding-bottom:24px;border-bottom:1px solid var(--line)}.filters label{min-width:145px}.filters .grow{flex:1;min-width:220px}.table-scroll{max-width:100%;overflow-x:auto;margin:16px 0}table{width:100%;border-collapse:collapse;font-size:14px}th{text-align:left;font-weight:600;color:var(--muted);background:#f2f6f9;white-space:nowrap}th,td{padding:12px 10px;border-bottom:1px solid var(--line);vertical-align:middle}td{line-height:1.65}td.num{text-align:right;white-space:nowrap}td small,.fee-choice small{display:block;color:var(--muted);font-size:12px;line-height:1.7}td .actions{gap:5px;flex-wrap:nowrap}td button{padding:7px 10px;font-size:13px;white-space:nowrap;min-height:38px}.product-layout{grid-template-columns:260px minmax(0,1fr)}.product-picker>label:not(:first-child){margin-top:18px}.order-row{grid-template-columns:minmax(180px,1.1fr) minmax(190px,.8fr) minmax(150px,.7fr)}.order-row>.actions{justify-content:flex-end}.order-row h3{overflow-wrap:anywhere}.order-edit-row{padding:20px;border:1px solid var(--line);border-radius:9px;margin:16px 0}.price-review{margin-top:16px}.price-review .tag{margin-left:10px}.wide-dialog{width:min(1000px,calc(100% - 28px))}.fee-box{background:#f6f8fa;border:1px solid var(--line);border-radius:8px;padding:20px;margin:20px 0}.fee-choice{flex-direction:row;align-items:flex-start;padding:12px 0;gap:12px;font-weight:400;border-top:1px solid var(--line)}.fee-choice input{width:20px;height:20px;min-height:20px;flex-shrink:0;margin-top:4px}.totals{margin:18px 0}.form-error{color:#992c36;white-space:pre-wrap}.form-error:empty{display:none}dialog .form-error{background:#fff0f1;border:1px solid #f0c3c8;border-radius:6px;padding:10px}.ledger-totals{display:flex;justify-content:flex-end;gap:32px;padding:24px 0;border-top:2px solid var(--line);flex-wrap:wrap}.ledger-totals dt{font-size:14px;color:var(--muted)}.ledger-totals dd{font-size:25px;font-weight:700;margin:10px 0 0}.ledger-totals div:last-child{color:var(--blue)}details{padding:15px 0}summary{cursor:pointer;color:var(--blue);font-weight:600}dialog .check{margin-top:18px}dialog label+label{margin-top:0}.table-scroll input{min-width:125px}dialog .table-scroll label{font-size:12px}.backup .divider{margin-top:24px}
@media(max-width:1150px){.product-layout{grid-template-columns:225px minmax(0,1fr)}.order-row{grid-template-columns:1fr 1fr}.order-row>.actions{grid-column:1/-1;justify-content:flex-start}}
@media(max-width:760px){.product-layout{grid-template-columns:1fr}.product-picker{max-height:400px}.order-row{grid-template-columns:1fr}.order-row>.actions{grid-column:auto}.filters{gap:10px}.filters .grow{min-width:100%}.filters label{flex:1;min-width:120px}.filters button{flex-shrink:0}.order-edit-row{padding:13px}.fee-box{padding:14px}.ledger-totals{gap:18px;justify-content:space-between}.ledger-totals dd{font-size:21px}.table-scroll th,.table-scroll td{padding:10px 8px}.wide-dialog{width:calc(100% - 20px);padding:16px}dialog .table-scroll{margin:12px 0}.table-scroll{overscroll-behavior-x:contain}.product-option{padding:12px 8px}}
.group-heading{margin:24px 0 12px;padding:14px 16px;background:#edf4f8;border-left:4px solid #225875;border-radius:4px}.group-heading small{font-size:14px;font-weight:400}.ledger-group{margin-top:20px}.tag{white-space:nowrap}
