/* 請求書管理ページだけ、画面固定・内部スクロールにする。 */
body:has(#view-business.active-view .invoice-page-layout){overflow:hidden}
#view-business:has(.invoice-page-layout){height:calc(100vh - 100px);overflow:hidden;padding-bottom:20px}
#view-business:has(.invoice-page-layout) .invoice-page-layout{height:100%;min-height:0;grid-template-columns:minmax(0,1fr) 250px}
#view-business:has(.invoice-page-layout) .invoice-primary-panel{height:100%;min-height:0;display:flex;flex-direction:column}
#view-business:has(.invoice-page-layout) .invoice-primary-panel .table-wrap{flex:1;min-height:0;overflow:auto}
#view-business:has(.invoice-page-layout) .invoice-manual-side{height:100%;min-height:0}
#view-business:has(.invoice-page-layout) .invoice-manual-panel{height:100%;overflow:auto}
#view-business:has(.invoice-page-layout) .invoice-main-actions{flex-wrap:wrap;justify-content:flex-end}
#view-business:has(.invoice-page-layout) .invoice-main-actions .ghost-btn{white-space:nowrap}
@media(max-width:1050px){#view-business:has(.invoice-page-layout){height:calc(100vh - 100px)}#view-business:has(.invoice-page-layout) .invoice-page-layout{height:100%;grid-template-columns:1fr}#view-business:has(.invoice-page-layout) .invoice-manual-side{height:190px}#view-business:has(.invoice-page-layout) .invoice-manual-panel{height:190px}}
.user-chip{display:none}
#view-business:has(.invoice-page-layout){padding-left:34px;transform:translateX(-240px);width:calc(100% + 240px)}
#view-business:has(.invoice-page-layout) .invoice-page-layout{margin-left:0;width:100%}
body:has(#view-business.active-view .invoice-page-layout) .topbar>div:first-child{transform:translateX(-240px)}
body:has(#view-business.active-view .invoice-page-layout) .topbar{border-bottom:0;position:relative}
body:has(#view-business.active-view .invoice-page-layout) .topbar::after{content:"";position:absolute;left:-240px;right:0;bottom:0;height:1px;background:var(--line)}
#view-business:has(.invoice-page-layout) .invoice-filter-row-wide{display:grid!important;grid-template-columns:minmax(0,1fr) 150px 170px max-content!important;align-items:end;gap:12px;min-width:0}
#view-business:has(.invoice-page-layout) .invoice-filter-row-wide label{display:block;min-width:0;max-width:none;width:auto}
#view-business:has(.invoice-page-layout) .invoice-filter-row-wide select{display:block;width:100%;min-width:0}
.invoice-main-table{min-width:930px}
.invoice-main-table th,.invoice-main-table td{white-space:nowrap}
.invoice-main-table th:nth-child(1){min-width:150px}
.invoice-main-table th:nth-child(3){min-width:180px}
.invoice-state-badge{display:inline-flex;align-items:center;min-height:24px;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:700;line-height:1.1;white-space:nowrap}
.invoice-state-badge.pending{background:#fcebed;color:#a65a68;border:1px solid #f2cdd4}
.invoice-state-badge.done{background:#e7f3fb;color:#4b7892;border:1px solid #c8e1ef}
.invoice-state-badge.payment-pending{background:#fff0d8;color:#9a6a1d;border:1px solid #efd39d}
.invoice-state-badge.payment-none{background:#f1f3f1;color:#69736c;border:1px solid #d9dfda}
@media(max-width:1100px){#view-business:has(.invoice-page-layout) .invoice-filter-row-wide{grid-template-columns:minmax(0,1fr) 135px 150px max-content!important}}
@media(max-width:850px){#view-business:has(.invoice-page-layout){transform:none;width:auto;padding-left:0}body:has(#view-business.active-view .invoice-page-layout) .topbar>div:first-child{transform:none}body:has(#view-business.active-view .invoice-page-layout) .topbar::after{left:0}#view-business:has(.invoice-page-layout) .invoice-filter-row-wide{grid-template-columns:1fr 1fr!important}#view-business:has(.invoice-page-layout) .invoice-filter-row-wide .text-link{justify-self:start}}
