#ledger{color:#25384b} .ledger-head h2{font-size:24px;margin:0 0 8px}.ledger-head p,.ledger-note{color:#617085}.ledger-note{background:#edf3f8;border-radius:8px;padding:12px 16px;font-size:13px}.ledger-tools,.ledger-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:18px 0}.ledger-actions{flex-wrap:nowrap;margin:0}.ledger-button{display:inline-flex!important;align-items:center;justify-content:center;white-space:nowrap;min-height:36px;padding:8px 13px;border:1px solid #b8c8d6;border-radius:6px;background:#fff;color:#244962;text-decoration:none;font-size:13px;cursor:pointer;box-sizing:border-box}.ledger-button.primary{background:#163f56;color:white}.ledger-button:disabled{opacity:.45;cursor:not-allowed}.ledger-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin:20px 0}.ledger-metrics>div{padding:18px;background:#fff;border:1px solid #dbe3ea;border-radius:10px}.ledger-metrics strong{display:block;font-size:24px;margin-top:8px;font-variant-numeric:tabular-nums}.ledger-scroll{overflow:auto;border:1px solid #d6e0e8;border-radius:10px;background:#fff}.ledger-table{width:100%;border-collapse:collapse;table-layout:auto!important;min-width:960px}.ledger-table th,.ledger-table td{padding:14px 12px!important;border-bottom:1px solid #dde5eb;border-right:1px solid #e9eef2;width:auto!important;white-space:nowrap;text-align:left;font-size:13px}.ledger-table th{background:#eaf0f5;color:#435b70}.ledger-table tbody tr:nth-child(even){background:#f8fafc}.ledger-table small{display:block;color:#6b7988;font-size:12px;margin-top:4px}.ledger-table .money{text-align:right;font-variant-numeric:tabular-nums}.ledger-form{display:grid;gap:16px;max-width:650px;background:white;padding:24px;border-radius:12px}.ledger-form label{display:grid;gap:6px}.ledger-form input,.ledger-form select,.ledger-tools input,.ledger-tools select{padding:10px;border:1px solid #b9c8d4;border-radius:6px;font-size:14px;background:white;color:#263d50}.ledger-paper{padding:28px;background:white;border:1px solid #d6e0e8;border-radius:10px}.ledger-dialog{border:0;border-radius:14px;max-width:95vw;box-shadow:0 20px 80px #172f4c55}.ledger-dialog::backdrop{background:#172c4570}.ledger-switch{display:inline-flex;align-items:center;cursor:pointer}.ledger-switch input{position:absolute;opacity:0;width:44px;height:26px}.ledger-switch span{display:block;width:44px;height:26px;background:#9ba9b6;border-radius:20px;padding:3px;box-sizing:border-box}.ledger-switch span:after{content:'';display:block;width:20px;height:20px;border-radius:50%;background:white;transition:transform .15s}.ledger-switch input:checked+span{background:#18785e}.ledger-switch input:checked+span:after{transform:translateX(18px)}.ledger-switch input:focus-visible+span{outline:3px solid #237ec6;outline-offset:3px}
/* Project ledger: fixed identification and actions, aligned accounting columns. */
.c-page--projects .l-content{max-width:none;padding:30px 32px}.project-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.project-eyebrow{font-size:11px;color:#008eb9;letter-spacing:2px;font-weight:800}.project-title h2{font-size:28px;letter-spacing:.04em;margin:5px 0}.project-title p{font-size:13px;color:#7b8a94;margin:0}.project-title>.ledger-button{background:#202a2e;color:#fff;border:0;height:42px;padding:0 20px;font-weight:700}.project-tabs{display:flex;border-bottom:1px solid #d7e1e7;gap:28px}.project-tabs button{border:0;background:none;padding:13px 4px;font-size:14px;color:#71808b;cursor:pointer;font-weight:700;border-bottom:3px solid transparent}.project-tabs button.active{color:#007eaa;border-bottom-color:#00a6d5}.project-controls{display:flex;gap:18px;align-items:end;padding:22px 0}.project-controls label{display:grid;gap:7px;font-size:11px;color:#647783;font-weight:700}.project-controls input,.project-controls select{height:39px;padding:8px 12px;border:1px solid #d5e1e9;border-radius:7px;background:#fff;font-size:13px;color:#253b48}.project-search{min-width:270px}.project-period{font-size:12px;color:#718493;align-self:center}.project-controls>.ledger-button{margin-left:auto}.project-summary{border:1px solid #d8e4e9;background:#fff;border-radius:14px;display:grid;grid-template-columns:250px 1fr;overflow:hidden;box-shadow:0 6px 24px #23435405}.project-summary-main{background:#202b30;color:#fff;padding:24px}.project-summary-main small{font-size:12px;color:#b5cad5}.project-summary-main small span{border:1px solid #59727e;padding:2px 5px;border-radius:3px;margin-left:7px}.project-summary-main strong{display:block;font-size:32px;letter-spacing:-.5px;margin:12px 0;font-variant-numeric:tabular-nums}.project-summary-main p{font-size:11px;color:#b6c6cd;margin:0}.category-summary{display:grid;grid-template-columns:repeat(6,minmax(90px,1fr));padding:10px 12px}.category-summary>div{padding:12px;border-bottom:1px solid #eef2f4}.category-summary>div:nth-child(n+7){border-bottom:0}.category-summary span{display:block;font-size:11px;color:#627983;white-space:nowrap}.category-summary b{display:block;font-size:15px;margin-top:6px;font-variant-numeric:tabular-nums}.is-zero{color:#b0bec7!important}.project-table-heading{display:flex;justify-content:space-between;align-items:end;margin:30px 0 12px;gap:14px}.project-table-heading h3{font-size:15px;margin:0 0 5px}.project-table-heading p,.project-table-heading>span{font-size:11px;color:#70838f;margin:0}.project-grid-scroll{overflow:auto;max-height:620px;border:1px solid #d3e0e7;border-radius:10px;background:#fff;scrollbar-color:#9eafb9 #edf2f5;scrollbar-width:auto}.project-grid{border-collapse:separate;border-spacing:0;table-layout:fixed!important;width:2220px;min-width:2220px}.project-grid th,.project-grid td{box-sizing:border-box;border-bottom:1px solid #e4ebef;border-right:1px solid #ecf1f4;padding:16px 10px;width:94px;white-space:nowrap;font-size:12px;vertical-align:middle}.project-grid thead th{position:sticky;top:0;background:#eaf1f5;z-index:2;color:#4e6774;font-size:11px;font-weight:700;text-align:right;height:50px;padding:10px}.project-grid tbody td{background:white}.project-grid tbody tr:nth-child(even) td{background:#f6f9fb}.project-grid tbody tr:hover td{background:#edf8fc}.project-grid .fixed-project{position:sticky;left:0;width:260px;min-width:260px;z-index:3;box-shadow:5px 0 8px #233b4710;text-align:left}.project-grid thead .fixed-project,.project-grid thead .fixed-action{z-index:5}.project-grid .fixed-project small{display:block;font-size:10px;color:#879aa5;margin-bottom:5px;font-weight:400}.project-grid .fixed-project b{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis}.project-grid .fixed-project>span{display:block;font-size:11px;color:#6b818e;margin-top:4px;overflow:hidden;text-overflow:ellipsis}.project-grid .fixed-action{position:sticky;right:0;width:176px;z-index:3;box-shadow:-5px 0 8px #233b4710;text-align:center}.project-grid .category-value,.project-grid .total-col,.project-grid tfoot td{text-align:right;font-variant-numeric:tabular-nums}.project-grid .total-col{font-weight:800;color:#123a50;width:120px}.project-grid small{font-size:10px}.project-grid tfoot th,.project-grid tfoot td{background:#e9f2f6;font-weight:800;border-top:2px solid #9ebcc9}.project-row-actions{display:flex;gap:7px;justify-content:center}.project-row-actions .ledger-button{font-size:11px;padding:7px 9px;min-height:34px;border-color:#c9dce6}.project-row-actions .ledger-button:last-child:not(:first-child){color:#007eaa;background:#effaff;border-color:#a8d9e9;font-weight:700}.project-row-actions svg{height:16px;width:16px;stroke:currentColor;stroke-width:1.7;fill:none}.sr-only{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.project-footnote{font-size:11px;color:#8898a1;margin-top:14px}.project-grid .selected-category{background:#d8f0f9;color:#00789f}@media(max-width:1300px){.category-summary{grid-template-columns:repeat(4,1fr)}.category-summary>div:nth-child(n+7){border-bottom:1px solid #eef2f4}.category-summary>div:nth-child(n+9){border-bottom:0}.project-summary{grid-template-columns:220px 1fr}}@media(max-width:760px){.c-page--projects .l-content{padding:20px 12px}.project-title h2{font-size:23px}.project-controls{flex-wrap:wrap;gap:12px}.project-search{min-width:100%;}.project-summary{grid-template-columns:1fr}.category-summary{grid-template-columns:repeat(3,1fr)}.project-table-heading{align-items:start;flex-direction:column}.project-grid .fixed-project{width:205px;min-width:205px}.project-grid .fixed-action{position:static}.project-title>.ledger-button{padding:0 12px}.category-summary>div{padding:10px}.project-summary-main{padding:18px}}

/* v34 compact, equal-width accounting columns */
.project-grid.project-grid--orders{width:1578px;min-width:1578px}.project-grid.project-grid--sales{width:1478px;min-width:1478px}.project-grid th,.project-grid td{width:auto}.project-grid .category-col,.project-grid .category-value{padding-left:6px;padding-right:6px}.project-grid .category-col{white-space:normal;overflow-wrap:anywhere;line-height:1.4;height:60px;text-align:center}.project-grid th small{display:block;font-size:10px;font-weight:400}.project-grid .owner-col{text-align:center;font-size:12px}.project-grid .total-col{width:auto}.project-grid .invoice-count{display:block;color:#78909c;font-size:10px;margin-top:4px;font-weight:400}.fully-invoiced{font-size:11px;color:#517d70;white-space:nowrap}.project-grid tfoot .fixed-project small{display:inline;margin-left:8px}@media(max-width:760px){.project-grid .fixed-project{width:260px;min-width:260px}}

/* v35: four full-width characters per category header */
.project-grid .category-col{font-size:12px;white-space:nowrap;overflow-wrap:normal;padding:10px 4px;height:50px;letter-spacing:0}.project-grid .category-value{padding-left:4px;padding-right:4px;font-size:11px;letter-spacing:0}

/* v36: eight-digit money columns and viewport fitting */
.project-grid.project-grid--orders{width:1422px;min-width:1422px}.project-grid.project-grid--sales{width:1326px;min-width:1326px}.project-grid .fixed-project{width:180px;min-width:180px}.project-grid .fixed-action{width:130px}.project-grid .total-col{font-size:12px;padding-left:6px;padding-right:6px}.project-grid--orders tbody td:nth-last-child(2),.project-grid--orders tbody td:nth-last-child(3),.project-grid--orders tfoot td:nth-last-child(2),.project-grid--orders tfoot td:nth-last-child(3){font-size:12px;padding-left:6px;padding-right:6px;font-variant-numeric:tabular-nums}.project-row-actions{gap:4px}.project-row-actions .ledger-button{padding:6px;min-height:32px}.project-grid-scroll{overflow-x:hidden;min-width:0;max-width:100%}.c-page--projects .main,.c-page--projects .content,#ledger{min-width:0}.project-grid thead th{white-space:normal}.project-grid th small{white-space:nowrap}.project-grid .fixed-project b,.project-grid .fixed-project>span{white-space:normal;overflow-wrap:anywhere}.project-table-heading>span{white-space:nowrap}

.row-grip{float:left;margin:0 5px 4px 0;padding:3px;color:#758e9b;border:1px solid #d8e4ea;border-radius:5px;background:#f3f8fa;cursor:grab;font-size:18px;line-height:1}.row-grip:active{cursor:grabbing}.project-grid tr.dragging{opacity:.45}.project-grid tr.drop-target{outline:2px solid #009cce;outline-offset:-2px}.schedule-dialog{width:min(780px,94vw);max-height:90vh;overflow:auto}.amount-editor{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.amount-editor input{width:100%}

.row-grip{min-width:28px;min-height:30px;touch-action:none}.project-grid tbody tr[data-row-id]{cursor:grab}.project-grid tbody tr.dragging td{background:#d8f0f9!important}.project-grid tbody tr.drop-target td{border-top:3px solid #009cce!important}.row-sorting,.row-sorting *{user-select:none!important;cursor:grabbing!important}.billing-filters label,.billing-batch>label:first-child{display:grid;gap:6px;font-size:12px;color:#526d7d}.billing-batch{display:flex;align-items:center;gap:20px;flex-wrap:wrap;padding:18px;background:#edf6fa;border:1px solid #cfdee7;border-radius:10px;margin:16px 0 8px}.billing-batch input[type=date]{padding:9px;border:1px solid #b9c8d4;border-radius:6px;font-size:14px}.billing-batch input[type=checkbox],.c-page--billing .ledger-table input[type=checkbox]:not([role=switch]){width:18px;height:18px;accent-color:#008fb9;vertical-align:middle}.billing-help{font-size:12px;color:#607887;line-height:1.8}#settle-selected{background:#163f56;color:#fff;margin-left:auto}.ledger-switch{position:relative}

.customer-ledger{margin-top:28px;padding:24px;background:#fff;border:1px solid #d8e4ea;border-radius:14px}.customer-ledger>h3{margin:28px 0 8px}.customer-ledger .ledger-table{min-width:760px}.customer-ledger .ledger-head h2{font-size:20px}.c-page--customer-ranking .ledger-table{min-width:850px}

.month-picker{display:flex;align-items:center;gap:8px}.month-picker .ledger-button{height:39px;padding:8px 12px;font-size:12px;color:#007eaa;background:#effaff;border-color:#a8d9e9}

.history-section-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:28px 0 12px}.history-section-heading h3{margin:0}.history-section-heading label{white-space:nowrap;font-size:13px}.history-section-heading select{padding:8px 12px;border:1px solid #cbdde6;border-radius:7px;background:#fff}.history-year-total{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;background:#20333d;color:#fff;border-radius:12px 12px 0 0;font-size:13px}.history-year-total strong{font-size:24px}.receipt-months{border:1px solid #dce6ec;border-top:0;border-radius:0 0 12px 12px;overflow:hidden}.receipt-month summary,.receipt-month-empty{display:flex;align-items:center;gap:18px;min-height:52px;padding:10px 22px;box-sizing:border-box;border-bottom:1px solid #e7edf1}.receipt-month summary{cursor:pointer;list-style:none}.receipt-month summary::-webkit-details-marker{display:none}.receipt-month summary>span:first-child,.receipt-month-empty>span{width:42px;font-weight:700}.receipt-month small,.receipt-month-empty small{font-size:12px;color:#8295a0}.receipt-month summary>b,.receipt-month-empty>b{margin-left:auto;font-variant-numeric:tabular-nums}.receipt-month[open] summary{background:#ecf7fb}.receipt-chevron{width:14px;color:#007fa6}.receipt-month[open] .receipt-chevron{transform:rotate(180deg)}.receipt-month-empty{color:#9baab2;padding-right:54px;background:#fafcfd}.receipt-month-content{padding:12px 18px 18px}.receipt-month-content .ledger-scroll{max-height:300px;overflow:auto}.receipt-month-content .ledger-table{min-width:540px!important}.history-orders-dialog{width:min(960px,94vw);max-height:85vh;overflow:auto;padding:24px}.history-orders-dialog .ledger-scroll{max-height:55vh}.history-dialog-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.history-dialog-head h3{margin:0}@media(max-width:600px){.history-section-heading{flex-wrap:wrap}.history-year-total{padding:16px}.history-year-total strong{font-size:20px}.receipt-month summary,.receipt-month-empty{padding-left:16px}}

.request-history-filters{display:grid;grid-template-columns:150px minmax(180px,1fr) 180px;gap:14px;padding:16px;background:#f3f8fa;border:1px solid #dfebf0;border-radius:10px}.request-history-filters label{display:grid;gap:6px;font-size:12px;color:#5a7484}.request-history-filters input,.request-history-filters select{width:100%;min-width:0;box-sizing:border-box;padding:10px;border:1px solid #cbdde6;border-radius:6px;background:white;font-size:13px}.request-result{font-size:13px;color:#536f7f;padding:10px 0}.request-result b{color:#183d50}:is(.history-orders-dialog,#request-history-panel) .ledger-table{min-width:640px!important}@media(max-width:650px){.request-history-filters{grid-template-columns:1fr}.history-orders-dialog{padding:16px}}

/* Request history dialog fits its viewport without horizontal scrolling. */
.history-orders-dialog{box-sizing:border-box;width:min(960px,94vw);min-width:0}
:is(.history-orders-dialog,#request-history-panel) .ledger-table{min-width:0!important;width:100%;table-layout:fixed!important}
:is(.history-orders-dialog,#request-history-panel) .ledger-table th,:is(.history-orders-dialog,#request-history-panel) .ledger-table td{white-space:normal;overflow-wrap:anywhere}
:is(.history-orders-dialog,#request-history-panel) .ledger-table th:nth-child(1){width:90px!important}
:is(.history-orders-dialog,#request-history-panel) .ledger-table th:nth-child(3){width:100px!important}
:is(.history-orders-dialog,#request-history-panel) .ledger-table th:nth-child(4){width:150px!important}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td.money{white-space:nowrap}
.history-orders-dialog .request-history-filters{grid-template-columns:120px minmax(0,1fr) 150px}
.history-orders-dialog .request-history-filters label{min-width:0}
.history-dialog-head{gap:12px}.history-dialog-head h3{min-width:0;overflow-wrap:anywhere}
@media(max-width:650px){
.history-orders-dialog .request-history-filters{grid-template-columns:1fr}
:is(.history-orders-dialog,#request-history-panel) .ledger-table,:is(.history-orders-dialog,#request-history-panel) .ledger-table tbody{display:block}
:is(.history-orders-dialog,#request-history-panel) .ledger-table thead{display:none}
:is(.history-orders-dialog,#request-history-panel) .ledger-table tr{display:block;border-bottom:1px solid #dce6ec;padding:10px}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td{display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px;width:auto!important;border:0;padding:6px 0!important;text-align:left}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td:before{font-size:12px;color:#617085;font-weight:400}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td:nth-child(1):before{content:'対象月'}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td:nth-child(2):before{content:'依頼内容'}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td:nth-child(3):before{content:'担当者'}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td:nth-child(4):before{content:'受注金額（税抜）'}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td.money{display:block;text-align:right}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td.money:before{float:left}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td[colspan]{display:block}
:is(.history-orders-dialog,#request-history-panel) .ledger-table td[colspan]:before{content:none}
}

/* Align the customer history action independently of other toolbars. */
#request-history-panel .request-history-actions{justify-content:flex-end}
