:root {
    --bg: #f4f6f9;
    --surface: #ffffff;
    --text: #1a1d26;
    --muted: #5c6578;
    --estimate-fg: #3b414f; /* 見積・受注の一覧・入欄 */
    --border: #e2e6ef;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --success: #059669;
    --danger: #dc2626;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    --font: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
    /* 受注明細 商品コード入力幅: JTC-C3BC2-D (11) + 半角3 = 14ch（虫眼鏡ボタン分を列幅に含む） */
    --order-line-code-input-ch: 14;
    --order-line-code-btn-width: 1.35rem;
    --order-line-code-col-width: calc(
        var(--order-line-code-input-ch) * 1ch + var(--order-line-code-btn-width) + 0.2rem
    );
    /* ヘッダー操作ボタン（新規・保存など）と下線の間 */
    --site-header-action-gap: 0.5rem;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 400;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: visible;
}

.site-header__inner {
    max-width: min(1760px, 100vw - 1.5rem);
    margin: 0 auto;
    padding: 0.75rem 1.25rem calc(0.75rem + var(--site-header-action-gap));
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.brand {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.02em;
    cursor: pointer;
}

.brand:hover,
.brand:focus-visible {
    color: var(--accent);
}

.brand span {
    color: var(--accent);
}

.site-header__brand-block {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.75rem;
    min-width: 0;
}

.site-header__context-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 0.03em;
    border-left: 1px solid var(--border);
    padding-left: 0.75rem;
    line-height: 1.25;
}

.site-header__brand-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.4rem;
    margin-left: 0.15rem;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    font-size: 0.8125rem;
}

.nav a:hover {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.08);
}

.nav a.is-active {
    color: var(--accent);
    font-weight: 600;
    background: rgba(37, 99, 235, 0.12);
}

/* 受注画面: グローバルナビはダッシュボードへの導線のみ */
.nav--dashboard-only {
    gap: 0.35rem;
}

.nav--dashboard-only a {
    font-weight: 600;
}

.site-header__cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem 0.85rem;
    min-width: 0;
    flex: 1 1 auto;
}

.site-header__quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.4rem;
}

.site-header__quick-actions .site-header__quick-inline-form {
    display: inline-flex;
    margin: 0;
    align-items: center;
}

.site-header__quick-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem 0.55rem;
    font-size: 0.75rem;
    font-weight: 400;
    color: #111;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.site-header__quick-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

.site-header__quick-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.site-header__quick-btn--primary {
    color: #111;
    background: #fff;
    border-color: #d1d5db;
    font-weight: 400;
}

.site-header__quick-btn--primary:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #111;
}

/* ヘッダークイックボタン共通ホバー（リンク・その他・保存・削除を同型に） */
.site-header__quick-actions .site-header__quick-btn:hover:not(:disabled):not(.site-header__quick-btn--primary),
.site-header__brand-actions .site-header__quick-btn:hover:not(:disabled):not(.site-header__quick-btn--primary) {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

.site-header__quick-sync-form {
    margin: 0;
    display: inline-flex;
}

.site-header__quick-actions__divider {
    width: 1px;
    height: 1.15em;
    margin: 0 0.1rem 0 0.35rem;
    background: var(--border);
    align-self: center;
    flex-shrink: 0;
}

.site-header__quick-import-form {
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
}

.site-header__quick-import-file {
    max-width: 10.5rem;
    font-size: 0.7rem;
    min-width: 0;
}

.site-header__quick-more-wrap {
    position: relative;
    display: inline-flex;
}

.site-header__quick-more-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 120;
    min-width: 10.5rem;
    padding: 0.3rem 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.site-header__quick-more-menu__item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: var(--text);
    text-decoration: none;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
}

.site-header__quick-more-menu__item:hover,
.site-header__quick-more-menu__item:focus-visible {
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent);
    outline: none;
}

.site-header__quick-more-menu__item--danger {
    color: var(--danger, #b91c1c);
}

.site-header__quick-more-menu__item--danger:hover,
.site-header__quick-more-menu__item--danger:focus-visible {
    background: rgba(185, 28, 28, 0.08);
    color: var(--danger, #b91c1c);
}

.payment-upload-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 2.5vw, 1.5rem);
    box-sizing: border-box;
}

.payment-upload-modal[hidden] {
    display: none !important;
}

.payment-upload-modal__backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
}

.payment-upload-modal__shell {
    position: relative;
    z-index: 1;
    width: min(28rem, calc(100vw - 1.5rem));
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
}

.payment-upload-modal__shell--wide {
    width: min(36rem, calc(100vw - 1.5rem));
}

.payment-import-modal__lead {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.payment-import-mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.payment-import-mode__btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    margin: 0;
    padding: 0.55rem 0.65rem;
    text-align: left;
    font: inherit;
    color: inherit;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.payment-import-mode__btn[aria-selected="true"] {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 1px var(--primary, #2563eb);
    background: rgba(37, 99, 235, 0.06);
}

.payment-import-mode__title {
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.35;
}

.payment-import-mode__hint {
    font-size: 0.6875rem;
    line-height: 1.4;
    color: var(--muted);
    font-weight: 400;
}

.payment-import-panel__desc {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
    line-height: 1.5;
}

.payment-import-panel__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
}

.payment-import-panel__form {
    width: 100%;
}

.payment-import-panel__warn {
    margin: 0 0 0.65rem;
    padding: 0.55rem 0.65rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--danger, #b91c1c);
    background: rgba(185, 28, 28, 0.08);
    border: 1px solid rgba(185, 28, 28, 0.25);
    border-radius: 8px;
}

@media (max-width: 520px) {
    .payment-import-mode {
        grid-template-columns: 1fr;
    }
}

.payment-upload-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
}

.payment-upload-modal__head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.payment-upload-modal__close {
    min-width: 2rem;
    font-size: 1.1rem;
    line-height: 1;
}

.payment-upload-modal__body {
    padding: 1rem;
}

.payment-upload-modal__templates {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.payment-upload-modal__form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.payment-upload-modal__form .site-header__quick-import-file {
    max-width: 100%;
    flex: 1 1 12rem;
}

.payment-upload-modal__advanced {
    margin-top: 0.75rem;
}

.payment-upload-modal__advanced summary {
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--muted);
}

/* 入金取込: 列設定（マトリクス） */
body.page-payment-import-map .payment-import-map__matrix-wrap {
    margin-bottom: 0.65rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

body.page-payment-import-map .payment-import-map__matrix {
    font-size: 0.8125rem;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 100%;
}

body.page-payment-import-map .payment-import-map__matrix thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: 0 1px 0 #e2e8f0;
}

body.page-payment-import-map .payment-import-map__matrix-corner {
    width: 5.5rem;
    min-width: 5.5rem;
    background: #fff;
}

body.page-payment-import-map .payment-import-map__matrix-col-head {
    min-width: 5.5rem;
    text-align: center;
    vertical-align: bottom;
    padding: 0.45rem 0.35rem;
}

body.page-payment-import-map .payment-import-map__matrix-col-name {
    font-weight: 700;
    line-height: 1.3;
}

body.page-payment-import-map .payment-import-map__matrix-col-ex {
    font-size: 0.6875rem;
    margin-top: 0.15rem;
    line-height: 1.25;
    color: var(--muted, #64748b);
}

body.page-payment-import-map .payment-import-map__matrix-col-head--on {
    background: #e2e8f0;
}

body.page-payment-import-map .payment-import-map__matrix-row-lbl {
    font-weight: 700;
    white-space: nowrap;
    padding: 0.5rem 0.65rem;
    background: #fff;
    border-right: 1px solid #e2e8f0;
}

body.page-payment-import-map .payment-import-map__matrix-row-lbl--date {
    color: #1d4ed8;
    box-shadow: inset 4px 0 0 #2563eb;
}

body.page-payment-import-map .payment-import-map__matrix-row-lbl--credit {
    color: #047857;
    box-shadow: inset 4px 0 0 #059669;
}

body.page-payment-import-map .payment-import-map__matrix-row-lbl--payer {
    color: #b45309;
    box-shadow: inset 4px 0 0 #d97706;
}

body.page-payment-import-map .payment-import-map__matrix-cell {
    text-align: center;
    padding: 0.35rem;
    vertical-align: middle;
    background: #fff;
}

body.page-payment-import-map .payment-import-map__matrix-radio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    cursor: pointer;
}

body.page-payment-import-map .payment-import-map__matrix-radio input {
    width: 1.05rem;
    height: 1.05rem;
    margin: 0;
    cursor: pointer;
}

body.page-payment-import-map .payment-import-map__preview-label {
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
}

body.page-payment-import-map .payment-import-map__preview {
    max-height: min(20rem, 50vh);
    overflow: auto;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

body.page-payment-import-map .payment-import-map__preview-table {
    font-size: 0.75rem;
    border-collapse: separate;
    border-spacing: 0;
}

body.page-payment-import-map .payment-import-map__preview-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    box-shadow: 0 1px 0 #e2e8f0;
}

body.page-payment-import-map .payment-import-map__preview-col--on {
    background: #f1f5f9;
}

body.page-payment-import-map .payment-import-map__advanced {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
}

body.page-payment-import-map .payment-import-map__advanced summary {
    cursor: pointer;
    color: var(--muted, #64748b);
    margin-bottom: 0.5rem;
}

body.page-payment-import-map .payment-import-map__advanced-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.65rem 1rem;
    padding: 0.5rem 0 0.25rem;
}

body.page-payment-import-review main.container--payment-import-review {
    max-width: min(100%, 96rem);
}

body.page-payment-import-review .payment-import-bulk-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.25rem;
    margin: 0 0 0.5rem;
    padding: 0.25rem 0;
}

body.page-payment-import-review .payment-import-bulk-tools__group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

body.page-payment-import-review .payment-import-bulk-tools__lbl {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    margin-right: 0.15rem;
}

body.page-payment-import-review .payment-import-review-bill-hint {
    margin: 0 0 0.55rem;
    font-size: 0.8125rem;
    line-height: 1.45;
}

body.page-payment-import-review .payment-import-review-table {
    table-layout: fixed;
    width: 100%;
    min-width: 72rem;
}

body.page-payment-import-review .payment-import-review-table th.num,
body.page-payment-import-review .payment-import-review-table td.num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body.page-payment-import-review .payment-import-bill--ok {
    color: #15803d;
    font-weight: 600;
}

body.page-payment-import-review .payment-import-bill--warn {
    color: #b45309;
    font-weight: 600;
}

body.page-payment-import-review .payment-import-bill--muted {
    color: var(--muted, #64748b);
}

body.page-payment-import-review .payment-import-fee-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

body.page-payment-import-review .payment-import-bill-period {
    font-size: 0.75rem;
    line-height: 1.4;
    word-break: break-word;
}

body.page-payment-import-review .payment-import-review-table .psp-in {
    max-width: none;
}

body.page-payment-import-review .payment-import-name-cell {
    min-width: 0;
}

body.page-payment-import-review .payment-import-reg-head {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.12rem;
    margin: 0;
    cursor: pointer;
    font-weight: 600;
    line-height: 1.1;
}

body.page-payment-import-review .payment-import-reg-head__lbl {
    font-size: 0.6875rem;
    color: var(--muted, #64748b);
}

body.page-payment-import-review .payment-import-review-table-wrap {
    max-height: min(72vh, 54rem);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
}

body.page-payment-import-review .payment-import-review-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: 0 1px 0 var(--border);
}

body.page-payment-import-review .payment-import-review-lead {
    margin: 0 0 0.55rem;
    font-size: 0.8125rem;
    line-height: 1.45;
}

body.page-payment-import-review .payment-import-review-learn {
    margin: 0 0 0.55rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    padding: 0.45rem 0.65rem;
    background: rgba(236, 253, 245, 0.9);
    border-left: 3px solid #059669;
}

body.page-payment-import-review .payment-import-name-cell {
    position: relative;
    min-width: 12rem;
}

.payment-import-suggest {
    position: absolute;
    z-index: 80;
    max-height: 14rem;
    overflow: auto;
    margin: 0;
    padding: 0.2rem 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.payment-import-suggest[hidden] {
    display: none !important;
}

.payment-import-suggest__item {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0.35rem 0.65rem;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    font-size: 0.8125rem;
    color: inherit;
}

.payment-import-suggest__item:hover,
.payment-import-suggest__item:focus {
    background: #f1f5f9;
    outline: none;
}

.payment-import-suggest__code {
    flex: 0 0 auto;
    min-width: 3.5rem;
    color: var(--muted, #64748b);
    font-variant-numeric: tabular-nums;
}

.payment-import-suggest__name {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-payment-import-review .payment-import-review-table th,
body.page-payment-import-review .payment-import-review-table td {
    font-size: 0.8125rem;
    vertical-align: top;
}

body.page-payment-import-review .payment-import-review-table .psp-in {
    width: 100%;
    max-width: 14rem;
    box-sizing: border-box;
    font-size: 0.8125rem;
    padding: 0.2rem 0.4rem;
}

body.page-payment-import-review .payment-import-cand {
    margin-top: 0.25rem;
    max-width: 14rem;
}

body.page-payment-import-review .payment-import-match {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

body.page-payment-import-review .payment-import-match--ok {
    color: #047857;
}

body.page-payment-import-review .payment-import-match--warn {
    color: #b45309;
}

body.page-payment-import-review .payment-import-match--need {
    color: #b91c1c;
}

body.page-payment-import-review .payment-import-row--need {
    background: rgba(254, 243, 199, 0.35);
}

body.page-orders-list--compact-header .site-header__inner {
    padding: 1rem 1.25rem calc(1rem + var(--site-header-action-gap));
    gap: 0.85rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 3rem;
}

/* 受注一覧・明細（業務画面向けにやや広め） */
.container--orders {
    max-width: 1320px;
}

/* 注文書AI一覧: カードを画面幅いっぱいに */
body.page-odai-list > main.container,
body.page-odai-list > main.container.container--odai-list {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
}

/* 受注一覧・受注明細: FLAM 風ダークツールバー（アクティブタブ + 操作ボタン） */
.site-header__toolbar--flam {
    background: linear-gradient(180deg, #4a505a 0%, #3d424a 100%);
    border-top: 1px solid #2d3138;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.site-header__toolbar-inner--flam {
    max-width: min(1760px, 100vw - 1.5rem);
    margin: 0 auto;
    padding: 0 1rem 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.35rem 0.75rem;
    min-height: 2.65rem;
}

.site-header__flam-tabs {
    display: flex;
    align-items: flex-end;
    gap: 0;
    flex-shrink: 0;
}

.site-header__flam-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.95rem 0.38rem;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #b8c0d0;
    background: #353a42;
    border: 1px solid #2a2e35;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    margin-right: 3px;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.2);
}

.site-header__flam-tab--link {
    text-decoration: none;
    color: #c5cbd8;
    cursor: pointer;
}

.site-header__flam-tab--link:hover {
    color: #fff;
    background: #404854;
}

.site-header__flam-tab--active {
    color: #1a1d26;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border-color: #94a3b8;
    box-shadow:
        0 3px 0 0 #9ccc65 inset,
        0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 1;
}

.site-header__flam-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.45rem;
    padding-bottom: 0.35rem;
}

.site-header__flam-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.32rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #e8eaef;
    background: #5c6370;
    border: 1px solid #454b56;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.25;
    white-space: nowrap;
}

.site-header__flam-btn:hover {
    background: #6d7484;
    color: #fff;
    border-color: #5c6370;
}

.site-header__flam-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.site-header__flam-btn--disabled,
.site-header__flam-btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.site-header__flam-btn--primary {
    color: #fff;
    background: #2563eb;
    border-color: #1d4ed8;
}

.site-header__flam-btn--primary:hover:not(:disabled) {
    background: #1d4ed8;
}

.site-header__flam-btn--accent {
    color: #fff;
    background: #4b5563;
    border-color: #6b7280;
}

.site-header__flam-btn--danger {
    color: #fff;
    background: #9f1239;
    border-color: #881337;
}

.site-header__flam-btn--danger:hover:not(:disabled) {
    background: #881337;
    border-color: #6f1028;
}

/* 納期回答レビュー: 進み具合・状態をヘッダーで示す固定表示（押せないので btn とは分ける） */
.site-header__flam-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.32rem 0.7rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #e8eaef;
    background: #3f4652;
    border: 1px solid #4b5563;
    border-radius: 4px;
    white-space: nowrap;
    cursor: default;
}

.site-header__flam-badge--warn {
    color: #1f2937;
    background: #fde68a;
    border-color: #d97706;
}

.site-header__flam-sync-form {
    margin: 0;
    display: inline-flex;
}

/* 発注明細ツールバー: 仕入へのコピー（顧客注文書・納期回答と同じ操作列） */
.site-header__flam-copy-gr-form {
    margin: 0;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem 0.4rem;
}

.site-header__flam-copy-gr__lbl {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #c5cbd8;
    white-space: nowrap;
}

.site-header__flam-copy-gr__date {
    font-size: 0.75rem;
    padding: 0.22rem 0.35rem;
    border-radius: 4px;
    border: 1px solid #2a2e35;
    background: #f8fafc;
    color: #1e293b;
    font-family: inherit;
    line-height: 1.2;
}

/* 受注明細ツールバー: コピーメニュー */
.site-header__flam-copy-wrap {
    position: relative;
    display: inline-flex;
}

.site-header__flam-copy-menu {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    z-index: 120;
    min-width: 13.5rem;
    padding: 0.3rem 0;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
}

.site-header__flam-copy-menu__item {
    display: block;
    width: 100%;
    padding: 0.45rem 0.85rem;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: #1e293b;
    text-decoration: none;
    text-align: left;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
}

.site-header__flam-copy-menu__item:hover,
.site-header__flam-copy-menu__item:focus-visible {
    background: #f1f5f9;
    outline: none;
}

.site-header__flam-copy-menu__item--primary {
    color: #1d4ed8;
    font-weight: 600;
}

.site-header__flam-copy-menu__section + .site-header__flam-copy-menu__section {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid #e2e8f0;
}

.site-header__flam-copy-menu__heading {
    padding: 0.35rem 0.85rem 0.2rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #64748b;
    text-transform: none;
}

html:has(body.page-orders-list) {
    height: 100%;
}

body.page-orders-list {
    min-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.page-orders-list > main.container--orders-fit {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.45rem 1rem 0.5rem;
    max-width: 1320px;
}

/* 在庫アラート: 長文テーブルのため main 内で縦スクロール */
body.page-inventory-alerts > main.container--orders-fit {
    overflow-y: auto;
    overflow-x: hidden;
}

/* 特価: ページ全体を縦スクロールする。一覧の見出しは残す */
body.page-special-prices.page-orders-list > main.container--wide {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    width: 100%;
    max-width: 1760px;
}

body.page-special-prices .special-price-views {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
}

body.page-special-prices .special-price-table-scroll table {
    table-layout: fixed;
    width: 100%;
}

body.page-special-prices .special-price-col-product {
    width: 46%;
    text-align: left;
}

body.page-special-prices .special-price-product__code {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.3;
}

body.page-special-prices .special-price-product__name {
    margin-top: 0.15rem;
    font-size: 0.875rem;
    line-height: 1.35;
}

body.page-special-prices .special-price-table-scroll th.num,
body.page-special-prices .special-price-table-scroll td.num,
body.page-special-prices .special-price-table-scroll th:not(.special-price-col-product),
body.page-special-prices .special-price-table-scroll td:not(.special-price-col-product) {
    width: 6.5rem;
    white-space: nowrap;
}

body.page-special-prices .special-price-find {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.35rem 0.5rem;
    font-size: 1rem;
    font-weight: 400;
}

body.page-special-prices .special-price-table-scroll {
    max-height: 28rem;
    overflow: auto;
}

body.page-special-prices .special-price-section {
    margin: 0 0 1.25rem;
}

body.page-special-prices .special-price-section__title {
    margin: 0 0 0.4rem;
    font-size: 1rem;
}

body.page-special-prices .special-price-table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
}

body.page-inventory-list .inventory-row--safety-alert {
    background: rgba(254, 226, 226, 0.55);
}

body.page-inventory-list .inventory-col-safety .inventory-safety-input {
    max-width: 5rem;
}

/* 在庫一覧は列数が多いため、品名を1行で見やすい横幅にする。長い表は表ラッパ内でスクロール */
body.page-inventory-list > main.container--orders-fit {
    width: 100%;
    max-width: 1760px;
}

body.page-inventory-list.page-orders-list--compact-header #inventory-safety-stock-form.order-list-data {
    margin: 0;
}

body.page-inventory-list .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-inventory-list .order-list-pager-tools {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

body.page-inventory-list .inventory-list-on-hand-meta {
    margin: 0;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ヘッダー以外のページ内文字を 0.875rem に統一 */
body.page-inventory-list main > .flash,
body.page-inventory-list main > .callout,
body.page-inventory-list .order-list-screen {
    font-size: 0.875rem;
}

body.page-inventory-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    th,
    td,
    .order-list-meta,
    .order-list-page-size,
    .order-list-pager-status,
    .order-summary-footer__label,
    .order-summary-footer__value,
    .list-pager-bottom__btn,
    .empty-state,
    .empty-state strong,
    .callout
) {
    font-size: 0.875rem;
}

/* 共通の compact 系（0.6〜0.8125rem）を在庫一覧では上書き */
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid label,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid select.order-filter-input,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-list-toolbar .order-list-meta,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-list-page-size,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-list-page-size select,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-list-pager-nav .btn,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-list-pager-nav a.btn,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-list-pager-status,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .btn--compact,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-summary-footer--compact .order-summary-footer__label,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .order-summary-footer--compact .order-summary-footer__value,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen .list-pager-bottom__btn,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen #inventory-list-table.data-table th,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen #inventory-list-table.data-table td,
body.page-inventory-list.page-orders-list--compact-header .order-list-screen #inventory-list-table.data-table code,
body.page-inventory-list main > .callout,
body.page-inventory-list main > .callout p,
body.page-inventory-list main > .callout strong,
body.page-inventory-list main > .callout a,
body.page-inventory-list main > .flash {
    font-size: 0.875rem;
}

body.page-inventory-list.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    min-width: 0;
    width: auto;
}

body.page-inventory-list.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 4.5rem;
    white-space: nowrap;
}

/* キーワードは商品一覧と同幅（約50%）、右に表示単位（やや狭め） */
body.page-inventory-list .order-filter-panel--compact .order-filter-grid--inventory-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem 0.85rem;
}

body.page-inventory-list .order-filter-field--kw {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    box-sizing: border-box;
}

body.page-inventory-list .order-filter-field--kw .order-filter-input--kw {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
}

body.page-inventory-list .order-filter-field--scope {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
}

body.page-inventory-list .order-filter-field--scope .order-filter-field__lbl {
    flex: 0 0 auto;
}

body.page-inventory-list.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inventory-row input.order-filter-input,
body.page-inventory-list.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inventory-row select.order-filter-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 1.65rem;
    padding: 0.2rem 0.45rem;
    box-sizing: border-box;
    font-size: 0.875rem;
}

body.page-inventory-list .order-filter-field--scope .order-filter-input {
    flex: 0 0 auto;
    width: 7.25rem;
    max-width: 7.25rem;
}

/* 行間隔は商品一覧と同型 */
body.page-inventory-list.page-orders-list--compact-header .container--orders-fit #inventory-list-table.data-table th,
body.page-inventory-list.page-orders-list--compact-header .container--orders-fit #inventory-list-table.data-table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-inventory-list.page-orders-list--compact-header .container--orders-fit #inventory-list-table.data-table thead th {
    padding: 0.4rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.35;
}

body.page-inventory-list #inventory-list-table .inventory-list-check-cell {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-inventory-list #inventory-list-table .inventory-list-check-cell input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

/* fixed だと品名が隣列に重なるため、内容幅で伸ばして横スクロール */
body.page-inventory-list #inventory-list-table.order-list-table {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
}

body.page-inventory-list #inventory-list-table .inventory-col-name,
body.page-inventory-list #inventory-list-table th.inventory-col-name {
    white-space: nowrap;
    overflow: visible;
}

body.page-inventory-list #inventory-list-table .inventory-col-kind,
body.page-inventory-list #inventory-list-table .inventory-col-maker,
body.page-inventory-list #inventory-list-table .inventory-col-code {
    white-space: nowrap;
}

body.page-inventory-list #inventory-list-table .inventory-col-expand {
    width: 1.75rem;
    min-width: 1.75rem;
    max-width: 2rem;
    padding-left: 0.35rem;
    padding-right: 0.15rem;
    text-align: center;
    vertical-align: middle;
}

body.page-inventory-list .inventory-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4rem;
    height: 1.4rem;
    margin: 0;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.875rem;
    line-height: 1;
    cursor: pointer;
}

body.page-inventory-list .inventory-expand-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
}

body.page-inventory-list .inventory-expand-btn[aria-expanded="true"] {
    background: #e2e8f0;
}

body.page-inventory-list .inventory-expand-spacer {
    display: inline-block;
    width: 1.4rem;
    height: 1.4rem;
}

body.page-inventory-list .inventory-row--warehouse td {
    background: #f8fafc;
    font-size: 0.875rem;
    color: #334155;
}

body.page-inventory-list .inventory-row--warehouse .inventory-wh-label {
    padding-left: 0.75rem;
}

body.page-inventory-list .inventory-wh-badge {
    display: inline-block;
    font-weight: 600;
    color: #0f172a;
}

/* 取り置き一覧: 出荷指示一覧と同型のサイズ・行間隔・フィルタ */
html:has(body.page-inventory-holds) {
    height: auto;
}

body.page-inventory-holds {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-inventory-holds > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-inventory-holds .order-list-screen,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen,
body.page-inventory-holds .order-list-data,
body.page-inventory-holds.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-inventory-holds .order-list-data {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-inventory-holds.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-inventory-holds main > .flash,
body.page-inventory-holds .order-list-screen {
    font-size: 0.875rem;
}

body.page-inventory-holds .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    th,
    td,
    .order-list-meta,
    .order-list-page-size,
    .order-list-pager-status,
    .list-pager-bottom__btn,
    .empty-state,
    .empty-state strong
) {
    font-size: 0.875rem;
}

body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid label,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid select.order-filter-input,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .order-list-toolbar .order-list-meta,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .order-list-page-size,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .order-list-page-size select,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .order-list-pager-nav .btn,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .order-list-pager-nav a.btn,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .order-list-pager-status,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .btn--compact,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen .list-pager-bottom__btn,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen #hold-list-table.data-table th,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen #hold-list-table.data-table td,
body.page-inventory-holds.page-orders-list--compact-header .order-list-screen #hold-list-table.data-table code {
    font-size: 0.875rem;
}

body.page-inventory-holds .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-inventory-holds .order-list-pager-tools {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

body.page-inventory-holds .order-filter-panel--compact .order-filter-grid--holds-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
}

body.page-inventory-holds.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
}

body.page-inventory-holds.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 auto;
    white-space: nowrap;
}

body.page-inventory-holds .order-filter-field--kw {
    flex: 0 0 50%;
    width: 50%;
    max-width: 50%;
    box-sizing: border-box;
}

body.page-inventory-holds .order-filter-field--kw .order-filter-input--kw {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
}

body.page-inventory-holds .order-filter-field--status {
    flex: 0 0 auto;
    width: auto;
}

body.page-inventory-holds .order-filter-field--status .order-filter-field__lbl {
    flex: 0 0 auto;
}

body.page-inventory-holds.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--holds-row input.order-filter-input,
body.page-inventory-holds.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--holds-row select.order-filter-input {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 1.65rem;
    padding: 0.2rem 0.35rem;
    box-sizing: border-box;
    font-size: 0.875rem;
}

body.page-inventory-holds .order-filter-field--status .order-filter-input {
    flex: 0 0 auto;
    width: 7rem;
    max-width: 7rem;
}

body.page-inventory-holds.page-orders-list--compact-header .order-filter-panel--compact {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

body.page-inventory-holds.page-orders-list--compact-header .container--orders-fit #hold-list-table.data-table th,
body.page-inventory-holds.page-orders-list--compact-header .container--orders-fit #hold-list-table.data-table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-inventory-holds.page-orders-list--compact-header .container--orders-fit #hold-list-table.data-table thead th {
    padding: 0.4rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.35;
}

body.page-inventory-holds #hold-list-table.order-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-inventory-holds #hold-list-table .order-list-col-no,
body.page-inventory-holds.page-orders-list--compact-header .container--orders .order-list-table#hold-list-table .order-list-col-no {
    width: 6.5rem;
}

body.page-inventory-holds #hold-list-table .hold-list-col-wh {
    width: 5rem;
    white-space: nowrap;
}

body.page-inventory-holds #hold-list-table .hold-list-col-qty {
    width: 4rem;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

body.page-inventory-holds #hold-list-table .order-list-col-date {
    width: 5.75rem;
    white-space: nowrap;
    padding-right: 0.85rem;
}

body.page-inventory-holds #hold-list-table .order-list-col-status,
body.page-inventory-holds.page-orders-list--compact-header .container--orders .order-list-table#hold-list-table .order-list-col-status {
    width: 4.85rem;
    padding-left: 0.35rem;
}

body.page-inventory-holds #hold-list-table .hold-list-col-actions {
    width: 5.75rem;
    white-space: nowrap;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-inventory-holds #hold-list-table .order-list-col-customer,
body.page-inventory-holds #hold-list-table .hold-list-col-case,
body.page-inventory-holds #hold-list-table .hold-list-col-name {
    width: auto;
}

body.page-inventory-holds #hold-list-table .link-order-id {
    color: var(--text);
    font-weight: 400;
}

body.page-inventory-holds #hold-list-table .link-order-id:hover {
    color: var(--text);
}

body.page-inventory-holds #hold-list-table .hold-list-action-form {
    display: inline;
    margin: 0;
}

body.page-inventory-holds #hold-list-table .hold-list-action-link {
    display: inline;
    margin: 0 0 0 0.45rem;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    line-height: inherit;
    vertical-align: baseline;
}

body.page-inventory-holds #hold-list-table .order-cell-clip,
body.page-inventory-holds #hold-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 出荷指示一覧: 商品一覧と同型の横幅・行間隔・フィルタ */
html:has(body.page-inventory-shipments) {
    height: auto;
}

body.page-inventory-shipments {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-inventory-shipments > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-inventory-shipments .order-list-screen,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen,
body.page-inventory-shipments .order-list-data,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-inventory-shipments .order-list-data {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-inventory-shipments.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-inventory-shipments main > .flash,
body.page-inventory-shipments .order-list-screen {
    font-size: 0.875rem;
}

body.page-inventory-shipments .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    th,
    td,
    .order-list-meta,
    .order-list-page-size,
    .order-list-pager-status,
    .list-pager-bottom__btn,
    .empty-state,
    .empty-state strong
) {
    font-size: 0.875rem;
}

body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid label,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid select.order-filter-input,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .order-list-toolbar .order-list-meta,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .order-list-page-size,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .order-list-page-size select,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .order-list-pager-nav .btn,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .order-list-pager-nav a.btn,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .order-list-pager-status,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .btn--compact,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen .list-pager-bottom__btn,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen #shipment-list-table.data-table th,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen #shipment-list-table.data-table td,
body.page-inventory-shipments.page-orders-list--compact-header .order-list-screen #shipment-list-table.data-table code {
    font-size: 0.875rem;
}

body.page-inventory-shipments .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-inventory-shipments .order-list-pager-tools {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

body.page-inventory-shipments .inventory-shipments-hint {
    margin: 0 0 0.45rem;
    line-height: 1.4;
}

body.page-inventory-shipments .order-filter-panel--compact .order-filter-grid--shipments-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
}

body.page-inventory-shipments.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
}

body.page-inventory-shipments.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 auto;
    white-space: nowrap;
}

body.page-inventory-shipments.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--shipments-row input.order-filter-input,
body.page-inventory-shipments.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--shipments-row select.order-filter-input {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 1.65rem;
    padding: 0.2rem 0.35rem;
    box-sizing: border-box;
    font-size: 0.875rem;
}

body.page-inventory-shipments .order-filter-field--date .order-filter-input--date {
    width: 9.5rem;
    min-width: 9.5rem;
}

body.page-inventory-shipments .order-filter-field--ship-no .order-filter-input,
body.page-inventory-shipments .order-filter-field--order-no .order-filter-input {
    width: 7rem;
    max-width: 7rem;
}

body.page-inventory-shipments .order-filter-field--wh .order-filter-input {
    width: 5.5rem;
    max-width: 5.5rem;
}

body.page-inventory-shipments .order-filter-field--status .order-filter-input {
    width: 7rem;
    max-width: 7rem;
}

body.page-inventory-shipments .order-filter-field--actions {
    flex: 0 0 auto;
    margin-left: 0.15rem;
}

body.page-inventory-shipments .order-filter-kw-actions {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
}

body.page-inventory-shipments .order-filter-kw-actions .btn {
    flex: 0 0 auto;
    color: var(--text);
    min-height: 1.65rem;
    padding: 0 0.55rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 500;
}

body.page-inventory-shipments.page-orders-list--compact-header .order-filter-panel--compact {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

body.page-inventory-shipments.page-orders-list--compact-header .container--orders-fit #shipment-list-table.data-table th,
body.page-inventory-shipments.page-orders-list--compact-header .container--orders-fit #shipment-list-table.data-table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-inventory-shipments.page-orders-list--compact-header .container--orders-fit #shipment-list-table.data-table thead th {
    padding: 0.4rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.35;
}

body.page-inventory-shipments #shipment-list-table .inventory-list-check-cell {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-inventory-shipments #shipment-list-table .inventory-list-check-cell input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

body.page-inventory-shipments #shipment-list-table.order-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-inventory-shipments #shipment-list-table .order-list-col-no,
body.page-inventory-shipments.page-orders-list--compact-header .container--orders .order-list-table#shipment-list-table .order-list-col-no {
    width: 5.65rem;
}

body.page-inventory-shipments #shipment-list-table .shipment-list-col-wh {
    width: 5rem;
    white-space: nowrap;
}

body.page-inventory-shipments #shipment-list-table .order-list-col-date {
    width: 5.75rem;
    white-space: nowrap;
    padding-right: 0.85rem;
}

body.page-inventory-shipments #shipment-list-table .order-list-col-status,
body.page-inventory-shipments.page-orders-list--compact-header .container--orders .order-list-table#shipment-list-table .order-list-col-status {
    width: 4.85rem;
    padding-left: 0.35rem;
}

body.page-inventory-shipments #shipment-list-table .order-list-col-customer,
body.page-inventory-shipments #shipment-list-table .order-list-col-delivery {
    width: auto;
}

body.page-inventory-shipments #shipment-list-table .link-order-id {
    color: var(--text);
    font-weight: 400;
}

body.page-inventory-shipments #shipment-list-table .link-order-id:hover {
    color: var(--text);
}

body.page-inventory-shipments #shipment-list-table .order-cell-clip,
body.page-inventory-shipments #shipment-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 在庫調整一覧: 出荷指示一覧と同型のサイズ・行間隔・フィルタ */
html:has(body.page-inventory-adjustments) {
    height: auto;
}

body.page-inventory-adjustments {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-inventory-adjustments > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-inventory-adjustments .order-list-screen,
body.page-inventory-adjustments.page-orders-list--compact-header .order-list-screen,
body.page-inventory-adjustments .order-list-data,
body.page-inventory-adjustments.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-inventory-adjustments .order-list-data {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-inventory-adjustments.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-inventory-adjustments main > .flash,
body.page-inventory-adjustments .order-list-screen {
    font-size: 0.875rem;
}

body.page-inventory-adjustments .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    th,
    td,
    .order-list-meta,
    .empty-state,
    .empty-state strong
) {
    font-size: 0.875rem;
}

body.page-inventory-adjustments .order-filter-panel--compact .order-filter-grid--adjustments-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
}

body.page-inventory-adjustments.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
}

body.page-inventory-adjustments.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 auto;
    white-space: nowrap;
}

body.page-inventory-adjustments.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--adjustments-row input.order-filter-input,
body.page-inventory-adjustments.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--adjustments-row select.order-filter-input {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 1.65rem;
    padding: 0.2rem 0.35rem;
    box-sizing: border-box;
    font-size: 0.875rem;
}

body.page-inventory-adjustments .order-filter-field--date .order-filter-input {
    width: 8.5rem;
    max-width: 8.5rem;
}

body.page-inventory-adjustments .order-filter-field--product {
    flex: 1 1 auto;
    min-width: 16rem;
    max-width: 36rem;
}

body.page-inventory-adjustments .order-filter-field--product .order-filter-product-row {
    flex: 1 1 16rem;
    max-width: 24rem;
}

body.page-inventory-adjustments .order-filter-field--actions {
    flex: 0 0 auto;
    margin-left: 0.15rem;
}

body.page-inventory-adjustments .order-filter-kw-actions {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
}

body.page-inventory-adjustments .order-filter-kw-actions .btn {
    flex: 0 0 auto;
    color: var(--text);
    min-height: 1.65rem;
    padding: 0 0.55rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 500;
}

body.page-inventory-adjustments.page-orders-list--compact-header .order-filter-panel--compact {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

body.page-inventory-adjustments.page-orders-list--compact-header .container--orders-fit #adj-list-table.data-table th,
body.page-inventory-adjustments.page-orders-list--compact-header .container--orders-fit #adj-list-table.data-table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-inventory-adjustments.page-orders-list--compact-header .container--orders-fit #adj-list-table.data-table thead th {
    padding: 0.4rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.35;
}

body.page-inventory-adjustments #adj-list-table.order-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-inventory-adjustments #adj-list-table .order-list-col-no {
    width: 5.65rem;
}

body.page-inventory-adjustments #adj-list-table .order-list-col-date {
    width: 9.5rem;
    white-space: nowrap;
}

body.page-inventory-adjustments #adj-list-table .adj-list-col-wh {
    width: 5rem;
    white-space: nowrap;
}

body.page-inventory-adjustments #adj-list-table .adj-list-col-qty {
    width: 4.5rem;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

body.page-inventory-adjustments #adj-list-table .adj-list-col-actions {
    width: 3.75rem;
    white-space: nowrap;
}

body.page-inventory-adjustments #adj-list-table .adj-list-col-name,
body.page-inventory-adjustments #adj-list-table .adj-list-col-note {
    width: auto;
}

body.page-inventory-adjustments #adj-list-table .link-order-id {
    color: var(--text);
    font-weight: 400;
}

body.page-inventory-adjustments #adj-list-table .link-order-id:hover {
    color: var(--text);
}

body.page-inventory-adjustments #adj-list-table .adj-list-action-form {
    display: inline;
    margin: 0;
}

body.page-inventory-adjustments #adj-list-table .adj-list-action-link {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    font: inherit;
    line-height: inherit;
    vertical-align: baseline;
}

body.page-inventory-adjustments #adj-list-table .order-cell-clip,
body.page-inventory-adjustments #adj-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 評価レポート: 商品一覧と同型のフィルタ・ツールバー・表 */
html:has(body.page-inventory-reports) {
    height: auto;
}

body.page-inventory-reports {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-inventory-reports > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-inventory-reports .order-list-screen,
body.page-inventory-reports.page-orders-list--compact-header .order-list-screen,
body.page-inventory-reports .order-list-data,
body.page-inventory-reports.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-inventory-reports .order-list-data {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-inventory-reports .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-inventory-reports .order-list-pager-tools {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

body.page-inventory-reports.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-inventory-reports main > .flash,
body.page-inventory-reports .order-list-screen {
    font-size: 0.875rem;
}

body.page-inventory-reports .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    th,
    td,
    .order-list-meta,
    .empty-state,
    .empty-state strong,
    .order-summary-footer__label,
    .order-summary-footer__value,
    .order-filter-hint
) {
    font-size: 0.875rem;
}

body.page-inventory-reports .order-filter-panel--compact .order-filter-grid {
    grid-template-columns: 1fr;
}

body.page-inventory-reports .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    min-width: 0;
    width: 100%;
}

body.page-inventory-reports .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 4.5rem;
    white-space: nowrap;
}

body.page-inventory-reports .order-filter-field--kw-actions {
    max-width: none;
    width: 100%;
}

body.page-inventory-reports .order-filter-kw-actions {
    display: flex;
    flex: 0 0 50%;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
    width: 50%;
    max-width: 50%;
    box-sizing: border-box;
}

body.page-inventory-reports .order-filter-kw-actions .order-filter-input--kw {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
}

body.page-inventory-reports .order-filter-kw-actions .btn {
    flex: 0 0 auto;
    align-self: stretch;
    color: var(--text);
    min-height: 1.65rem;
    padding: 0 0.55rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 500;
}

body.page-inventory-reports.page-orders-list--compact-header .order-filter-panel--compact {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

body.page-inventory-reports .order-filter-hint {
    margin: 0.45rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.4;
}

body.page-inventory-reports.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-inventory-reports.page-orders-list--compact-header .order-list-page-size,
body.page-inventory-reports.page-orders-list--compact-header .order-list-page-size select,
body.page-inventory-reports.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-inventory-reports.page-orders-list--compact-header .order-list-pager-status {
    font-size: 0.875rem;
}

body.page-inventory-reports.page-orders-list--compact-header .container--orders-fit .valuation-report-table.data-table th,
body.page-inventory-reports.page-orders-list--compact-header .container--orders-fit .valuation-report-table.data-table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-inventory-reports .valuation-report-table {
    width: 100%;
    table-layout: fixed;
}

body.page-inventory-reports .valuation-report-table .order-list-col-no {
    width: 8.5rem;
}

body.page-inventory-reports .valuation-report-table .order-list-col-customer {
    width: auto;
}

body.page-inventory-reports .valuation-report-table .valuation-col-qty,
body.page-inventory-reports .valuation-report-table .valuation-col-cost,
body.page-inventory-reports .valuation-report-table .valuation-col-amount {
    width: 7.5rem;
    text-align: right;
    white-space: nowrap;
}

body.page-inventory-reports .valuation-report-table .order-cell-clip,
body.page-inventory-reports .valuation-report-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-inventory-reports .order-summary-footer--compact {
    margin-top: 0.75rem;
}

/* 入出庫履歴: 商品一覧と同型のフィルタ・ツールバー・ページ送り */
html:has(body.page-inventory-ledger) {
    height: auto;
}

body.page-inventory-ledger {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-inventory-ledger > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-inventory-ledger .order-list-screen,
body.page-inventory-ledger.page-orders-list--compact-header .order-list-screen,
body.page-inventory-ledger .order-list-data,
body.page-inventory-ledger.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-inventory-ledger .order-list-data {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-inventory-ledger .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-inventory-ledger .order-list-pager-tools {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

body.page-inventory-ledger.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-inventory-ledger main > .flash,
body.page-inventory-ledger .order-list-screen {
    font-size: 0.875rem;
}

body.page-inventory-ledger .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td
) {
    font-size: 0.875rem;
}

/* 開始日〜クリアを1行 */
body.page-inventory-ledger .order-filter-panel--compact .order-filter-grid--ledger-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
}

body.page-inventory-ledger.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
}

body.page-inventory-ledger.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 auto;
    white-space: nowrap;
}

body.page-inventory-ledger.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-inventory-ledger.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid select.order-filter-input {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 1.65rem;
    padding: 0.2rem 0.35rem;
    box-sizing: border-box;
    font-size: 0.875rem;
}

body.page-inventory-ledger .order-filter-field--date .order-filter-input--date {
    flex: 0 0 auto;
    width: 8.25rem;
    max-width: 8.25rem;
    padding-inline: 0.25rem;
}

body.page-inventory-ledger .order-filter-field--product-code .order-filter-input {
    width: 9rem;
    max-width: 9rem;
}

body.page-inventory-ledger .order-filter-field--type .order-filter-input {
    width: 7rem;
    max-width: 7rem;
}

body.page-inventory-ledger .order-filter-field--actions {
    flex: 0 0 auto;
    margin-left: 0.15rem;
}

body.page-inventory-ledger.page-orders-list--compact-header .order-filter-panel--compact {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

body.page-inventory-ledger .order-filter-kw-actions {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
}

body.page-inventory-ledger .order-filter-kw-actions .btn {
    flex: 0 0 auto;
    color: var(--text);
    min-height: 1.65rem;
    padding: 0 0.55rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 500;
}

body.page-inventory-ledger.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-inventory-ledger.page-orders-list--compact-header .order-list-page-size,
body.page-inventory-ledger.page-orders-list--compact-header .order-list-page-size select,
body.page-inventory-ledger.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-inventory-ledger.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-inventory-ledger.page-orders-list--compact-header .order-list-pager-status,
body.page-inventory-ledger .empty-state,
body.page-inventory-ledger .empty-state strong {
    font-size: 0.875rem;
}

body.page-inventory-ledger #inventory-ledger-table.order-list-table {
    table-layout: auto;
    width: 100%;
    max-width: 100%;
}

body.page-inventory-ledger.page-orders-list--compact-header .container--orders-fit #inventory-ledger-table.data-table th,
body.page-inventory-ledger.page-orders-list--compact-header .container--orders-fit #inventory-ledger-table.data-table td {
    padding: 0.4rem 0.95rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-inventory-ledger #inventory-ledger-table .order-list-col-date,
body.page-inventory-ledger #inventory-ledger-table .inventory-ledger-col-type,
body.page-inventory-ledger #inventory-ledger-table .inventory-ledger-col-product,
body.page-inventory-ledger #inventory-ledger-table .inventory-ledger-col-wh,
body.page-inventory-ledger #inventory-ledger-table .order-list-col-total,
body.page-inventory-ledger #inventory-ledger-table .inventory-ledger-col-action {
    white-space: nowrap;
}

body.page-inventory-ledger #inventory-ledger-table .order-list-col-date {
    width: 7.25rem;
    padding-right: 1.15rem;
}

body.page-inventory-ledger #inventory-ledger-table .inventory-ledger-col-type {
    width: 6.25rem;
    padding-right: 1.15rem;
}

body.page-inventory-ledger #inventory-ledger-table .inventory-ledger-col-product,
body.page-inventory-ledger #inventory-ledger-table th.inventory-ledger-col-product {
    width: 11rem;
    min-width: 9.5rem;
    overflow: visible;
    padding-right: 1.15rem;
}

body.page-inventory-ledger #inventory-ledger-table .inventory-ledger-col-product code {
    white-space: nowrap;
}

body.page-inventory-ledger #inventory-ledger-table .inventory-ledger-col-wh {
    width: 6.25rem;
    padding-right: 1.15rem;
}

body.page-inventory-ledger #inventory-ledger-table .order-list-col-total {
    width: auto;
    min-width: 6.25rem;
    text-align: right;
    font-variant-numeric: tabular-nums;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
}

body.page-inventory-ledger #inventory-ledger-table .inventory-ledger-col-ref {
    min-width: 10rem;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
}

body.page-inventory-ledger #inventory-ledger-table .inventory-ledger-col-action {
    width: 5rem;
    text-align: center;
    padding-left: 1.1rem;
}

/* ODAIレビュー: 仕入先/在庫プルダウン＋在庫出荷詳細 */
.order-line-td-source {
    vertical-align: top;
}
.order-line-td-source .order-line-supplier {
    width: 100%;
    min-width: 11rem;
    font-size: 0.8125rem;
    padding: 0.22rem 0.35rem;
    line-height: 1.25;
}
.order-line-td-stock-ff {
    vertical-align: middle;
    padding: 0.28rem 0.35rem !important;
    white-space: nowrap;
}
.odai-stock-ff {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    min-width: 4.5rem;
}
.odai-order-dedicated-lbl {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    font-weight: 500;
    color: #6d28d9;
    white-space: nowrap;
    cursor: pointer;
}
.odai-order-dedicated-lbl input {
    margin: 0;
}
.lt-review-procurement__dedicated {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #6d28d9;
}
.lt-col-map-modal__shell {
    width: min(36rem, calc(100vw - 1.5rem));
}
.lt-col-map-row__label {
    font-weight: 600;
    white-space: nowrap;
}
.lt-col-map-row__select {
    min-width: 11rem;
    font-size: 0.8125rem;
}
.lt-col-map-row--need {
    background: #fff8e6;
}
.lt-col-map-status {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}
.lt-col-map-status--ok {
    color: #0a7a3e;
}
.lt-col-map-status--need {
    color: #9a6b00;
}
.lt-col-map-banner {
    margin-bottom: 0.45rem;
}
.odai-stock-ff__badge,
.odai-stock-ff .order-line-ff-summary {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.35;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    background: #f1f5f9;
    color: #334155;
}
.odai-stock-ff[data-mode="stock"] .odai-stock-ff__badge,
.odai-stock-ff[data-mode="stock"] .order-line-ff-summary {
    background: #ecfdf5;
    color: #047857;
}
.odai-stock-ff[data-mode="purchase"] .odai-stock-ff__badge,
.odai-stock-ff[data-mode="purchase"] .order-line-ff-summary {
    background: #eff6ff;
    color: #1d4ed8;
}
.odai-stock-ff[data-mode="backorder"] .odai-stock-ff__badge,
.odai-stock-ff[data-mode="backorder"] .order-line-ff-summary {
    background: #fff7ed;
    color: #c2410c;
}
.odai-stock-ff__summary,
.odai-stock-ff__qtys,
.odai-stock-ff__purchase-sup {
    display: none;
}

body.page-orders-list--compact-header > main.container--orders-fit {
    padding: 0.25rem 0.85rem 0.2rem;
}

.page-orders-list .callout {
    margin-bottom: 0.45rem;
}

.order-list-screen {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-height: 0;
}

body.page-orders-list--compact-header .order-list-screen {
    gap: 0.14rem;
    flex: 1 1 auto;
    min-height: 0;
}

/* 受注・発注一覧: 検索はコンパクト、表領域を縦に最大化 */
body.page-orders-list--compact-header .order-filter-panel--compact {
    flex: 0 0 auto;
}

body.page-orders-list--compact-header .order-filter-hint {
    display: none;
}

.order-export-filter-details {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--border, #e5e7eb);
}

.order-export-filter-details__summary {
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    list-style: none;
    padding: 0.15rem 0;
}

.order-export-filter-details__summary::-webkit-details-marker {
    display: none;
}

.order-export-filter-details[open] > .order-export-filter-details__summary {
    margin-bottom: 0.35rem;
    color: var(--text, #0f172a);
}

.order-export-filter-details__form {
    margin-top: 0;
}

/* 売上一覧: 手入力カードを一覧の下に置いていた compact レイアウトで一覧領域が潰れるのを防ぐ */
body.page-invoice-list.page-orders-list--compact-header .order-list-screen {
    flex: 1 1 auto;
    min-height: 0;
}

body.page-invoice-list.page-orders-list--compact-header .order-list-data {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-invoice-list .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.page-invoice-list .order-list-pager-tools {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

body.page-invoice-list .order-list-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.invoice-recovery-view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.65rem;
    padding: 0;
}

.invoice-recovery-view-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border, #d8dee6);
    background: var(--surface, #fff);
    color: inherit;
    font-size: 0.875rem;
    text-decoration: none;
    line-height: 1.35;
}

.invoice-recovery-view-tab:hover {
    border-color: var(--brand, #2563eb);
}

.invoice-recovery-view-tab.is-active {
    border-color: var(--brand, #2563eb);
    background: color-mix(in srgb, var(--brand, #2563eb) 12%, #fff);
    font-weight: 600;
}

.invoice-filter-date-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
    flex: 1 1 auto;
}

.invoice-filter-date-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.invoice-filter-date-preset {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--border, #d8dee6);
    background: var(--surface, #fff);
    color: inherit;
    font-size: 0.8125rem;
    line-height: 1.35;
    cursor: pointer;
}

.invoice-filter-date-preset:hover {
    border-color: var(--brand, #2563eb);
}

.invoice-filter-date-preset.is-active {
    border-color: var(--brand, #2563eb);
    background: color-mix(in srgb, var(--brand, #2563eb) 12%, #fff);
    font-weight: 600;
}

.invoice-list-col-diff--short {
    color: var(--danger, #b42318);
}

.invoice-list-col-diff--over {
    color: var(--warn, #9a6700);
}

/* 入金過不足一覧: 8列・幅100%（列幅は colgroup + 下の詳細ルール） */
body.page-invoice-recovery-view--mismatch .invoice-list-table--recovery col.invoice-recovery-w-check,
body.page-invoice-recovery-view--matched .invoice-list-table--recovery col.invoice-recovery-w-check {
    width: 2.75rem;
}

body.page-invoice-recovery-view--mismatch .invoice-list-table--recovery col.invoice-recovery-w-no,
body.page-invoice-recovery-view--matched .invoice-list-table--recovery col.invoice-recovery-w-no {
    width: 6.25rem;
}

body.page-invoice-recovery-view--mismatch .invoice-list-table--recovery col.invoice-recovery-w-date,
body.page-invoice-recovery-view--matched .invoice-list-table--recovery col.invoice-recovery-w-date {
    width: 6.75rem;
}

body.page-invoice-recovery-view--mismatch .invoice-list-table--recovery col.invoice-recovery-w-delay,
body.page-invoice-recovery-view--matched .invoice-list-table--recovery col.invoice-recovery-w-delay {
    width: 4.75rem;
}

body.page-invoice-recovery-view--mismatch .invoice-list-table--recovery col.invoice-recovery-w-collection,
body.page-invoice-recovery-view--matched .invoice-list-table--recovery col.invoice-recovery-w-collection {
    width: auto;
}

body.page-invoice-recovery-view--mismatch .invoice-list-table--recovery col.invoice-recovery-w-amt,
body.page-invoice-recovery-view--matched .invoice-list-table--recovery col.invoice-recovery-w-amt {
    width: 6.5rem;
}

body.page-invoice-recovery-view--mismatch .invoice-list-table--recovery col.invoice-recovery-w-amt-current,
body.page-invoice-recovery-view--matched .invoice-list-table--recovery col.invoice-recovery-w-amt-current {
    width: 7rem;
}

/* 入金入力: 見積一覧と同型の main 余白・スクロール */
body.page-payment-entry.page-orders-list > main.container--orders-fit {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.45rem 1rem 0.5rem;
    max-width: 1320px;
}

/* 入金一覧・請求一覧・仕入明細・見積一覧・入金入力・ダッシュボード: ブランド行（販売管理・画面名・操作）の縦余白をやや広げる */
body.page-payment-entry.page-orders-list--compact-header .site-header__inner,
body.page-payment-list.page-orders-list--compact-header .site-header__inner,
body.page-invoice-list.page-orders-list--compact-header .site-header__inner,
body.page-odai-list.page-orders-list--compact-header .site-header__inner,
body.page-gr-list.page-orders-list--compact-header .site-header__inner,
body.page-po-list.page-orders-list--compact-header .site-header__inner,
body.page-so-list.page-orders-list--compact-header .site-header__inner,
body.page-sales-list.page-orders-list--compact-header .site-header__inner,
body.page-estimate-list.page-orders-list--compact-header .site-header__inner,
body.page-product-list.page-orders-list--compact-header .site-header__inner,
body.page-inventory-list.page-orders-list--compact-header .site-header__inner,
body.page-inventory-section.page-orders-list--compact-header .site-header__inner,
body.page-posting-batch.page-orders-list--compact-header .site-header__inner,
body.page-consignor-list.page-orders-list--compact-header .site-header__inner,
body.page-delivery-site-list.page-orders-list--compact-header .site-header__inner,
body.page-supplier-list.page-orders-list--compact-header .site-header__inner,
body.page-rank-price-list.page-orders-list--compact-header .site-header__inner,
body.page-customer-list.page-orders-list--compact-header .site-header__inner,
body.page-staff-list.page-orders-list--compact-header .site-header__inner,
body.page-remark-template-list.page-orders-list--compact-header .site-header__inner,
body.page-remark-template-detail .site-header__inner,
body.page-settings .site-header__inner,
body.page-company-profile .site-header__inner,
body.page-mail-settings .site-header__inner,
body.page-mail-history.page-orders-list--compact-header .site-header__inner,
body.page-sync-log.page-orders-list--compact-header .site-header__inner,
body.page-order-detail .site-header__inner,
body.page-so-create .site-header__inner,
body.page-so-edit .site-header__inner,
body.page-sales-detail .site-header__inner,
body.page-payment-detail .site-header__inner,
body.page-estimate-detail .site-header__inner,
body.page-invoice-detail .site-header__inner,
body.page-gr-detail .site-header__inner,
body.page-po-detail .site-header__inner,
body.page-inventory-hold .site-header__inner,
body.page-inventory-adjust .site-header__inner,
body.page-inventory-transfer .site-header__inner,
body.page-invoice-mail-send .site-header__inner,
body.page-invoice-from-sales .site-header__inner,
body.page-lt-reply-mail .site-header__inner,
body.page-lt-reply-edit .site-header__inner,
body.page-lt-reply-review .site-header__inner,
body.page-odai-review .site-header__inner,
body.page-dashboard .site-header__inner {
    padding: 1rem 1.25rem calc(1rem + var(--site-header-action-gap));
    gap: 0.85rem;
}

body.page-dashboard .site-header__quick-btn {
    padding: 0.58rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.25;
    border-radius: 7px;
}

body.page-dashboard .brand {
    font-size: 1rem;
    line-height: 1.4;
}

body.page-dashboard .site-header__context-label {
    font-size: 1.0625rem;
    line-height: 1.35;
}

body.page-payment-detail .payment-detail-header-fields {
    align-items: start;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.45rem;
    gap: 0.5rem 1rem;
}

/* 荷主・納入先登録: 入力カードは角丸、入力欄は UA の太い枠をやめ住所（textarea）と同じ細い 1px 枠に */
body.page-consignor-detail .payment-detail-header-fields.card,
body.page-delivery-site-detail .payment-detail-header-fields.card,
body.page-rank-price-detail .payment-detail-header-fields.card {
    border-radius: 12px;
}

body.page-consignor-detail .payment-detail-fields-grid .psp-in,
body.page-consignor-detail .payment-detail-fields-grid textarea.psp-in,
body.page-delivery-site-detail .payment-detail-fields-grid .psp-in,
body.page-delivery-site-detail .payment-detail-fields-grid textarea.psp-in,
body.page-rank-price-detail .payment-detail-fields-grid .psp-in,
body.page-rank-price-detail .payment-detail-fields-grid textarea.psp-in {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

body.page-consignor-detail .payment-detail-fields-grid textarea.psp-in,
body.page-delivery-site-detail .payment-detail-fields-grid textarea.psp-in {
    min-height: 1.7rem;
    height: 1.7rem;
    resize: vertical;
    overflow-y: auto;
}

body.page-rank-price-detail .payment-detail-fields-grid textarea.rank-price-note-in {
    min-height: 4.5rem;
    height: auto;
    resize: vertical;
    overflow-y: auto;
}

/* 荷主・納入先コード + 自動連番（備考テンプレート登録と同型） */
body.page-consignor-detail .consignor-code-field,
body.page-delivery-site-detail .delivery-site-code-field,
body.page-customer-detail .customer-code-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    width: 100%;
}

body.page-consignor-detail .consignor-code-field .consignor-code-in,
body.page-delivery-site-detail .delivery-site-code-field .delivery-site-code-in,
body.page-customer-detail .customer-code-field .customer-code-in {
    flex: 0 0 8rem;
    width: 8rem;
    max-width: 8rem;
    font-variant-numeric: tabular-nums;
}

body.page-consignor-detail .consignor-auto-seq,
body.page-delivery-site-detail .delivery-site-auto-seq,
body.page-customer-detail .customer-auto-seq {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

body.page-consignor-detail .consignor-auto-seq input[type="checkbox"],
body.page-delivery-site-detail .delivery-site-auto-seq input[type="checkbox"],
body.page-customer-detail .customer-auto-seq input[type="checkbox"],
body.page-consignor-detail .consignor-zip-auto input[type="checkbox"],
body.page-delivery-site-detail .delivery-site-zip-auto input[type="checkbox"],
body.page-supplier-detail .supplier-zip-auto input[type="checkbox"],
body.page-customer-detail .customer-zip-auto input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
}

/* 荷主・納入先・仕入先・得意先: 郵便番号 + 住所自動入力 */
body.page-consignor-detail .consignor-zip-field,
body.page-delivery-site-detail .delivery-site-zip-field,
body.page-supplier-detail .supplier-zip-field,
body.page-customer-detail .customer-zip-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    width: 100%;
}

body.page-consignor-detail .consignor-zip-field .consignor-zip-in,
body.page-delivery-site-detail .delivery-site-zip-field .delivery-site-zip-in,
body.page-supplier-detail .supplier-zip-field .supplier-zip-in,
body.page-customer-detail .customer-zip-field .customer-zip-in {
    flex: 0 0 8rem;
    width: 8rem;
    max-width: 8rem;
    font-variant-numeric: tabular-nums;
}

body.page-consignor-detail .consignor-zip-auto,
body.page-delivery-site-detail .delivery-site-zip-auto,
body.page-supplier-detail .supplier-zip-auto,
body.page-customer-detail .customer-zip-auto {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

/* 明細系ヘッダー: 保存・削除は白背景＋薄い灰色枠（ホバーは納期回答等と同じアクセント） */
:is(
    body.page-consignor-detail,
    body.page-delivery-site-detail,
    body.page-supplier-detail,
    body.page-customer-detail,
    body.page-product-detail,
    body.page-rank-price-detail,
    body.page-inventory-hold,
    body.page-inventory-adjust,
    body.page-gr-detail,
    body.page-po-detail,
    body.page-so-edit,
    body.page-so-create,
    body.page-sales-detail,
    body.page-order-detail,
    body.page-payment-detail,
    body.page-estimate-detail,
    body.page-invoice-detail,
    body.page-remark-template-detail
) .site-header__quick-btn[type="submit"] {
    color: var(--text);
    background: #fff;
    border-color: #d1d5db;
}

:is(
    body.page-consignor-detail,
    body.page-delivery-site-detail,
    body.page-supplier-detail,
    body.page-customer-detail,
    body.page-product-detail,
    body.page-rank-price-detail,
    body.page-inventory-hold,
    body.page-inventory-adjust,
    body.page-gr-detail,
    body.page-po-detail,
    body.page-so-edit,
    body.page-so-create,
    body.page-sales-detail,
    body.page-order-detail,
    body.page-payment-detail,
    body.page-estimate-detail,
    body.page-invoice-detail,
    body.page-remark-template-detail
) .site-header__quick-btn[type="submit"]:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

:is(
    body.page-consignor-detail,
    body.page-delivery-site-detail,
    body.page-supplier-detail,
    body.page-customer-detail,
    body.page-product-detail,
    body.page-rank-price-detail,
    body.page-inventory-hold,
    body.page-inventory-adjust,
    body.page-gr-detail,
    body.page-po-detail,
    body.page-so-edit,
    body.page-so-create,
    body.page-sales-detail,
    body.page-order-detail,
    body.page-payment-detail,
    body.page-estimate-detail,
    body.page-invoice-detail,
    body.page-remark-template-detail
) .site-header__quick-btn--primary[type="submit"]:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

body.page-payment-detail .payment-detail-fields-grid {
    grid-template-columns: minmax(6.5rem, 8rem) minmax(0, 1fr);
    gap: 0.28rem 0.65rem;
    align-items: center;
    font-size: 0.8125rem;
}

body.page-payment-detail .payment-detail-fields-grid dt {
    align-self: center;
    padding-top: 0;
    line-height: 1.25;
    font-size: 0.8125rem;
}

body.page-payment-detail .payment-detail-fields-grid dd {
    min-width: 0;
    font-size: 0.8125rem;
}

body.page-payment-detail .payment-detail-fields-grid .psp-in,
body.page-payment-detail .payment-detail-fields-grid select.psp-in,
body.page-payment-detail .payment-detail-fields-grid textarea.psp-in {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    font-size: 0.8125rem;
    line-height: 1.3;
    padding: 0.2rem 0.4rem;
    min-height: 1.7rem;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

body.page-payment-detail .payment-detail-fields-grid textarea.psp-in {
    min-height: 1.7rem;
    resize: vertical;
}

body.page-payment-detail .payment-detail-fields-grid dd .muted,
body.page-payment-detail .payment-detail-fields-grid dd code {
    font-size: 0.8125rem;
}

body.page-payment-detail .payment-detail-fields-grid .order-filter-customer-row {
    display: flex;
    width: 100%;
    min-width: 0;
}

body.page-payment-detail .payment-detail-fields-grid .order-filter-input--cust {
    flex: 1 1 auto;
    min-width: 0;
}

body.page-invoice-mail-send .inv-mail-compose-fields {
    max-width: 48rem;
    margin: 0;
}

body.page-invoice-mail-send .inv-mail-compose-fields dt {
    background: #f2fbf8;
    font-size: 0.875rem;
}

/* 件名など: UA の太い inset 枠をやめ、宛先欄と同じ 1px 枠に揃える */
body.page-invoice-mail-send .inv-mail-compose-fields .psp-in,
body.page-invoice-mail-send .inv-mail-compose-fields select.psp-in,
body.page-invoice-mail-send .inv-mail-compose-fields textarea.psp-in {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.55rem;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text);
}

body.page-invoice-mail-send .inv-mail-compose-fields input.psp-in,
body.page-invoice-mail-send .inv-mail-compose-fields textarea.psp-in {
    appearance: none;
    -webkit-appearance: none;
}

body.page-invoice-mail-send .inv-mail-compose-fields .psp-in:focus,
body.page-invoice-mail-send .inv-mail-compose-fields select.psp-in:focus,
body.page-invoice-mail-send .inv-mail-compose-fields textarea.psp-in:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 0;
    border-color: var(--accent);
}

body.page-invoice-mail-send .inv-mail-compose-body {
    min-height: 12rem;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* 請求メール送信: ヘッダー以外のページ内文字を 0.875rem に統一 */
body.page-invoice-mail-send > main {
    font-size: 0.875rem;
}

body.page-invoice-mail-send > main :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .flash,
    .psp-in,
    .order-lead-mail__input,
    .data-table
) {
    font-size: 0.875rem;
}

/* ランク別価格一覧: ヘッダー以外のページ内文字を 0.875rem に統一 */
body.page-rank-price-list > main {
    font-size: 0.875rem;
}

body.page-rank-price-list > main :is(
    h1,
    h2,
    h3,
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .flash,
    .psp-in,
    .empty-state,
    .empty-state strong,
    .order-list-meta,
    .order-list-page-size,
    .order-list-pager-status,
    .order-filter-field__lbl,
    .order-filter-input,
    .data-table,
    .payment-upload-modal__head h2,
    .payment-upload-modal__body
) {
    font-size: 0.875rem;
}

/* 備考テンプレート一覧: ヘッダー以外のページ内文字を 0.875rem に統一 */
body.page-remark-template-list > main {
    font-size: 0.875rem;
}

body.page-remark-template-list > main :is(
    h1,
    h2,
    h3,
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    .flash,
    .empty-state,
    .empty-state strong,
    .order-list-meta,
    .order-filter-field__lbl,
    .order-filter-input,
    .data-table
) {
    font-size: 0.875rem;
}

/* 備考テンプレート明細: ヘッダー以外のページ内文字を 0.875rem に統一 */
body.page-remark-template-detail > main {
    font-size: 0.875rem;
}

body.page-remark-template-detail > main :is(
    h1,
    h2,
    h3,
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .flash,
    .psp-in,
    .remark-template-form-section__title,
    .remark-template-form-section,
    .remark-template-form-dl,
    .remark-template-auto-seq,
    .master-flam-meta,
    .card,
    h2,
    .data-table
) {
    font-size: 0.875rem;
}

body.page-payment-detail main > .flash,
body.page-payment-detail .order-detail-screen {
    font-size: 0.8125rem;
}

/* 仕入明細（新規）: ヘッダー以外は 0.875rem（入金入力の 0.8125rem を上書き） */
body.page-gr-detail.page-payment-detail main > .flash,
body.page-gr-detail.page-payment-detail .order-detail-screen {
    font-size: 0.875rem;
}

/* 発注明細: 入金入力と同型の本文サイズ（ヘッダーは別ルールで 1rem） */
body.page-po-detail.page-payment-detail main > .flash,
body.page-po-detail.page-payment-detail .order-detail-screen {
    font-size: 0.875rem;
}

/* 荷主・納入先・仕入先登録: ヘッダー以外のページ内文字を 0.875rem に統一（入金入力の 0.8125rem を上書き） */
body.page-consignor-detail > main,
body.page-delivery-site-detail > main,
body.page-supplier-detail > main,
body.page-customer-detail > main,
body.page-product-detail > main,
body.page-rank-price-detail > main,
body.page-inventory-hold > main,
body.page-inventory-transfer > main,
body.page-inventory-adjust > main,
body.page-gr-detail > main,
body.page-po-detail > main {
    font-size: 0.875rem;
}

body.page-consignor-detail main > .flash,
body.page-consignor-detail .order-detail-screen,
body.page-consignor-detail .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .psp-in,
    .consignor-auto-seq,
    .consignor-zip-auto,
    .data-table
),
body.page-delivery-site-detail main > .flash,
body.page-delivery-site-detail .order-detail-screen,
body.page-delivery-site-detail .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .psp-in,
    .delivery-site-auto-seq,
    .delivery-site-zip-auto,
    .data-table
),
body.page-supplier-detail main > .flash,
body.page-supplier-detail .order-detail-screen,
body.page-supplier-detail .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .psp-in,
    .master-flam-section__title,
    .master-flam-check,
    .master-flam-radio,
    .data-table
),
body.page-customer-detail main > .flash,
body.page-customer-detail .order-detail-screen,
body.page-customer-detail .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .psp-in,
    .master-flam-section__title,
    .master-flam-check,
    .master-flam-radio,
    .customer-zip-auto,
    .data-table
),
body.page-product-detail main > .flash,
body.page-product-detail .order-detail-screen,
body.page-product-detail .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .psp-in,
    .master-flam-section__title,
    .master-flam-check,
    .master-flam-radio,
    .data-table
),
body.page-inventory-hold main > .flash,
body.page-inventory-hold .order-detail-screen,
body.page-inventory-hold .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    .btn--secondary,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .psp-in,
    .order-lines-unified-card__title,
    .order-lines-help,
    .order-lines-help__body,
    .order-detail-header-flam__lbl,
    .order-page-head__subid,
    .data-table
),
body.page-inventory-adjust main > .flash,
body.page-inventory-adjust .order-detail-screen,
body.page-inventory-adjust .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    .btn--secondary,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    .psp-in,
    .order-lines-unified-card__title,
    .order-detail-header-flam__lbl,
    .data-table
),
body.page-gr-detail main > .flash,
body.page-gr-detail .order-detail-screen,
body.page-gr-detail .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    .btn--secondary,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    summary,
    .psp-in,
    .order-lines-unified-card__title,
    .order-lines-help,
    .order-lines-help__body,
    .order-detail-header-flam__lbl,
    .order-page-head__title,
    .order-page-head__id,
    .order-summary-footer__label,
    .order-summary-footer__value,
    .callout,
    .data-table
),
body.page-inventory-transfer main > .flash,
body.page-inventory-transfer #inventory-transfer-form,
body.page-inventory-transfer #inventory-transfer-form :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    .btn--secondary,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    .psp-in,
    .order-lines-unified-card__title,
    .card,
    .data-table
),
body.page-rank-price-detail main > .flash,
body.page-rank-price-detail .order-detail-screen,
body.page-rank-price-detail .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .psp-in,
    .data-table
) {
    font-size: 0.875rem;
}

body.page-consignor-detail .payment-detail-fields-grid,
body.page-consignor-detail .payment-detail-fields-grid dt,
body.page-consignor-detail .payment-detail-fields-grid dd,
body.page-consignor-detail .payment-detail-fields-grid .psp-in,
body.page-consignor-detail .payment-detail-fields-grid select.psp-in,
body.page-consignor-detail .payment-detail-fields-grid textarea.psp-in,
body.page-delivery-site-detail .payment-detail-fields-grid,
body.page-delivery-site-detail .payment-detail-fields-grid dt,
body.page-delivery-site-detail .payment-detail-fields-grid dd,
body.page-delivery-site-detail .payment-detail-fields-grid .psp-in,
body.page-delivery-site-detail .payment-detail-fields-grid select.psp-in,
body.page-delivery-site-detail .payment-detail-fields-grid textarea.psp-in,
body.page-rank-price-detail .payment-detail-fields-grid,
body.page-rank-price-detail .payment-detail-fields-grid dt,
body.page-rank-price-detail .payment-detail-fields-grid dd,
body.page-rank-price-detail .payment-detail-fields-grid .psp-in,
body.page-rank-price-detail .payment-detail-fields-grid select.psp-in,
body.page-rank-price-detail .payment-detail-fields-grid textarea.psp-in {
    font-size: 0.875rem;
}

body.page-payment-detail .order-detail-screen :is(.muted, p, .btn, code, label, dt, dd, a) {
    font-size: 0.8125rem;
}

body.page-payment-detail .order-detail-screen .order-detail-header h2 {
    font-size: 0.8125rem;
    text-transform: none;
    letter-spacing: normal;
}

body.page-payment-detail .order-detail-screen .order-detail-header .dl-grid,
body.page-payment-detail .order-detail-screen .order-detail-header .psp-in,
body.page-payment-detail .order-detail-screen .order-detail-header select.psp-in,
body.page-payment-detail .order-detail-screen .order-detail-header textarea.psp-in {
    font-size: 0.8125rem;
}

body.page-payment-detail .order-detail-screen .order-manual-lines-table--sheet.data-table,
body.page-payment-detail .order-detail-screen .order-manual-lines-table--sheet.data-table th,
body.page-payment-detail .order-detail-screen .order-manual-lines-table--sheet.data-table td,
body.page-payment-detail .order-detail-screen .order-manual-lines-table--sheet .psp-in,
body.page-payment-detail .order-detail-screen .order-manual-lines-table thead th,
body.page-payment-detail .order-detail-screen .payment-invoice-alloc-table,
body.page-payment-detail .order-detail-screen .payment-invoice-alloc-table th,
body.page-payment-detail .order-detail-screen .payment-invoice-alloc-table td,
body.page-payment-detail .order-detail-screen .payment-alloc-amount {
    font-size: 0.8125rem;
}

/* 入金入力: 明細をヘッダー直下に置き、請求表は内側スクロールで一瞥性を確保 */
body.page-payment-detail .payment-detail-form-layout {
    gap: 0.45rem;
}

body.page-payment-detail .payment-lines-section,
body.page-payment-detail .payment-invoice-section-wrap {
    margin-top: 0;
    flex: 0 0 auto;
}

/* 受注明細向け min-height:20rem を打ち消し、一瞥で入金明細まで見えるようにする */
body.page-payment-detail.page-order-detail .order-detail-screen .order-manual-lines-wrap {
    flex: 0 0 auto;
    min-height: 0;
}

body.page-payment-detail.page-order-detail .order-detail-screen .order-manual-lines-table-wrap,
body.page-payment-detail.page-order-detail .order-detail-screen .payment-lines-section .order-manual-lines-table-wrap {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

body.page-payment-detail .payment-lines-toolbar {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.75rem;
}

body.page-payment-detail .payment-invoice-hint {
    margin: 0.35rem 0 0;
    line-height: 1.35;
}

body.page-payment-detail .payment-lines-table th,
body.page-payment-detail .payment-lines-table td,
body.page-payment-detail .payment-invoice-alloc-table th,
body.page-payment-detail .payment-invoice-alloc-table td {
    padding-top: 0.22rem;
    padding-bottom: 0.22rem;
}

body.page-payment-detail .payment-lines-table .psp-in,
body.page-payment-detail .payment-lines-table select.psp-in {
    padding: 0.15rem 0.35rem;
    min-height: 1.55rem;
    line-height: 1.25;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

body.page-payment-detail.page-order-detail #payment-invoice-section.order-manual-lines-table-wrap,
body.page-payment-detail #payment-invoice-section.order-manual-lines-table-wrap {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    max-height: none;
    overflow: visible;
}

body.page-payment-detail .payment-invoice-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 0.35rem;
}

body.page-payment-detail .payment-invoice-section-head .order-manual-lines-heading {
    margin: 0;
}

body.page-payment-detail .payment-invoice-more-link {
    font-size: 0.8125rem;
    white-space: nowrap;
}

body.page-payment-detail .payment-invoice-alloc-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-payment-detail .payment-invoice-alloc-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f2fbf8;
}

body.page-payment-detail .payment-invoice-alloc-table th,
body.page-payment-detail .payment-invoice-alloc-table td {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-payment-detail .payment-invoice-alloc-table th:nth-child(1),
body.page-payment-detail .payment-invoice-alloc-table td:nth-child(1) {
    width: 9%;
}

body.page-payment-detail .payment-invoice-alloc-table th:nth-child(2),
body.page-payment-detail .payment-invoice-alloc-table td:nth-child(2),
body.page-payment-detail .payment-invoice-alloc-table th:nth-child(3),
body.page-payment-detail .payment-invoice-alloc-table td:nth-child(3) {
    width: 9.5%;
}

body.page-payment-detail .payment-invoice-alloc-table th:nth-child(4),
body.page-payment-detail .payment-invoice-alloc-table td:nth-child(4) {
    width: 5%;
    text-align: center;
}

body.page-payment-detail .payment-invoice-alloc-table th:nth-child(5),
body.page-payment-detail .payment-invoice-alloc-table td:nth-child(5),
body.page-payment-detail .payment-invoice-alloc-table th:nth-child(7),
body.page-payment-detail .payment-invoice-alloc-table td:nth-child(7),
body.page-payment-detail .payment-invoice-alloc-table th:nth-child(8),
body.page-payment-detail .payment-invoice-alloc-table td:nth-child(8) {
    width: 11%;
}

body.page-payment-detail .payment-invoice-alloc-table th:nth-child(6),
body.page-payment-detail .payment-invoice-alloc-table td:nth-child(6),
body.page-payment-detail .payment-invoice-alloc-table th:nth-child(10),
body.page-payment-detail .payment-invoice-alloc-table td:nth-child(10) {
    width: 12%;
}

body.page-payment-detail .payment-invoice-alloc-table th:nth-child(9),
body.page-payment-detail .payment-invoice-alloc-table td:nth-child(9) {
    width: 9%;
}

body.page-payment-detail .payment-invoice-alloc-table .payment-alloc-amount {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

/* 入金入力: 請求書番号（数字のみ）に下線・本文色（青リンクにしない） */
body.page-payment-detail .payment-invoice-alloc-table .payment-invoice-no-link {
    color: var(--text);
}

body.page-payment-detail .payment-invoice-alloc-table .payment-invoice-no-link:hover {
    color: var(--text);
}

body.page-payment-detail .order-detail-screen h2.order-manual-lines-heading {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    line-height: 1.25;
}

/* 入金入力: main 内の文字はすべて 0.875rem（サイトヘッダーは main 外のため対象外） */
body.page-payment-entry.page-payment-detail main,
body.page-payment-entry.page-payment-detail main * {
    font-size: 0.875rem;
}

/* 入金入力: 見積一覧と同型のコンパクトカード・フィルタ風ヘッダー */

body.page-payment-entry.page-orders-list--compact-header .payment-entry-header-panel.payment-entry-section-card {
    margin-top: 0.55rem;
}

body.page-payment-entry .payment-entry-header-panel {
    --payment-entry-control-h: 1.875rem;
}

body.page-payment-entry .payment-entry-section-card {
    --payment-entry-control-h: 1.875rem;
}

body.page-payment-entry .payment-entry-section-card.card {
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem 0.75rem;
    background: var(--surface, #fff);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
}

body.page-payment-entry .payment-entry-header-panel.payment-entry-section-card.card {
    border-radius: 12px;
}

body.page-payment-entry .payment-entry-header-grid.order-filter-grid--cols2 {
    grid-template-columns: 1fr;
    gap: 0.4rem 1.25rem;
    align-items: start;
}

@media (min-width: 720px) {
    body.page-payment-entry .payment-entry-header-grid.order-filter-grid--cols2 {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }
}

body.page-payment-entry .payment-entry-header-panel .order-filter-field,
body.page-payment-entry .payment-entry-header-grid.order-filter-grid--inline > label.order-filter-field {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem 0.5rem;
    min-width: 0;
    width: 100%;
    margin: 0;
}

body.page-payment-entry .payment-entry-header-panel .order-filter-field__lbl {
    flex: 0 0 4.5rem;
    display: flex;
    align-items: center;
    align-self: flex-start;
    min-height: var(--payment-entry-control-h);
    white-space: nowrap;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.25;
}

body.page-payment-entry .payment-entry-header-panel .order-filter-field--note {
    align-items: flex-start;
}

body.page-payment-entry .payment-entry-header-panel .order-filter-field--note .order-filter-field__lbl {
    align-items: flex-start;
    padding-top: 0.35rem;
    min-height: 0;
}

body.page-payment-entry .payment-entry-header-panel .order-filter-input,
body.page-payment-entry .payment-entry-header-panel select.order-filter-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: var(--payment-entry-control-h);
    min-height: var(--payment-entry-control-h);
    max-height: var(--payment-entry-control-h);
    padding: 0 0.45rem;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: inherit;
    line-height: 1.25;
    appearance: none;
    -webkit-appearance: none;
}

body.page-payment-entry .payment-entry-header-panel textarea.order-filter-input {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: var(--payment-entry-control-h);
    padding: 0.35rem 0.45rem;
    box-sizing: border-box;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-size: inherit;
    line-height: 1.25;
    appearance: none;
    -webkit-appearance: none;
}

body.page-payment-entry .payment-entry-header-panel textarea.order-filter-input {
    resize: vertical;
}

body.page-payment-entry .payment-entry-header-panel .order-filter-customer-row {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.25rem;
}

/* 一覧フィルタの max-width:16rem を打ち消し、担当者行と同幅まで伸ばす */
body.page-payment-entry .payment-entry-header-panel .order-filter-grid--inline .order-filter-field--customer .order-filter-customer-row,
body.page-payment-entry .payment-entry-header-panel .order-filter-grid--inline .order-filter-field--staff .order-filter-customer-row {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
}

body.page-payment-entry .payment-entry-header-panel .payment-entry-master-row {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    gap: 0.25rem;
    min-height: var(--payment-entry-control-h);
}

body.page-payment-entry .payment-entry-header-panel .payment-entry-master-row .payment-entry-master-name-in {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

body.page-payment-entry .payment-entry-header-panel .payment-entry-master-row .payment-entry-master-code-in--ro,
body.page-payment-entry .payment-entry-header-panel .payment-entry-master-row .payment-entry-master-name-in--ro {
    background: #fff;
    color: var(--text);
}

body.page-payment-entry .payment-entry-header-panel .payment-entry-master-row .om-combo-search-btn {
    flex: 0 0 auto;
    align-self: center;
    width: 2rem;
    min-width: 2rem;
    height: var(--payment-entry-control-h);
    min-height: var(--payment-entry-control-h);
    box-sizing: border-box;
}

body.page-payment-entry .payment-entry-header-panel .payment-entry-master-row .om-combo-search-btn svg {
    width: 17px;
    height: 17px;
}

/* 件名と同じ: ラベル右の入力エリアを列いっぱいに */
body.page-payment-entry .payment-entry-header-panel .order-filter-field > .payment-entry-master-row {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    width: auto;
}

body.page-payment-entry .payment-entry-header-panel .payment-entry-master-row .payment-entry-master-code-in {
    flex: 0 0 6rem;
    width: 6rem;
    max-width: 6rem;
}

body.page-payment-entry .payment-entry-header-col-stack {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    width: 100%;
    align-self: start;
}

body.page-payment-entry .payment-entry-header-col-stack .payment-entry-header-col-stack__row {
    width: 100%;
    min-height: var(--payment-entry-control-h);
}

body.page-payment-entry .payment-entry-header-panel .order-filter-field--bank {
    align-items: flex-start;
}

body.page-payment-entry .payment-entry-header-panel .order-filter-field--bank .order-filter-field__lbl {
    padding-top: 0;
}

body.page-payment-entry .payment-entry-bank-field {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.25rem;
}

body.page-payment-entry .payment-entry-select-wrap {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

body.page-payment-entry .payment-entry-select-wrap .payment-entry-select-input {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 1.35rem;
    cursor: pointer;
}

body.page-payment-entry .payment-entry-select-wrap::after {
    content: "▼";
    position: absolute;
    right: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.625rem;
    line-height: 1;
    color: #64748b;
}

body.page-payment-entry .payment-entry-bank-manual-wrap {
    margin-top: 0;
}

body.page-payment-entry .payment-entry-readonly-val {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    min-height: var(--payment-entry-control-h);
    line-height: 1.25;
}

body.page-payment-entry .payment-entry-section-card .order-manual-lines-heading {
    margin: 0 0 0.45rem;
    font-weight: 500;
    color: var(--muted);
    line-height: 1.25;
}

body.page-payment-entry .payment-invoice-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 0.45rem;
}

body.page-payment-entry .payment-invoice-section-head .order-manual-lines-heading {
    margin: 0;
}

body.page-payment-entry .payment-invoice-more-link {
    font-size: inherit;
    color: var(--accent);
    white-space: nowrap;
}

body.page-payment-entry .payment-invoice-section-wrap .order-manual-lines-table-wrap,
body.page-payment-entry .payment-lines-section .order-manual-lines-table-wrap {
    border: none;
    border-radius: 0;
    background: transparent;
}

body.page-payment-entry.page-payment-detail .payment-invoice-alloc-table,
body.page-payment-entry.page-payment-detail .payment-invoice-alloc-table th,
body.page-payment-entry.page-payment-detail .payment-invoice-alloc-table td,
body.page-payment-entry.page-payment-detail .payment-lines-table,
body.page-payment-entry.page-payment-detail .payment-lines-table th,
body.page-payment-entry.page-payment-detail .payment-lines-table td,
body.page-payment-entry.page-payment-detail .payment-lines-table .psp-in,
body.page-payment-entry.page-payment-detail .payment-lines-table select.psp-in {
    font-size: 0.875rem;
}

body.page-payment-entry.page-payment-detail .payment-invoice-alloc-table thead th,
body.page-payment-entry.page-payment-detail .payment-lines-table thead th {
    position: static;
    top: auto;
    z-index: auto;
    background: #fff;
    color: var(--muted);
    font-weight: 500;
    box-shadow: none;
    border: none;
    padding: 0.35rem 0.45rem 0.4rem;
}

body.page-payment-entry.page-payment-detail .payment-invoice-alloc-table th,
body.page-payment-entry.page-payment-detail .payment-invoice-alloc-table td,
body.page-payment-entry.page-payment-detail .payment-lines-table th,
body.page-payment-entry.page-payment-detail .payment-lines-table td {
    padding: 0.4rem 0.45rem;
    vertical-align: middle;
    background: #fff;
    border-color: var(--border);
}

body.page-payment-entry.page-payment-detail .payment-lines-table .psp-in,
body.page-payment-entry.page-payment-detail .payment-lines-table select.psp-in {
    height: var(--payment-entry-control-h);
    min-height: var(--payment-entry-control-h);
    padding: 0 0.45rem;
    box-sizing: border-box;
    line-height: 1.25;
}

body.page-payment-entry .payment-lines-toolbar {
    margin-top: 0.45rem;
}

body.page-payment-entry.page-payment-detail .order-list-screen h2.order-manual-lines-heading {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
}

body.page-payment-entry .payment-detail-form-layout.stack {
    gap: 0;
}

/* 請求明細: ヘッダー以外のページ内文字を 0.875rem に統一 */
body.page-invoice-detail main > .flash,
body.page-invoice-detail .order-detail-screen {
    font-size: 0.875rem;
}

body.page-invoice-detail .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    .btn--secondary,
    .btn--primary,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    h2,
    .psp-in,
    .order-manual-lines-heading,
    .order-manual-lines-heading__meta,
    .invoice-detail-ops-status,
    .invoice-detail-ops-label,
    .invoice-detail-ops-hint,
    .invoice-detail-note-body,
    .order-cell-clip,
    .link-order-id
) {
    font-size: 0.875rem;
}

body.page-invoice-detail .order-detail-screen .order-detail-header .dl-grid,
body.page-invoice-detail .order-detail-screen .order-manual-lines-table--sheet.data-table,
body.page-invoice-detail .order-detail-screen .order-manual-lines-table--sheet.data-table th,
body.page-invoice-detail .order-detail-screen .order-manual-lines-table--sheet.data-table td,
body.page-invoice-detail .order-detail-screen h2.order-manual-lines-heading {
    font-size: 0.875rem;
}

body.page-invoice-detail .order-detail-screen .order-detail-header h2,
body.page-invoice-detail .order-detail-screen .card h2,
body.page-invoice-detail .invoice-detail-ops-col h2,
body.page-invoice-detail .invoice-detail-note-card h2 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: normal;
    color: var(--muted);
}

body.page-invoice-detail .invoice-detail-header-fields {
    align-items: start;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0;
    gap: 0.5rem 1rem;
}

body.page-invoice-detail .invoice-detail-header-fields.card,
body.page-invoice-detail .order-detail-screen > .card {
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

body.page-invoice-detail .order-detail-screen > .card {
    padding: 0.55rem 0.75rem;
    margin: 0;
}

body.page-invoice-detail .payment-detail-fields-grid {
    grid-template-columns: minmax(6.5rem, 8rem) minmax(0, 1fr);
    gap: 0.28rem 0.65rem;
    align-items: center;
}

body.page-invoice-detail .payment-detail-fields-grid dt {
    color: var(--muted);
    font-weight: 500;
}

body.page-invoice-detail .payment-detail-fields-grid dd {
    color: var(--text);
}

body.page-invoice-detail .order-detail-header__col h2 {
    margin: 0 0 0.45rem;
}

body.page-invoice-detail .invoice-detail-amt {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body.page-invoice-detail .invoice-detail-note-body {
    margin: 0;
    line-height: 1.45;
}

body.page-invoice-detail .order-manual-lines-heading .order-manual-lines-heading__meta {
    font-weight: 500;
}

body.page-invoice-detail .invoice-detail-ledger-col-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body.page-invoice-detail .order-manual-lines-table--sheet.data-table th,
body.page-invoice-detail .order-manual-lines-table--sheet.data-table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.35;
    vertical-align: middle;
}

body.page-invoice-detail .order-manual-lines-table--sheet.data-table thead th {
    padding: 0.45rem 0.5rem;
    background: #f8fafc;
    color: var(--text);
    box-shadow: 0 1px 0 var(--border);
}

body.page-invoice-detail .invoice-detail-ops-form .psp-in,
body.page-invoice-detail .invoice-detail-ops-form select.psp-in {
    height: 1.65rem;
    min-height: 1.65rem;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    box-shadow: none;
    padding: 0 0.45rem;
    font-size: 0.875rem;
    line-height: 1.25;
}

body.page-invoice-detail .invoice-detail-ops-form .btn.btn--compact {
    height: 1.65rem;
    min-height: 1.65rem;
    box-sizing: border-box;
    padding: 0 0.55rem;
    font-size: 0.875rem;
    line-height: 1;
    align-items: center;
}

body.page-invoice-detail .invoice-detail-ops-hint,
body.page-invoice-detail .invoice-detail-note-body.muted,
body.page-invoice-detail .order-manual-lines-heading .order-manual-lines-heading__meta {
    color: var(--muted);
}

body.page-invoice-detail .invoice-detail-ops-status {
    color: var(--text);
}

body.page-invoice-detail .order-detail-screen h2.order-manual-lines-heading {
    color: var(--text);
    font-weight: 700;
}

body.page-invoice-detail .invoice-detail-ledger-table .link-order-id {
    color: var(--text);
    font-weight: 400;
}

body.page-invoice-detail .invoice-detail-ledger-table .link-order-id:hover {
    color: var(--text);
}

body.page-invoice-detail .invoice-detail-ops-hint a {
    color: var(--accent);
}

body.page-invoice-detail .invoice-detail-ops-hint a:hover {
    color: var(--accent-hover);
}

/* ダッシュボード: カテゴリナビを入金一覧のクイックボタンと同じ文字サイズに */
body.page-dashboard .nav {
    gap: 0.35rem;
}

body.page-dashboard .nav a {
    padding: 0.58rem 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.25;
    border-radius: 7px;
    font-weight: 600;
}

/* インデックスタブ（ダッシュボード・受注一覧等・上丸・下フラット） */
body.page-hub-index .site-header__inner.site-header__inner--hub {
    flex-wrap: wrap;
    align-items: flex-end;
    padding-bottom: 0;
    gap: 0.4rem 0.75rem;
}

body.page-hub-index .site-header__inner.site-header__inner--hub .site-header__brand-block {
    flex: 0 0 auto;
}

body.page-hub-index .site-header__inner.site-header__inner--hub .site-header__cluster {
    flex: 0 0 auto;
    margin-left: auto;
}

/* 受注一覧・明細等: ブランド+操作+インデックス+アカウントを常に横1列（幅に応じて縮小、はみ出し時は trailing 横スクロール・バー非表示） */
body.page-hub-index .site-header__inner--hub-with-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-start;
    gap: clamp(0.25rem, 0.15rem + 0.35vw, 0.55rem);
    min-width: 0;
    width: 100%;
    overflow: visible;
}

body.page-hub-index .site-header__quick-more-menu.is-header-more-menu--fixed {
    right: auto;
    z-index: 220;
}

/* 一覧ヘッダー左の「その他」はボタン直下・左揃え（アカウントメニューは右揃えのまま） */
body.page-hub-index .site-header__hub-leading .site-header__quick-more-wrap > .site-header__quick-more-menu {
    left: 0;
    right: auto;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-leading {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    min-width: 0;
    align-self: flex-end;
    padding-bottom: var(--site-header-action-gap);
    overflow: visible;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-trailing {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    align-self: flex-end;
    min-width: 0;
    margin-left: auto;
    justify-content: flex-end;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-trailing::-webkit-scrollbar {
    display: none;
    height: 0;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-tabs {
    overflow: visible;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-dropdown {
    overflow: visible;
    z-index: 2;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-dropdown:has([aria-expanded="true"]) {
    z-index: 210;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__brand-block {
    flex-wrap: nowrap;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    gap: 0.25rem 0.45rem;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__brand-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    min-width: 0;
    margin-left: 0.1rem;
    gap: clamp(0.18rem, 0.12rem + 0.2vw, 0.28rem);
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__context-label {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-hub-index .site-header__inner--hub-with-actions .brand {
    flex-shrink: 0;
    font-size: clamp(0.75rem, 0.65rem + 0.45vw, 1.125rem);
    white-space: nowrap;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__context-label {
    font-size: clamp(0.75rem, 0.65rem + 0.4vw, 1rem);
    padding-left: clamp(0.35rem, 0.2rem + 0.35vw, 0.75rem);
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__quick-btn {
    padding: clamp(0.3rem, 0.2rem + 0.28vw, 0.58rem) clamp(0.48rem, 0.32rem + 0.5vw, 1rem);
    font-size: clamp(0.75rem, 0.64rem + 0.38vw, 1rem);
    line-height: 1.25;
    border-radius: clamp(5px, 0.22rem + 0.12vw, 7px);
    min-height: clamp(1.7rem, 1.5rem + 0.45vw, 2.05rem);
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-tabs {
    flex-wrap: nowrap;
    flex: 0 0 auto;
    gap: clamp(0.12rem, 0.08rem + 0.14vw, 0.3rem);
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-tab {
    padding: clamp(0.3rem, 0.22rem + 0.16vw, 0.5rem) clamp(0.42rem, 0.3rem + 0.32vw, 0.95rem)
        clamp(0.24rem, 0.17rem + 0.1vw, 0.4rem);
    font-size: clamp(0.7rem, 0.58rem + 0.34vw, 0.875rem);
    flex-shrink: 0;
}

body.page-hub-index .site-header__hub-tab__label {
    display: inline-block;
    white-space: nowrap;
    line-height: inherit;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-tab.is-active {
    padding-bottom: clamp(0.3rem, 0.22rem + 0.16vw, 0.5rem);
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-tab--account {
    font-size: clamp(0.7rem, 0.58rem + 0.34vw, 0.875rem);
    flex-shrink: 0;
    max-width: clamp(4.5rem, 8vw, 11rem);
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    text-align: inherit;
    vertical-align: bottom;
}

body.page-hub-index .site-header__hub-leading {
    grid-column: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    justify-self: start;
    align-self: end;
    min-width: 0;
    padding-bottom: var(--site-header-action-gap);
}

body.page-hub-index .site-header__hub-trailing {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.35rem 0.65rem;
    justify-self: end;
    min-width: 0;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-tabs {
    flex: none;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__auth {
    flex: 0 0 auto;
}

body.page-hub-index .site-header__hub-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.3rem;
    flex: 1 1 280px;
    min-width: 0;
}

body.page-hub-index .site-header__hub-tab {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.95rem 0.4rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25;
    color: var(--muted);
    text-decoration: none;
    white-space: nowrap;
    background: #e6ebf2;
    border: 1px solid #d4dbe6;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -2px 6px rgba(15, 23, 42, 0.07);
    margin-bottom: -1px;
    position: relative;
    transition:
        background 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
}

body.page-hub-index .site-header__hub-tab:hover {
    color: var(--accent);
    background: #dde4ed;
}

body.page-hub-index .site-header__hub-tab.is-active {
    color: var(--accent);
    background: var(--surface);
    border-color: var(--border);
    padding-bottom: 0.4rem;
    box-shadow:
        0 -3px 8px rgba(15, 23, 42, 0.09),
        0 1px 0 var(--surface);
    z-index: 1;
}

/* プルダウンを開いたカテゴリタブを選択中表示（ページ所属の is-active より優先） */
body.page-hub-index .site-header__hub-dropdown .site-header__hub-tab[aria-expanded="true"] {
    color: var(--accent);
    background: var(--surface);
    border-color: var(--border);
    padding-bottom: 0.4rem;
    box-shadow:
        0 -3px 8px rgba(15, 23, 42, 0.09),
        0 1px 0 var(--surface);
    z-index: 1;
}

body.page-hub-index .site-header__inner--hub-with-actions .site-header__hub-dropdown .site-header__hub-tab[aria-expanded="true"] {
    padding-bottom: clamp(0.3rem, 0.22rem + 0.16vw, 0.5rem);
}

body.page-hub-index
    .site-header__hub-tabs:has([data-hub-dropdown-trigger][aria-expanded="true"])
    .site-header__hub-tab.is-active:not([aria-expanded="true"]) {
    color: var(--muted);
    background: #e6ebf2;
    border-color: #d4dbe6;
    padding-bottom: 0.4rem;
    box-shadow: 0 -2px 6px rgba(15, 23, 42, 0.07);
    z-index: auto;
}

body.page-hub-index
    .site-header__inner--hub-with-actions
    .site-header__hub-tabs:has([data-hub-dropdown-trigger][aria-expanded="true"])
    .site-header__hub-tab.is-active:not([aria-expanded="true"]) {
    padding-bottom: clamp(0.24rem, 0.17rem + 0.1vw, 0.4rem);
}

/* アカウント名: インデックスタブ同型・白背景（メニュー開閉はボタン） */
body.page-hub-index .site-header__hub-tab--account {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
    border-bottom: none;
    padding-bottom: 0.5rem;
    box-shadow:
        0 -3px 8px rgba(15, 23, 42, 0.09),
        0 1px 0 var(--surface);
    z-index: 1;
}

body.page-hub-index .site-header__hub-tab--account:hover,
body.page-hub-index .site-header__hub-tab--account:focus-visible {
    color: var(--accent);
    background: var(--surface);
    border-color: var(--border);
    outline: none;
}

body.page-hub-index .site-header__hub-tab--account[aria-expanded="true"] {
    color: var(--accent);
    background: var(--surface);
    border-color: var(--accent);
}

body.page-hub-index .site-header__auth {
    margin-left: 0;
    align-self: flex-end;
}

body.page-hub-index .site-header__auth .site-header__quick-more-wrap {
    display: inline-flex;
    align-items: flex-end;
}

body.page-hub-index .site-header__hub-dropdown {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    width: max-content;
    max-width: none;
}

body.page-hub-index .site-header__hub-dropdown .site-header__hub-tab {
    margin: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-align: inherit;
    vertical-align: bottom;
    width: max-content;
    max-width: none;
    align-self: flex-start;
}

body.page-hub-index .site-header__hub-dropdown-panel {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: auto;
    z-index: 40;
    width: max-content;
    max-width: calc(100vw - 1.5rem);
    min-width: 0;
    padding: 0.65rem 0.75rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    box-sizing: border-box;
}

body.page-hub-index .site-header__hub-dropdown-panel--fit {
    min-width: 0;
}

body.page-hub-index .site-header__hub-dropdown-panel.is-align-viewport-end {
    position: fixed;
    left: auto;
    z-index: 200;
    border-radius: 12px;
}

body.page-hub-index .app-tile-grid--hub-dropdown {
    display: grid;
    gap: 0.55rem;
    margin: 0;
    width: max-content;
    max-width: calc(100vw - 1.5rem);
}

body.page-hub-index .app-tile-grid--hub-dropdown-cols-4 {
    grid-template-columns: repeat(4, minmax(5.5rem, 1fr));
}

body.page-hub-index .app-tile-grid--hub-dropdown-cols-6 {
    grid-template-columns: repeat(6, minmax(5.5rem, 1fr));
}

body.page-hub-index .app-tile-grid--hub-dropdown-cols-7 {
    grid-template-columns: repeat(7, minmax(5.25rem, 1fr));
}

body.page-hub-index .app-tile--hub-dropdown {
    min-height: 0;
    padding: 0.7rem 0.35rem 0.65rem;
    border-radius: 10px;
    box-shadow: none;
}

body.page-hub-index .app-tile--hub-dropdown:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
}

body.page-hub-index .app-tile--hub-dropdown .app-tile__icon {
    margin-bottom: 0.4rem;
}

body.page-hub-index .app-tile--hub-dropdown .app-tile__icon svg {
    width: 28px;
    height: 28px;
}

body.page-hub-index .app-tile--hub-dropdown .app-tile__label {
    font-size: 0.8125rem;
    line-height: 1.25;
    font-weight: 600;
}

@media (max-width: 900px) {
    body.page-hub-index .app-tile-grid--hub-dropdown-cols-7 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    body.page-hub-index .app-tile-grid--hub-dropdown-cols-6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    body.page-hub-index .app-tile-grid--hub-dropdown-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 「すべて」タブ: 家アイコン、幅は従来のラベル相当を維持 */
body.page-hub-index .site-header__hub-tab--all {
    min-width: 3.5rem;
    justify-content: center;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
}

body.page-hub-index .site-header__hub-tab__icon {
    display: inline-flex;
    line-height: 0;
}

body.page-hub-index .site-header__hub-tab__icon svg {
    display: block;
}

/* ダッシュボードのみ: 販売管理の右横にインデックスタブ・1段大きめ（タブは下線に接続） */
body.page-dashboard.page-hub-index .site-header__hub-leading {
    align-items: flex-end;
    flex-wrap: nowrap;
    padding-bottom: 0;
}

body.page-dashboard.page-hub-index .site-header__hub-leading .site-header__brand-block {
    flex-shrink: 0;
}

body.page-dashboard.page-hub-index .site-header__hub-leading .site-header__hub-tabs {
    flex: 0 1 auto;
    min-width: 0;
    margin-left: 1em;
}

body.page-dashboard.page-hub-index .site-header__hub-tab {
    padding: 0.58rem 1.1rem 0.48rem;
    font-size: 1rem;
    border-radius: 14px 14px 0 0;
}

body.page-dashboard.page-hub-index .site-header__hub-tab.is-active {
    padding-bottom: 0.58rem;
}

body.page-dashboard.page-hub-index .site-header__hub-tab--all {
    min-width: 4rem;
    padding-left: 0.95rem;
    padding-right: 0.95rem;
}

body.page-dashboard.page-hub-index .site-header__hub-tab--all .site-header__hub-tab__icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

@media (max-width: 900px) {
    body.page-hub-index .site-header__inner--hub:not(.site-header__inner--hub-with-actions) .site-header__hub-tabs {
        flex-basis: 100%;
        order: 3;
    }
}

/* 入金一覧・請求一覧・仕入明細・見積一覧・設定: ヘッダー文字を 1rem（16px）に統一 */
body.page-payment-list .brand,
body.page-payment-list .site-header__context-label,
body.page-payment-list .site-header__quick-btn,
body.page-invoice-list .brand,
body.page-invoice-list .site-header__context-label,
body.page-invoice-list .site-header__quick-btn,
body.page-odai-list .brand,
body.page-odai-list .site-header__context-label,
body.page-odai-list .site-header__quick-btn,
body.page-gr-list .brand,
body.page-gr-list .site-header__context-label,
body.page-gr-list .site-header__quick-btn,
body.page-po-list .brand,
body.page-po-list .site-header__context-label,
body.page-po-list .site-header__quick-btn,
body.page-so-list .brand,
body.page-so-list .site-header__context-label,
body.page-so-list .site-header__quick-btn,
body.page-sales-list .brand,
body.page-sales-list .site-header__context-label,
body.page-sales-list .site-header__quick-btn,
body.page-estimate-list .brand,
body.page-estimate-list .site-header__context-label,
body.page-estimate-list .site-header__quick-btn,
body.page-product-list .brand,
body.page-product-list .site-header__context-label,
body.page-product-list .site-header__quick-btn,
body.page-inventory-list .brand,
body.page-inventory-list .site-header__context-label,
body.page-inventory-list .site-header__quick-btn,
body.page-inventory-section .brand,
body.page-inventory-section .site-header__context-label,
body.page-inventory-section .site-header__quick-btn,
body.page-posting-batch .brand,
body.page-posting-batch .site-header__context-label,
body.page-posting-batch .site-header__quick-btn,
body.page-consignor-list .brand,
body.page-consignor-list .site-header__context-label,
body.page-consignor-list .site-header__quick-btn,
body.page-delivery-site-list .brand,
body.page-delivery-site-list .site-header__context-label,
body.page-delivery-site-list .site-header__quick-btn,
body.page-supplier-list .brand,
body.page-supplier-list .site-header__context-label,
body.page-supplier-list .site-header__quick-btn,
body.page-rank-price-list .brand,
body.page-rank-price-list .site-header__context-label,
body.page-rank-price-list .site-header__quick-btn,
body.page-customer-list .brand,
body.page-customer-list .site-header__context-label,
body.page-customer-list .site-header__quick-btn,
body.page-remark-template-list .brand,
body.page-remark-template-list .site-header__context-label,
body.page-remark-template-list .site-header__quick-btn,
body.page-remark-template-detail .brand,
body.page-remark-template-detail .site-header__context-label,
body.page-remark-template-detail .site-header__quick-btn,
body.page-settings .brand,
body.page-settings .site-header__context-label,
body.page-settings .site-header__quick-btn,
body.page-company-profile .brand,
body.page-company-profile .site-header__context-label,
body.page-company-profile .site-header__quick-btn,
body.page-mail-settings .brand,
body.page-mail-settings .site-header__context-label,
body.page-mail-settings .site-header__quick-btn,
body.page-mail-history .brand,
body.page-mail-history .site-header__context-label,
body.page-mail-history .site-header__quick-btn,
body.page-sync-log .brand,
body.page-sync-log .site-header__context-label,
body.page-sync-log .site-header__quick-btn,
body.page-consignor-detail .brand,
body.page-consignor-detail .site-header__context-label,
body.page-consignor-detail .site-header__quick-btn,
body.page-delivery-site-detail .brand,
body.page-delivery-site-detail .site-header__context-label,
body.page-delivery-site-detail .site-header__quick-btn,
body.page-supplier-detail .brand,
body.page-supplier-detail .site-header__context-label,
body.page-supplier-detail .site-header__quick-btn,
body.page-customer-detail .brand,
body.page-customer-detail .site-header__context-label,
body.page-customer-detail .site-header__quick-btn,
body.page-product-detail .brand,
body.page-product-detail .site-header__context-label,
body.page-product-detail .site-header__quick-btn,
body.page-rank-price-detail .brand,
body.page-rank-price-detail .site-header__context-label,
body.page-rank-price-detail .site-header__quick-btn,
body.page-order-detail .brand,
body.page-order-detail .site-header__context-label,
body.page-order-detail .site-header__quick-btn,
body.page-so-create .brand,
body.page-so-create .site-header__context-label,
body.page-so-create .site-header__quick-btn,
body.page-so-edit .brand,
body.page-so-edit .site-header__context-label,
body.page-so-edit .site-header__quick-btn,
body.page-sales-detail .brand,
body.page-sales-detail .site-header__context-label,
body.page-sales-detail .site-header__quick-btn,
body.page-payment-detail .brand,
body.page-payment-detail .site-header__context-label,
body.page-payment-detail .site-header__quick-btn,
body.page-estimate-detail .brand,
body.page-estimate-detail .site-header__context-label,
body.page-estimate-detail .site-header__quick-btn,
body.page-invoice-detail .brand,
body.page-invoice-detail .site-header__context-label,
body.page-invoice-detail .site-header__quick-btn,
body.page-gr-detail .brand,
body.page-gr-detail .site-header__context-label,
body.page-gr-detail .site-header__quick-btn,
body.page-po-detail .brand,
body.page-po-detail .site-header__context-label,
body.page-po-detail .site-header__quick-btn,
body.page-inventory-hold .brand,
body.page-inventory-hold .site-header__context-label,
body.page-inventory-hold .site-header__quick-btn,
body.page-inventory-adjust .brand,
body.page-inventory-adjust .site-header__context-label,
body.page-inventory-adjust .site-header__quick-btn,
body.page-inventory-transfer .brand,
body.page-inventory-transfer .site-header__context-label,
body.page-inventory-transfer .site-header__quick-btn,
body.page-invoice-mail-send .brand,
body.page-invoice-mail-send .site-header__context-label,
body.page-invoice-mail-send .site-header__quick-btn,
body.page-invoice-from-sales .brand,
body.page-invoice-from-sales .site-header__context-label,
body.page-invoice-from-sales .site-header__quick-btn,
body.page-lt-reply-mail .brand,
body.page-lt-reply-mail .site-header__context-label,
body.page-lt-reply-mail .site-header__quick-btn,
body.page-lt-reply-edit .brand,
body.page-lt-reply-edit .site-header__context-label,
body.page-lt-reply-edit .site-header__quick-btn,
body.page-lt-reply-review .brand,
body.page-lt-reply-review .site-header__context-label,
body.page-lt-reply-review .site-header__quick-btn,
body.page-odai-review .brand,
body.page-odai-review .site-header__context-label,
body.page-odai-review .site-header__quick-btn {
    font-size: 1rem;
    line-height: 1.4;
}

body.page-payment-list .site-header__quick-btn,
body.page-invoice-list .site-header__quick-btn,
body.page-odai-list .site-header__quick-btn,
body.page-gr-list .site-header__quick-btn,
body.page-po-list .site-header__quick-btn,
body.page-so-list .site-header__quick-btn,
body.page-sales-list .site-header__quick-btn,
body.page-estimate-list .site-header__quick-btn,
body.page-product-list .site-header__quick-btn,
body.page-inventory-list .site-header__quick-btn,
body.page-inventory-section .site-header__quick-btn,
body.page-posting-batch .site-header__quick-btn,
body.page-consignor-list .site-header__quick-btn,
body.page-delivery-site-list .site-header__quick-btn,
body.page-supplier-list .site-header__quick-btn,
body.page-rank-price-list .site-header__quick-btn,
body.page-customer-list .site-header__quick-btn,
body.page-remark-template-list .site-header__quick-btn,
body.page-remark-template-detail .site-header__quick-btn,
body.page-settings .site-header__quick-btn,
body.page-company-profile .site-header__quick-btn,
body.page-mail-settings .site-header__quick-btn,
body.page-mail-history .site-header__quick-btn,
body.page-sync-log .site-header__quick-btn,
body.page-consignor-detail .site-header__quick-btn,
body.page-delivery-site-detail .site-header__quick-btn,
body.page-supplier-detail .site-header__quick-btn,
body.page-customer-detail .site-header__quick-btn,
body.page-product-detail .site-header__quick-btn,
body.page-rank-price-detail .site-header__quick-btn,
body.page-order-detail .site-header__quick-btn,
body.page-so-create .site-header__quick-btn,
body.page-so-edit .site-header__quick-btn,
body.page-sales-detail .site-header__quick-btn,
body.page-payment-detail .site-header__quick-btn,
body.page-estimate-detail .site-header__quick-btn,
body.page-invoice-detail .site-header__quick-btn,
body.page-gr-detail .site-header__quick-btn,
body.page-po-detail .site-header__quick-btn,
body.page-inventory-hold .site-header__quick-btn,
body.page-inventory-adjust .site-header__quick-btn,
body.page-inventory-transfer .site-header__quick-btn,
body.page-invoice-mail-send .site-header__quick-btn,
body.page-invoice-from-sales .site-header__quick-btn,
body.page-lt-reply-mail .site-header__quick-btn,
body.page-lt-reply-edit .site-header__quick-btn,
body.page-lt-reply-review .site-header__quick-btn,
body.page-odai-review .site-header__quick-btn {
    padding: 0.58rem 1rem;
    border-radius: 7px;
    font-weight: 400;
}

body.page-company-profile .company-profile-header-save {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

body.page-company-profile .company-profile-header-save:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

body.page-settings-inventory .inventory-settings-header-save,
body.page-warehouse-edit .inventory-settings-header-save {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

body.page-settings-inventory .inventory-settings-header-save:hover,
body.page-warehouse-edit .inventory-settings-header-save:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

body.page-mail-settings .mail-settings-header-save {
    background: #fff;
    border: 1px solid #d1d5db;
    color: var(--text);
}

body.page-mail-settings .mail-settings-header-save:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

/* 自社情報: ヘッダー以外のページ内文字を 0.875rem に統一 */
body.page-company-profile > main {
    font-size: 0.875rem;
}

body.page-company-profile > main :is(
    h1,
    h2,
    h3,
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    summary,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    .flash,
    .psp-in,
    .card h2,
    .company-profile-section__summary,
    .company-profile-logo-empty,
    .data-table
) {
    font-size: 0.875rem;
}

/* 一覧系: ヘッダー以外のページ内文字を 0.875rem に統一 */
body.page-payment-list main > .flash,
body.page-payment-list .order-list-screen,
body.page-invoice-list main > .flash,
body.page-invoice-list .order-list-screen,
body.page-remark-template-list main > .flash,
body.page-remark-template-list .order-list-screen,
body.page-remark-template-detail main > .flash,
body.page-remark-template-detail .remark-template-form,
body.page-gr-list main > .flash,
body.page-gr-list .order-list-screen,
body.page-estimate-list main > .flash,
body.page-estimate-list .order-list-screen,
body.page-product-list main > .flash,
body.page-product-list .order-list-screen,
body.page-posting-batch main > .flash,
body.page-posting-batch .order-list-screen,
body.page-consignor-list main > .flash,
body.page-consignor-list .order-list-screen,
body.page-delivery-site-list main > .flash,
body.page-delivery-site-list .order-list-screen,
body.page-supplier-list main > .flash,
body.page-supplier-list .order-list-screen,
body.page-customer-list main > .flash,
body.page-customer-list .order-list-screen,
body.page-staff-list main > .flash,
body.page-staff-list .order-list-screen {
    font-size: 0.875rem;
}

body.page-payment-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-invoice-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]):not([type="radio"]),
    button,
    th,
    td,
    .invoice-list-past-hint,
    .invoice-recovery-view-hint,
    .invoice-filter-amount-mode,
    .invoice-filter-date-preset,
    .invoice-recovery-view-tab,
    .invoice-send-badge,
    .invoice-send-method,
    .invoice-list-send-empty,
    .list-pager-bottom
),
body.page-gr-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    summary,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-estimate-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-product-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-posting-batch .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-consignor-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-delivery-site-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-supplier-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-customer-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-remark-template-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    button,
    th,
    td,
    .order-list-meta,
    .order-filter-field__lbl,
    .order-filter-input,
    .empty-state,
    .empty-state strong,
    .empty-state span
) {
    font-size: 0.875rem;
}

body.page-payment-list .order-filter-panel--compact .order-filter-grid label,
body.page-payment-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-payment-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-payment-list .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-payment-list.page-orders-list--compact-header .order-filter-date-unified__text,
body.page-payment-list .order-filter-date-range__sep,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid label,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal):not([type="radio"]),
body.page-invoice-list .order-filter-panel--compact .order-filter-grid select.order-filter-input,
body.page-invoice-list.page-orders-list--compact-header .order-filter-date-unified__text,
body.page-invoice-list .order-filter-date-range__sep,
body.page-gr-list .order-filter-panel--compact .order-filter-grid label,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-gr-list .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-gr-list.page-orders-list--compact-header .order-filter-date-unified__text,
body.page-gr-list .order-filter-date-range__sep,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid label,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-estimate-list.page-orders-list--compact-header .order-filter-date-unified__text,
body.page-estimate-list .order-filter-date-range__sep,
body.page-product-list .order-filter-panel--compact .order-filter-grid label,
body.page-product-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-product-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-product-list .order-filter-panel--compact .order-filter-grid input,
body.page-posting-batch .order-filter-panel--compact .order-filter-grid label,
body.page-posting-batch .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-posting-batch .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-posting-batch .order-filter-panel--compact .order-filter-grid input,
body.page-consignor-list .order-filter-panel--compact .order-filter-grid label,
body.page-consignor-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-consignor-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-consignor-list .order-filter-panel--compact .order-filter-grid input,
body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid label,
body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid input,
body.page-supplier-list .order-filter-panel--compact .order-filter-grid label,
body.page-supplier-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-supplier-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-supplier-list .order-filter-panel--compact .order-filter-grid input,
body.page-customer-list .order-filter-panel--compact .order-filter-grid label,
body.page-customer-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-customer-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-customer-list .order-filter-panel--compact .order-filter-grid input,
body.page-customer-list .order-filter-panel--compact .order-filter-grid select,
body.page-remark-template-list .order-filter-panel--compact .order-filter-grid label,
body.page-remark-template-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-remark-template-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-remark-template-list .order-filter-panel--compact .order-filter-grid input,
body.page-staff-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-staff-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-staff-list .order-filter-panel--compact .order-filter-grid input {
    font-size: 0.875rem;
}

body.page-payment-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-payment-list.page-orders-list--compact-header .order-list-page-size,
body.page-payment-list.page-orders-list--compact-header .order-list-page-size select,
body.page-payment-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-payment-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-payment-list.page-orders-list--compact-header .order-list-pager-status,
body.page-payment-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__label,
body.page-payment-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__value,
body.page-payment-list .empty-state,
body.page-payment-list .empty-state strong,
body.page-invoice-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-invoice-list.page-orders-list--compact-header .order-list-page-size,
body.page-invoice-list.page-orders-list--compact-header .order-list-page-size select,
body.page-invoice-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-invoice-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-invoice-list.page-orders-list--compact-header .order-list-pager-status,
body.page-invoice-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__label,
body.page-invoice-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__value,
body.page-invoice-list .empty-state,
body.page-invoice-list .empty-state strong,
body.page-gr-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-gr-list.page-orders-list--compact-header .order-list-page-size,
body.page-gr-list.page-orders-list--compact-header .order-list-page-size select,
body.page-gr-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-gr-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-gr-list.page-orders-list--compact-header .order-list-pager-status,
body.page-gr-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__label,
body.page-gr-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__value,
body.page-gr-list .empty-state,
body.page-gr-list .empty-state strong,
body.page-estimate-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-estimate-list.page-orders-list--compact-header .order-list-page-size,
body.page-estimate-list.page-orders-list--compact-header .order-list-page-size select,
body.page-estimate-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-estimate-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-estimate-list.page-orders-list--compact-header .order-list-pager-status,
body.page-estimate-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__label,
body.page-estimate-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__value,
body.page-estimate-list .empty-state,
body.page-estimate-list .empty-state strong,
body.page-product-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-product-list.page-orders-list--compact-header .order-list-page-size,
body.page-product-list.page-orders-list--compact-header .order-list-page-size select,
body.page-product-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-product-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-product-list.page-orders-list--compact-header .order-list-pager-status,
body.page-product-list .empty-state,
body.page-product-list .empty-state strong,
body.page-posting-batch.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-posting-batch .empty-state,
body.page-posting-batch .empty-state strong,
body.page-consignor-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-consignor-list.page-orders-list--compact-header .order-list-page-size,
body.page-consignor-list.page-orders-list--compact-header .order-list-page-size select,
body.page-consignor-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-consignor-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-consignor-list.page-orders-list--compact-header .order-list-pager-status,
body.page-consignor-list .empty-state,
body.page-consignor-list .empty-state strong,
body.page-delivery-site-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-delivery-site-list.page-orders-list--compact-header .order-list-page-size,
body.page-delivery-site-list.page-orders-list--compact-header .order-list-page-size select,
body.page-delivery-site-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-delivery-site-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-delivery-site-list.page-orders-list--compact-header .order-list-pager-status,
body.page-delivery-site-list .empty-state,
body.page-delivery-site-list .empty-state strong,
body.page-supplier-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-supplier-list.page-orders-list--compact-header .order-list-page-size,
body.page-supplier-list.page-orders-list--compact-header .order-list-page-size select,
body.page-supplier-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-supplier-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-supplier-list.page-orders-list--compact-header .order-list-pager-status,
body.page-supplier-list .empty-state,
body.page-supplier-list .empty-state strong,
body.page-customer-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-customer-list.page-orders-list--compact-header .order-list-page-size,
body.page-customer-list.page-orders-list--compact-header .order-list-page-size select,
body.page-customer-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-customer-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-customer-list.page-orders-list--compact-header .order-list-pager-status,
body.page-customer-list .empty-state,
body.page-customer-list .empty-state strong,
body.page-remark-template-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-remark-template-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta strong,
body.page-remark-template-list .empty-state,
body.page-remark-template-list .empty-state strong,
body.page-remark-template-list .empty-state span,
body.page-staff-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-staff-list .empty-state,
body.page-staff-list .empty-state strong {
    font-size: 0.875rem;
}

/* 一覧系: 検索を2列 */
body.page-payment-list .order-filter-panel--compact .order-filter-grid--cols2,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--cols2,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--cols2,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid--cols2,
body.page-product-list .order-filter-panel--compact .order-filter-grid--cols2,
body.page-posting-batch .order-filter-panel--compact .order-filter-grid--cols2,
body.page-consignor-list .order-filter-panel--compact .order-filter-grid--cols2,
body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid--cols2,
body.page-supplier-list .order-filter-panel--compact .order-filter-grid--cols2,
body.page-customer-list .order-filter-panel--compact .order-filter-grid--cols2 {
    grid-template-columns: 1fr;
    gap: 0.4rem 1.25rem;
    align-items: center;
}

@media (min-width: 720px) {
    body.page-payment-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-invoice-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-gr-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-po-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-so-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-sales-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-estimate-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-product-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-posting-batch .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-consignor-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-supplier-list .order-filter-panel--compact .order-filter-grid--cols2,
    body.page-customer-list .order-filter-panel--compact .order-filter-grid--cols2 {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }
}

/* 入金一覧・請求一覧・仕入明細: ラベル幅を揃え、入力は列内で均等に伸ばす */
body.page-payment-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-product-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-posting-batch .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-consignor-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-supplier-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-customer-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-remark-template-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    min-width: 0;
    width: 100%;
}

body.page-payment-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-product-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-posting-batch .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-consignor-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-supplier-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-customer-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-remark-template-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 4.5rem;
    white-space: nowrap;
}

body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 5.5rem;
}

body.page-payment-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--date-range .order-filter-field__lbl,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--date-range .order-filter-field__lbl,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--date-range .order-filter-field__lbl,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--date-range .order-filter-field__lbl,
body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--date-range .order-filter-field__lbl,
body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--date-range .order-filter-field__lbl,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--date-range .order-filter-field__lbl {
    flex: 0 0 4.5rem;
}

body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--date-range .order-filter-field__lbl,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--amount-mode .order-filter-field__lbl {
    flex: 0 0 5.5rem;
}

/* キーワード右横: ラベル＋ラジオ（0円含む／除外／範囲）を1行で横並び */
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--amount-mode {
    flex-wrap: nowrap;
    min-width: 0;
}

body.page-payment-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-date-range,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-date-range,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-date-range,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-date-range,
body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-date-range,
body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-date-range,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-date-range {
    flex: 1 1 auto;
    min-width: 0;
}

body.page-payment-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--id,
body.page-payment-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-payment-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--cust,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--id,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--cust,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid--inline select.order-filter-input,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--id,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--cust,
body.page-gr-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--prod,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--id,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--cust,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--prod,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline select.order-filter-input,
body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--id,
body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--cust,
body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--prod,
body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--id,
body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--cust,
body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--prod,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--id,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--cust,
body.page-product-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-consignor-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-supplier-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-customer-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw,
body.page-remark-template-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-input--kw {
    flex: 1 1 auto;
    max-width: none;
    width: 100%;
}

/* 荷主・納入先・仕入先・得意先・備考テンプレート: キーワード入力の右に検索・クリア */
/* デフォルトの2/4列グリッドだと入力が短くなるため1列にし、枠幅を直接指定する */
body.page-consignor-list .order-filter-panel--compact .order-filter-grid,
body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid,
body.page-supplier-list .order-filter-panel--compact .order-filter-grid,
body.page-customer-list .order-filter-panel--compact .order-filter-grid,
body.page-remark-template-list .order-filter-panel--compact .order-filter-grid {
    grid-template-columns: 1fr;
}

body.page-consignor-list .order-filter-field--kw-actions,
body.page-delivery-site-list .order-filter-field--kw-actions,
body.page-supplier-list .order-filter-field--kw-actions,
body.page-customer-list .order-filter-field--kw-actions,
body.page-remark-template-list .order-filter-field--kw-actions {
    max-width: none;
    width: 100%;
}

body.page-consignor-list .order-filter-kw-actions,
body.page-delivery-site-list .order-filter-kw-actions,
body.page-supplier-list .order-filter-kw-actions,
body.page-customer-list .order-filter-kw-actions,
body.page-remark-template-list .order-filter-kw-actions {
    display: flex;
    flex: 0 0 50%;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
    width: 50%;
    max-width: 50%;
    box-sizing: border-box;
}

body.page-consignor-list .order-filter-kw-actions .order-filter-input--kw,
body.page-delivery-site-list .order-filter-kw-actions .order-filter-input--kw,
body.page-supplier-list .order-filter-kw-actions .order-filter-input--kw,
body.page-customer-list .order-filter-kw-actions .order-filter-input--kw,
body.page-remark-template-list .order-filter-kw-actions .order-filter-input--kw {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
}

body.page-consignor-list .order-filter-kw-actions .btn,
body.page-delivery-site-list .order-filter-kw-actions .btn,
body.page-supplier-list .order-filter-kw-actions .btn,
body.page-customer-list .order-filter-kw-actions .btn,
body.page-remark-template-list .order-filter-kw-actions .btn {
    flex: 0 0 auto;
    align-self: stretch;
    color: var(--text);
    min-height: 1.65rem;
    padding: 0 0.55rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 500;
}

body.page-consignor-list .order-filter-kw-actions .btn:hover,
body.page-delivery-site-list .order-filter-kw-actions .btn:hover,
body.page-supplier-list .order-filter-kw-actions .btn:hover,
body.page-customer-list .order-filter-kw-actions .btn:hover,
body.page-remark-template-list .order-filter-kw-actions .btn:hover {
    color: var(--text);
}

/* キーワード〜検索の上下に少し余白 */
body.page-consignor-list.page-orders-list--compact-header .order-filter-panel--compact,
body.page-delivery-site-list.page-orders-list--compact-header .order-filter-panel--compact,
body.page-supplier-list.page-orders-list--compact-header .order-filter-panel--compact,
body.page-customer-list.page-orders-list--compact-header .order-filter-panel--compact,
body.page-remark-template-list.page-orders-list--compact-header .order-filter-panel--compact {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

body.page-payment-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-invoice-list .order-filter-panel--compact .order-filter-grid select.order-filter-input,
body.page-gr-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-po-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-po-list .order-filter-panel--compact .order-filter-grid select.order-filter-input,
body.page-so-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-sales-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-estimate-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-product-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-posting-batch .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-consignor-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-delivery-site-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-supplier-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-customer-list .order-filter-panel--compact .order-filter-grid input.order-filter-input,
body.page-customer-list .order-filter-panel--compact .order-filter-grid select.order-filter-input,
body.page-remark-template-list .order-filter-panel--compact .order-filter-grid input.order-filter-input {
    min-height: 1.65rem;
    padding: 0.2rem 0.45rem;
    box-sizing: border-box;
}

/* 請求一覧: 送付・入金・回収プルダウンをテキスト入力と同型 */
body.page-invoice-list .order-filter-panel--compact .order-filter-grid select.order-filter-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: none;
    min-height: 1.65rem;
    height: 1.65rem;
    padding: 0 1.35rem 0 0.45rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2364748b' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.25;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

body.page-invoice-list .order-filter-panel--compact .order-filter-grid select.order-filter-input:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 0;
    border-color: var(--accent);
}

/* 発注一覧: 仕入計上・CSV連携プルダウンをテキスト入力と同型 */
body.page-po-list .order-filter-panel--compact .order-filter-grid select.order-filter-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    max-width: none;
    min-height: 1.65rem;
    height: 1.65rem;
    padding: 0 1.35rem 0 0.45rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2364748b' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.25;
    color: var(--text);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

body.page-po-list .order-filter-panel--compact .order-filter-grid select.order-filter-input:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 0;
    border-color: var(--accent);
}

/* 発注一覧: 仕入先・商品（入力＋虫眼鏡）を仕入計上プルダウンと同じ高さ・角丸 */
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--customer .order-filter-customer-row,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field--product .order-filter-product-row {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    align-items: center;
    gap: 0.25rem;
}

body.page-po-list .order-filter-panel--compact .order-filter-grid .order-filter-customer-row .order-filter-input--cust,
body.page-po-list .order-filter-panel--compact .order-filter-grid .order-filter-product-row .order-filter-input--prod {
    height: 1.65rem;
    min-height: 1.65rem;
    max-height: 1.65rem;
    padding: 0 0.45rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-sizing: border-box;
    line-height: 1.25;
}

body.page-po-list .order-filter-panel--compact .order-filter-grid .order-filter-customer-row .om-combo-search-btn,
body.page-po-list .order-filter-panel--compact .order-filter-grid .order-filter-product-row .om-combo-search-btn {
    width: 1.65rem;
    min-width: 1.65rem;
    height: 1.65rem;
    min-height: 1.65rem;
    border-radius: 8px;
    box-sizing: border-box;
    align-self: center;
}

body.page-po-list .order-filter-panel--compact .order-filter-grid .order-filter-customer-row .om-combo-search-btn svg,
body.page-po-list .order-filter-panel--compact .order-filter-grid .order-filter-product-row .om-combo-search-btn svg {
    width: 15px;
    height: 15px;
}

body.page-payment-list.page-orders-list--compact-header .order-filter-date-unified,
body.page-invoice-list.page-orders-list--compact-header .order-filter-date-unified,
body.page-gr-list.page-orders-list--compact-header .order-filter-date-unified,
body.page-po-list.page-orders-list--compact-header .order-filter-date-unified,
body.page-so-list.page-orders-list--compact-header .order-filter-date-unified,
body.page-sales-list.page-orders-list--compact-header .order-filter-date-unified,
body.page-estimate-list.page-orders-list--compact-header .order-filter-date-unified {
    min-height: 1.65rem;
}

body.page-invoice-list .invoice-filter-amount-modes {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    min-width: 0;
    flex: 1 1 auto;
}

body.page-invoice-list .invoice-filter-amount-mode {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
}

body.page-invoice-list .invoice-filter-amount-range {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

body.page-invoice-list .invoice-filter-amount-range[hidden] {
    display: none !important;
}

body.page-invoice-list .invoice-filter-amount-range .order-filter-input {
    width: 5.5rem;
    max-width: 5.5rem;
}

/* 入金一覧・請求一覧: フッタ金額は太字にしない */
body.page-payment-list .order-summary-footer--compact .order-summary-footer__value,
body.page-invoice-list .order-summary-footer--compact .order-summary-footer__value,
body.page-gr-list .order-summary-footer--compact .order-summary-footer__value {
    font-weight: 400;
}

body.page-payment-list .order-summary-footer--compact {
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: baseline;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

body.page-payment-list.page-orders-list--compact-header .order-summary-footer--compact {
    padding: 0.52rem 0.55rem;
}

body.page-payment-list .order-summary-footer--compact .order-summary-footer__box {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    text-align: right;
}

body.page-payment-list .order-summary-footer--compact .order-summary-footer__label {
    display: inline;
    margin-bottom: 0;
    font-size: 0.875rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

body.page-payment-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__label {
    font-size: 0.875rem;
}

body.page-payment-list .order-summary-footer--compact .order-summary-footer__value {
    font-size: 0.875rem;
}

body.page-payment-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__value {
    font-size: 0.875rem;
}

/* 入金一覧: 表の上下余白・文字は請求一覧と同じ 0.875rem */
body.page-payment-list.page-orders-list--compact-header .container--orders-fit .payment-list-table.data-table th,
body.page-payment-list.page-orders-list--compact-header .container--orders-fit .payment-list-table.data-table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-payment-list.page-orders-list--compact-header .container--orders-fit .payment-list-table.data-table thead th {
    padding: 0.45rem 0.5rem;
}

/* 入金日(td直書き)と同じ 0.875rem。親ルールの :is(input…) で上がったサイズを上書き */
body.page-payment-list.page-orders-list--compact-header .order-list-screen .payment-list-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .order-cell-clip,
    .list-sort-link
) {
    font-size: 0.875rem;
}

body.page-payment-list .payment-list-table th:first-child,
body.page-payment-list .payment-list-table td:first-child,
body.page-payment-list .payment-list-table .payment-list-check-cell {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-payment-list .payment-list-table input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

body.page-estimate-list .estimate-list-table th:first-child,
body.page-estimate-list .estimate-list-table td:first-child,
body.page-estimate-list .estimate-list-table .est-list-check-cell {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-estimate-list .estimate-list-table input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

body.page-gr-list .gr-list-table th:first-child,
body.page-gr-list .gr-list-table td:first-child,
body.page-gr-list .gr-list-table .gr-list-check-cell {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-gr-list .gr-list-table input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

body.page-invoice-list .invoice-list-table th:first-child,
body.page-invoice-list .invoice-list-table td:first-child,
body.page-invoice-list .invoice-list-table .invoice-list-check-cell {
    width: 1.65rem;
    min-width: 1.65rem;
    max-width: 1.65rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.15rem;
    padding-right: 0;
}

body.page-invoice-list .invoice-list-table .order-list-col-no {
    padding-left: 0.2rem;
}

body.page-invoice-list .invoice-list-table input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

/* 入金一覧・請求一覧・仕入明細・荷主一覧・納入先一覧・仕入先一覧・得意先一覧・見積一覧・商品一覧・注文書AI一覧: 表エリアの内側スクロールをやめて、内容の高さで伸ばす */
html:has(body.page-payment-list),
html:has(body.page-invoice-list),
html:has(body.page-gr-list),
html:has(body.page-consignor-list),
html:has(body.page-delivery-site-list),
html:has(body.page-supplier-list),
html:has(body.page-staff-list),
html:has(body.page-customer-list),
html:has(body.page-estimate-list),
html:has(body.page-product-list),
html:has(body.page-odai-list) {
    height: auto;
}

body.page-payment-list,
body.page-invoice-list,
body.page-gr-list,
body.page-consignor-list,
body.page-delivery-site-list,
body.page-supplier-list,
body.page-staff-list,
body.page-customer-list,
body.page-estimate-list,
body.page-product-list,
body.page-orders-list.page-odai-list {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-payment-list > main.container--orders-fit,
body.page-invoice-list > main.container--orders-fit,
body.page-gr-list > main.container--orders-fit,
body.page-consignor-list > main.container--orders-fit,
body.page-delivery-site-list > main.container--orders-fit,
body.page-supplier-list > main.container--orders-fit,
body.page-staff-list > main.container--orders-fit,
body.page-customer-list > main.container--orders-fit,
body.page-estimate-list > main.container--orders-fit,
body.page-product-list > main.container--orders-fit,
body.page-orders-list.page-odai-list > main.container,
body.page-orders-list.page-odai-list > main.container.container--odai-list {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-payment-list .order-list-screen,
body.page-payment-list.page-orders-list--compact-header .order-list-screen,
body.page-payment-list .order-list-data,
body.page-payment-list.page-orders-list--compact-header .order-list-data,
body.page-invoice-list .order-list-screen,
body.page-invoice-list.page-orders-list--compact-header .order-list-screen,
body.page-invoice-list .order-list-data,
body.page-invoice-list.page-orders-list--compact-header .order-list-data,
body.page-gr-list .order-list-screen,
body.page-gr-list.page-orders-list--compact-header .order-list-screen,
body.page-gr-list .order-list-data,
body.page-gr-list.page-orders-list--compact-header .order-list-data,
body.page-estimate-list .order-list-screen,
body.page-estimate-list.page-orders-list--compact-header .order-list-screen,
body.page-estimate-list .order-list-data,
body.page-estimate-list.page-orders-list--compact-header .order-list-data,
body.page-product-list .order-list-screen,
body.page-product-list.page-orders-list--compact-header .order-list-screen,
body.page-product-list .order-list-data,
body.page-product-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

/* 入金一覧・請求一覧: 合計フッタ直下の番号ページ送りを縮めず常に見えるようにする */
body.page-payment-list .list-pager-bottom,
body.page-invoice-list .list-pager-bottom {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-payment-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap,
body.page-invoice-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap,
body.page-gr-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap,
body.page-estimate-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap,
body.page-product-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

/* 入金一覧: 売上一覧と同型（表はコンテナ全幅） */
body.page-payment-list .payment-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-payment-list .payment-list-table .link-order-id,
body.page-payment-list .payment-list-table .list-sort-link,
body.page-invoice-list .invoice-list-table .link-order-id,
body.page-invoice-list .invoice-list-table .list-sort-link,
body.page-gr-list .gr-list-table .link-order-id,
body.page-product-list .product-list-table .link-order-id {
    color: var(--text);
    font-weight: 400 !important;
}

body.page-estimate-list .estimate-list-table .link-order-id,
body.page-estimate-list .estimate-list-table .list-sort-link,
body.page-so-list .so-list-table .link-order-id,
body.page-so-list .so-list-table .list-sort-link {
    color: var(--estimate-fg);
    font-weight: 400 !important;
}

body.page-estimate-list .estimate-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

body.page-so-list .so-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

body.page-estimate-list .estimate-list-table .list-sort-link:hover {
    color: var(--estimate-fg);
}

body.page-so-list .so-list-table .list-sort-link:hover,
body.page-so-list .so-list-table .link-order-id:hover {
    color: var(--estimate-fg);
}

body.page-payment-list .payment-list-table .list-sort-link,
body.page-invoice-list .invoice-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
}

body.page-payment-list .payment-list-table .link-order-id:hover,
body.page-payment-list .payment-list-table .list-sort-link:hover,
body.page-invoice-list .invoice-list-table .link-order-id:hover,
body.page-invoice-list .invoice-list-table .list-sort-link:hover,
body.page-gr-list .gr-list-table .link-order-id:hover,
body.page-product-list .product-list-table .link-order-id:hover {
    color: var(--text);
}

body.page-estimate-list .estimate-list-table .link-order-id:hover {
    color: var(--estimate-fg);
}

body.page-estimate-list .order-filter-grid.order-filter-grid--inline .order-filter-field,
body.page-so-list .order-filter-grid.order-filter-grid--inline .order-filter-field {
    color: var(--estimate-fg);
}

body.page-estimate-list .order-list-screen,
body.page-so-list .order-list-screen {
    color: var(--estimate-fg);
}

body.page-estimate-list .order-list-screen :is(
    input:not([type="checkbox"]),
    select,
    textarea,
    .btn
),
body.page-so-list .order-list-screen :is(
    input:not([type="checkbox"]),
    select,
    textarea,
    .btn
) {
    color: var(--text);
}

/* 見積一覧: 表を全幅にし列バランスを整える */
body.page-estimate-list .estimate-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

/* 見積一覧: 受注一覧（so-list-table）と同じ行の余白・行高 */
body.page-estimate-list.page-orders-list--compact-header .container--orders-fit .estimate-list-table.data-table th,
body.page-estimate-list.page-orders-list--compact-header .container--orders-fit .estimate-list-table.data-table td {
    padding: 0.4rem 0.55rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-estimate-list.page-orders-list--compact-header .container--orders-fit .estimate-list-table.data-table thead th {
    padding: 0.44rem 0.55rem;
}

body.page-estimate-list.page-orders-list--compact-header .container--orders-fit .estimate-list-table.data-table .est-list-check-cell {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-estimate-list.page-orders-list--compact-header .order-list-screen .estimate-list-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .list-sort-link,
    .order-cell-clip
) {
    font-size: 0.875rem;
}

body.page-estimate-list .estimate-list-table .order-list-col-no,
body.page-estimate-list.page-orders-list--compact-header .container--orders .estimate-list-table .order-list-col-no {
    width: 6.75rem;
}

body.page-estimate-list .estimate-list-table .order-list-col-date,
body.page-estimate-list.page-orders-list--compact-header .container--orders .estimate-list-table .order-list-col-date {
    width: 5.5rem;
    white-space: nowrap;
}

body.page-estimate-list .estimate-list-table .est-list-col-category {
    width: 5.5rem;
}

body.page-estimate-list .estimate-list-table .est-list-col-assignee,
body.page-estimate-list .estimate-list-table .est-list-col-order {
    width: 4.5rem;
}

body.page-estimate-list .estimate-list-table .order-list-col-total,
body.page-estimate-list.page-orders-list--compact-header .container--orders .estimate-list-table .order-list-col-total {
    width: 6.75rem;
    white-space: nowrap;
    text-align: right;
}

body.page-estimate-list .estimate-list-table .order-list-col-customer,
body.page-estimate-list .estimate-list-table .est-list-col-subject,
body.page-estimate-list .estimate-list-table .order-list-col-delivery {
    width: auto;
}

body.page-estimate-list .estimate-list-table .order-cell-clip,
body.page-estimate-list .estimate-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-estimate-list .order-summary-footer--estimate-list .order-summary-footer__label,
body.page-estimate-list .order-summary-footer--estimate-list .order-summary-footer__value,
body.page-estimate-list .order-summary-footer--estimate-list .order-summary-footer__value #est-footer-visible-sum {
    font-weight: 400;
}

body.page-estimate-list .order-summary-footer--estimate-list {
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: baseline;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

body.page-estimate-list.page-orders-list--compact-header .order-summary-footer--estimate-list {
    padding: 0.52rem 0.55rem;
}

body.page-estimate-list .order-summary-footer--estimate-list .order-summary-footer__box {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    text-align: right;
}

body.page-estimate-list .order-summary-footer--estimate-list .order-summary-footer__label {
    display: inline;
    margin-bottom: 0;
    font-size: 0.875rem;
    text-transform: none;
    letter-spacing: normal;
    color: var(--estimate-fg);
}

body.page-estimate-list .order-summary-footer--estimate-list .order-summary-footer__value {
    font-size: 0.875rem;
    color: var(--estimate-fg);
}

body.page-so-list .order-summary-footer--compact .order-summary-footer__label,
body.page-so-list .order-summary-footer--compact .order-summary-footer__value {
    font-weight: 400;
}

/* 商品一覧: 表を全幅にし列バランスを整える */
body.page-product-list .product-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-product-list.page-orders-list--compact-header .container--orders-fit .product-list-table.data-table th,
body.page-product-list.page-orders-list--compact-header .container--orders-fit .product-list-table.data-table td {
    padding: 0.52rem 0.55rem;
    line-height: 1.45;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-product-list.page-orders-list--compact-header .container--orders-fit .product-list-table.data-table thead th {
    padding: 0.48rem 0.55rem;
    font-size: 0.875rem;
    line-height: 1.35;
}

body.page-product-list.page-orders-list--compact-header .order-list-screen .product-list-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .list-sort-link,
    .order-cell-clip
) {
    font-size: 0.875rem;
}

body.page-product-list .product-list-table .order-list-col-no,
body.page-product-list.page-orders-list--compact-header .container--orders .product-list-table .order-list-col-no {
    width: 7.5rem;
}

body.page-product-list .product-list-table .product-list-check-cell {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-product-list .product-list-table .product-list-check-cell input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

body.page-product-list .product-list-table .product-list-col-unit,
body.page-product-list .product-list-table .product-list-col-status {
    width: 4rem;
}

body.page-product-list .product-list-table .product-list-col-rank {
    width: 4.75rem;
    white-space: nowrap;
    text-align: right;
}

body.page-product-list .product-list-table .product-list-col-stock {
    width: 5.5rem;
    white-space: nowrap;
    text-align: right;
}

body.page-product-list .product-list-table .product-list-rank-link,
body.page-product-list .product-list-table .product-list-stock-link {
    color: inherit;
    text-decoration: none;
}

body.page-product-list .product-list-table .product-list-rank-link:hover,
body.page-product-list .product-list-table .product-list-stock-link:hover {
    color: var(--accent);
    text-decoration: underline;
}

body.page-product-list .product-list-table .product-list-stock--empty {
    color: var(--danger, #b91c1c);
}

body.page-product-list .product-list-table .order-list-col-total,
body.page-product-list.page-orders-list--compact-header .container--orders .product-list-table .order-list-col-total {
    width: 6.5rem;
    white-space: nowrap;
    text-align: right;
}

body.page-product-list .product-list-table .order-list-col-customer,
body.page-product-list .product-list-table .product-list-col-spec {
    width: auto;
}

body.page-product-list .product-list-table .link-order-id,
body.page-product-list .product-list-table .list-sort-link {
    color: var(--text);
    font-weight: 400 !important;
}

body.page-product-list .product-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
}

body.page-product-list .product-list-table .list-sort-link:hover {
    color: var(--text);
}

body.page-product-list .product-list-table .order-cell-clip,
body.page-product-list .product-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-product-list .order-filter-hint {
    margin: 0.4rem 0 0;
    font-size: 0.875rem;
}

/* 商品一覧: main 内の文字は 0.875rem（サイトヘッダーは main 外のため対象外） */
body.page-product-list > main.container--orders-fit {
    font-size: 0.875rem;
}

body.page-product-list > main.container--orders-fit :is(
    .flash,
    .flash *,
    .order-list-screen,
    .order-list-screen *,
    .payment-upload-modal,
    .payment-upload-modal *,
    .btn--compact
) {
    font-size: 0.875rem;
}

/* 商品一覧: ランク別価格と同型の検索・ツールバー */
body.page-product-list .order-list-screen,
body.page-product-list.page-orders-list--compact-header .order-list-screen,
body.page-product-list .order-list-data,
body.page-product-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-product-list .order-list-data {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-product-list .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-product-list .order-list-pager-tools {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

body.page-product-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-product-list .order-filter-panel--compact .order-filter-grid {
    grid-template-columns: 1fr;
}

body.page-product-list .order-filter-panel--compact .order-filter-grid label,
body.page-product-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-product-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-product-list .order-filter-panel--compact .order-filter-grid input {
    font-size: 0.875rem;
}

body.page-product-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    min-width: 0;
    width: 100%;
}

body.page-product-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 4.5rem;
    white-space: nowrap;
}

body.page-product-list .order-filter-field--kw-actions {
    max-width: none;
    width: 100%;
}

body.page-product-list .order-filter-kw-actions {
    display: flex;
    flex: 0 0 50%;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
    width: 50%;
    max-width: 50%;
    box-sizing: border-box;
}

body.page-product-list .order-filter-kw-actions .order-filter-input--kw {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
}

body.page-product-list .order-filter-kw-actions .btn {
    flex: 0 0 auto;
    align-self: stretch;
    color: var(--text);
    min-height: 1.65rem;
    padding: 0 0.55rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 500;
}

body.page-product-list .order-filter-kw-actions .btn:hover {
    color: var(--text);
}

body.page-product-list.page-orders-list--compact-header .order-filter-panel--compact {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

body.page-product-list .order-filter-panel--compact .order-filter-grid input.order-filter-input {
    min-height: 1.65rem;
    padding: 0.2rem 0.45rem;
    box-sizing: border-box;
}

body.page-product-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-product-list.page-orders-list--compact-header .order-list-page-size,
body.page-product-list.page-orders-list--compact-header .order-list-page-size select,
body.page-product-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-product-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-product-list.page-orders-list--compact-header .order-list-pager-status,
body.page-product-list .empty-state,
body.page-product-list .empty-state strong {
    font-size: 0.875rem;
}

/* ランク別価格一覧: 商品一覧と同密度・文字サイズ */
body.page-rank-price-list .rank-price-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-rank-price-list.page-orders-list--compact-header .container--orders-fit .rank-price-list-table.data-table th,
body.page-rank-price-list.page-orders-list--compact-header .container--orders-fit .rank-price-list-table.data-table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-rank-price-list.page-orders-list--compact-header .order-list-screen .rank-price-list-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .list-sort-link,
    .order-cell-clip,
    .btn
) {
    font-size: 0.875rem;
}

body.page-rank-price-list .rank-price-list-table .order-list-col-no,
body.page-rank-price-list.page-orders-list--compact-header .container--orders .rank-price-list-table .order-list-col-no {
    width: 7.5rem;
}

body.page-rank-price-list .rank-price-list-table .rank-price-list-check-cell {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-rank-price-list .rank-price-list-table .rank-price-list-check-cell input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

body.page-rank-price-list .rank-price-list-table .rank-price-list-col-maker {
    width: 5.5rem;
}

body.page-rank-price-list .rank-price-list-table .order-list-col-total,
body.page-rank-price-list.page-orders-list--compact-header .container--orders .rank-price-list-table .order-list-col-total {
    width: 5.5rem;
    white-space: nowrap;
    text-align: right;
}

body.page-rank-price-list .rank-price-list-table .rank-price-list-col-rank {
    width: 4.75rem;
    white-space: nowrap;
    text-align: right;
}

body.page-rank-price-list .rank-price-list-table .rank-price-list-col-spec {
    width: 7rem;
}

body.page-rank-price-list .rank-price-list-table .rank-price-list-col-note {
    width: 6rem;
}

body.page-rank-price-list .rank-price-list-table .order-list-col-customer {
    width: 28%;
    min-width: 12rem;
}

body.page-rank-price-list .rank-price-list-table .link-order-id,
body.page-rank-price-list .rank-price-list-table .list-sort-link {
    color: var(--text);
    font-weight: 400;
}

body.page-rank-price-list .rank-price-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
}

body.page-rank-price-list .rank-price-list-table .list-sort-link:hover {
    color: var(--text);
}

body.page-rank-price-list .rank-price-list-table .order-cell-clip,
body.page-rank-price-list .rank-price-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-rank-price-list .order-filter-hint {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
}

/* ランク別価格一覧: 仕入先一覧と同型（キーワード位置・該当件数〜ページ送り） */
body.page-rank-price-list .order-list-screen,
body.page-rank-price-list.page-orders-list--compact-header .order-list-screen,
body.page-rank-price-list .order-list-data,
body.page-rank-price-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-rank-price-list .order-list-data {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-rank-price-list .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-rank-price-list .order-list-pager-tools {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

body.page-rank-price-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-rank-price-list .order-filter-panel--compact .order-filter-grid {
    grid-template-columns: 1fr;
}

body.page-rank-price-list .order-filter-panel--compact .order-filter-grid label,
body.page-rank-price-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-rank-price-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-rank-price-list .order-filter-panel--compact .order-filter-grid input {
    font-size: 0.875rem;
}

body.page-rank-price-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    min-width: 0;
    width: 100%;
}

body.page-rank-price-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 4.5rem;
    white-space: nowrap;
}

body.page-rank-price-list .order-filter-field--kw-actions {
    max-width: none;
    width: 100%;
}

body.page-rank-price-list .order-filter-kw-actions {
    display: flex;
    flex: 0 0 50%;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
    width: 50%;
    max-width: 50%;
    box-sizing: border-box;
}

body.page-rank-price-list .order-filter-kw-actions .order-filter-input--kw {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
}

body.page-rank-price-list .order-filter-kw-actions .btn {
    flex: 0 0 auto;
    align-self: stretch;
    color: var(--text);
    min-height: 1.65rem;
    padding: 0 0.55rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 500;
}

body.page-rank-price-list .order-filter-kw-actions .btn:hover {
    color: var(--text);
}

body.page-rank-price-list.page-orders-list--compact-header .order-filter-panel--compact {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

body.page-rank-price-list .order-filter-panel--compact .order-filter-grid input.order-filter-input {
    min-height: 1.65rem;
    padding: 0.2rem 0.45rem;
    box-sizing: border-box;
}

body.page-rank-price-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-rank-price-list.page-orders-list--compact-header .order-list-page-size,
body.page-rank-price-list.page-orders-list--compact-header .order-list-page-size select,
body.page-rank-price-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-rank-price-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-rank-price-list.page-orders-list--compact-header .order-list-pager-status,
body.page-rank-price-list .empty-state,
body.page-rank-price-list .empty-state strong {
    font-size: 0.875rem;
}

body.page-rank-price-list main > .flash,
body.page-rank-price-list .order-list-screen,
body.page-rank-price-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td
) {
    font-size: 0.875rem;
}

html:has(body.page-rank-price-list) {
    height: auto;
}

body.page-rank-price-list {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-rank-price-list > main.container--orders-fit {
    height: auto;
    min-height: 0;
    overflow: visible;
}

/* 一括計上: プレビュー / 計上漏れタブ */
.posting-batch-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle, #e2e8f0);
    padding-bottom: 0.35rem;
}
.posting-batch-tab {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-size: 0.875rem;
    border-radius: 0.35rem 0.35rem 0 0;
    text-decoration: none;
    color: var(--text-muted, #64748b);
}
.posting-batch-tab--active {
    font-weight: 600;
    color: var(--text, #0f172a);
    background: var(--surface-elevated, #f8fafc);
    border: 1px solid var(--border-subtle, #e2e8f0);
    border-bottom-color: transparent;
    margin-bottom: -1px;
}

.posting-reconcile-subnav {
    display: flex;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
    font-size: 0.875rem;
}
.posting-reconcile-subnav__link {
    color: var(--link, #2563eb);
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    line-height: 1.25;
    box-sizing: border-box;
}
.posting-reconcile-subnav__link:hover {
    text-decoration: none !important;
    border-bottom-color: currentColor;
}
.posting-reconcile-section {
    margin-bottom: 2rem;
}
.posting-reconcile-section__title {
    margin: 0 0 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
}
.posting-reconcile-section--over {
    padding-top: 0.5rem;
    border-top: 1px solid var(--border-subtle, #e2e8f0);
}

/* 一括計上: ヘッダー以外のページ内文字を 0.875rem に統一 */
body.page-posting-batch main > .flash,
body.page-posting-batch main > .callout,
body.page-posting-batch .order-list-screen {
    font-size: 0.875rem;
}

body.page-posting-batch .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    .btn--secondary,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    th,
    td,
    h2,
    .order-list-meta,
    .empty-state,
    .empty-state strong,
    .callout,
    .callout p,
    .posting-batch-tab,
    .posting-batch-run-bar,
    .posting-batch-run-bar__opt,
    .posting-batch-run-bar__hint,
    .posting-reconcile-subnav,
    .posting-reconcile-subnav__link,
    .posting-reconcile-section__title,
    .posting-batch-table__caption
) {
    font-size: 0.875rem;
}

body.page-posting-batch.page-orders-list--compact-header main > .flash,
body.page-posting-batch.page-orders-list--compact-header main > .callout,
body.page-posting-batch.page-orders-list--compact-header main > .callout p,
body.page-posting-batch.page-orders-list--compact-header main > .callout strong,
body.page-posting-batch.page-orders-list--compact-header main > .callout a,
body.page-posting-batch.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid label,
body.page-posting-batch.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-posting-batch.page-orders-list--compact-header .order-list-screen .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-posting-batch.page-orders-list--compact-header .order-list-screen .order-list-toolbar .order-list-meta,
body.page-posting-batch.page-orders-list--compact-header .order-list-screen .btn--compact,
body.page-posting-batch.page-orders-list--compact-header .order-list-screen .btn--ghost,
body.page-posting-batch.page-orders-list--compact-header .order-list-screen .btn--secondary,
body.page-posting-batch.page-orders-list--compact-header .container--orders-fit .posting-batch-table.data-table th,
body.page-posting-batch.page-orders-list--compact-header .container--orders-fit .posting-batch-table.data-table td,
body.page-posting-batch.page-orders-list--compact-header .container--orders-fit .posting-leak-table.data-table th,
body.page-posting-batch.page-orders-list--compact-header .container--orders-fit .posting-leak-table.data-table td {
    font-size: 0.875rem;
}

/* 一括計上: 件数が多いと表が画面内に収まらないため、他の一覧と同じくページ全体でスクロール */
html:has(body.page-posting-batch) {
    height: auto;
}

body.page-posting-batch {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-posting-batch > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-posting-batch.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

/* 一括計上: 仕入・売上プレビューを横並び */
body.page-posting-batch .order-list-screen,
body.page-posting-batch.page-orders-list--compact-header .order-list-screen,
body.page-posting-batch .order-list-data,
body.page-posting-batch.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-posting-batch .posting-batch-lead {
    margin: 0 0 0.75rem;
    line-height: 1.45;
}

body.page-posting-batch .posting-batch-tables {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

@media (min-width: 900px) {
    body.page-posting-batch .posting-batch-tables {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }
}

body.page-posting-batch .posting-batch-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-posting-batch.page-orders-list--compact-header .container--orders-fit .posting-batch-table.data-table th,
body.page-posting-batch.page-orders-list--compact-header .container--orders-fit .posting-batch-table.data-table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-posting-batch .posting-batch-table .posting-batch-table__caption {
    text-align: left;
    font-weight: 600;
    background: var(--surface-2, #f3f4f6);
    border-bottom: 1px solid var(--border, #e5e7eb);
}

body.page-posting-batch .posting-batch-table .order-list-col-no {
    width: 7rem;
}

body.page-posting-batch .posting-batch-table .order-list-col-total {
    width: 5.5rem;
    white-space: nowrap;
    text-align: right;
}

body.page-posting-batch .posting-batch-table .link-order-id {
    color: var(--text);
    font-weight: 400;
}

body.page-posting-batch .posting-batch-table .order-cell-clip,
body.page-posting-batch .posting-batch-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-posting-batch .posting-leak-table {
    table-layout: fixed;
    width: 100%;
}

body.page-posting-batch .posting-leak-table th,
body.page-posting-batch .posting-leak-table td {
    overflow: hidden;
    vertical-align: top;
}

body.page-posting-batch .posting-leak-table .posting-leak-col-customer {
    width: 18%;
    min-width: 11rem;
    max-width: none;
}

body.page-posting-batch .posting-leak-table .posting-leak-col-customer .order-cell-clip {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-posting-batch .posting-leak-table .posting-leak-col-name {
    width: 26%;
    min-width: 9rem;
    max-width: 20rem;
}

body.page-posting-batch .posting-leak-table .posting-leak-col-name .order-cell-clip {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-posting-batch .posting-batch-run-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.1rem;
    padding: 0.65rem 0.75rem;
    margin: 0;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: var(--surface, #fff);
}

body.page-posting-batch .posting-batch-run-bar__opt {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.875rem;
    white-space: nowrap;
}

body.page-posting-batch .posting-batch-run-bar__hint {
    font-size: 0.875rem;
}

/* 荷主一覧（得意先一覧と同じコンテナ幅・表余白・ソート見出し） */
body.page-consignor-list > main.container--orders-fit {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.45rem 1rem 0.5rem;
    box-sizing: border-box;
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-consignor-list .order-list-screen,
body.page-consignor-list.page-orders-list--compact-header .order-list-screen,
body.page-consignor-list .order-list-data,
body.page-consignor-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
    width: 100%;
    max-width: 100%;
}

body.page-consignor-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
    width: 100%;
    max-width: 100%;
}

body.page-consignor-list .consignor-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-consignor-list.page-orders-list--compact-header .container--orders-fit .consignor-list-table.data-table th,
body.page-consignor-list.page-orders-list--compact-header .container--orders-fit .consignor-list-table.data-table td {
    padding: 0.5rem 0.55rem;
    line-height: 1.45;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-consignor-list.page-orders-list--compact-header .container--orders-fit .consignor-list-table.data-table thead th {
    padding: 0.42rem 0.55rem;
}

body.page-consignor-list.page-orders-list--compact-header .order-list-screen .consignor-list-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .list-sort-link,
    .order-cell-clip
) {
    font-size: 0.875rem;
}

body.page-consignor-list .consignor-list-table .order-list-col-no,
body.page-consignor-list.page-orders-list--compact-header .container--orders .consignor-list-table .order-list-col-no {
    width: 7.5rem;
}

body.page-consignor-list .consignor-list-table .consignor-list-col-zip {
    width: 6.5rem;
    white-space: nowrap;
}

body.page-consignor-list .consignor-list-table .consignor-list-col-phone {
    width: 8rem;
    white-space: nowrap;
}

body.page-consignor-list .consignor-list-table .order-list-col-customer,
body.page-consignor-list .consignor-list-table .consignor-list-col-addr {
    width: auto;
}

body.page-consignor-list .consignor-list-table .link-order-id,
body.page-consignor-list .consignor-list-table .list-sort-link {
    color: var(--text);
    font-weight: 400;
}

body.page-consignor-list .consignor-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

body.page-consignor-list .consignor-list-table .list-sort-link:hover {
    color: var(--text);
}

body.page-consignor-list .consignor-list-table .order-cell-clip,
body.page-consignor-list .consignor-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 一覧共通: 表下・中央の番号ページ送り（表行と重ならないよう縮まず下に配置） */
.list-pager-bottom,
.consignor-list-pager-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    position: relative;
    z-index: 2;
    width: 100%;
    gap: 0.35rem;
    margin: 0.85rem auto 0.35rem;
    padding: 0.45rem 0.5rem;
    text-align: center;
    box-sizing: border-box;
    background: var(--bg, #f8fafc);
}

.list-pager-bottom[hidden],
.consignor-list-pager-bottom[hidden] {
    display: none;
}

.list-pager-bottom__btn,
.consignor-list-pager-bottom__btn {
    min-width: 2rem;
    padding: 0.28rem 0.55rem;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 0.875rem;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

a.list-pager-bottom__btn:hover,
.list-pager-bottom__btn:hover:not(:disabled):not([aria-current="page"]),
.consignor-list-pager-bottom__btn:hover:not(:disabled):not([aria-current="page"]) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.list-pager-bottom__btn:disabled,
.consignor-list-pager-bottom__btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.list-pager-bottom__btn[aria-current="page"],
.consignor-list-pager-bottom__btn[aria-current="page"] {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: var(--text);
    font-weight: 600;
    cursor: default;
}

.list-pager-bottom__ellipsis,
.consignor-list-pager-bottom__ellipsis {
    min-width: 1.5rem;
    text-align: center;
    color: var(--muted, #64748b);
    font-size: 0.875rem;
    user-select: none;
}

/* 納入先一覧: 表を全幅にし列バランスを整える */
body.page-delivery-site-list .order-list-screen,
body.page-delivery-site-list.page-orders-list--compact-header .order-list-screen,
body.page-delivery-site-list .order-list-data,
body.page-delivery-site-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-delivery-site-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-delivery-site-list .delivery-site-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-delivery-site-list.page-orders-list--compact-header .container--orders-fit .delivery-site-list-table.data-table th,
body.page-delivery-site-list.page-orders-list--compact-header .container--orders-fit .delivery-site-list-table.data-table td {
    padding: 0.5rem 0.55rem;
    line-height: 1.45;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-delivery-site-list.page-orders-list--compact-header .container--orders-fit .delivery-site-list-table.data-table thead th {
    padding: 0.42rem 0.55rem;
}

body.page-delivery-site-list.page-orders-list--compact-header .order-list-screen .delivery-site-list-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .order-cell-clip
) {
    font-size: 0.875rem;
}

body.page-delivery-site-list .delivery-site-list-table .order-list-col-no,
body.page-delivery-site-list.page-orders-list--compact-header .container--orders .delivery-site-list-table .order-list-col-no {
    width: 7.5rem;
}

body.page-delivery-site-list .delivery-site-list-table .delivery-site-list-col-phone {
    width: 7.5rem;
    white-space: nowrap;
}

body.page-delivery-site-list .delivery-site-list-table .order-list-col-customer,
body.page-delivery-site-list .delivery-site-list-table .delivery-site-list-col-addr {
    width: auto;
}

body.page-delivery-site-list .delivery-site-list-table .link-order-id,
body.page-delivery-site-list .delivery-site-list-table .list-sort-link {
    color: var(--text);
    font-weight: 400;
}

body.page-delivery-site-list .delivery-site-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
}

body.page-delivery-site-list .delivery-site-list-table .list-sort-link:hover {
    color: var(--text);
}

body.page-delivery-site-list .delivery-site-list-table .order-cell-clip,
body.page-delivery-site-list .delivery-site-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 仕入先一覧 */
body.page-supplier-list .order-list-screen,
body.page-supplier-list.page-orders-list--compact-header .order-list-screen,
body.page-supplier-list .order-list-data,
body.page-supplier-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-supplier-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-supplier-list .supplier-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-supplier-list.page-orders-list--compact-header .container--orders-fit .supplier-list-table.data-table th,
body.page-supplier-list.page-orders-list--compact-header .container--orders-fit .supplier-list-table.data-table td {
    padding: 0.5rem 0.55rem;
    line-height: 1.45;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-supplier-list.page-orders-list--compact-header .container--orders-fit .supplier-list-table.data-table thead th {
    padding: 0.42rem 0.55rem;
}

body.page-supplier-list.page-orders-list--compact-header .order-list-screen .supplier-list-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .order-cell-clip
) {
    font-size: 0.875rem;
}

body.page-supplier-list .supplier-list-table .order-list-col-no,
body.page-supplier-list.page-orders-list--compact-header .container--orders .supplier-list-table .order-list-col-no {
    width: 7.5rem;
}

body.page-supplier-list .supplier-list-table .supplier-list-col-closing {
    width: 5.5rem;
}

body.page-supplier-list .supplier-list-table .supplier-list-col-phone {
    width: 7.5rem;
}

body.page-supplier-list .supplier-list-table .supplier-list-col-status {
    width: 4.5rem;
}

body.page-supplier-list .supplier-list-table .order-list-col-customer,
body.page-supplier-list .supplier-list-table .supplier-list-col-addr {
    width: auto;
}

body.page-supplier-list .supplier-list-table .link-order-id,
body.page-supplier-list .supplier-list-table .list-sort-link {
    color: var(--text);
    font-weight: 400;
}

body.page-supplier-list .supplier-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
}

body.page-supplier-list .supplier-list-table .list-sort-link:hover {
    color: var(--text);
}

body.page-supplier-list .supplier-list-table .order-cell-clip,
body.page-supplier-list .supplier-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 得意先一覧（コンテナ幅・表の横余白は受注一覧 so-list に揃え、行の縦余白はやや広め） */
body.page-customer-list > main.container--orders-fit {
    width: 100%;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.45rem 1rem 0.5rem;
    box-sizing: border-box;
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-customer-list .order-list-screen,
body.page-customer-list.page-orders-list--compact-header .order-list-screen,
body.page-customer-list .order-list-data,
body.page-customer-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
    width: 100%;
    max-width: 100%;
}

body.page-customer-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
    width: 100%;
    max-width: 100%;
}

body.page-customer-list .customer-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-customer-list.page-orders-list--compact-header .container--orders-fit .customer-list-table.data-table th,
body.page-customer-list.page-orders-list--compact-header .container--orders-fit .customer-list-table.data-table td {
    padding: 0.5rem 0.55rem;
    line-height: 1.45;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-customer-list.page-orders-list--compact-header .container--orders-fit .customer-list-table.data-table thead th {
    padding: 0.42rem 0.55rem;
}

body.page-customer-list.page-orders-list--compact-header .order-list-screen .customer-list-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .order-cell-clip
) {
    font-size: 0.875rem;
}

body.page-customer-list .customer-list-table .order-list-col-no,
body.page-customer-list.page-orders-list--compact-header .container--orders .customer-list-table .order-list-col-no {
    width: 7.5rem;
}

body.page-customer-list .customer-list-table .customer-list-col-rank {
    width: 5rem;
}

body.page-customer-list .customer-list-table .customer-list-col-closing {
    width: 5.5rem;
}

body.page-customer-list .customer-list-table .customer-list-col-phone {
    width: 8rem;
    white-space: nowrap;
}

body.page-customer-list .customer-list-table .customer-list-col-status {
    width: 4.5rem;
}

body.page-customer-list .customer-list-table .order-list-col-customer,
body.page-customer-list .customer-list-table .customer-list-col-addr {
    width: auto;
}

body.page-customer-list .customer-list-table .link-order-id,
body.page-customer-list .customer-list-table .list-sort-link {
    color: var(--text);
    font-weight: 400;
}

body.page-customer-list .customer-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

body.page-customer-list .customer-list-table .list-sort-link:hover {
    color: var(--text);
}

body.page-customer-list .customer-list-table .order-cell-clip,
body.page-customer-list .customer-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 仕入明細: 表を全幅にし、納入先・仕入先に余白を回して明細計・注文書が左に寄りすぎないようにする */
body.page-gr-list .gr-list-table {
    table-layout: auto;
    width: 100%;
    max-width: 100%;
}

body.page-gr-list .gr-list-table .link-order-id,
body.page-gr-list .gr-list-table .list-sort-link {
    color: var(--text);
    font-weight: 400 !important;
}

body.page-gr-list .gr-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
}

body.page-gr-list .gr-list-table .link-order-id:hover,
body.page-gr-list .gr-list-table .list-sort-link:hover {
    color: var(--text);
}

body.page-gr-list .gr-list-table .order-list-col-no,
body.page-gr-list.page-orders-list--compact-header .container--orders .gr-list-table .order-list-col-no,
body.page-gr-list .gr-list-table .order-list-col-po,
body.page-gr-list.page-orders-list--compact-header .container--orders .gr-list-table .order-list-col-po {
    width: 6.75rem;
}

body.page-gr-list .gr-list-table .order-list-col-date,
body.page-gr-list.page-orders-list--compact-header .container--orders .gr-list-table .order-list-col-date {
    width: 7.25rem;
    white-space: nowrap;
}

body.page-gr-list .gr-list-table .order-list-col-delivery,
body.page-gr-list .gr-list-table .order-list-col-customer {
    width: auto;
}

body.page-gr-list .gr-list-table .order-list-col-total,
body.page-gr-list.page-orders-list--compact-header .container--orders .gr-list-table .order-list-col-total {
    width: 6.75rem;
    white-space: nowrap;
    text-align: right;
}

body.page-gr-list .gr-list-table .order-list-col-doc,
body.page-gr-list.page-orders-list--compact-header .container--orders .gr-list-table .order-list-col-doc {
    width: 4.75rem;
}

body.page-gr-list .gr-list-table td.order-list-col-delivery,
body.page-gr-list .gr-list-table td.order-list-col-customer {
    overflow: hidden;
    vertical-align: middle;
}

body.page-gr-list .gr-list-table .order-cell-clip,
body.page-gr-list .gr-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 入出庫履歴と同型の行密度 */
body.page-gr-list.page-orders-list--compact-header .container--orders-fit .gr-list-table.data-table th,
body.page-gr-list.page-orders-list--compact-header .container--orders-fit .gr-list-table.data-table td {
    padding: 0.4rem 0.95rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-gr-list.page-orders-list--compact-header .container--orders-fit .gr-list-table.data-table thead th {
    padding: 0.4rem 0.95rem;
}

body.page-gr-list.page-orders-list--compact-header .container--orders-fit .gr-list-table.data-table .gr-list-check-cell {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

/* 入出庫履歴と同型: フィルタを1行コンパクトに */
body.page-gr-list .order-filter-panel--compact .order-filter-grid--gr-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
}

body.page-gr-list.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--gr-row .order-filter-field {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
}

body.page-gr-list.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--gr-row .order-filter-field__lbl {
    flex: 0 0 auto;
    white-space: nowrap;
}

body.page-gr-list.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--gr-row input.order-filter-input,
body.page-gr-list.page-orders-list--compact-header .order-filter-panel--compact .order-filter-grid--gr-row .order-filter-date-unified__text {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 1.65rem;
    padding: 0.2rem 0.35rem;
    box-sizing: border-box;
    font-size: 0.875rem;
}

body.page-gr-list .order-filter-grid--gr-row .order-filter-field--date-range {
    flex: 0 1 auto;
}

body.page-gr-list .order-filter-grid--gr-row .order-filter-field--customer .order-filter-input--cust,
body.page-gr-list .order-filter-grid--gr-row .order-filter-field--kw .order-filter-input--kw {
    width: 9rem;
    max-width: 9rem;
}

body.page-gr-list .order-filter-grid--gr-row .order-filter-field--id .order-filter-input--id,
body.page-gr-list .order-filter-grid--gr-row .order-filter-field--product .order-filter-input--prod {
    width: 7.5rem;
    max-width: 7.5rem;
}

body.page-gr-list .order-filter-grid--gr-row .order-filter-field--actions {
    flex: 0 0 auto;
    margin-left: 0.15rem;
}

body.page-gr-list .order-filter-grid--gr-row .order-filter-kw-actions {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
}

body.page-gr-list .order-filter-grid--gr-row .order-filter-kw-actions .btn {
    flex: 0 0 auto;
    color: var(--text);
    min-height: 1.65rem;
    padding: 0 0.55rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 500;
}

body.page-gr-list.page-orders-list--compact-header .order-filter-panel--compact {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

body.page-gr-list .list-pager-bottom {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 0.55rem;
}

body.page-gr-list .order-summary-footer--compact {
    margin-top: 0.75rem;
}

/* 仕入明細: ヘッダー以外のページ内文字を 0.875rem に統一（compact-header の縮小ルールも上書き） */
body.page-gr-list main,
body.page-gr-list main :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    summary,
    h2,
    input:not([type="checkbox"]),
    th,
    td,
    .link-order-id,
    .order-cell-clip,
    .order-list-doc-open-btn,
    .order-list-doc-placeholder,
    .order-list-meta,
    .order-list-page-size,
    .order-list-pager-status,
    .order-summary-footer__label,
    .order-summary-footer__value,
    .order-filter-field__lbl,
    .order-filter-date-range__sep,
    .order-filter-hint,
    .empty-state,
    .flash
) {
    font-size: 0.875rem;
}

body.page-gr-list.page-orders-list--compact-header .gr-list-table .link-order-id,
body.page-gr-list.page-orders-list--compact-header .gr-list-table .order-list-doc-open-btn,
body.page-gr-list.page-orders-list--compact-header .gr-list-table .order-list-doc-placeholder,
body.page-gr-list.page-orders-list--compact-header .gr-list-table .order-cell-clip,
body.page-gr-list.page-orders-list--compact-header .gr-list-table .badge {
    font-size: 0.875rem;
}

body.page-gr-list .payment-upload-modal__head h2,
body.page-gr-list .payment-upload-modal__close,
body.page-gr-list .payment-upload-modal__body,
body.page-gr-list .payment-upload-modal__body :is(p, a, label, button, input, .btn, .site-header__quick-btn) {
    font-size: 0.875rem;
}

/* 発注一覧: 仕入明細と同型（表バランス・0.875rem・チェック列） */
body.page-po-list main > .flash,
body.page-po-list .order-list-screen {
    font-size: 0.875rem;
}

body.page-po-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    summary,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-po-list .order-filter-panel--compact .order-filter-grid label,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-po-list .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-po-list .order-filter-panel--compact .order-filter-grid select.order-filter-input,
body.page-po-list.page-orders-list--compact-header .order-filter-date-unified__text,
body.page-po-list .order-filter-date-range__sep,
body.page-po-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-po-list.page-orders-list--compact-header .order-list-page-size,
body.page-po-list.page-orders-list--compact-header .order-list-page-size select,
body.page-po-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-po-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-po-list.page-orders-list--compact-header .order-list-pager-status,
body.page-po-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__label,
body.page-po-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__value,
body.page-po-list .empty-state,
body.page-po-list .empty-state strong {
    font-size: 0.875rem;
}

body.page-po-list .order-filter-panel--compact .order-filter-grid--cols2 {
    grid-template-columns: 1fr;
    gap: 0.4rem 1.25rem;
    align-items: center;
}

@media (min-width: 720px) {
    body.page-po-list .order-filter-panel--compact .order-filter-grid--cols2 {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }
}

body.page-po-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    min-width: 0;
    width: 100%;
}

body.page-po-list .order-summary-footer--compact .order-summary-footer__value {
    font-weight: 400;
}

body.page-po-list .po-list-table th:first-child,
body.page-po-list .po-list-table td:first-child,
body.page-po-list .po-list-table .po-list-check-cell {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-po-list .po-list-table input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

html:has(body.page-po-list) {
    height: auto;
}

body.page-po-list {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-po-list > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-po-list .order-list-screen,
body.page-po-list.page-orders-list--compact-header .order-list-screen,
body.page-po-list .order-list-data,
body.page-po-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-po-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-po-list .po-list-table .link-order-id,
body.page-po-list .po-list-table .list-sort-link {
    color: var(--text);
    font-weight: 400 !important;
}

body.page-po-list .po-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
}

body.page-po-list .po-list-table .link-order-id:hover,
body.page-po-list .po-list-table .list-sort-link:hover {
    color: var(--text);
}

body.page-po-list .po-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-po-list .po-list-table .order-list-col-no,
body.page-po-list.page-orders-list--compact-header .container--orders .po-list-table .order-list-col-no {
    width: 5.75rem;
}

body.page-po-list .po-list-table .order-list-col-date,
body.page-po-list.page-orders-list--compact-header .container--orders .po-list-table .order-list-col-date,
body.page-po-list .po-list-table .order-list-col-preferred,
body.page-po-list.page-orders-list--compact-header .container--orders .po-list-table .order-list-col-preferred {
    width: 5.25rem;
    white-space: nowrap;
}

body.page-po-list .po-list-table .order-list-col-status,
body.page-po-list.page-orders-list--compact-header .container--orders .po-list-table .order-list-col-status {
    width: 5rem;
}

body.page-po-list .po-list-table .order-list-col-total,
body.page-po-list.page-orders-list--compact-header .container--orders .po-list-table .order-list-col-total {
    width: 6.25rem;
    white-space: nowrap;
    text-align: right;
}

body.page-po-list .po-list-table .order-list-col-doc,
body.page-po-list.page-orders-list--compact-header .container--orders .po-list-table .order-list-col-doc {
    width: 4.75rem;
}

body.page-po-list .po-list-table td.order-list-col-delivery,
body.page-po-list .po-list-table td.order-list-col-customer,
body.page-po-list .po-list-table td.order-list-col-status {
    overflow: hidden;
    vertical-align: middle;
}

body.page-po-list .po-list-table .order-cell-clip,
body.page-po-list .po-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-po-list.page-orders-list--compact-header .container--orders-fit .po-list-table.data-table th,
body.page-po-list.page-orders-list--compact-header .container--orders-fit .po-list-table.data-table td {
    padding: 0.28rem 0.55rem;
    line-height: 1.25;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-po-list.page-orders-list--compact-header .container--orders-fit .po-list-table.data-table thead th {
    padding: 0.32rem 0.55rem;
}

body.page-po-list.page-orders-list--compact-header .container--orders-fit .po-list-table.data-table .po-list-check-cell {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-po-list main,
body.page-po-list main :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    summary,
    h2,
    input:not([type="checkbox"]),
    th,
    td,
    .link-order-id,
    .order-cell-clip,
    .order-list-doc-open-btn,
    .order-list-doc-placeholder,
    .order-list-meta,
    .order-list-page-size,
    .order-list-pager-status,
    .order-summary-footer__label,
    .order-summary-footer__value,
    .order-filter-field__lbl,
    .order-filter-date-range__sep,
    .order-filter-hint,
    .empty-state,
    .flash
) {
    font-size: 0.875rem;
}

body.page-po-list.page-orders-list--compact-header .po-list-table .link-order-id,
body.page-po-list.page-orders-list--compact-header .po-list-table .list-sort-link,
body.page-po-list.page-orders-list--compact-header .po-list-table .order-list-doc-open-btn,
body.page-po-list.page-orders-list--compact-header .po-list-table .order-list-doc-placeholder,
body.page-po-list.page-orders-list--compact-header .po-list-table .order-cell-clip,
body.page-po-list.page-orders-list--compact-header .po-list-table .badge {
    font-size: 0.875rem;
}

body.page-po-list .payment-upload-modal__head h2,
body.page-po-list .payment-upload-modal__close,
body.page-po-list .payment-upload-modal__body,
body.page-po-list .payment-upload-modal__body :is(p, a, label, button, input, .btn, .site-header__quick-btn) {
    font-size: 0.875rem;
}

/* 受注一覧: 発注・仕入明細と同型（表バランス・0.875rem・チェック列） */
body.page-so-list main > .flash,
body.page-so-list .order-list-screen {
    font-size: 0.875rem;
}

body.page-so-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    summary,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-so-list .order-filter-panel--compact .order-filter-grid label,
body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-so-list .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-so-list.page-orders-list--compact-header .order-filter-date-unified__text,
body.page-so-list .order-filter-date-range__sep,
body.page-so-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-so-list.page-orders-list--compact-header .order-list-page-size,
body.page-so-list.page-orders-list--compact-header .order-list-page-size select,
body.page-so-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-so-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-so-list.page-orders-list--compact-header .order-list-pager-status,
body.page-so-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__label,
body.page-so-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__value,
body.page-so-list .empty-state,
body.page-so-list .empty-state strong {
    font-size: 0.875rem;
}

body.page-so-list .order-filter-panel--compact .order-filter-grid--cols2 {
    grid-template-columns: 1fr;
    gap: 0.4rem 1.25rem;
    align-items: center;
}

@media (min-width: 720px) {
    body.page-so-list .order-filter-panel--compact .order-filter-grid--cols2 {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }
}

body.page-so-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    min-width: 0;
    width: 100%;
}

body.page-so-list .order-summary-footer--compact .order-summary-footer__value {
    font-weight: 400;
}

body.page-so-list .so-list-table th.order-list-col-doc {
    font-weight: 400;
    color: var(--estimate-fg);
    text-align: center;
}

body.page-so-list .so-list-table .order-list-doc-open-btn,
body.page-so-list .so-list-table .order-list-doc-placeholder {
    color: var(--estimate-fg);
    font-weight: 400;
}

body.page-so-list .so-list-table td.order-list-doc-cell.order-list-col-doc {
    text-align: center;
}

body.page-so-list .order-summary-footer--so-list-grand-total {
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: baseline;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

body.page-so-list.page-orders-list--compact-header .order-summary-footer--so-list-grand-total {
    padding: 0.52rem 0.55rem;
}

body.page-so-list .order-summary-footer--so-list-grand-total .order-summary-footer__box {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    text-align: right;
}

body.page-so-list .order-summary-footer--so-list-grand-total .order-summary-footer__label {
    display: inline;
    margin-bottom: 0;
    font-size: 0.875rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    color: var(--estimate-fg);
}

body.page-so-list .order-summary-footer--so-list-grand-total .order-summary-footer__value {
    font-size: 0.875rem;
    color: var(--estimate-fg);
}

body.page-so-list .so-list-table th:first-child,
body.page-so-list .so-list-table td:first-child,
body.page-so-list .so-list-table .so-list-check-cell {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-so-list .so-list-table input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

html:has(body.page-so-list) {
    height: auto;
}

body.page-so-list {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-so-list > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-so-list .order-list-screen,
body.page-so-list.page-orders-list--compact-header .order-list-screen,
body.page-so-list .order-list-data,
body.page-so-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-so-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-so-list .so-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-so-list .so-list-table .order-list-col-no,
body.page-so-list.page-orders-list--compact-header .container--orders .so-list-table .order-list-col-no {
    width: 4.85rem;
    min-width: 4.85rem;
    max-width: 4.85rem;
    padding-right: 0.2rem;
}

body.page-so-list.page-orders-list--compact-header .container--orders-fit .so-list-table .order-list-col-no {
    width: 4.65rem;
    min-width: 4.65rem;
    max-width: 4.65rem;
}

body.page-so-list .so-list-table td.order-list-col-no {
    overflow: visible;
}

body.page-so-list .so-list-table .order-list-col-no-inner {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

body.page-so-list .so-list-table .link-order-id {
    font-variant-numeric: tabular-nums;
}

body.page-so-list .so-list-table .order-list-col-date,
body.page-so-list.page-orders-list--compact-header .container--orders .so-list-table .order-list-col-date {
    width: 8rem;
    min-width: 8rem;
    max-width: 8rem;
    white-space: nowrap;
    padding-left: 0.2rem;
    padding-right: 0.35rem;
}

body.page-so-list .so-list-table .order-list-col-customer,
body.page-so-list.page-orders-list--compact-header .container--orders .so-list-table .order-list-col-customer {
    width: 12rem;
    min-width: 12rem;
    max-width: 12rem;
    padding-left: 0.55rem;
    padding-right: 0.35rem;
}

body.page-so-list .so-list-table .order-list-col-delivery,
body.page-so-list.page-orders-list--compact-header .container--orders .so-list-table .order-list-col-delivery {
    padding-left: 0.55rem;
}

body.page-so-list .so-list-table .order-list-col-assigned,
body.page-so-list.page-orders-list--compact-header .container--orders .so-list-table .order-list-col-assigned {
    width: 7.5rem;
    min-width: 7.5rem;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.3;
}

body.page-so-list .so-list-table .order-list-col-total,
body.page-so-list.page-orders-list--compact-header .container--orders .so-list-table .order-list-col-total {
    width: 6.75rem;
    white-space: nowrap;
    text-align: right;
}

body.page-so-list .so-list-table .order-list-col-doc,
body.page-so-list.page-orders-list--compact-header .container--orders .so-list-table .order-list-col-doc {
    width: 4.75rem;
}

body.page-so-list .so-list-table td.order-list-col-delivery,
body.page-so-list .so-list-table td.order-list-col-customer {
    overflow: hidden;
    vertical-align: middle;
}

body.page-so-list .so-list-table td.order-list-col-assigned {
    overflow: visible;
    vertical-align: middle;
}

body.page-so-list .so-list-table .order-cell-clip,
body.page-so-list .so-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-so-list.page-orders-list--compact-header .container--orders-fit .so-list-table.data-table th,
body.page-so-list.page-orders-list--compact-header .container--orders-fit .so-list-table.data-table td {
    padding: 0.28rem 0.55rem;
    line-height: 1.25;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-so-list.page-orders-list--compact-header .container--orders-fit .so-list-table.data-table thead th {
    padding: 0.32rem 0.55rem;
}

body.page-so-list.page-orders-list--compact-header .container--orders-fit .so-list-table.data-table .so-list-check-cell {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-so-list main,
body.page-so-list main :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    summary,
    h2,
    input:not([type="checkbox"]),
    th,
    td,
    .link-order-id,
    .order-cell-clip,
    .order-list-doc-open-btn,
    .order-list-doc-placeholder,
    .order-list-meta,
    .order-list-page-size,
    .order-list-pager-status,
    .order-summary-footer__label,
    .order-summary-footer__value,
    .order-filter-field__lbl,
    .order-filter-date-range__sep,
    .order-filter-hint,
    .empty-state,
    .flash
) {
    font-size: 0.875rem;
}

body.page-so-list.page-orders-list--compact-header .so-list-table .link-order-id,
body.page-so-list.page-orders-list--compact-header .so-list-table .list-sort-link,
body.page-so-list.page-orders-list--compact-header .so-list-table .order-list-doc-open-btn,
body.page-so-list.page-orders-list--compact-header .so-list-table .order-list-doc-placeholder,
body.page-so-list.page-orders-list--compact-header .so-list-table .order-cell-clip,
body.page-so-list.page-orders-list--compact-header .so-list-table .badge {
    font-size: 0.875rem;
}

body.page-so-list .payment-upload-modal__head h2,
body.page-so-list .payment-upload-modal__close,
body.page-so-list .payment-upload-modal__body,
body.page-so-list .payment-upload-modal__body :is(p, a, label, button, input, .btn, .site-header__quick-btn) {
    font-size: 0.875rem;
}

/* 売上一覧: 発注・受注一覧と同型（表バランス・0.875rem・チェック列） */
body.page-sales-list main > .flash,
body.page-sales-list .order-list-screen {
    font-size: 0.875rem;
}

body.page-sales-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    summary,
    input:not([type="checkbox"]),
    th,
    td
),
body.page-sales-list .order-filter-panel--compact .order-filter-grid label,
body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field,
body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl,
body.page-sales-list .order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-sales-list.page-orders-list--compact-header .order-filter-date-unified__text,
body.page-sales-list .order-filter-date-range__sep,
body.page-sales-list.page-orders-list--compact-header .order-list-toolbar .order-list-meta,
body.page-sales-list.page-orders-list--compact-header .order-list-page-size,
body.page-sales-list.page-orders-list--compact-header .order-list-page-size select,
body.page-sales-list.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-sales-list.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-sales-list.page-orders-list--compact-header .order-list-pager-status,
body.page-sales-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__label,
body.page-sales-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__value,
body.page-sales-list .empty-state,
body.page-sales-list .empty-state strong {
    font-size: 0.875rem;
}

body.page-sales-list .order-filter-panel--compact .order-filter-grid--cols2 {
    grid-template-columns: 1fr;
    gap: 0.4rem 1.25rem;
    align-items: center;
}

@media (min-width: 720px) {
    body.page-sales-list .order-filter-panel--compact .order-filter-grid--cols2 {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }
}

body.page-sales-list .order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    min-width: 0;
    width: 100%;
}

body.page-sales-list .order-summary-footer--compact .order-summary-footer__value {
    font-weight: 400;
}

body.page-sales-list .order-summary-footer--compact {
    flex-wrap: nowrap;
    justify-content: flex-end;
    align-items: baseline;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

body.page-sales-list.page-orders-list--compact-header .order-summary-footer--compact {
    padding: 0.52rem 0.55rem;
}

body.page-sales-list .order-summary-footer--compact .order-summary-footer__box {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
    text-align: right;
}

body.page-sales-list .order-summary-footer--compact .order-summary-footer__label {
    display: inline;
    margin-bottom: 0;
    font-size: 0.875rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

body.page-sales-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__label {
    font-size: 0.875rem;
}

body.page-sales-list .order-summary-footer--compact .order-summary-footer__value {
    font-size: 0.875rem;
}

body.page-sales-list.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__value {
    font-size: 0.875rem;
}

body.page-sales-list .sales-list-table th:first-child,
body.page-sales-list .sales-list-table td:first-child,
body.page-sales-list .sales-list-table .sales-list-check-cell {
    width: 2.75rem;
    text-align: center;
    vertical-align: middle;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-sales-list .sales-list-table input[type="checkbox"] {
    display: block;
    width: 1rem;
    height: 1rem;
    margin: 0 auto;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--accent);
}

html:has(body.page-sales-list) {
    height: auto;
}

body.page-sales-list {
    height: auto;
    min-height: 100%;
    overflow: visible;
}

body.page-sales-list > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-sales-list .order-list-screen,
body.page-sales-list.page-orders-list--compact-header .order-list-screen,
body.page-sales-list .order-list-data,
body.page-sales-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-sales-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-sales-list .sales-list-table .link-order-id,
body.page-sales-list .sales-list-table .list-sort-link {
    color: var(--text);
    font-weight: 400 !important;
}

body.page-sales-list .sales-list-table .list-sort-link {
    display: inline;
    cursor: pointer;
}

body.page-sales-list .sales-list-table .link-order-id:hover,
body.page-sales-list .sales-list-table .list-sort-link:hover {
    color: var(--text);
}

body.page-sales-list .sales-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-sales-list .sales-list-table .order-list-col-no,
body.page-sales-list.page-orders-list--compact-header .container--orders .sales-list-table .order-list-col-no {
    width: 4.85rem;
    min-width: 4.85rem;
    max-width: 4.85rem;
    padding-right: 0.2rem;
}

body.page-sales-list.page-orders-list--compact-header .container--orders-fit .sales-list-table .order-list-col-no {
    width: 4.65rem;
    min-width: 4.65rem;
    max-width: 4.65rem;
}

body.page-sales-list .sales-list-table td.order-list-col-no {
    overflow: visible;
}

body.page-sales-list .sales-list-table .order-list-col-no-inner {
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

body.page-sales-list .sales-list-table .link-order-id {
    font-variant-numeric: tabular-nums;
}

body.page-sales-list .sales-list-table .order-list-col-order-no,
body.page-sales-list.page-orders-list--compact-header .container--orders .sales-list-table .order-list-col-order-no {
    width: 4.85rem;
    min-width: 4.85rem;
    max-width: 4.85rem;
    padding-right: 0.2rem;
}

body.page-sales-list.page-orders-list--compact-header .container--orders-fit .sales-list-table .order-list-col-order-no {
    width: 4.65rem;
    min-width: 4.65rem;
    max-width: 4.65rem;
}

body.page-sales-list .sales-list-table td.order-list-col-order-no {
    overflow: visible;
}

body.page-sales-list .sales-list-table .order-list-col-date,
body.page-sales-list.page-orders-list--compact-header .container--orders .sales-list-table .order-list-col-date {
    width: 8rem;
    min-width: 8rem;
    max-width: 8rem;
    white-space: nowrap;
    padding-left: 0.2rem;
    padding-right: 0.35rem;
}

body.page-sales-list .sales-list-table .order-list-col-customer,
body.page-sales-list.page-orders-list--compact-header .container--orders .sales-list-table .order-list-col-customer {
    width: 12rem;
    min-width: 12rem;
    max-width: 12rem;
    padding-left: 0.55rem;
    padding-right: 0.35rem;
}

body.page-sales-list .sales-list-table .order-list-col-delivery,
body.page-sales-list.page-orders-list--compact-header .container--orders .sales-list-table .order-list-col-delivery {
    padding-left: 0.55rem;
}

body.page-sales-list .sales-list-table .order-list-col-assigned,
body.page-sales-list.page-orders-list--compact-header .container--orders .sales-list-table .order-list-col-assigned {
    width: 7.5rem;
    min-width: 7.5rem;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.3;
}

body.page-sales-list .sales-list-table .order-list-col-total,
body.page-sales-list.page-orders-list--compact-header .container--orders .sales-list-table .order-list-col-total {
    width: 6.75rem;
    white-space: nowrap;
    text-align: right;
}

body.page-sales-list .sales-list-table .order-list-col-doc,
body.page-sales-list.page-orders-list--compact-header .container--orders .sales-list-table .order-list-col-doc {
    width: 4.75rem;
}

body.page-sales-list .sales-list-table td.order-list-col-delivery,
body.page-sales-list .sales-list-table td.order-list-col-customer {
    overflow: hidden;
    vertical-align: middle;
}

body.page-sales-list .sales-list-table td.order-list-col-assigned {
    overflow: visible;
    vertical-align: middle;
}

body.page-sales-list .sales-list-table .order-cell-clip,
body.page-sales-list .sales-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-sales-list.page-orders-list--compact-header .container--orders-fit .sales-list-table.data-table th,
body.page-sales-list.page-orders-list--compact-header .container--orders-fit .sales-list-table.data-table td {
    padding: 0.28rem 0.55rem;
    line-height: 1.25;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-sales-list.page-orders-list--compact-header .container--orders-fit .sales-list-table.data-table thead th {
    padding: 0.32rem 0.55rem;
}

body.page-sales-list.page-orders-list--compact-header .container--orders-fit .sales-list-table.data-table .sales-list-check-cell {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-sales-list main,
body.page-sales-list main :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    summary,
    h2,
    input:not([type="checkbox"]),
    th,
    td,
    .link-order-id,
    .order-cell-clip,
    .order-list-doc-open-btn,
    .order-list-doc-placeholder,
    .order-list-meta,
    .order-list-page-size,
    .order-list-pager-status,
    .order-summary-footer__label,
    .order-summary-footer__value,
    .order-filter-field__lbl,
    .order-filter-date-range__sep,
    .order-filter-hint,
    .empty-state,
    .flash
) {
    font-size: 0.875rem;
}

body.page-sales-list.page-orders-list--compact-header .sales-list-table .link-order-id,
body.page-sales-list.page-orders-list--compact-header .sales-list-table .order-list-doc-open-btn,
body.page-sales-list.page-orders-list--compact-header .sales-list-table .order-list-doc-placeholder,
body.page-sales-list.page-orders-list--compact-header .sales-list-table .order-cell-clip,
body.page-sales-list.page-orders-list--compact-header .sales-list-table .badge {
    font-size: 0.875rem;
}

body.page-sales-list .payment-upload-modal__head h2,
body.page-sales-list .payment-upload-modal__close,
body.page-sales-list .payment-upload-modal__body,
body.page-sales-list .payment-upload-modal__body :is(p, a, label, button, input, .btn, .site-header__quick-btn, textarea, select) {
    font-size: 0.875rem;
}

/* 請求一覧: 請求書番号〜備考を横1列に収める */
body.page-invoice-list > main.container--orders-fit {
    max-width: min(100%, 1720px);
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

body.page-invoice-list .invoice-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

/* 請求一覧: 表の上下余白・文字は入金一覧と同じ 0.875rem */
body.page-invoice-list.page-orders-list--compact-header .container--orders-fit .invoice-list-table.data-table th,
body.page-invoice-list.page-orders-list--compact-header .container--orders-fit .invoice-list-table.data-table td {
    padding: 0.4rem 0.5rem;
    line-height: 1.35;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
}

body.page-invoice-list.page-orders-list--compact-header .container--orders-fit .invoice-list-table.data-table thead th {
    padding: 0.45rem 0.5rem;
    letter-spacing: -0.02em;
    font-size: 0.875rem;
}

body.page-invoice-list.page-orders-list--compact-header .container--orders-fit .invoice-list-table.data-table .invoice-list-check-cell {
    padding-left: 0.15rem;
    padding-right: 0;
}

body.page-invoice-list.page-orders-list--compact-header .container--orders-fit .invoice-list-table.data-table .order-list-col-no {
    padding-left: 0.2rem;
}

/* 請求日(td直書き)と同じ 0.875rem。親ルールの :is(input…) で上がった 1rem を上書き */
body.page-invoice-list.page-orders-list--compact-header .order-list-screen .invoice-list-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .order-cell-clip,
    .invoice-send-badge,
    .invoice-send-method,
    .invoice-list-send-empty,
    .list-sort-link
) {
    font-size: 0.875rem;
}

body.page-invoice-list .invoice-list-table .order-list-col-no {
    width: 7.5%;
}

body.page-invoice-list .invoice-list-table .order-list-col-date {
    width: 7%;
}

body.page-invoice-list .invoice-list-table .invoice-list-col-customer,
body.page-invoice-list .invoice-list-table th.invoice-list-col-customer,
body.page-invoice-list .invoice-list-table td.invoice-list-col-customer {
    width: 18%;
    text-align: left;
}

body.page-invoice-list .invoice-list-table .invoice-list-col-category {
    width: 4%;
    text-align: center;
}

body.page-invoice-list .invoice-list-table .invoice-list-col-send {
    width: 5.5%;
    max-width: 6.5rem;
    text-align: left;
    white-space: nowrap;
}

.invoice-list-send-cell {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.15rem;
}

body.page-invoice-list .invoice-list-send-empty {
    font-size: 0.875rem;
}

body.page-invoice-list .invoice-list-table .invoice-list-col-due.is-overdue,
body.page-invoice-list .invoice-list-table tr.invoice-row--overdue td.invoice-list-col-due {
    color: #9b1c1c;
    font-weight: 600;
}

body.page-invoice-list .invoice-send-badge--done {
    font-size: 0.875rem;
    font-weight: 600;
    color: #065f46;
    background: #ecfdf5;
    padding: 0.05rem 0.35rem;
    border-radius: 0.2rem;
}

body.page-invoice-list .invoice-list-table .invoice-send-method {
    font-size: 0.875rem;
    margin-left: 0.1rem;
}

body.page-invoice-list .invoice-list-table .invoice-list-col-amt {
    width: 8%;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body.page-invoice-list .invoice-list-table .invoice-list-col-tax {
    width: 6%;
}

body.page-invoice-list .invoice-list-table .order-list-col-total {
    width: 8.5%;
}

body.page-invoice-list .invoice-list-table .order-cell-clip,
body.page-invoice-list .invoice-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    font-weight: inherit;
}

body.page-invoice-list .invoice-list-table .invoice-list-col-customer .order-cell-clip {
    text-align: left;
}

body.page-invoice-list .invoice-list-table .link-order-id {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

/* 入金過不足一覧: 請求一覧の ellipsis / 列幅% を上書き（詳細度を請求一覧コンパクトヘッダより上げる） */
body.page-invoice-list.page-invoice-recovery-view--mismatch.page-orders-list--compact-header .container--orders-fit .invoice-list-table.invoice-list-table--recovery.data-table,
body.page-invoice-list.page-invoice-recovery-view--matched.page-orders-list--compact-header .container--orders-fit .invoice-list-table.invoice-list-table--recovery.data-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch.page-orders-list--compact-header .container--orders-fit .invoice-list-table.invoice-list-table--recovery.data-table th,
body.page-invoice-list.page-invoice-recovery-view--mismatch.page-orders-list--compact-header .container--orders-fit .invoice-list-table.invoice-list-table--recovery.data-table td,
body.page-invoice-list.page-invoice-recovery-view--matched.page-orders-list--compact-header .container--orders-fit .invoice-list-table.invoice-list-table--recovery.data-table th,
body.page-invoice-list.page-invoice-recovery-view--matched.page-orders-list--compact-header .container--orders-fit .invoice-list-table.invoice-list-table--recovery.data-table td {
    width: auto;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    vertical-align: top;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch.page-orders-list--compact-header .container--orders-fit .invoice-list-table.invoice-list-table--recovery.data-table thead th,
body.page-invoice-list.page-invoice-recovery-view--matched.page-orders-list--compact-header .container--orders-fit .invoice-list-table.invoice-list-table--recovery.data-table thead th {
    white-space: normal;
    line-height: 1.25;
    vertical-align: bottom;
    letter-spacing: 0;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-no,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-no,
body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-date,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-date {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-collection,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-collection {
    text-align: left;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
    padding-right: 0.75rem;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-delay,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-delay {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-delay--late,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-delay--late {
    color: #b45309;
    font-weight: 600;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-amt,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-amt {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-current,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-current {
    font-weight: 600;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-diff.invoice-list-col-diff--short,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-diff.invoice-list-col-diff--short {
    color: var(--danger, #b42318);
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-diff.invoice-list-col-diff--over,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-diff.invoice-list-col-diff--over {
    color: var(--warn, #9a6700);
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .link-order-id,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .link-order-id {
    display: inline;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery tr.invoice-recovery-row--continuation td,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery tr.invoice-recovery-row--continuation td {
    border-top: none;
    padding-top: 0.15rem;
    padding-bottom: 0.35rem;
}

body.page-invoice-list.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-episode-mark,
body.page-invoice-list.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-episode-mark {
    color: var(--muted, #64748b);
    font-size: 0.95rem;
    padding-left: 0.15rem;
}

body.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-due--missing,
body.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-due--missing {
    background: color-mix(in srgb, var(--warn, #9a6700) 10%, #fff);
}

body.page-invoice-recovery-view--mismatch .invoice-recovery-due-missing,
body.page-invoice-recovery-view--matched .invoice-recovery-due-missing {
    color: var(--warn, #9a6700);
    font-weight: 600;
}

body.page-invoice-recovery-view--mismatch .invoice-list-table--recovery .invoice-recovery-col-due--late-resolved,
body.page-invoice-recovery-view--matched .invoice-list-table--recovery .invoice-recovery-col-due--late-resolved {
    color: #b45309;
    font-weight: 600;
}

body.page-invoice-recovery-view--mismatch .invoice-recovery-due-setup-link,
body.page-invoice-recovery-view--matched .invoice-recovery-due-setup-link {
    font-size: 0.75rem;
    margin-left: 0.15rem;
    white-space: nowrap;
}

body.page-payment-list .payment-list-table .order-list-col-no,
body.page-payment-list.page-orders-list--compact-header .container--orders .payment-list-table .order-list-col-no {
    width: 6.75rem;
    min-width: 6.75rem;
    max-width: 6.75rem;
    white-space: nowrap;
    padding-right: 0.2rem;
}

body.page-payment-list.page-orders-list--compact-header .container--orders-fit .payment-list-table .order-list-col-no {
    width: 6.5rem;
    min-width: 6.5rem;
    max-width: 6.5rem;
}

body.page-payment-list .payment-list-table .order-list-col-date,
body.page-payment-list.page-orders-list--compact-header .container--orders .payment-list-table .order-list-col-date {
    width: 8rem;
    min-width: 8rem;
    max-width: 8rem;
    white-space: nowrap;
    padding-left: 0.2rem;
    padding-right: 0.35rem;
}

body.page-payment-list .payment-list-table .payment-list-col-category {
    width: 5.5rem;
    white-space: nowrap;
}

body.page-payment-list .payment-list-table .order-list-col-customer,
body.page-payment-list.page-orders-list--compact-header .container--orders .payment-list-table .order-list-col-customer {
    width: 12rem;
    min-width: 12rem;
    max-width: 12rem;
    padding-left: 0.55rem;
    padding-right: 0.35rem;
}

body.page-payment-list .payment-list-table .payment-list-col-subject {
    width: auto;
    min-width: 0;
}

body.page-payment-list .payment-list-table .order-list-col-assigned,
body.page-payment-list.page-orders-list--compact-header .container--orders .payment-list-table .order-list-col-assigned {
    width: 7.5rem;
    min-width: 7.5rem;
    white-space: normal;
    word-break: keep-all;
    line-height: 1.3;
}

body.page-payment-list .payment-list-table .order-list-col-total,
body.page-payment-list.page-orders-list--compact-header .container--orders .payment-list-table .order-list-col-total {
    width: 6.75rem;
    white-space: nowrap;
    text-align: right;
}

body.page-payment-list .payment-list-table .order-cell-clip,
body.page-payment-list .payment-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-payment-list .payment-list-table td.order-list-col-customer {
    overflow: hidden;
    vertical-align: middle;
}

.order-screen__title-row--list {
    margin-bottom: 0.25rem;
}

.order-list-data {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1 1 auto;
    min-height: 0;
}

.order-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 0.75rem;
}

body.page-orders-list--compact-header .order-list-toolbar {
    gap: 0.18rem 0.45rem;
    align-items: flex-start;
}

.order-list-toolbar .order-list-meta {
    margin: 0;
    flex: 1 1 12rem;
}

body.page-orders-list--compact-header .order-list-toolbar .order-list-meta {
    line-height: 1.28;
    font-size: 0.75rem;
}

body.page-posting-batch.page-orders-list--compact-header .order-list-screen .order-list-toolbar .order-list-meta,
body.page-posting-batch.page-orders-list--compact-header .order-list-screen .order-list-toolbar .order-list-meta strong {
    font-size: 0.875rem;
}

body.page-orders-list--compact-header .order-list-data {
    gap: 0.12rem;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 1 1 auto;
    min-height: 12rem;
    overflow: auto;
}

.order-list-pager-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    flex-shrink: 0;
}

.order-list-page-size {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--muted);
}

.order-list-page-size select {
    min-width: 4rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.8125rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
}

.order-list-pager-nav {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* 表示件数横の前へ／次へ: 文字色は下部ページ送り、枠サイズは表示件数 select に揃える */
.order-list-pager-nav .btn,
.order-list-pager-nav a.btn {
    color: var(--text);
    font-weight: 400;
    font-size: 0.8125rem;
    line-height: 1.3;
    padding: 0.2rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}

.order-list-pager-nav .btn:hover:not(:disabled),
.order-list-pager-nav a.btn:hover:not(.disabled):not([aria-disabled="true"]) {
    color: var(--text);
    background: #f8fafc;
    border-color: #cbd5e1;
}

.order-list-pager-nav .btn:disabled,
.order-list-pager-nav a.btn.disabled,
.order-list-pager-nav a.btn[aria-disabled="true"] {
    color: var(--text);
    opacity: 0.45;
    cursor: default;
}

.order-list-pager-status {
    min-width: 4.5rem;
    text-align: center;
    font-size: 0.8125rem;
}

body.page-orders-list--compact-header .order-list-page-size,
body.page-orders-list--compact-header .order-list-page-size select,
body.page-orders-list--compact-header .order-list-pager-nav .btn,
body.page-orders-list--compact-header .order-list-pager-nav a.btn,
body.page-orders-list--compact-header .order-list-pager-status {
    font-size: 0.75rem;
}

body.page-orders-list--compact-header .order-list-pager-tools {
    gap: 0.35rem 0.55rem;
}

.order-summary-footer--compact {
    margin-top: 0.25rem;
    padding: 0.45rem 0.75rem;
    gap: 0.65rem 1rem;
}

body.page-orders-list--compact-header .order-summary-footer--compact {
    margin-top: 0.06rem;
    padding: 0.22rem 0.45rem;
    gap: 0.32rem 0.6rem;
}

.order-summary-footer--compact .order-summary-footer__value {
    font-size: 1rem;
}

body.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__value {
    font-size: 0.92rem;
}

.order-summary-footer--compact .order-summary-footer__label {
    margin-bottom: 0.05rem;
}

body.page-orders-list--compact-header .order-summary-footer--compact .order-summary-footer__label {
    margin-bottom: 0.02rem;
    font-size: 0.6rem;
}

.order-filter-panel--compact {
    margin-bottom: 0.35rem;
    padding: 0.5rem 0.75rem;
}

body.page-orders-list--compact-header .order-filter-panel--compact {
    margin-bottom: 0.22rem;
    padding: 0.38rem 0.55rem;
}

.order-filter-panel--compact .order-filter-grid {
    gap: 0.28rem 0;
}

.order-filter-panel--compact .order-filter-grid label {
    font-size: 0.75rem;
    gap: 0.2rem;
}

.order-filter-panel--compact .order-filter-grid--inline .order-filter-field {
    gap: 0.35rem;
}

.order-filter-panel--compact .order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 7.35rem;
    font-size: 0.75rem;
}

.order-filter-panel--compact .order-filter-grid--inline .order-filter-field--date-range .order-filter-field__lbl {
    flex: 0 0 3.65rem;
}

.order-filter-panel--compact .order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal) {
    padding: 0.32rem 0.45rem;
    font-size: 0.8125rem;
}

.btn--compact {
    padding: 0.2rem 0.45rem;
    font-size: 0.8125rem;
}

/* 20件程度で一画面に収めやすい密度（狭いビューポートでは main 内でスクロール） */
.container--orders-fit .order-list-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
}

.container--orders-fit .order-list-table.data-table:not(.so-list-table):not(.estimate-list-table):not(.mail-send-history-table):not(.customer-list-table):not(.consignor-list-table):not(.supplier-list-table):not(.delivery-site-list-table):not(.payment-list-table):not(.invoice-list-table):not(.sales-list-table):not(.po-list-table):not(.staff-list-table):not(.gr-list-table):not(.product-list-table):not(.posting-batch-table):not(.posting-leak-table):not(.remark-template-master-table) th,
.container--orders-fit .order-list-table.data-table:not(.so-list-table):not(.estimate-list-table):not(.mail-send-history-table):not(.customer-list-table):not(.consignor-list-table):not(.supplier-list-table):not(.delivery-site-list-table):not(.payment-list-table):not(.invoice-list-table):not(.sales-list-table):not(.po-list-table):not(.staff-list-table):not(.gr-list-table):not(.product-list-table):not(.posting-batch-table):not(.posting-leak-table):not(.remark-template-master-table) td {
    padding: 0.28rem 0.45rem;
    font-size: 0.8125rem;
}

body.page-orders-list--compact-header .container--orders-fit .order-list-table.data-table:not(.so-list-table):not(.estimate-list-table):not(.mail-send-history-table):not(.customer-list-table):not(.consignor-list-table):not(.supplier-list-table):not(.delivery-site-list-table):not(.payment-list-table):not(.invoice-list-table):not(.sales-list-table):not(.po-list-table):not(.staff-list-table):not(.gr-list-table):not(.product-list-table):not(.posting-batch-table):not(.posting-leak-table):not(.remark-template-master-table) th,
body.page-orders-list--compact-header .container--orders-fit .order-list-table.data-table:not(.so-list-table):not(.estimate-list-table):not(.mail-send-history-table):not(.customer-list-table):not(.consignor-list-table):not(.supplier-list-table):not(.delivery-site-list-table):not(.payment-list-table):not(.invoice-list-table):not(.sales-list-table):not(.po-list-table):not(.staff-list-table):not(.gr-list-table):not(.product-list-table):not(.posting-batch-table):not(.posting-leak-table):not(.remark-template-master-table) td {
    padding: 0.03rem 0.18rem;
    font-size: 0.875rem;
    line-height: 1.08;
}

.container--orders-fit .order-list-table.data-table:not(.so-list-table):not(.estimate-list-table):not(.mail-send-history-table):not(.customer-list-table):not(.consignor-list-table):not(.supplier-list-table):not(.delivery-site-list-table):not(.payment-list-table):not(.invoice-list-table):not(.sales-list-table):not(.po-list-table):not(.staff-list-table):not(.gr-list-table):not(.product-list-table):not(.posting-batch-table):not(.posting-leak-table):not(.remark-template-master-table) thead th {
    padding: 0.32rem 0.45rem;
    font-size: 0.75rem;
}

body.page-orders-list--compact-header .container--orders-fit .order-list-table.data-table:not(.so-list-table):not(.estimate-list-table):not(.mail-send-history-table):not(.customer-list-table):not(.consignor-list-table):not(.supplier-list-table):not(.delivery-site-list-table):not(.payment-list-table):not(.invoice-list-table):not(.sales-list-table):not(.po-list-table):not(.staff-list-table):not(.gr-list-table):not(.product-list-table):not(.posting-batch-table):not(.posting-leak-table):not(.remark-template-master-table) thead th {
    padding: 0.06rem 0.2rem;
    font-size: 0.75rem;
    line-height: 1.1;
}

/* 一括計上プレビュー表: 件数行・仕入/売上（予定）表を 0.875rem に統一 */
body.page-posting-batch.page-orders-list--compact-header .container--orders-fit .posting-batch-table.order-list-table.data-table :is(
    th,
    td,
    a,
    span,
    strong,
    .muted
) {
    font-size: 0.875rem;
}

.container--orders-fit .order-doc-dropzone--compact {
    min-height: 2.05rem;
    padding: 0.2rem 0.32rem;
}

body.page-orders-list--compact-header .container--orders-fit .order-doc-dropzone--compact {
    min-height: 1.5rem;
    padding: 0.06rem 0.16rem;
}

.container--orders-fit .order-doc-dropzone--compact .order-doc-dropzone__hint {
    font-size: 0.65rem;
    line-height: 1.25;
}

body.page-orders-list--compact-header .container--orders-fit .order-doc-dropzone--compact .order-doc-dropzone__hint {
    font-size: 0.65rem;
    line-height: 1.12;
}

/* 20件1画面向け: 列幅を詰め納入先・得意先に余白を回す */
body.page-orders-list--compact-header .container--orders .order-list-table .order-list-col-no {
    width: 5.65rem;
}

body.page-orders-list--compact-header .container--orders .order-list-table .order-list-col-date {
    width: 4.65rem;
}

body.page-orders-list--compact-header .container--orders .order-list-table .order-list-col-order-no {
    width: 4.85rem;
}

body.page-orders-list--compact-header .container--orders .order-list-table .order-list-col-subject {
    width: 7.5rem;
}

body.page-orders-list--compact-header .container--orders .order-list-table .order-list-col-status {
    width: 4.85rem;
}

body.page-orders-list--compact-header .container--orders .order-list-table .order-list-col-total {
    width: 4.35rem;
}

body.page-orders-list--compact-header .container--orders .order-list-table .order-list-col-doc {
    /* 「開く」とドロップゾーンを横並びに収める最低幅（過去の 7.85rem では折り返し・崩れの原因） */
    width: 13.25rem;
}

body.page-orders-list--compact-header .order-list-doc-open-btn {
    padding: 0.05rem 0.2rem;
    font-size: 0.72rem;
}

body.page-orders-list--compact-header .order-list-table .badge {
    font-size: 0.68rem;
    padding: 0.03rem 0.18rem;
}

.order-posting-badge {
    font-weight: 600;
    white-space: nowrap;
}
.order-posting-badge--missed {
    background: #fde8e8;
    color: #9b1c1c;
}
.order-posting-badge--ship {
    background: #eef2ff;
    color: #3730a3;
}
.order-posting-badge--partial {
    background: #fff7ed;
    color: #9a3412;
}
.order-posting-badge--open {
    background: #f3f4f6;
    color: #374151;
}
.order-posting-badge--done {
    background: #ecfdf5;
    color: #065f46;
}

body.page-so-list .so-list-table .order-list-col-posting,
body.page-so-list.page-orders-list--compact-header .container--orders .so-list-table .order-list-col-posting,
body.page-po-list .po-list-table .order-list-col-posting,
body.page-po-list.page-orders-list--compact-header .container--orders .po-list-table .order-list-col-posting {
    width: 7.5rem;
    max-width: 9rem;
    white-space: nowrap;
}

body.page-orders-list--compact-header .order-list-table .order-list-col-no .muted {
    font-size: 0.68rem;
}

body.page-orders-list--compact-header .order-list-table .link-order-id {
    font-size: 0.84rem;
}

body.page-orders-list--compact-header .container--orders .order-list-table .order-list-doc-stack {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.28rem 0.35rem;
}

body.page-orders-list--compact-header .container--orders-fit .order-list-table .order-list-doc-cell {
    min-width: 0;
    max-width: none;
}

body.page-orders-list--compact-header .container--orders .order-list-table .order-list-doc-stack .order-doc-dropzone--compact {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.28rem;
    min-height: 1.42rem;
}

body.page-orders-list--compact-header
    .container--orders
    .order-list-table
    .order-list-doc-stack
    .order-doc-dropzone--compact
    .order-doc-dropzone__hint {
    white-space: nowrap;
    text-align: center;
    margin: 0;
}

.order-list-src-badge--manual {
    background: #e0e7ff;
    color: #3730a3;
}

.order-list-src-badge--import {
    background: #ecfdf5;
    color: #047857;
}

body.page-orders-list--compact-header .order-list-table .order-list-src-web,
body.page-orders-list--compact-header .order-list-table .order-list-doc-placeholder {
    font-size: 0.68rem;
}

.container--orders .order-list-doc-open-btn {
    padding: 0.16rem 0.38rem;
    font-size: 0.7rem;
}

/* 受注一覧: 長い納入先・得意先・ステータスを省略しレイアウトを固定 */
.container--orders .order-list-table {
    table-layout: fixed;
    width: 100%;
}

/* 狭い列は必要最低限。幅未指定の納入先・得意先が残りを分け合い広く取る（ステータスは固定で間に空きを作らない） */
.container--orders .order-list-table .order-list-col-no {
    width: 6.75rem;
}

.container--orders .order-list-table .order-list-col-date {
    width: 5.25rem;
    white-space: nowrap;
}

.container--orders .order-list-table .order-list-col-status {
    width: 6.25rem;
}

.container--orders .order-list-table .order-list-col-total {
    width: 5.5rem;
    white-space: nowrap;
}

.container--orders .order-list-table .order-list-col-doc {
    width: 10.75rem;
}

.container--orders .order-list-table td.order-list-doc-cell.order-list-col-doc {
    min-width: 0;
    max-width: none;
}

.container--orders .order-list-table td.order-list-col-delivery,
.container--orders .order-list-table td.order-list-col-customer,
.container--orders .order-list-table td.order-list-col-subject,
.container--orders .order-list-table td.order-list-col-order-no,
.container--orders .order-list-table td.order-list-col-status {
    overflow: hidden;
    vertical-align: middle;
}

.container--orders .order-list-table td.order-list-col-no {
    overflow: visible;
    vertical-align: middle;
}

.container--orders .order-list-table .order-list-col-no-inner {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-bottom: 1px;
    box-sizing: border-box;
}

/* 一覧の番号リンク: 省略表示用レイアウト（下線は .link-order-id 共通） */
.container--orders .order-list-table a.link-order-id {
    display: inline-block;
    max-width: 100%;
    font-weight: 400 !important;
    vertical-align: baseline;
}

.container--orders .order-list-table .order-cell-clip--fill {
    display: block;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* 注文書: 「開く」とドロップゾーンを常に横並び（折り返さない） */
.container--orders .order-list-table .order-list-doc-stack {
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}

.container--orders .order-list-table .order-list-doc-stack .order-doc-dropzone--compact {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container--orders .order-list-table .order-list-doc-stack .order-doc-dropzone--compact .order-doc-dropzone__hint {
    white-space: nowrap;
    margin: 0;
}

/* 受注明細: 表を広く、縦余白を抑える */
.container--order-detail {
    max-width: min(1760px, 100vw - 1.5rem);
    padding: 0.65rem 1rem 1.25rem;
}

/* 受注明細: ウィンドウ全体はスクロールさせず、main 内／明細テーブル内でスクロール */
html:has(body.page-order-detail) {
    height: 100%;
}

body.page-order-detail {
    min-height: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.page-order-detail > main.container--order-detail-fit {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding: 0.4rem 1rem 0.5rem;
    max-width: min(1760px, 100vw - 1.5rem);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* 請求明細: 受注画面の「明細エリアを画面内に押し込む」レイアウトを外し、ページ全体スクロールで明細を読めるようにする */
html:has(body.page-invoice-detail) {
    height: auto;
    min-height: 100%;
}

body.page-invoice-detail {
    height: auto;
    min-height: 100%;
    overflow: auto;
}

body.page-invoice-detail > main.container--order-detail-fit {
    flex: 0 1 auto;
    min-height: auto;
    height: auto;
    overflow: visible;
    display: block;
    padding-bottom: 1.5rem;
}

body.page-invoice-detail .invoice-detail-screen.order-detail-screen {
    flex: none;
    min-height: auto;
    height: auto;
    gap: 0.65rem;
}

body.page-invoice-detail .invoice-detail-ledger-card {
    margin: 0;
}

body.page-invoice-detail .invoice-detail-ledger-card .order-manual-lines-heading {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
}

body.page-invoice-detail .invoice-detail-ledger-wrap.order-manual-lines-table-wrap,
body.page-invoice-detail .order-detail-screen .order-manual-lines-table-wrap {
    flex: none;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
    overflow-y: visible;
}

body.page-invoice-detail .order-detail-screen .order-manual-lines-wrap {
    flex: none;
    min-height: auto;
}

.invoice-detail-ops-card {
    margin: 0;
}

.invoice-detail-ops-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.25rem;
}

@media (max-width: 720px) {
    .invoice-detail-ops-grid {
        grid-template-columns: 1fr;
    }
}

.invoice-detail-ops-col h2 {
    margin: 0 0 0.45rem;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
}

.invoice-detail-ops-status {
    font-weight: 600;
}

.invoice-detail-ops-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.6rem;
}

.invoice-detail-ops-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.invoice-detail-ops-hint {
    margin: 0.45rem 0 0;
    line-height: 1.45;
}

.invoice-detail-note-card {
    margin: 0;
}

.invoice-detail-note-card h2 {
    margin: 0 0 0.35rem;
}

.page-order-detail .callout {
    margin-bottom: 0.45rem;
}

.order-detail-screen {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-height: 0;
}

.order-detail-screen > .order-page-head {
    flex-shrink: 0;
}

.order-detail-screen > .order-detail-summary--bar,
.order-detail-screen > .order-detail-header-flam,
.order-detail-screen > .order-detail-lt-compact-row,
.order-detail-screen > .callout,
.order-detail-screen > p.muted {
    flex-shrink: 0;
}

.order-detail-lt-compact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: stretch;
}

.order-detail-lt-compact-row__col {
    flex: 1 1 min(240px, 100%);
    min-width: 0;
    display: flex;
}

.order-detail-lt-compact-row__col > .card {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
    padding: 0.45rem 0.55rem;
}

.order-lt-reply-docs-card--compact .order-lt-reply-docs-card__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.2rem;
}

.order-lt-reply-docs-card__title {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.25;
}

.order-lt-reply-docs-card__tools {
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.order-lt-reply-docs-card__tools a {
    white-space: nowrap;
}

.order-lt-reply-doc-list--compact {
    margin: 0.1rem 0 0;
    padding-left: 1rem;
    font-size: 0.78rem;
    line-height: 1.4;
}

.order-lt-reply-docs-card__empty {
    margin: 0;
    font-size: 0.78rem;
}

.order-lt-reply-ai-card--compact .order-lt-reply-ai-ingest-form--compact {
    margin-top: 0.25rem;
}

.order-lt-reply-ai-card--compact .order-lt-reply-ai-ingest-form__zone.om-dropzone-label {
    min-height: 2.35rem;
    padding: 0.35rem 0.45rem;
}

.order-lt-reply-ai-card--compact .order-lt-reply-ai-ingest-form__zone .om-dropzone__inner {
    font-size: 0.75rem;
    line-height: 1.35;
    margin-bottom: 0.15rem;
}

/* 明細カード: ヘッダー・備考と縦を分け、表は残り viewport で表内スクロール */
.order-detail-screen > .order-lines-unified-card.order-lines-unified-card--primary {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 0.2rem;
    padding: 0.5rem 0.65rem;
}

.order-detail-screen .order-lines-unified-card__head {
    flex-shrink: 0;
}

.order-detail-screen .order-lines-unified-form {
    flex: 0 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.order-detail-screen .order-manual-lines-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 縦は flex で残り viewport を使い、長い明細はこの枠内スクロール（品目数では高さを決めない） */
.order-detail-screen .order-manual-lines-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 0.75rem;
}

/* 受注・発注・仕入・売上明細: 注文書AIレビューと同様に備考・合計まで初画面へ（明細が多いときだけ表内スクロール） */
body.page-order-detail .order-detail-screen {
    flex: 1 1 auto;
    min-height: 0;
}

body.page-order-detail .order-detail-screen > .order-lines-unified-card.order-lines-unified-card--primary {
    flex: 1 1 auto;
    min-height: min(28vh, 14rem);
    display: flex;
    flex-direction: column;
    margin-top: 0.1rem;
    padding: 0.4rem 0.55rem;
}

body.page-order-detail .order-detail-screen .order-lines-unified-form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.page-order-detail .order-detail-screen .order-manual-lines-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.page-order-detail .order-detail-screen .order-manual-lines-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 0.75rem;
}

body.page-order-detail .order-detail-screen > .order-detail-remarks,
body.page-order-detail .order-detail-screen > .order-summary-footer,
body.page-order-detail .order-detail-screen > .order-detail-meta-details,
body.page-order-detail .order-detail-screen > .odai-remarks-card,
body.page-order-detail .order-detail-screen > .order-inventory-alloc,
body.page-order-detail .order-detail-screen > [class*="inventory-alloc"] {
    flex-shrink: 0;
}

body.page-order-detail .order-detail-screen > .order-detail-remarks.card {
    margin-top: 0.25rem;
    padding: 0.25rem 0.5rem;
}

body.page-order-detail .order-detail-remarks__title {
    display: none;
}

body.page-order-detail .order-detail-remarks__hint {
    display: none;
}

body.page-order-detail .order-detail-remarks__grid .remark-field textarea.psp-in {
    min-height: 2.2rem;
    height: 2.35rem;
    max-height: 5rem;
    resize: vertical;
}

/* 合計行: ラベル：値 を1行に圧縮 */
body.page-order-detail .order-detail-screen > .order-summary-footer--detail {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: baseline;
    gap: 0.35rem 1.1rem;
    margin-top: 0.2rem;
    padding: 0.28rem 0.55rem;
    box-shadow: none;
}

body.page-order-detail .order-summary-footer--detail .order-summary-footer__box {
    display: inline-flex;
    flex-direction: row;
    align-items: baseline;
    gap: 0.3rem;
    min-width: 0;
    text-align: left;
}

body.page-order-detail .order-summary-footer--detail .order-summary-footer__label {
    display: inline;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    color: var(--muted, #64748b);
}

body.page-order-detail .order-summary-footer--detail .order-summary-footer__label::after {
    content: "：";
}

body.page-order-detail .order-summary-footer--detail .order-summary-footer__value {
    font-size: 0.875rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* 圧縮した分、明細表を縦に広げる */
body.page-order-detail .order-detail-screen > .order-lines-unified-card.order-lines-unified-card--primary {
    min-height: min(42vh, 22rem);
}

body.page-order-detail .order-detail-screen .order-manual-lines-table-wrap {
    min-height: 0;
}

/* 区分・システム情報は初画面から外す（中の input は display:none でも form 送信される） */
body.page-order-detail .order-detail-screen > .order-detail-meta-details {
    display: none;
}

body.page-order-detail .order-detail-screen > .order-manual-lines-wrap > p.muted,
body.page-order-detail .order-detail-screen .order-manual-lines-wrap > p.muted {
    display: none;
}

body.page-order-detail .order-detail-lt-compact-details {
    flex-shrink: 0;
    margin-bottom: 0.2rem;
}

body.page-order-detail .order-detail-lt-compact-details > summary {
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #64748b;
    padding: 0.2rem 0;
    list-style: none;
}

body.page-order-detail .order-detail-lt-compact-details > summary::-webkit-details-marker {
    display: none;
}

body.page-order-detail .order-detail-lt-compact-details[open] > summary {
    margin-bottom: 0.25rem;
}

body.page-order-detail .order-detail-header-flam.order-detail-header-flam--sheet.card {
    margin-bottom: 0.3rem;
}

body.page-order-detail .order-detail-screen > p.muted {
    margin: 0.15rem 0 0.25rem;
    font-size: 0.78rem;
    line-height: 1.4;
}

/* 注文書 AI レビュー: 備考（折りたたみ・空なら閉じる） */
body.page-odai-review .odai-remarks-card {
    margin: 0.15rem 0 0.3rem;
    padding: 0.3rem 0.55rem;
}

body.page-odai-review .odai-remarks-card__summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8125rem;
    list-style: none;
}

body.page-odai-review .odai-remarks-card__summary::-webkit-details-marker {
    display: none;
}

body.page-odai-review .odai-remarks-card__summary::before {
    content: "▶ ";
    font-size: 0.7rem;
    opacity: 0.7;
}

body.page-odai-review .odai-remarks-card[open] > .odai-remarks-card__summary::before {
    content: "▼ ";
}

body.page-odai-review .odai-remarks-card__label {
    display: block;
    margin: 0.3rem 0 0;
}

body.page-odai-review .odai-remarks-card__textarea {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.4;
    font-size: 0.875rem;
}

/* 注文書 AI レビュー: ステータス帯を薄く1本に */
body.page-odai-review main > .flash.flash--odai-compact,
body.page-odai-review .flash.flash--odai-compact {
    padding: 0.3rem 0.55rem;
    margin-bottom: 0.3rem;
    font-size: 0.8125rem;
    line-height: 1.35;
}

body.page-odai-review .odai-flash-timing__details {
    display: inline;
    margin-left: 0.15rem;
}

body.page-odai-review .odai-flash-timing__details > summary {
    cursor: pointer;
    font-size: 0.75rem;
    display: inline;
}

/* ヘッダー内の抽出 JSON */
body.page-odai-review .odai-raw--header {
    position: relative;
    display: inline-block;
}

body.page-odai-review .odai-raw--header > summary {
    list-style: none;
    cursor: pointer;
}

body.page-odai-review .odai-raw--header > summary::-webkit-details-marker {
    display: none;
}

body.page-odai-review .odai-pre--header {
    position: absolute;
    z-index: 40;
    top: 100%;
    left: 0;
    margin: 0.25rem 0 0;
    max-width: min(42rem, 90vw);
    max-height: 50vh;
    overflow: auto;
    padding: 0.5rem;
    font-size: 0.7rem;
    line-height: 1.35;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
}

/* 送り先・荷主: コード・名称・〒・住所・電話・マスタ登録を横一列（注文書AIレビュー／受注・発注・出荷明細で共通） */
body.page-odai-review .order-detail-header-flam__strip,
body.page-order-detail .order-detail-header-flam__strip {
    align-items: center;
}

body.page-odai-review .order-detail-header-flam__strip-fields,
body.page-order-detail .order-detail-header-flam__strip-fields {
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
}

body.page-odai-review .order-detail-header-flam__strip-fields > .order-detail-header-flam__code-name-pair,
body.page-order-detail .order-detail-header-flam__strip-fields > .order-detail-header-flam__code-name-pair {
    flex: 1 1 20rem;
    min-width: 16rem;
    max-width: 30rem;
}

body.page-odai-review .order-detail-header-flam__strip-name,
body.page-order-detail .order-detail-header-flam__strip-name {
    flex: 1 1 18rem;
    min-width: 14rem;
    max-width: 26rem;
}

body.page-odai-review .order-detail-header-flam__strip-addr,
body.page-order-detail .order-detail-header-flam__strip-addr {
    flex: 1 1 12rem;
    min-width: 8rem;
    max-width: none;
}

body.page-odai-review .order-detail-header-flam__strip-phone,
body.page-order-detail .order-detail-header-flam__strip-phone {
    flex: 0 0 22ch;
    width: 22ch;
    min-width: 22ch;
    max-width: 22ch;
}

/* マスタ登録ボタンを入力行と同じ高さに */
body.page-odai-review .order-detail-header-flam__strip-register,
body.page-order-detail .order-detail-header-flam__strip-register {
    margin-left: 0.15rem;
    align-self: center;
}

body.page-odai-review .order-detail-header-flam__strip-register .btn,
body.page-order-detail .order-detail-header-flam__strip-register .btn {
    padding: 0.15rem 0.4rem;
    min-height: 1.42rem;
    height: 1.42rem;
    line-height: 1.1;
    font-size: 0.75rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}

/* レビューヘッダー: ツール類も flam-btn に揃え、タブと並ぶ */
body.page-odai-review .site-header__toolbar-inner--flam {
    align-items: center;
    gap: 0.45rem 0.75rem;
}

body.page-odai-review .site-header__flam-actions--odai-tools {
    padding-bottom: 0.35rem;
    margin-right: auto;
}

body.page-odai-review .site-header__flam-actions--odai-tools .site-header__flam-btn,
body.page-odai-review .odai-raw--header > summary.site-header__flam-btn {
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    line-height: 1.25;
    padding: 0.32rem 0.7rem;
    border-radius: 4px;
    list-style: none;
    cursor: pointer;
}

body.page-odai-review .odai-raw--header > summary.site-header__flam-btn::-webkit-details-marker {
    display: none;
}

body.page-odai-review .odai-header-inline-form {
    display: inline;
    margin: 0;
}

body.page-odai-review .order-detail-header-flam.card {
    padding: 0.4rem 0.55rem;
}

body.page-odai-review .order-page-head__subids--preferred {
    margin: 0 0 0.25rem;
}

/* 税区分・税率・売上計上はレビューでは非表示（DOMは残し保存値を維持） */
body.page-odai-review .order-manual-lines-table--sheet .order-line-th-tax-cat,
body.page-odai-review .order-manual-lines-table--sheet .order-line-th-tax-rate,
body.page-odai-review .order-manual-lines-table--sheet .order-line-th-sales-post,
body.page-odai-review .order-manual-lines-table--sheet .order-line-td-tax-cat,
body.page-odai-review .order-manual-lines-table--sheet .order-line-td-tax-rate,
body.page-odai-review .order-manual-lines-table--sheet .order-line-sales-cell {
    display: none;
}

/* 注文書 AI レビュー: 得意先ブロック直下に明細を広く表示（備考が初画面に入る高さ） */
body.page-odai-review .order-detail-screen {
    flex: 1 1 auto;
    min-height: 0;
}

body.page-odai-review .order-detail-screen > .order-page-head--compact {
    flex-shrink: 0;
    margin-bottom: 0.15rem;
}

body.page-odai-review .order-page-head--compact .order-page-head__title {
    font-size: 1.05rem;
    margin: 0;
}

body.page-odai-review .order-detail-screen > .order-detail-header-flam {
    flex-shrink: 0;
    margin-bottom: 0.25rem;
}

body.page-odai-review .order-detail-screen > .order-lines-unified-card.order-lines-unified-card--primary {
    flex: 1 1 auto;
    min-height: min(48vh, 26rem);
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

body.page-odai-review .order-detail-screen .order-manual-lines-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.page-odai-review .order-detail-screen .order-manual-lines-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 0.75rem;
}

body.page-odai-review .order-manual-lines-table--sheet.data-table {
    min-width: max(100%, 80rem);
}

.odai-doc-open-banner {
    margin-bottom: 0.5rem;
}

.odai-doc-prompt-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.45);
}

.odai-doc-prompt {
    width: min(32rem, 100%);
    margin: 0;
    padding: 1.1rem 1.25rem 1.15rem;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
}

.odai-doc-prompt__title {
    margin: 0 0 0.55rem;
    font-size: 1.15rem;
}

.odai-doc-prompt__lead {
    margin: 0 0 0.45rem;
    line-height: 1.55;
}

.odai-doc-prompt__note {
    margin: 0 0 0.85rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.odai-doc-prompt__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 0.75rem;
    align-items: center;
}

body.page-odai-review .order-detail-screen > .order-detail-meta-details,
body.page-odai-review .order-detail-screen > .odai-original-preview,
body.page-odai-review .order-detail-screen > .odai-card--footer-actions,
body.page-lt-reply-review .order-detail-screen > .order-page-head {
    flex-shrink: 0;
}

body.page-lt-reply-review form.lt-reply-review-form {
    display: contents;
}

/* 納期回答レビュー: 明細は viewport 残り高さで表内スクロール（品目数固定は使わない） */
/* 納期回答レビュー: 多明細時は main 内 flex で表を伸ばし、ページ全体スクロールは抑える */
body.page-lt-reply-review.page-lt-reply-review--scroll-many > main.container--order-detail-fit {
    overflow: hidden;
}

.lt-review-top-notices {
    flex-shrink: 0;
    margin: 0 0 0.45rem;
    border: 1px solid #e8c547;
    border-radius: 6px;
    background: #fff8e6;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.lt-review-top-notices__summary {
    cursor: pointer;
    padding: 0.42rem 0.65rem;
    font-weight: 600;
    color: #9a6b00;
    user-select: none;
    list-style: none;
}

.lt-review-top-notices__summary::-webkit-details-marker {
    display: none;
}

.lt-review-top-notices__body {
    padding: 0 0.65rem 0.55rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.lt-review-top-notices__body > .lt-notice-summary,
.lt-review-top-notices__body > .callout,
.lt-review-top-notices__body > .flash {
    margin: 0;
}

body.page-lt-reply-review .order-detail-screen {
    flex: 1 1 auto;
    min-height: 0;
}

body.page-lt-reply-review .order-detail-screen > .order-detail-header-flam {
    flex-shrink: 0;
}

body.page-lt-reply-review.page-lt-reply-review--scroll-many .order-detail-screen > .order-lines-unified-card.order-lines-unified-card--primary {
    min-height: 0;
}

body.page-lt-reply-review .order-detail-screen > .order-lines-unified-card.order-lines-unified-card--primary {
    flex: 1 1 auto;
    min-height: min(48vh, 26rem);
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

body.page-lt-reply-review .order-detail-screen .order-manual-lines-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.page-lt-reply-review .order-detail-screen .order-manual-lines-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    scroll-padding-bottom: 0.75rem;
}

body.page-lt-reply-review .order-detail-screen > .odai-original-preview {
    flex-shrink: 0;
}

/* 多明細: 表の高さは flex で viewport 残りを使う（JS の inline height は使わない） */
body.page-lt-reply-review.page-lt-reply-review--scroll-many .order-detail-screen {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

body.page-lt-reply-review.page-lt-reply-review--scroll-many .order-lines-unified-card--scroll-many,
body.page-odai-review.page-order-detail--scroll-many .order-lines-unified-card--scroll-many,
body.page-order-detail.page-order-detail--scroll-many .order-lines-unified-card--scroll-many {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

body.page-lt-reply-review .order-manual-lines-table-wrap--scroll-many,
body.page-odai-review .order-manual-lines-table-wrap--scroll-many,
body.page-order-detail .order-manual-lines-table-wrap--scroll-many {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    box-sizing: border-box;
}

/* 商品セルは3行（コード・品名・調達）になるため、行の高さを詰めて品目数を稼ぐ */
body.page-lt-reply-review .order-manual-lines-table--sheet.data-table td {
    padding-top: 0.12rem;
    padding-bottom: 0.12rem;
    line-height: 1.18;
}

/* 商品セルは調達行が伸びても列を押し広げず、枠内で折り返す */
.lt-review-product-cell {
    vertical-align: top;
}

.lt-review-product {
    min-width: 14rem;
    max-width: 22rem;
    overflow-wrap: anywhere;
    word-break: normal;
}

body.page-lt-reply-review .order-manual-lines-table-wrap--scroll-many .lt-review-product {
    max-width: 24rem;
}

.lt-review-product__name {
    font-size: 0.78rem;
}

.lt-review-procurement {
    margin-top: 0.1rem;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
}

.lt-review-procurement.muted {
    color: #94a3b8;
    font-weight: 400;
}

.lt-review-procurement .muted,
.lt-review-row--out-of-scope .lt-review-procurement {
    color: #94a3b8;
    font-weight: 400;
}

.lt-review-row--out-of-scope > td {
    background: #f8fafc;
}

#lt-review-table .lt-th-split,
#lt-review-table .lt-td-split {
    width: 3.5rem;
    min-width: 3.25rem;
    white-space: nowrap;
    text-align: center;
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 2;
    box-shadow: -3px 0 5px -3px rgba(15, 23, 42, 0.12);
}

#lt-review-table thead .lt-th-split {
    z-index: 3;
    background: #f8fafc;
}

#lt-review-table tr.lt-review-line-split td {
    background: #fafafa;
}

#lt-review-table tr.lt-review-line-registered td {
    background: #f1f5f9;
    color: #334155;
}

#lt-review-table tr.lt-review-line-registered .lt-review-registered-val {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
}

#lt-review-table tr.lt-review-line-registered .lt-review-registered-arrival-text,
#lt-review-table tr.lt-review-line-registered .lt-review-registered-carrier,
#lt-review-table tr.lt-review-line-registered .lt-review-registered-tracking {
    background: #fff;
    min-width: 8rem;
}

#lt-review-table tr.lt-review-line-registered--merged td {
    background: #fff;
    color: inherit;
}

#lt-review-table tr.lt-review-line-registered--merged .lt-review-registered-arrival-text,
#lt-review-table tr.lt-review-line-registered--merged .lt-review-registered-carrier,
#lt-review-table tr.lt-review-line-registered--merged .lt-review-registered-tracking {
    background: #fff;
}

.lt-review-registered-badge {
    font-weight: 600;
    white-space: nowrap;
    background: #e2e8f0;
    color: #334155;
    font-size: 0.68rem;
    padding: 0.03rem 0.22rem;
    vertical-align: middle;
}

.lt-review-registered-label {
    font-size: 0.8125rem;
    line-height: 1.35;
}

#lt-review-table tr.lt-review-line--partial-answer td {
    background: #fffbeb;
}

.lt-review-remain-badge {
    font-weight: 600;
    white-space: nowrap;
    background: #ecfdf5;
    color: #065f46;
    font-size: 0.68rem;
    padding: 0.03rem 0.18rem;
}

.lt-review-split-label {
    font-size: 0.8125rem;
    line-height: 1.35;
}

.lt-review-field-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    min-width: 0;
}

.lt-review-field-wrap--changed .lt-review-date-text,
.lt-review-field-wrap--changed .lt-review-arrival-text,
.lt-review-field-wrap--changed .lt-review-carrier,
.lt-review-field-wrap--changed .lt-review-tracking {
    background: #fffbeb;
    border-color: #f59e0b;
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.35);
}

.lt-review-existing-hint {
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9.5rem;
}

.lt-review-existing-hint--diff {
    color: #b45309;
    font-weight: 600;
}

body.page-lt-reply-review .lt-review-date-cell .lt-review-field-wrap .order-filter-date-unified {
    width: 100%;
}

tr.order-line--import-summary .order-line-summary-suppressed {
    display: none !important;
}

tr.order-line--import-summary .order-line-td-name {
    width: 100%;
}

tr.order-line--import-summary .order-line-summary-memo {
    width: 100%;
    min-width: 16rem;
}

.order-detail-screen .order-manual-lines-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    box-shadow: 0 1px 0 var(--border);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.3rem;
    line-height: 1.2;
}

.order-detail-screen .order-lines-save-bar {
    flex-shrink: 0;
}

.order-detail-screen .order-manual-lines-wrap > .order-manual-lines-toolbar {
    flex-shrink: 0;
}

.order-detail-screen > .order-summary-footer,
.order-detail-screen > .order-detail-meta-details,
.order-detail-screen > .order-lead-time-mail-card {
    flex-shrink: 0;
}

.container--order-detail-fit .order-doc-upload-card h2 {
    font-size: 0.95rem;
    margin: 0 0 0.3rem;
}

.container--order-detail-fit .order-doc-upload-card > p.muted {
    font-size: 0.75rem;
    margin: 0 0 0.35rem;
    line-height: 1.35;
}

.container--order-detail-fit .order-doc-dropzone {
    min-height: 2.6rem;
    padding: 0.45rem 0.65rem;
}

.container--order-detail-fit .order-detail-meta-details {
    margin-top: 0.5rem;
}

.container--order-detail-fit .order-summary-footer--detail {
    margin-top: 0.4rem;
    padding: 0.45rem 0.75rem;
}

.container--order-detail-fit .order-summary-footer--detail .order-summary-footer__value {
    font-size: 1rem;
}

.container--order-detail-fit .order-lead-time-mail-card textarea {
    max-height: min(11rem, 22vh);
    overflow-y: auto;
    resize: vertical;
}

/* 納期回答ページ: 1画面に収める（メール｜納期の2カラム） */
body.page-lt-reply-mail .lt-reply-mail-screen {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
    gap: 0.4rem;
}

body.page-lt-reply-mail .lt-reply-mail-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    margin: 0;
    flex-shrink: 0;
}

body.page-lt-reply-mail .lt-reply-mail-head .order-page-head__title {
    margin: 0;
    font-size: 1.05rem;
}

.lt-reply-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

.lt-reply-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--accent, #2563eb);
    font-size: 0.75rem;
    line-height: 1.3;
    text-decoration: none;
}

.lt-reply-chip:hover {
    border-color: var(--accent, #2563eb);
    background: #eff6ff;
}

.lt-reply-chip--muted {
    color: var(--muted);
    cursor: default;
}

body.page-lt-reply-mail .lt-reply-mail-screen > .order-lead-time-mail-card,
body.page-lt-reply-mail form.lt-reply-mail-screen > .order-lead-time-mail-card {
    margin: 0;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    max-width: 48rem;
    padding: 0.55rem 0.75rem 0.65rem;
}

body.page-lt-reply-mail .order-lead-mail__grid {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
    grid-template-rows: auto auto auto minmax(6rem, 1fr);
}

.order-lead-mail__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.order-lead-mail__head > h2 {
    margin: 0;
    font-size: 0.95rem;
}

.order-lead-mail__hint {
    margin: 0 0 0.28rem !important;
    font-size: 0.75rem !important;
    line-height: 1.35 !important;
}

.order-lead-mail__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem 0.5rem;
}

.order-lead-mail__label {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    width: 100%;
    max-width: none;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
}

.order-lead-mail__label--full {
    grid-column: 1 / -1;
}

.order-lead-mail__sub {
    font-size: 0.7rem;
    line-height: 1.3;
}

.order-lead-mail__input,
.order-lead-mail__textarea {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.28rem 0.45rem;
    font-size: 0.8125rem;
    min-height: 1.7rem;
}

.order-lead-mail__input:focus,
.order-lead-mail__textarea:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    border-color: var(--accent);
}

body.page-lt-reply-mail textarea.order-lead-mail__textarea {
    flex: 1 1 auto;
    min-height: 5.5rem;
    max-height: none;
    height: clamp(5.5rem, 18vh, 12rem);
    overflow-y: auto;
    resize: vertical;
    font-size: 0.8125rem;
    line-height: 1.4;
}

body.page-lt-reply-mail .order-lead-mail__label--body {
    flex: 1 1 auto;
    min-height: 0;
}

.order-lead-mail__toolbar {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    flex-shrink: 0;
}

.odai-po-mail__head-end {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
}

.odai-po-mail__pono {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
}

.odai-po-mail__pono .order-lead-mail__input {
    width: 5.5rem;
    min-height: 1.7rem;
}

body.page-lt-reply-mail form.lt-reply-mail-screen > .order-lead-time-mail-card,
body.page-lt-reply-mail form.lt-reply-mail-screen > .card {
    margin: 0;
    max-width: 48rem;
}

body.page-lt-reply-mail .order-lead-reply-info-card--slim {
    padding: 0.4rem 0.55rem 0.45rem;
}

body.page-lt-reply-mail .order-lead-reply-info-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    flex-shrink: 0;
}

body.page-lt-reply-mail .order-lead-reply-info-card__title {
    margin: 0;
    font-size: 0.95rem;
}

body.page-lt-reply-mail .order-lead-reply-info-form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

body.page-lt-reply-mail .order-lead-reply-info-card--slim .order-manual-lines-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.page-lt-reply-mail .order-lead-reply-info-card--slim .order-manual-lines-table-wrap {
    flex: 1 1 auto;
    min-height: 8rem;
    max-height: none;
    overflow: auto;
}

body.page-lt-reply-mail .order-lead-reply-lines-table--slim {
    min-width: 42rem;
    font-size: 0.78rem;
}

body.page-lt-reply-mail .order-lead-reply-lines-table--slim .order-line-th-name,
body.page-lt-reply-mail .order-lead-reply-lines-table--slim .order-line-td-name {
    min-width: 0;
    max-width: none;
    width: auto;
}

body.page-lt-reply-mail .line-reply-defaults-bar {
    padding: 0.2rem 0.4rem;
    flex-shrink: 0;
}

body.page-lt-reply-mail .line-reply-defaults-bar__title {
    margin: 0;
    align-self: center;
    font-size: 0.72rem;
}

body.page-lt-reply-mail .lt-reply-docs-fold {
    flex-shrink: 0;
    margin: 0;
    padding: 0.35rem 0.65rem;
}

body.page-lt-reply-mail .lt-reply-docs-fold > summary {
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
}

body.page-lt-reply-mail .lt-reply-docs-fold .order-lt-reply-docs-card {
    border: 0;
    box-shadow: none;
    padding: 0.35rem 0 0;
    margin: 0;
}

.container--order-detail-fit .order-page-head {
    margin-bottom: 0.25rem;
}

.container--order-detail-fit .order-page-head__title {
    font-size: 1.1rem;
}

#order-lead-time-mail {
    scroll-margin-top: 4.5rem;
}

.site-header__toolbar:not(.site-header__toolbar--flam) {
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.site-header__toolbar-inner:not(.site-header__toolbar-inner--flam) {
    max-width: min(1760px, 100vw - 1.5rem);
    margin: 0 auto;
    padding: 0.4rem 1rem 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.45rem;
}

.site-header__toolbar .site-header__tool {
    font-size: 0.8125rem;
    padding: 0.38rem 0.65rem;
    white-space: nowrap;
}

.order-page-head {
    margin: 0 0 0.45rem;
}

.order-page-head--row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 1rem;
    margin: 0 0 0.35rem;
}

.order-page-head--row .order-page-head__title {
    margin: 0;
    flex: 0 1 auto;
}

.order-page-head__row-meta {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.85rem;
    padding: 0.28rem 0.5rem;
    border-radius: 6px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    flex: 1 1 auto;
    min-width: 0;
}

.order-page-head__row-meta .order-page-head__preferred {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--muted, #64748b);
    white-space: nowrap;
}

.order-page-head__om-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    white-space: nowrap;
}

.order-page-head__om-lbl {
    font-weight: 600;
    color: var(--muted, #64748b);
}

.order-page-head__om-link {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.order-page-head__lt-badge {
    display: inline-block;
    margin-left: 0.45rem;
    padding: 0.12rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    vertical-align: middle;
    color: #92400e;
    background: #fef3c7;
    border: 1px solid #f59e0b;
}

.order-page-head__title {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.3;
}

.order-page-head__id {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.92rem;
    margin-left: 0.25rem;
}

.order-page-head__id--field {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    font-weight: normal;
}

.order-page-head__no-input {
    width: 10.5ch;
    min-width: 10.5ch;
    max-width: 42vw;
    padding: 0.2rem 0.45rem;
    font-size: 0.92rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 6px;
    line-height: 1.25;
}

.order-page-head__no-input:focus {
    outline: 2px solid rgba(37, 99, 235, 0.25);
    outline-offset: 1px;
    border-color: var(--accent, #2563eb);
}

.order-page-head__subids {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1.25rem;
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
}

.order-page-head__subids label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-weight: 600;
    color: var(--muted, #64748b);
}

.order-page-head__so-readonly {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-weight: 600;
    color: var(--muted, #64748b);
}

.order-page-head__so-readonly-val {
    font-weight: 600;
    color: var(--text, #0f172a);
    font-variant-numeric: tabular-nums;
    min-width: 4rem;
}

.order-page-head__so-missing {
    font-weight: 600;
    color: #b45309;
    font-variant-numeric: tabular-nums;
    cursor: help;
    border-bottom: 1px dotted #d97706;
}

.order-page-head__subids .psp-in {
    width: 6.5rem;
    max-width: 36vw;
    padding: 0.18rem 0.4rem;
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
}

.order-page-head__subids .psp-in--wide {
    width: 9.5rem;
    max-width: 48vw;
}

.order-page-head__subids--preferred {
    margin-top: 0.45rem;
    padding: 0.35rem 0.55rem;
    border-radius: 6px;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    gap: 0.5rem 0.85rem;
}

.order-page-head__subids--preferred-empty {
    background: #f8fafc;
    border-color: var(--border, #e2e8f0);
}

/* 出荷明細メタ: 1行構成・日付ペア・受注リンク */
.order-page-head__subids--shipment-meta {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.4rem;
}

.order-page-head__subid--date-pair {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem 0.85rem;
    font-weight: 600;
    color: var(--muted, #64748b);
}

.order-page-head__date-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
}

.order-page-head__smart-date.order-filter-date-unified {
    width: auto;
    min-width: 0;
    flex: 0 0 auto;
}

.order-page-head__subids .order-page-head__smart-date .order-filter-date-unified__text {
    width: 7.25rem;
    max-width: 9rem;
    min-width: 6.5rem;
    padding: 0.15rem 0.28rem;
    min-height: 1.42rem;
    font-size: 0.8125rem;
    line-height: 1.15;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
    font-variant-numeric: tabular-nums;
}

.ship-line-smart-date.order-filter-date-unified {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    max-width: 9.5rem;
    min-width: 8rem;
    width: auto;
    flex: 0 0 auto;
}

.ship-line-smart-date .order-filter-date-unified__text {
    font-size: 0.78rem;
    padding: 0.2rem 0.25rem;
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

.ship-line-smart-date .order-filter-date-unified__pick {
    flex: 0 0 1.85rem;
    min-width: 1.85rem;
    min-height: 1.55rem;
}

.ship-lines-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

.ship-lines-table th,
.ship-lines-table td {
    padding: 0.28rem 0.15rem;
    vertical-align: middle;
}

/* 固定列は必要最小。余白は品名だけが吸収する */
.ship-lines-table .ship-line-th-lineno,
.ship-lines-table .ship-line-td-lineno {
    width: 2.6rem;
    white-space: nowrap;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}

.ship-lines-table .ship-line-th-wh,
.ship-lines-table .ship-line-td-wh {
    width: 4.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ship-lines-table .ship-line-th-qty,
.ship-lines-table .ship-line-td-qty {
    width: 3.2rem;
    white-space: nowrap;
}

.ship-lines-table .ship-line-th-date,
.ship-lines-table .ship-line-td-date {
    width: 8.6rem;
    white-space: nowrap;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}

.ship-lines-table .ship-line-th-slot,
.ship-lines-table .ship-line-td-slot {
    width: 5.6rem;
    white-space: nowrap;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}

.ship-lines-table .ship-line-in-slot {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

/* 全角おおよそ8文字 */
.ship-lines-table .ship-line-th-carrier,
.ship-lines-table .ship-line-td-carrier {
    width: 8.6em;
    white-space: nowrap;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}

.ship-lines-table .ship-line-in-carrier {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

/* 全角おおよそ14桁 */
.ship-lines-table .ship-line-th-track,
.ship-lines-table .ship-line-td-track {
    width: 14.6em;
    white-space: nowrap;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}

.ship-lines-table .ship-line-in-track {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

.ship-lines-table .ship-line-th-name,
.ship-lines-table .ship-line-td-name {
    width: auto;
    min-width: 0;
    max-width: none;
}

.ship-lines-table .ship-line-td-name {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.35;
}

.ship-lines-table .ship-line-smart-date.order-filter-date-unified {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.ship-line-defaults-bar {
    margin: 0 0 0.55rem;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.4rem 0.65rem;
    padding: 0.35rem 0.45rem;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    background: #f8fafc;
}

.ship-line-defaults-bar__title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    align-self: center;
    white-space: nowrap;
    margin: 0;
    padding: 0 0.1rem 0 0;
}

.ship-line-defaults-bar__lbl {
    white-space: nowrap;
    line-height: 1.2;
}

.ship-line-defaults-bar__cell {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted, #64748b);
    flex: 0 0 auto;
}

.ship-line-defaults-bar__cell--date {
    width: auto;
}

.ship-line-defaults-bar__cell--slot {
    width: 7rem;
}

.ship-line-defaults-bar__cell--carrier {
    width: 8em;
}

.ship-line-defaults-bar__cell--track {
    width: 14em;
}

.ship-line-defaults-bar__cell .psp-in {
    width: 100%;
    box-sizing: border-box;
    min-height: 1.55rem;
    padding: 0.22rem 0.35rem;
    font-size: 0.8125rem;
}

.ship-line-defaults-bar .ship-line-smart-date {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    margin-top: 0;
    width: 9.2rem;
    max-width: 9.2rem;
}

.ship-line-defaults-bar__actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    align-self: flex-end;
    padding-bottom: 0.05rem;
    white-space: nowrap;
}

.ship-line-defaults-bar__overwrite {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted, #64748b);
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    white-space: nowrap;
    cursor: pointer;
}

.ship-line-defaults-bar__actions .btn {
    flex: 0 0 auto;
}

.order-page-head__subid--order-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--muted, #64748b);
}

.order-page-head__order-link {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    line-height: 1.25;
    box-sizing: border-box;
}

.order-page-head__order-link:hover {
    text-decoration: none !important;
    border-bottom-color: currentColor;
}

/* 受注・発注・出荷: ヘッダー入力枠を注文書AIレビューと同系に */
body.page-order-detail .order-detail-header-flam.order-detail-header-flam--sheet.card {
    padding: 0.4rem 0.55rem;
}

body.page-order-detail .order-detail-header-flam .psp-in,
body.page-order-detail .order-detail-header-flam__code,
body.page-order-detail .order-detail-header-flam__name,
body.page-order-detail .order-detail-header-flam__addr,
body.page-order-detail .order-detail-header-flam__zip,
body.page-order-detail .order-detail-header-flam__phone {
    border-radius: 4px;
    border: 1px solid var(--border);
    min-height: 1.42rem;
    padding: 0.15rem 0.28rem;
    font-size: 0.8125rem;
    line-height: 1.15;
    box-sizing: border-box;
}

.order-page-head__subids--preferred-empty {
    background: #f8fafc;
    border-color: var(--border, #e2e8f0);
}

.order-page-head__preferred {
    font-weight: 700 !important;
    color: #92400e !important;
}

.order-page-head__subids--preferred-empty .order-page-head__preferred {
    color: var(--muted, #64748b) !important;
    font-weight: 600 !important;
}

.order-page-head__preferred .psp-in--preferred-date {
    width: 9.5rem;
    max-width: 48vw;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.order-page-head__preferred .psp-in--preferred-datetime {
    width: 14.5rem;
    max-width: 72vw;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.order-page-head__preferred-badge {
    font-size: 0.9375rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #92400e;
    letter-spacing: 0.02em;
}

.order-page-head__preferred-hint {
    font-size: 0.75rem;
    font-weight: 500;
}

.order-list-col-preferred {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-weight: 400;
}

.order-list-col-preferred.is-empty {
    font-weight: 400;
    color: var(--muted, #64748b);
}

/* 注文管理（横に列が多い） */
.container--wide {
    max-width: 1480px;
}

.container--wide.container--om-list {
    max-width: min(1760px, calc(100vw - 1.5rem));
    overflow-x: clip;
}

/* 注文管理一覧: サイトヘッダー以外の文字を 0.875rem に統一 */
body.page-order-management-list main.container--om-list {
    font-size: 0.875rem;
}

body.page-order-management-list .app-tile--hub-dropdown[href="/order-management"] {
    display: none;
}

body.page-order-management-list main.container--om-list :is(
    .page-title,
    .flash,
    .callout,
    .callout p,
    .callout li,
    .callout a,
    .callout strong,
    .muted,
    p,
    a,
    span,
    strong,
    label,
    legend,
    button,
    .btn,
    input,
    select,
    textarea,
    th,
    td,
    h2,
    h3,
    .om-list-tab,
    .om-list-tab__count,
    .om-filter-card__title,
    .om-filter-field,
    .om-filter-field__lbl,
    .om-filter-hint,
    .order-list-meta,
    .order-list-page-size,
    .order-list-pager-status,
    .list-pager-bottom__btn,
    .om-lt-result__lead,
    .om-lt-result__reason,
    .om-lt-result__details summary,
    .om-lt-result__list,
    .om-lt-skip-details summary,
    .om-mail-intake-dock__title,
    .om-mail-intake-dock__queue-title,
    .om-mail-intake-dock__queue-summary,
    .om-mail-intake-dock__more,
    .om-mail-intake-empty,
    .om-mail-intake-claim-note,
    .om-mail-intake-status-note,
    .om-mail-intake-kind-option,
    .om-dropzone__inner,
    .om-dropzone-kind-note,
    .card__title,
    .link-order-id,
    code
) {
    font-size: 0.875rem;
}

body.page-order-management-list main.container--om-list .om-filter-field input,
body.page-order-management-list main.container--om-list .om-filter-field select {
    font-size: 0.875rem;
}

body.page-order-management-list main.container--om-list .om-table th,
body.page-order-management-list main.container--om-list .om-table td,
body.page-order-management-list main.container--om-list .om-table.om-table--excel th,
body.page-order-management-list main.container--om-list .om-table.om-table--excel td {
    font-size: 0.875rem;
}

body.page-order-management-list main.container--om-list .om-table--inline-edit .om-cell-input,
body.page-order-management-list main.container--om-list .om-table--inline-edit .om-cell-select {
    font-size: 0.875rem;
}

body.page-order-management-list main.container--om-list .om-mail-intake-dock__badge,
body.page-order-management-list main.container--om-list .om-mail-intake-nav-badge {
    font-size: 0.875rem;
}

.container--om-list .om-table-wrap {
    overflow-x: auto;
    max-width: 100%;
}

/* 注文管理一覧: 行背景はすべて白 */
body.page-order-management-list main.container--om-list .om-table.om-table--excel tbody tr td,
body.page-order-management-list main.container--om-list .om-table.om-table--excel tbody tr:nth-child(even) td,
body.page-order-management-list main.container--om-list .om-table.om-table--excel tbody tr.om-row--lead-done,
body.page-order-management-list main.container--om-list .om-table.om-table--excel tbody tr.om-row--lead-done td,
body.page-order-management-list main.container--om-list .om-table--inline-edit td.om-cell--ship-estimate-delayed,
body.page-order-management-list main.container--om-list .om-table--inline-edit td.om-cell--ship-estimate-unset,
body.page-order-management-list main.container--om-list .om-table--inline-edit td.om-cell--ship-estimate-delayed .om-cell-input--date,
body.page-order-management-list main.container--om-list .om-table--inline-edit td.om-cell--status-done,
body.page-order-management-list main.container--om-list .om-table--inline-edit .om-cell-select--done {
    background: #fff;
    box-shadow: none;
}

body.page-order-management-list main.container--om-list .om-table--inline-edit td.om-cell--ship-estimate-delayed,
body.page-order-management-list main.container--om-list .om-table--inline-edit td.om-cell--ship-estimate-unset,
body.page-order-management-list main.container--om-list .om-ship-rollup,
body.page-order-management-list main.container--om-list .om-ship-rollup-text {
    color: inherit;
}

.container--om-list .om-table.om-table--excel {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

/* 備考は広めつつ、右端の操作列が必ず収まるよう配分 */
.container--om-list .om-col--check { width: 2.2%; }
.container--om-list .om-col--mgmt { width: 4.6%; min-width: 11ch; }
.container--om-list .om-col--so { width: 4.8%; min-width: 9ch; }
.container--om-list .om-col--po { width: 6.4%; }
.container--om-list .om-col--party { width: 11.8%; }
.container--om-list .om-col--date { width: 5.2%; }
.container--om-list .om-col--status { width: 5%; }
.container--om-list .om-col--remarks { width: 13.5%; }
.container--om-list .om-col--assign { width: 3.9%; min-width: 7ch; }
.container--om-list .om-col--doc { width: 2.5%; }
.container--om-list .om-col--actions { width: 3.2%; }

.container--om-list .om-list-check-cell,
.container--om-list .om-cell--check {
    width: 2.25rem;
    max-width: 2.25rem;
    padding-left: 0.35rem !important;
    padding-right: 0.2rem !important;
    text-align: center;
    vertical-align: middle;
    overflow: visible;
}

.container--om-list .om-table-wrap.table-wrap {
    overflow-x: auto;
}

.om-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.om-table th,
.om-table td {
    font-size: 0.8125rem;
    vertical-align: top;
}

.om-cell--clip {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.om-cell--party {
    min-width: 0;
}

.om-table--inline-edit td.om-cell--party {
    vertical-align: top;
}

.om-table--inline-edit td.om-cell--party .om-cell-input {
    max-height: none;
    min-height: 2.4rem;
    white-space: normal;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.om-cell--po {
    min-width: 0;
    vertical-align: top;
}

.om-po-links-stack {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    line-height: 1.35;
    min-width: 0;
}

.om-so-links-stack {
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    line-height: 1.35;
    min-width: 0;
}

.om-so-link-chip {
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    color: var(--link, #2563eb);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.om-so-link-chip--text {
    color: var(--text, #1e293b);
}

.om-mgmt-split-badge {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.05rem 0.35rem;
    border-radius: 0.25rem;
    background: var(--surface-muted, #f1f5f9);
    color: var(--muted-fg, #64748b);
    font-size: 0.6875rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.om-row-split--cont td {
    background: color-mix(in srgb, var(--surface-muted, #f8fafc) 70%, transparent);
}

.om-row-split--primary + .om-row-split--cont td {
    border-top-style: dashed;
}

.om-cell-readonly {
    display: block;
    font-size: 0.8125rem;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 12rem;
}

.om-party-mismatch-hint {
    display: block;
    margin-top: 0.12rem;
    font-size: 0.68rem;
    line-height: 1.25;
    color: #b45309;
    white-space: normal;
}

.om-cell--split-echo {
    font-size: 0.75rem;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 8rem;
}

.om-po-link-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem 0.28rem;
    min-width: 0;
}

.om-po-link-row__docs {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    flex-shrink: 0;
}

.om-po-link-chip {
    font-size: 0.8125rem;
    font-variant-numeric: tabular-nums;
    text-decoration: none;
    color: var(--link, #2563eb);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.om-po-link-chip {
    border-bottom: 1px solid transparent;
    line-height: 1.25;
    box-sizing: border-box;
}

.om-po-link-chip:hover {
    text-decoration: none !important;
    border-bottom-color: currentColor;
}

.om-po-link-chip--stock {
    color: #0f766e;
}

.om-po-link-chip--stock:hover {
    color: #0d9488;
}

.om-inv-ship-links-stack {
    margin-top: 0.1rem;
}

.om-cell--so {
    min-width: 0;
}

.om-table--inline-edit td.om-cell--so {
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

.om-table--inline-edit .om-cell--so .om-cell-input--erp-id {
    max-width: 100%;
    min-width: 0;
    width: 100%;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

.om-cell--doc-icon {
    text-align: center;
    vertical-align: middle;
    padding: 0.15rem 0.1rem !important;
}

.container--om-list .om-cell-doc-icon-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.om-th--doc {
    text-align: center;
    padding-left: 0.1rem !important;
    padding-right: 0.1rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.container--om-list .om-table.om-table--excel th.om-th--doc {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.container--om-list .om-table.om-table--excel th,
.container--om-list .om-table.om-table--excel td {
    overflow: hidden;
}

.container--om-list .om-table .om-management-no-cell {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    font-variant-numeric: tabular-nums;
}

body.page-order-management-list main.container--om-list a.om-mgmt-no-link {
    display: inline;
    color: inherit;
    font-weight: inherit;
    border-bottom: none;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.12em;
    text-decoration-color: currentColor;
    line-height: inherit;
}

body.page-order-management-list main.container--om-list a.om-mgmt-no-link:hover,
body.page-order-management-list main.container--om-list a.om-mgmt-no-link:focus-visible {
    border-bottom: none;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

body.page-order-management-list main.container--om-list a.om-so-link-chip {
    display: inline;
    color: inherit;
    font-weight: inherit;
    border-bottom: none;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.12em;
    text-decoration-color: currentColor;
    line-height: inherit;
}

body.page-order-management-list main.container--om-list a.om-so-link-chip:hover,
body.page-order-management-list main.container--om-list a.om-so-link-chip:focus-visible {
    border-bottom: none;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.container--om-list .om-cell--actions,
.container--om-list .om-th--actions {
    overflow: visible;
    position: sticky;
    right: 0;
    z-index: 3;
    min-width: calc(3.25rem - 2ch);
    box-shadow: -4px 0 6px -4px rgba(15, 23, 42, 0.12);
    text-align: center;
}

.container--om-list .om-cell-actions-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-width: 0;
}

.container--om-list .om-th--actions {
    background: #f1f5f9;
}

.container--om-list .om-table.om-table--excel tbody tr td.om-cell--actions {
    background: #fff;
}

.container--om-list .om-table.om-table--excel tbody tr:nth-child(even) td.om-cell--actions {
    background: #fafbfc;
}

.om-doc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    padding: 0;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 6px;
    background: var(--surface, #fff);
    color: var(--link, #2563eb);
    cursor: pointer;
    line-height: 1;
    vertical-align: middle;
}

.om-doc-icon:hover {
    background: rgba(37, 99, 235, 0.08);
    border-color: var(--accent, #2563eb);
}

.om-doc-icon--lt-reply {
    color: #0d9488;
}

.om-doc-icon--lt-reply:hover {
    background: rgba(13, 148, 136, 0.08);
    border-color: #0d9488;
}

.om-doc-icon__svg {
    display: block;
}

.om-case-progress-card {
    margin-bottom: 1rem;
    border-left: 3px solid var(--accent, #2563eb);
}

.om-case-progress-card__title {
    margin: 0 0 0.35rem;
    font-size: 1.125rem;
}

.om-case-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.65rem 1rem;
    margin: 0;
}

.om-case-progress-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.om-case-progress-row dt {
    margin: 0;
    font-size: 0.75rem;
    color: var(--muted-fg, #64748b);
    font-weight: 600;
}

.om-case-progress-row dd {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.45;
}

.om-case-progress-po .om-po-links-stack {
    align-items: flex-start;
}

.om-case-progress-so .om-so-links-stack {
    align-items: flex-start;
}

/* 注文管理明細: 1画面コンパクトレイアウト */
.container--om-case-edit {
    max-width: min(100%, 72rem);
    padding-top: 0.5rem;
    padding-bottom: 0.75rem;
}

.container--om-case-edit .om-case-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "topLeft topRight"
        "bottomLeft bottomRight";
    gap: 0.65rem 0.85rem;
    align-items: start;
}

.container--om-case-edit .om-case-edit-grid--hub {
    grid-template-areas:
        "topLeft topRight"
        "bottomFull bottomFull";
}

.container--om-case-edit .om-case-edit-grid__top-left {
    grid-area: topLeft;
}

.container--om-case-edit .om-case-edit-grid__top-right {
    grid-area: topRight;
}

.container--om-case-edit .om-case-edit-grid__bottom-left {
    grid-area: bottomLeft;
}

.container--om-case-edit .om-case-edit-grid__bottom-right {
    grid-area: bottomRight;
}

.container--om-case-edit .om-case-edit-grid__bottom-full {
    grid-area: bottomFull;
}

.om-hub-readonly-party {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem 1rem;
    margin-bottom: 0.35rem;
}

.om-hub-readonly-party__val {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.35;
    margin-top: 0.15rem;
}

.om-case-docs-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
}

.om-case-docs-progress {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    color: var(--muted, #64748b);
    font-variant-numeric: tabular-nums;
}

.om-doc-state--todo {
    color: var(--danger, #b91c1c);
}

.om-case-docs-card__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    margin-left: auto;
}

.om-doc-add-btn-form {
    display: inline-flex;
    margin: 0;
}

.om-doc-add-btn {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.om-doc-add-btn input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    font-size: 0;
}

.container--om-case-edit .om-case-progress-card,
.container--om-case-edit .om-case-docs-card,
.container--om-case-edit .om-case-edit-card {
    margin: 0;
    padding: 0.65rem 0.85rem;
}

.container--om-case-edit .om-case-progress-card__title,
.container--om-case-edit .om-case-docs-card h2,
.container--om-case-edit .om-case-edit-card h2 {
    margin: 0 0 0.4rem;
    font-size: 0.95rem;
}

.container--om-case-edit .om-case-progress-grid {
    gap: 0.35rem 0.75rem;
}

.container--om-case-edit .om-case-progress-row dd {
    font-size: 0.875rem;
}

.container--om-case-edit .om-case-docs-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    margin-bottom: 0.35rem;
}

.container--om-case-edit .om-case-docs-card__head h2 {
    margin: 0;
}

.container--om-case-edit .om-case-docs-table,
.container--om-case-edit .om-case-reply-history {
    margin-top: 0.35rem;
    max-height: 9.5rem;
    overflow: auto;
}

.container--om-case-edit .data-table--compact th,
.container--om-case-edit .data-table--compact td {
    padding: 0.25rem 0.4rem;
    font-size: 0.8125rem;
}

.container--om-case-edit .form-grid--compact {
    gap: 0.45rem 0.75rem;
}

.container--om-case-edit .form-grid--compact label {
    font-size: 0.8125rem;
}

.container--om-case-edit .form-grid--compact textarea {
    min-height: 2.5rem;
}

.container--om-case-edit .om-edit-suggest-collapsible,
.container--om-case-edit .callout {
    margin: 0.5rem 0 0;
    padding: 0.45rem 0.65rem;
    font-size: 0.8125rem;
}

.container--om-case-edit .site-header__flam-tab .om-management-no {
    font-size: 0.8125rem;
    margin-left: 0.35rem;
}

@media (max-width: 900px) {
    .container--om-case-edit .om-case-edit-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "topLeft"
            "topRight"
            "bottomLeft"
            "bottomRight";
    }

    .container--om-case-edit .om-case-docs-table,
    .container--om-case-edit .om-case-reply-history {
        max-height: none;
    }
}

.om-case-status-pill {
    display: inline-block;
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    background: var(--surface-muted, #f1f5f9);
    font-size: 0.8125rem;
    font-weight: 600;
}

.form-grid .form-section-label {
    grid-column: 1 / -1;
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--muted-fg, #64748b);
}

.master-emails-editor {
    width: 100%;
    min-width: 0;
}

.master-emails-editor__list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.master-email-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
}

.master-email-input {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}

.master-email-row__actions {
    flex: 0 0 auto;
}

body.page-customer-detail .master-flam-dl--customer-fields .master-email-add,
body.page-customer-detail .master-flam-dl--customer-fields .master-email-remove,
body.page-supplier-detail .master-flam-dl--customer-fields .master-email-add,
body.page-supplier-detail .master-flam-dl--customer-fields .master-email-remove {
    box-sizing: border-box;
    min-height: 2.25rem;
    height: 2.25rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 400;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

body.page-customer-detail .master-flam-dl--customer-fields .master-email-add,
body.page-supplier-detail .master-flam-dl--customer-fields .master-email-add {
    max-width: none;
}

body.page-customer-detail .master-flam-dl--customer-fields .master-email-remove,
body.page-supplier-detail .master-flam-dl--customer-fields .master-email-remove {
    min-width: 2.25rem;
    width: 2.25rem;
    padding: 0.45rem 0;
    justify-content: center;
}

.om-cell--mgmt {
    white-space: nowrap;
    font-size: 0.8125rem;
}

.om-mgmt-links {
    display: inline-flex;
    align-items: center;
    gap: 0.12rem;
    flex-wrap: wrap;
}

.om-case-id-digits {
    font-variant-numeric: tabular-nums;
}

.om-management-no,
.om-management-no-cell {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-size: 0.8125rem;
}

.om-management-no-row {
    margin-bottom: 0.25rem;
}

.om-table--inline-edit .om-cell-input,
.om-table--inline-edit .om-cell-select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 0.8125rem;
    line-height: 1.25;
    padding: 0.12rem 0.3rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface);
}

.om-table--inline-edit .om-cell-input:not([type="date"]) {
    min-height: 1.65rem;
    max-height: 1.85rem;
}

.om-table--inline-edit .om-cell-input--date {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    min-height: 1.75rem;
    max-height: none;
}

.om-table--inline-edit td.om-cell--date {
    min-width: 0;
}

.om-table--inline-edit td.om-cell--ship-estimate-delayed,
.om-table--inline-edit td.om-cell--ship-estimate-delayed .om-cell-input--date {
    background: #fff7ed;
    color: #9a3412;
    box-shadow: inset 0 0 0 1px #fdba74;
}

.om-table--inline-edit td.om-cell--ship-estimate-unset {
    background: #fef2f2;
    color: #b91c1c;
    box-shadow: inset 0 0 0 1px #fecaca;
}

.om-ship-rollup {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    line-height: 1.25;
    font-size: 0.8125rem;
}

.om-ship-rollup-text {
    font-weight: inherit;
}

.om-ship-rollup-hint {
    font-size: 0.68rem;
}

.om-mini-badge {
    display: inline-block;
    margin-top: 0.15rem;
    margin-right: 0.2rem;
    padding: 0.05rem 0.3rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 3px;
    white-space: nowrap;
    vertical-align: middle;
}

.om-mini-badge--ok {
    background: #ecfdf5;
    color: #047857;
}

.om-mini-badge--po {
    background: #eff6ff;
    color: #1d4ed8;
}

.om-mini-badge--pending {
    background: #fff7ed;
    color: #9a3412;
}

.om-table--inline-edit td.om-cell--status-done,
.om-table--inline-edit .om-cell-select--done {
    background: #ecfdf5;
    color: #047857;
    font-weight: 600;
}

.om-table--inline-edit tr.om-row--lead-done {
    background: #f8fffb;
}

.om-filter-field--include-done {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.om-filter-field--include-done input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.om-table--inline-edit td.om-cell--remarks {
    min-width: 0;
}

.om-table--inline-edit .om-cell-input--remarks {
    min-width: 0;
    width: 100%;
    /* 全角ひらがな約25文字が見える目安（表フォント 0.8125rem 前提） */
    font-size: 0.8125rem;
    letter-spacing: 0;
}

.om-table--inline-edit td.om-cell--assign {
    min-width: 0;
}

.om-table--inline-edit .om-cell-input--assign {
    min-width: 0;
}

.om-table--inline-edit td.om-cell--status {
    min-width: 0;
}

.om-table--inline-edit td.om-cell--status .om-cell-select {
    font-size: 0.75rem;
    padding: 0.06rem 0.15rem;
    max-width: 100%;
}

.om-table--inline-edit .om-cell-select {
    padding: 0.08rem 0.2rem;
    cursor: pointer;
}

.om-table--inline-edit td.om-cell--input {
    vertical-align: top;
    min-width: 0;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

/* td 自体に display:flex するとテーブル列がずれるため、内側ラッパーで横並びにする */
.om-cell--so-inner,
.om-cell--po-inner {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    width: 100%;
    min-width: 0;
}

.om-cell--so-inner .om-cell-input,
.om-cell--po-inner .om-cell-input {
    flex: 1;
    min-width: 0;
}

.om-cell-so-link {
    flex-shrink: 0;
    text-decoration: none;
    font-size: 0.875rem;
    opacity: 0.75;
}

.om-cell-so-link:hover {
    opacity: 1;
}

.om-table.om-table--excel th {
    background: #f1f5f9;
    font-weight: 600;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    padding: 0.22rem 0.38rem;
    border: 1px solid #cbd5e1;
    white-space: nowrap;
    vertical-align: middle;
}

.om-table.om-table--excel td {
    padding: 0.18rem 0.35rem;
    border: 1px solid #e2e8f0;
    vertical-align: middle;
}

.om-table.om-table--excel tbody tr:nth-child(even) td {
    background: #fafbfc;
}

.om-table--inline-edit .om-cell-input--erp-id {
    max-width: 100%;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.container--om-list .om-table--inline-edit .om-cell--so .om-cell-input--erp-id {
    width: 8.5ch;
    min-width: 8.5ch;
    max-width: 100%;
}

.container--om-list .om-table--inline-edit td.om-cell--so .om-so-links-stack .link-order-id {
    display: inline-block;
    max-width: 8.5ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
}

/* 注文管理: マスタ検索コンボ（datalist ではなくパネルで絞り込み） */
.om-combo-wrap {
    position: relative;
    display: block;
    width: 100%;
}

/* 受注明細: 商品コード＋虫眼鏡（検索） */
.om-combo-wrap--order-line-code {
    display: flex;
    align-items: stretch;
    gap: 0.2rem;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.om-combo-wrap--order-line-code .om-combo-search-btn {
    flex: 0 0 auto;
    width: var(--order-line-code-btn-width);
    min-width: var(--order-line-code-btn-width);
    height: var(--order-line-code-btn-width);
    min-height: var(--order-line-code-btn-width);
    padding: 0;
}

.om-combo-wrap--order-line-code .om-combo-search-btn svg {
    width: 14px;
    height: 14px;
}

.om-combo-wrap--order-line-code .order-line-code,
.om-combo-wrap--order-line-code .psp-in.order-line-code {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}

/* 商品コード欄直下: 入力に応じた候補（虫眼鏡のモーダルと併用） */
.om-inline-product-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 1250;
    max-height: min(38vh, 260px);
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
    font-size: 0.8125rem;
}

/* 受注・取り置き等: 表の overflow で切れないよう fixed 配置 */
.om-inline-product-suggest--fixed {
    position: fixed;
    left: auto;
    right: auto;
    top: auto;
}

body.page-inventory-hold .order-manual-lines-table-wrap,
body.page-inventory-transfer .order-manual-lines-table-wrap,
body.page-inventory-adjust .order-manual-lines-table-wrap {
    min-height: 14rem;
    overflow: auto;
}

/* 拠点振替: ヘッダー以外のページ内文字を 0.875rem に統一 */
body.page-inventory-transfer .order-lines-unified-card__title,
body.page-inventory-transfer .order-manual-lines-table th,
body.page-inventory-transfer .order-manual-lines-table td,
body.page-inventory-transfer .order-manual-lines-table .psp-in,
body.page-inventory-transfer .form-grid label,
body.page-inventory-transfer .form-grid .psp-in {
    font-size: 0.875rem;
}

/* 在庫調整明細: 取り置き明細と同型の色味・行密度 */
body.page-inventory-adjust .order-detail-header-flam.order-detail-header-flam--sheet.card {
    margin: 0;
    background: #fafbfc;
    border-color: var(--border);
    box-shadow: none;
}

body.page-inventory-adjust .order-lines-unified-card--primary {
    border-color: var(--border);
    box-shadow: none;
    background: #fff;
}

/* 発注明細: 入金入力に寄せた色味・カード・表密度 */
body.page-po-detail .order-detail-header-flam.order-detail-header-flam--sheet.card {
    margin: 0 0 0.45rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    background: #fff;
    border-color: var(--border);
    box-shadow: var(--shadow);
}

body.page-po-detail:not(.page-po-v2) .order-lines-unified-card--primary {
    border-radius: 12px;
    border-color: var(--border);
    box-shadow: var(--shadow);
    background: #fff;
}

body.page-po-detail .order-detail-header-flam .psp-in,
body.page-po-detail .order-detail-header-flam__code,
body.page-po-detail .order-detail-header-flam__name,
body.page-po-detail .order-detail-header-flam__addr,
body.page-po-detail .order-detail-header-flam__zip,
body.page-po-detail .order-detail-header-flam__phone {
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

/* 伝票系 v2: 一覧フィルタ同型の外枠＋行内は枠線なし（項目はそのまま） */
body.page-v2-filter-shell .po-v2-header.card {
    margin: 0 0 0.45rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #fff;
}

body.page-v2-filter-shell .po-v2-header .po-v2-header__grid {
    margin: 0;
    gap: 0.55rem 1.5rem;
    border: none;
    border-radius: 0;
}

/* 明細表と同じ行の余白（0.4rem × 0.45rem）で項目行を揃える */
body.page-v2-filter-shell .po-v2-header .po-v2-header__grid--so-detail {
    margin: 0;
    gap: 0 1.5rem;
    border: none;
    border-radius: 0;
}

@media (min-width: 720px) {
    body.page-v2-filter-shell .po-v2-header--so-detail .po-v2-header__grid--so-detail {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }

    body.page-v2-filter-shell .po-v2-header .po-v2-header__grid:not(.po-v2-header__grid--so-detail) {
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    }
}

body.page-v2-filter-shell .po-v2-header .po-v2-header__col--right {
    border-left: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-header__col {
    gap: 0.5rem;
}

/* 2列ヘッダー（新規見積など）: 項目名が外枠に張り付かない */
body.page-v2-filter-shell .po-v2-header .po-v2-header__col--left {
    padding-left: 0.4rem;
    padding-right: 0.2rem;
    box-sizing: border-box;
}

body.page-v2-filter-shell .po-v2-header .po-v2-header__col--right {
    padding-left: 0.2rem;
    padding-right: 0.4rem;
    box-sizing: border-box;
}

body.page-v2-filter-shell .po-v2-header .po-v2-header__grid--so-detail > .po-v2-field {
    padding: 0.4rem 0.45rem;
    min-height: auto;
    box-sizing: border-box;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field {
    min-height: auto;
    border-bottom: none;
    align-items: center;
    column-gap: 1.25em;
    row-gap: 0.5rem;
}

body.page-v2-filter-shell .po-v2-header .po-v2-header__grid--so-detail > .po-v2-field:nth-child(even) {
    border-left: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field__lbl {
    padding: 0;
    font-weight: 500;
    color: var(--muted);
    background: #fff;
    border: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field--split .po-v2-field__lbl:nth-child(3),
body.page-v2-filter-shell .po-v2-header .po-v2-field--partners .po-v2-field__lbl:nth-child(3),
body.page-v2-filter-shell .po-v2-header .po-v2-field--top-date.po-v2-field--split .po-v2-field__lbl:nth-child(3) {
    border-left: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field--so-detail-footer {
    background: transparent;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field--so-detail-footer .po-v2-field__lbl,
body.page-v2-filter-shell .po-v2-header .po-v2-field--so-detail-footer .po-v2-field__val {
    background: #fff;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field__val {
    padding: 0;
    background: #fff;
}

body.page-v2-filter-shell .po-v2-header .po-v2-readonly-val,
body.page-v2-filter-shell .po-v2-header .po-v2-readonly-val a {
    font-weight: 400;
}

body.page-v2-filter-shell .po-v2-header .po-v2-in:not(.po-v2-in--readonly) {
    height: 1.65rem;
    min-height: 1.65rem;
    padding: 0 0.45rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-in--readonly {
    height: 1.65rem;
    min-height: 1.65rem;
    padding: 0 0.45rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    box-sizing: border-box;
}

body.page-v2-filter-shell .po-v2-header .po-v2-date-unified {
    min-height: 1.65rem;
    height: 1.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: none;
}

.estimate-report-follow {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.45rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

body.page-v2-filter-shell .po-v2-header .po-v2-date-unified:focus-within {
    box-shadow: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-date-unified .po-v2-in--date {
    height: 100%;
    min-height: 0;
    border: none;
    border-radius: 0;
    background: transparent;
}

body.page-v2-filter-shell .po-v2-header .po-v2-date-trigger {
    border: none;
    border-radius: 0;
    background: transparent;
}

body.page-v2-filter-shell .po-v2-header .po-v2-search-wrap .om-combo-search-btn,
body.page-v2-filter-shell .po-v2-header .po-v2-field__val--staff .om-combo-search-btn,
body.page-v2-filter-shell .po-v2-header .remark-field__search-btn {
    width: 1.65rem;
    height: 1.65rem;
    min-width: 1.65rem;
    min-height: 1.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

body.page-v2-filter-shell .po-v2-header .remark-field textarea,
body.page-v2-filter-shell .po-v2-header .po-v2-field__val--memo .remark-field textarea {
    min-height: 1.65rem;
    height: 1.65rem;
    max-height: 1.65rem;
    padding: 0 0.45rem;
    font-size: 0.875rem;
    line-height: 1.25;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
    box-shadow: none;
    resize: none;
    overflow-y: auto;
}

/* 担当行〜件名行: 備考は右2行分の枠に収める（はみ出して広がらない） */
body.page-v2-filter-shell .po-v2-header .po-v2-field--remark-rowspan,
body.page-v2-filter-shell .po-v2-header .po-v2-field--remark-rowspan-3,
body.page-v2-filter-shell .po-v2-header .po-v2-field--remark-rowspan-1 {
    align-items: stretch;
    align-self: stretch;
    min-height: auto;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field--remark-rowspan .po-v2-field__val {
    display: flex;
    flex-direction: column;
    align-self: stretch;
    min-height: 0;
    padding: 0;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field--remark-rowspan .remark-field {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    align-items: stretch;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field--remark-rowspan .remark-field .remark-field__body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field--remark-rowspan .remark-field textarea {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    max-height: none;
    padding: 0.35rem 0.45rem;
    resize: none;
    overflow-y: auto;
}

body.page-v2-filter-shell .po-v2-header .po-v2-in:focus,
body.page-v2-filter-shell .po-v2-header .remark-field textarea:focus {
    box-shadow: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field__val > .po-v2-readonly-val {
    padding-left: 0;
}

@media (max-width: 1100px) {
    body.page-v2-filter-shell .po-v2-header .po-v2-header__grid--so-detail > .po-v2-field:nth-child(even) {
        border-top: none;
    }
}

body.page-po-detail:not(.page-v2-filter-shell) .order-detail-screen .order-manual-lines-table--sheet.data-table thead th {
    background: #f2fbf8;
}

body.page-po-detail .order-detail-screen .order-manual-lines-table--sheet .psp-in,
body.page-po-detail .order-detail-screen .order-manual-lines-table--sheet select.psp-in {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

body.page-po-detail .site-header__quick-actions .site-header__flam-btn {
    padding: 0.58rem 1rem;
    border-radius: 7px;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.4;
    color: var(--text);
    background: #fff;
    border: 1px solid #d1d5db;
}

body.page-po-detail .site-header__quick-actions .site-header__flam-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

body.page-po-detail.page-payment-detail main > .flash,
body.page-po-detail .order-detail-screen,
body.page-po-detail .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    .btn--primary,
    .btn--ghost,
    .btn--secondary,
    code,
    label,
    a,
    strong,
    span,
    select,
    option,
    button,
    input:not([type="checkbox"]),
    textarea,
    th,
    td,
    dt,
    dd,
    summary,
    .psp-in,
    .order-lines-unified-card__title,
    .order-lines-help,
    .order-lines-help__body,
    .order-detail-header-flam__lbl,
    .order-page-head__title,
    .order-page-head__id,
    .order-summary-footer__label,
    .order-summary-footer__value,
    .callout,
    .data-table
) {
    font-size: 0.875rem;
}

body.page-inventory-adjust .adj-lines-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

body.page-inventory-adjust .adj-lines-table th,
body.page-inventory-adjust .adj-lines-table td {
    padding: 0.28rem 0.15rem;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-inventory-adjust .adj-lines-table .adj-line-th-lineno {
    width: 2.6rem;
    white-space: nowrap;
}

body.page-inventory-adjust .adj-lines-table .adj-line-th-code {
    width: 6.5rem;
    max-width: 7.5rem;
}

body.page-inventory-adjust .adj-lines-table .adj-line-th-name {
    min-width: 0;
    width: auto;
}

body.page-inventory-adjust .adj-lines-table .adj-line-th-wh {
    width: 6rem;
}

body.page-inventory-adjust .adj-lines-table .adj-line-th-onhand,
body.page-inventory-adjust .adj-lines-table .adj-line-th-target {
    width: 5.5rem;
}

body.page-inventory-adjust .adj-lines-table .adj-line-th-actions {
    width: 3.25rem;
}

body.page-inventory-adjust .adj-lines-toolbar {
    margin-top: 0.45rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
}

/* 取り置き明細: 出荷指示明細と同型のヘッダー色味・行密度 */
body.page-inventory-hold .order-page-head__subids--hold-meta {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.4rem;
    margin-top: 0;
    background: #fafbfc;
    border-color: var(--border);
}

body.page-inventory-hold .order-page-head__subids--hold-meta .order-page-head__subid .psp-in,
body.page-inventory-hold .order-page-head__subids--hold-meta .order-page-head__subid input[type="date"].psp-in {
    min-width: 9.5rem;
    max-width: 11rem;
}

body.page-inventory-hold .order-detail-header-flam.order-detail-header-flam--sheet.card {
    margin: 0;
    background: #fafbfc;
    border-color: var(--border);
    box-shadow: none;
}

body.page-inventory-hold .order-lines-unified-card--primary {
    border-color: var(--border);
    box-shadow: none;
    background: #fff;
}

body.page-inventory-hold .hold-lines-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
}

body.page-inventory-hold .hold-lines-table th,
body.page-inventory-hold .hold-lines-table td {
    padding: 0.28rem 0.15rem;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-inventory-hold .hold-lines-table .hold-line-th-lineno {
    width: 2.6rem;
    white-space: nowrap;
}

body.page-inventory-hold .hold-lines-table .hold-line-th-code {
    width: 6.5rem;
    max-width: 7.5rem;
}

body.page-inventory-hold .hold-lines-table .hold-line-th-name {
    min-width: 0;
    width: auto;
}

body.page-inventory-hold .hold-lines-table .hold-line-th-qty {
    width: 5rem;
}

body.page-inventory-hold .hold-lines-table .hold-line-th-wh {
    width: 6rem;
}

body.page-inventory-hold .hold-lines-table .hold-line-th-avail {
    width: 5.5rem;
}

body.page-inventory-hold .hold-lines-table .hold-line-th-actions {
    width: 3.25rem;
}

body.page-inventory-hold .hold-lines-toolbar {
    margin-top: 0.45rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
}

body.page-inventory-hold .hold-lines-toolbar .muted,
body.page-inventory-hold .hold-lines-hint {
    font-size: 0.875rem;
}

body.page-inventory-hold .hold-lines-hint {
    margin: 0.35rem 0 0;
}

.om-inline-master-suggest {
    box-sizing: border-box;
}

.om-hdr-inline-li--keyboard-focus,
.om-inline-product-li--keyboard-focus,
.om-ommaster-li--keyboard-focus {
    background: rgba(37, 99, 235, 0.12);
    outline: 1px solid var(--accent, #2563eb);
    outline-offset: -1px;
}

.om-combo-search-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    min-width: 2rem;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    line-height: 0;
}

.om-combo-search-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #94a3b8;
}

.om-combo-search-btn:focus-visible {
    outline: 2px solid var(--accent, #2563eb);
    outline-offset: 1px;
}

/* 閉じている候補リストはレイアウト高さに一切含めない */
.om-combo-panel[hidden] {
    display: none !important;
}

.lt-input-suggest-panel {
    z-index: 80;
    max-height: 12rem;
}

.lt-input-suggest-panel .om-combo-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.lt-input-suggest-panel .om-combo-li {
    display: block;
    padding: 0.28rem 0.55rem;
    text-align: left;
}

.lt-suggest-combo {
    display: inline-flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.lt-suggest-combo__input {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.lt-suggest-combo__toggle {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    min-width: 1.35rem;
    padding: 0;
    margin: 0;
    border: 1px solid var(--border);
    border-left: none;
    border-radius: 0 6px 6px 0;
    background: #f8fafc;
    color: #475569;
    font-size: 0.62rem;
    line-height: 1;
    cursor: pointer;
}

.lt-suggest-combo__toggle:hover:not(:disabled) {
    background: #eef2f7;
    color: #1e293b;
}

.lt-suggest-combo__toggle:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.line-reply-carrier-cell .lt-suggest-combo,
.line-reply-defaults-bar__cell--carrier .lt-suggest-combo {
    width: 100%;
}

/* 候補一覧は body 直下・fixed。セル幅に縛られず社名を表示（幅は JS で 360〜560px 目安） */
.om-combo-panel.om-combo-panel--floating {
    position: fixed;
    box-sizing: border-box;
    margin: 0;
    padding: 0.15rem 0;
    list-style: none;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
    font-size: 0.8125rem;
}

.om-combo-panel li {
    padding: 0.28rem 0.55rem;
    cursor: pointer;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}

.om-combo-panel li:hover,
.om-combo-panel li:focus {
    background: rgba(37, 99, 235, 0.08);
    outline: none;
}

.om-combo-code {
    font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
    font-weight: 600;
}

.om-combo-name {
    font-size: 0.75rem;
}

/* 受注明細: 商品検索パネル（一覧＋複数選択フッター） */
.om-combo-panel.om-combo-panel--order-product {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.om-order-product-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 2.5vw, 1.5rem);
    box-sizing: border-box;
}

.om-order-product-modal[hidden] {
    display: none !important;
}

.om-order-product-modal__backdrop {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(15, 23, 42, 0.45);
    cursor: pointer;
}

.om-order-product-modal__shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(920px, calc(100vw - 1.5rem));
    max-height: min(86vh, 900px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.om-order-product-modal__shell .om-combo-panel.om-combo-panel--floating {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    max-width: none;
    max-height: none;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.om-combo-panel--order-product .om-combo-panel-header {
    flex-shrink: 0;
    padding: 0.55rem 0.65rem 0.45rem;
    border-bottom: 1px solid var(--border);
    background: #f1f3f4;
}

.om-combo-panel-header__headrow {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
}

.om-combo-panel-header__copy {
    flex: 1 1 auto;
    min-width: 0;
}

.om-order-product-modal__close {
    flex-shrink: 0;
    padding: 0.15rem 0.4rem !important;
    min-height: 2rem;
    line-height: 1;
}

.om-order-product-modal__close-x {
    display: block;
    font-size: 1.45rem;
    font-weight: 300;
    line-height: 1;
}

.om-order-product-modal__searchbox {
    flex-shrink: 0;
    padding: 0.5rem 0.65rem 0.45rem;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.om-order-product-modal__searchbox--with-icon {
    position: relative;
}

.om-order-product-modal__search-icon {
    position: absolute;
    left: 1.05rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    pointer-events: none;
}

.om-order-product-modal__searchbox--with-icon .om-order-product-modal__keyword {
    padding-left: 2.35rem;
}

.om-order-product-modal__keyword {
    width: 100%;
    box-sizing: border-box;
    font-size: 0.95rem;
    padding: 0.45rem 0.55rem;
}

.om-order-product-modal__multi-add-bar {
    flex-shrink: 0;
    padding: 0.45rem 0.65rem 0.5rem;
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.om-order-product-modal__apply-multi {
    width: auto;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.4rem 0.65rem;
    border-radius: 6px;
    letter-spacing: 0;
    background: #fff;
    border: 1px solid var(--border);
    color: #000;
    box-shadow: none;
}

.om-order-product-modal__apply-multi:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
    box-shadow: none;
}

.om-product-selection-order {
    margin-top: 0.45rem;
    color: #334155;
    font-size: 0.78rem;
}

.om-product-selection-order__empty {
    display: block;
    text-align: center;
}

.om-product-selection-order__label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.om-product-selection-order__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.om-product-selection-order__item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 15rem;
    padding: 0.2rem 0.4rem;
    border: 1px solid #93c5fd;
    border-radius: 999px;
    background: #fff;
    color: #1e3a5f;
    cursor: pointer;
    font: inherit;
}

.om-product-selection-order__number {
    display: inline-grid;
    place-items: center;
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
}

.om-product-selection-order__name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.om-product-selection-order__remove {
    color: #64748b;
}

.om-combo-panel-footer--hint-only {
    padding: 0.45rem 0.65rem 0.55rem;
}

.om-combo-li--empty {
    cursor: default;
    pointer-events: none;
}

.om-combo-li--empty:hover {
    background: transparent !important;
}

.om-combo-li--hint {
    cursor: default;
}

.om-combo-li--hint a {
    pointer-events: auto;
    cursor: pointer;
}

.om-combo-panel--order-product .om-combo-panel-header__title {
    display: block;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: 0.02em;
}

.om-combo-panel--order-product .om-combo-panel-header__lead {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #334155;
}

.om-combo-panel--order-product .om-combo-panel-header__lead strong {
    color: #1d4ed8;
    font-weight: 700;
}

.om-order-product-modal__list-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

.om-order-product-modal .om-product-selection-order {
    display: none !important;
}

.om-combo-list-head {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1.35rem minmax(5rem, 7rem) minmax(0, 1fr);
    gap: 0.35rem 0.45rem;
    align-items: center;
    padding: 0.22rem 0.45rem 0.22rem 0.4rem;
    background: #f1f3f4;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 700;
    color: #3d4635;
}

.om-combo-list-head__cb {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.om-combo-list-head__check-all {
    width: 0.95rem;
    height: 0.95rem;
    margin: 0;
    cursor: pointer;
}

.om-combo-list-head__code,
.om-combo-list-head__name {
    min-width: 0;
}

.om-order-product-modal__pager.list-pager-bottom {
    flex-shrink: 0;
    margin: 0;
    padding: 0.45rem 0.65rem;
    background: #fff;
    border-top: 1px solid var(--border);
    width: 100%;
}

.om-combo-panel--order-product .om-combo-list {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    font-size: 0.75rem;
    max-height: calc(20 * 1.55rem);
}

.om-combo-panel--order-product .om-combo-panel-footer {
    flex-shrink: 0;
    padding: 0.45rem 0.55rem;
    border-top: 1px solid var(--border);
    background: #fff;
    border-radius: 0 0 5px 5px;
}

.om-combo-panel--order-product .om-combo-li,
.om-combo-panel--order-product .om-combo-li:hover,
.om-combo-panel--order-product .om-combo-li:focus {
    background: #fff;
}

.om-combo-li {
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.28rem 0.45rem 0.28rem 0.35rem;
}

.om-combo-panel--order-product .om-combo-li {
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.4rem 0.2rem 0.35rem;
    min-height: 1.55rem;
    box-sizing: border-box;
}

.om-combo-li .om-combo-cb {
    flex-shrink: 0;
    margin-top: 0.12rem;
    cursor: pointer;
}

/* 受注モーダル: チェックはコンパクトに（20行を1画面に収める） */
.om-combo-panel--order-product .om-combo-cb {
    width: 0.95rem;
    height: 0.95rem;
    min-width: 0.95rem;
    min-height: 0.95rem;
    margin-top: 0;
    accent-color: var(--accent, #2563eb);
    cursor: pointer;
}

.om-combo-li-one {
    flex: 1 1 auto;
    min-width: 0;
    cursor: pointer;
    text-align: left;
    line-height: 1.35;
    white-space: normal;
    word-break: break-word;
}

.om-combo-panel--order-product .om-combo-li-grid {
    display: grid;
    grid-template-columns: minmax(4.75rem, 6.5rem) minmax(0, 1fr);
    gap: 0.3rem 0.45rem;
    width: 100%;
    align-items: center;
}

.om-combo-panel--order-product .om-combo-code--cell {
    display: block;
    font-size: 0.75rem;
    line-height: 1.25;
    word-break: break-all;
}

.om-combo-panel--order-product .om-combo-name--cell {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.25;
    color: #0f172a;
    word-break: break-word;
}

.om-combo-li:hover .om-combo-li-one {
    text-decoration: none !important;
    border-bottom: 1px solid currentColor;
}

.om-combo-panel--order-product .om-combo-li:hover .om-combo-name--cell {
    text-decoration: none !important;
    border-bottom: 1px solid currentColor;
}

/* 新規・詳細フォーム内のマスタ検索欄も1行に揃える */
.form-grid .om-master-combo-input {
    line-height: 1.25;
    min-height: 1.65rem;
    max-height: 1.85rem;
    padding: 0.12rem 0.35rem;
}


.om-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
    white-space: nowrap;
}

.om-status--warn {
    background: #fef2f2;
    color: #b91c1c;
}

.om-status--ok {
    background: #ecfdf5;
    color: #047857;
}

/* 注文管理一覧: 取り込み・納品先追加を折りたたみ１行サマリでコンパクト化 */
.om-list-compact-tools {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.om-list-compact-tools--ingest-only {
    grid-template-columns: 1fr;
}

.om-list-compact-tools--ai-pair {
    grid-template-columns: 1fr;
}

.om-ai-ingest-pair {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: 1fr;
    width: 100%;
}

/* 注文管理一覧では、取り込み口を常時見せつつ表の開始位置を押し下げない */
.om-doc-ingest-card--list-compact {
    margin: 0;
    padding: 0.55rem 0.75rem 0.65rem;
}

.om-doc-ingest-card--list-compact > .om-doc-ingest-advanced {
    display: none;
}

.om-list-ingest-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 0.4rem;
    font-size: 0.82rem;
    line-height: 1.2;
}

.om-doc-ingest-form--list-compact {
    gap: 0.35rem;
}

.om-doc-ingest-form--list-compact .om-dropzone-label--hero {
    min-height: 3.5rem;
    padding: 0.55rem 0.75rem;
    border-width: 1px;
}

.om-doc-ingest-form--list-compact .om-dropzone__inner--hero {
    margin: 0;
    font-size: 0.88rem;
}

.om-doc-ingest-form--list-compact .om-dropzone__sub {
    margin: 0.15rem 0 0;
    font-size: 0.7rem;
    line-height: 1.25;
}

.om-list-ingest-options {
    margin-top: 0.05rem;
    font-size: 0.72rem;
    color: var(--muted);
}

.om-list-ingest-options > summary {
    width: max-content;
    cursor: pointer;
    user-select: none;
}

.om-list-ingest-options[open] {
    padding-top: 0.25rem;
}

.om-list-ingest-options label {
    display: block;
    margin-top: 0.35rem;
    color: var(--text);
}

.om-list-ingest-options input {
    margin-top: 0.2rem;
}

@media (min-width: 768px) {
    .om-list-compact-tools {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        align-items: start;
    }

    .om-list-compact-tools--ingest-only {
        grid-template-columns: 1fr;
        max-width: 52rem;
    }

    .om-list-compact-tools--ai-pair {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .om-ai-ingest-pair {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        align-items: start;
    }
}

.container--om-ai-ingest {
    max-width: 56rem;
}

/* 注文管理 × メール受付ドック */
.om-mail-intake-dock {
    margin-bottom: 1rem;
    padding: 0;
    overflow: hidden;
}

.om-mail-intake-dock__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.75rem;
    padding: 0.65rem 0.85rem;
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.om-mail-intake-dock__summary::-webkit-details-marker {
    display: none;
}

.om-mail-intake-dock__summary::before {
    content: "▼";
    flex-shrink: 0;
    font-size: 0.65em;
    line-height: 1;
    color: var(--muted, #64748b);
    transition: transform 0.15s ease;
}

.om-mail-intake-dock[open] > .om-mail-intake-dock__summary::before {
    transform: rotate(180deg);
}

.om-mail-intake-dock__title {
    font-weight: 600;
    font-size: 0.95rem;
}

.om-mail-intake-dock__badge,
.om-mail-intake-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.om-mail-intake-dock__hint {
    font-size: 0.78rem;
}

.om-mail-intake-dock__body {
    display: grid;
    gap: 0.75rem;
    padding: 0 0.85rem 0.85rem;
    border-top: 1px solid var(--border, #e5e7eb);
}

.om-mail-intake-dock__queue-title {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
}

.om-mail-intake-dock__queue-summary {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
}

.om-mail-intake-status-note {
    display: inline-block;
    margin-top: 0.15rem;
    padding: 0.05rem 0.35rem;
    border-radius: 0.25rem;
    font-size: 0.72rem;
    background: #f3f4f6;
    color: #4b5563;
}

.om-mail-intake-status-note--warn {
    background: #fef3c7;
    color: #92400e;
}

.om-mail-intake-empty {
    font-size: 0.82rem;
    line-height: 1.5;
}

.om-mail-intake-dock__more {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
}

.om-mail-intake-drop-card--compact {
    margin: 0;
    padding: 0.65rem 0.75rem;
    box-shadow: none;
    border: 1px solid var(--border, #e5e7eb);
}

.om-mail-intake-drop-card--compact .card__title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.om-mail-intake-drop-card__lead {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    line-height: 1.45;
}

.om-mail-intake-kind-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 0.5rem;
}

.om-mail-intake-kind-fieldset legend {
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
}

.om-mail-intake-kind-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
    font-size: 0.82rem;
}

.om-mail-intake-kind-option {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.om-mail-intake-kind-option.is-selected {
    font-weight: 600;
    color: var(--primary, #2563eb);
}

.container--mail-intake-list .om-mail-intake-list-filter-card {
    margin: 0.65rem 0 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--border, #e5e7eb);
    box-shadow: none;
}

.om-mail-intake-filter-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.85rem;
}

.om-mail-intake-filter-nav__group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.65rem;
    min-width: 0;
}

.om-mail-intake-filter-nav__legend {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.om-mail-intake-filter-nav__links {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
}

.om-mail-intake-filter-link {
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--primary, #2563eb);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    text-decoration-color: color-mix(in srgb, var(--primary, #2563eb) 35%, transparent);
}

.om-mail-intake-filter-link:hover {
    text-decoration-color: currentColor;
}

.om-mail-intake-filter-link.is-active {
    font-weight: 600;
    text-decoration: none;
    color: var(--text, #111827);
}

.om-mail-intake-filter-nav__sep {
    flex-shrink: 0;
    width: 1px;
    height: 1.1em;
    background: var(--border, #e5e7eb);
    align-self: center;
}

.container--mail-intake-list .om-mail-intake-list-summary {
    margin: 0 0 1rem;
}

/* メール受付一覧: サイトヘッダー以外の文字を 0.875rem に統一 */
body.page-mail-intake-list main.container--mail-intake-list {
    font-size: 0.875rem;
}

body.page-mail-intake-list main.container--mail-intake-list :is(
    .page-title,
    .flash,
    .callout,
    .callout p,
    .callout li,
    .callout a,
    .muted,
    p,
    a,
    span,
    strong,
    label,
    legend,
    button,
    .btn,
    input,
    select,
    textarea,
    th,
    td,
    h2,
    h3,
    .card__title,
    .om-mail-intake-filter-link,
    .om-mail-intake-filter-nav__legend,
    .om-mail-intake-kind-option,
    .om-dropzone__inner,
    .om-dropzone-kind-note,
    .om-dropzone-status,
    .om-mail-intake-empty,
    .om-mail-intake-claim-note,
    .om-mail-intake-status-note,
    .om-mail-intake-list-summary
) {
    font-size: 0.875rem;
}

body.page-mail-intake-list main.container--mail-intake-list .om-mail-intake-table th,
body.page-mail-intake-list main.container--mail-intake-list .om-mail-intake-table td,
body.page-mail-intake-list main.container--mail-intake-list .om-table th,
body.page-mail-intake-list main.container--mail-intake-list .om-table td {
    font-size: 0.875rem;
}

.om-dropzone-kind-note {
    font-weight: 600;
}

.om-dropzone-label.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.om-dropzone-label.is-disabled.is-dragover {
    opacity: 0.55;
}

.om-mail-intake-batch-bar {
    margin-bottom: 0.5rem;
    gap: 0.5rem;
    align-items: center;
}

.om-mail-intake-claim-note {
    font-size: 0.78rem;
    margin-top: 0.2rem;
}

.om-mail-intake-table--compact th,
.om-mail-intake-table--compact td {
    font-size: 0.8rem;
    padding: 0.35rem 0.45rem;
}

.om-mail-intake-table-wrap--compact {
    max-height: 14rem;
}

@media (min-width: 900px) {
    .om-mail-intake-dock__body {
        grid-template-columns: minmax(15rem, 24rem) 1fr;
        align-items: start;
    }
}

.om-doc-ingest-card--hero {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.container--om-ai-ingest .om-ai-ingest-pair .om-doc-ingest-card--hero {
    height: 100%;
}

.card.om-tool-collapsible {
    margin-bottom: 0;
    padding: 0.55rem 1rem;
}

.card.om-tool-collapsible[open] {
    padding-bottom: 1rem;
}

.om-tool-collapsible > summary {
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    padding: 0.1rem 0;
    cursor: pointer;
    user-select: none;
}

.om-tool-collapsible > summary::-webkit-details-marker {
    display: none;
}

.om-tool-collapsible__label {
    font-size: 0.875rem;
    font-weight: 600;
}

.om-tool-collapsible__hint {
    font-size: 0.75rem;
    font-weight: 400;
    margin-left: auto;
}

@media (max-width: 767px) {
    .om-tool-collapsible__hint {
        flex-basis: 100%;
        margin-left: 1.85rem;
    }
}

.om-tool-collapsible__body {
    padding-top: 0.65rem;
    margin-top: 0.35rem;
    border-top: 1px solid var(--border);
}

.om-doc-ingest-card__lead--short,
.om-delivery-site-quickadd .om-delivery-site-quickadd__lead {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
}

.om-tool-ic {
    flex-shrink: 0;
    color: var(--muted);
    opacity: 0.92;
    vertical-align: middle;
}

.om-combo-add-site {
    margin-top: 0.25rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border);
    cursor: pointer;
    font-weight: 600;
    color: var(--accent, #2563eb);
}

.om-combo-add-site:hover,
.om-combo-add-site:focus {
    background: rgba(37, 99, 235, 0.06);
}

.om-combo-add-hint {
    font-size: 0.75rem;
    font-weight: 400;
}

.om-doc-ingest-form--ai .om-dropzone-label--hero {
    padding: 2rem 1.25rem;
    border-width: 2px;
}

.om-dropzone__inner--hero {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.om-dropzone__sub {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.om-dropzone-error {
  margin: 0.5rem 0 0;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #f0c2c2;
  background: #fff5f5;
  color: #9b1c1c;
  font-size: 0.875rem;
  line-height: 1.45;
}

.om-doc-ingest-actions {
    display: flex;
    justify-content: center;
}

.om-doc-ingest-submit {
    min-width: 12rem;
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
}

.om-doc-ingest-advanced {
    margin-top: 0.75rem;
}

.om-doc-ingest-advanced__summary {
    cursor: pointer;
    font-size: 0.8125rem;
    user-select: none;
}

.om-doc-ingest-advanced__body {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.om-ai-import-hero {
    text-align: center;
    padding: 2rem 1.5rem 1.75rem;
}

.om-ai-import-hero__eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
}

.om-ai-import-hero__title {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
}

.om-ai-import-hero__file {
    margin: 0 0 1.25rem;
    font-size: 0.9375rem;
}

.om-ai-import-hero__actions {
    margin: 0;
}

.odai-launch-card {
    max-width: 36rem;
    margin: 2rem auto;
    text-align: center;
}

.odai-launch-actions {
    align-items: center;
    gap: 0.65rem;
}

.odai-launch-actions .btn--lg {
    min-width: 14rem;
}

body.page-odai-all-siblings-hub .odai-all-siblings-hub {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
    max-width: 52rem;
}

.odai-send-section {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.odai-send-section__head {
    margin: 0;
}

.odai-send-section__title {
    margin: 0 0 0.25rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.odai-send-section__lead {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.55;
}

.odai-send-section__actions {
    margin-top: 0.25rem;
}

.odai-send-checklist {
    color: var(--muted);
}

/* レビュー確定ハブ: 送信一覧（左）＋本文確認（右・選択時のみ） */
.odai-post-review-hub,
.odai-all-siblings-hub {
    max-width: none;
    width: 100%;
}

.odai-mail-hub {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0;
    width: 100%;
    max-width: none;
}

.odai-mail-hub__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem 0.65rem;
    font-size: 0.875rem;
    line-height: 1.45;
}

.odai-mail-hub__toolbar {
    width: 100%;
    max-width: none;
}

.odai-mail-hub__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.65rem;
    align-items: stretch;
    min-height: 0;
}

.odai-mail-hub--detail-open .odai-mail-hub__layout {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.92fr);
    min-height: clamp(16rem, calc(100vh - 14rem), 34rem);
}

.odai-mail-hub__list-wrap {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.odai-mail-hub__list {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.odai-mail-hub__list-body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: auto;
}

.odai-mail-hub__list-head {
    display: grid;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.35rem 0.55rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.odai-mail-hub__list-head--po {
    grid-template-columns: 1.6rem minmax(7rem, 1.1fr) minmax(8rem, 1.2fr) minmax(6.5rem, 0.75fr) auto;
}

.odai-mail-hub__list-head--ship {
    grid-template-columns: minmax(7rem, 1.1fr) minmax(8rem, 1.2fr) minmax(5rem, 0.65fr) auto;
}

.odai-mail-hub__head-cell--actions {
    justify-self: end;
}

.odai-mail-hub__row {
    display: grid;
    align-items: center;
    gap: 0.35rem 0.5rem;
    padding: 0.35rem 0.55rem;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.odai-mail-hub__row--po {
    grid-template-columns: 1.6rem minmax(0, 1fr);
}

.odai-mail-hub__row--ship {
    grid-template-columns: minmax(0, 1fr);
}

.odai-mail-hub__row:last-child {
    border-bottom: 0;
}

.odai-mail-hub__row--active {
    background: #f8fbff;
    box-shadow: inset 3px 0 0 var(--accent, #2563eb);
}

.odai-mail-hub__row--disabled {
    opacity: 0.78;
}

.odai-mail-hub__row-check {
    margin: 0;
    padding: 0;
    align-self: center;
}

.odai-mail-hub__row-cols {
    display: grid;
    align-items: center;
    gap: 0.35rem 0.5rem;
    min-width: 0;
}

.odai-mail-hub__row-cols {
    grid-template-columns: minmax(7rem, 1.1fr) minmax(8rem, 1.2fr) minmax(6.5rem, 0.75fr) auto;
}

.odai-mail-hub__row-cols--ship {
    grid-template-columns: minmax(7rem, 1.1fr) minmax(8rem, 1.2fr) minmax(5rem, 0.65fr) auto;
}

.odai-mail-hub__col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.odai-mail-hub__col--no {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.35rem;
}

.odai-mail-hub__col--actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem 0.35rem;
}

.odai-mail-hub__row-title {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
    word-break: break-word;
}

.odai-mail-hub__row-meta {
    font-size: 0.75rem;
    line-height: 1.35;
    word-break: break-word;
    color: var(--muted);
}

.odai-mail-hub__field-label {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin: 0;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted);
    width: 100%;
}

.odai-mail-hub__field-input {
    min-height: 1.65rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.8125rem;
}

.odai-mail-hub__field-input--no {
    width: 5.25rem;
    max-width: 100%;
}

.odai-mail-hub__field-static {
    font-size: 0.8125rem;
    line-height: 1.35;
    word-break: break-all;
}

.odai-mail-hub__field-static--warn {
    color: #b91c1c;
}

.odai-mail-hub__row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    align-items: center;
}

.odai-mail-hub__badge {
    display: inline-block;
    padding: 0.08rem 0.4rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    line-height: 1.3;
    white-space: nowrap;
}

.odai-mail-hub__badge--warn {
    background: #fef3c7;
    color: #92400e;
}

.odai-mail-hub__detail {
    min-width: 0;
    min-height: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.odai-mail-hub__detail[hidden] {
    display: none !important;
}

.odai-mail-hub__detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.4rem 0.55rem;
    border-bottom: 1px solid var(--border);
    background: #f8fafc;
    flex-shrink: 0;
}

.odai-mail-hub__detail-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
}

.odai-mail-hub__detail-body {
    padding: 0.5rem 0.55rem 0.55rem;
    overflow: auto;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.odai-mail-hub__detail-panel {
    margin: 0;
    border: 0;
    box-shadow: none;
    padding: 0;
    max-width: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.odai-mail-hub__detail-panel[hidden] {
    display: none !important;
}

.odai-mail-hub__detail-meta {
    margin: 0 0 0.4rem;
    font-size: 0.75rem;
    line-height: 1.4;
}

.odai-mail-hub__detail-warn {
    margin-bottom: 0.35rem;
}

.odai-mail-hub__detail-callout {
    padding: 0.4rem 0.55rem;
    margin: 0 0 0.35rem;
    font-size: 0.75rem;
    line-height: 1.45;
}

.odai-mail-hub__body-grid {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
}

.odai-mail-hub__detail-panel--ship .odai-mail-hub__body-grid {
    grid-template-rows: auto minmax(0, 1fr);
}

.odai-mail-hub__detail-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.45rem;
    flex-shrink: 0;
}

.odai-mail-hub__warnings {
    margin-bottom: 0.5rem;
}

body.page-lt-reply-mail .odai-mail-hub,
body.page-lt-reply-mail form.lt-reply-mail-screen > .odai-mail-hub,
body.page-lt-reply-mail form.lt-reply-mail-screen > .card.odai-mail-hub__toolbar,
body.page-lt-reply-mail .odai-send-section .odai-mail-hub {
    max-width: none;
    width: 100%;
}

body.page-lt-reply-mail .odai-mail-hub .odai-mail-hub__body-grid {
    grid-template-columns: 1fr 1fr;
}

body.page-lt-reply-mail .odai-mail-hub .odai-mail-hub__detail-panel--ship .odai-mail-hub__body-grid {
    grid-template-columns: 1fr;
}

body.page-lt-reply-mail .odai-mail-hub textarea.order-lead-mail__textarea,
body.page-lt-reply-mail .odai-mail-hub .odai-ship-mail-body {
    flex: 1 1 auto;
    min-height: 8rem;
    max-height: none;
    height: auto;
    resize: vertical;
}

body.page-lt-reply-mail .odai-mail-hub--detail-open .order-lead-mail__label--body {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1 1 auto;
}

body.page-odai-all-siblings-hub .odai-all-siblings-hub {
    max-width: none;
}

.lt-reply-chip--sm {
    font-size: 0.6875rem;
    padding: 0.12rem 0.4rem;
}

@media (max-width: 900px) {
    .odai-mail-hub--detail-open .odai-mail-hub__layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .odai-mail-hub__list-head {
        display: none;
    }

    .odai-mail-hub__row-cols,
    .odai-mail-hub__row-cols--ship {
        grid-template-columns: 1fr;
    }

    .odai-mail-hub__col--actions {
        justify-content: flex-start;
    }
}

body.page-odai-all-siblings-hub .odai-all-siblings-intro {
    flex-shrink: 0;
}

body.page-odai-all-siblings-hub .odai-all-siblings-form {
    gap: 0.65rem;
}

body.page-odai-all-siblings-hub .odai-all-siblings-table-card {
    padding: 0.55rem 0.65rem 0.65rem;
    margin: 0;
}

.odai-all-siblings-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.odai-all-siblings-table {
    width: 100%;
    min-width: 58rem;
    border-collapse: collapse;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.odai-all-siblings-table th,
.odai-all-siblings-table td {
    padding: 0.35rem 0.4rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    text-align: left;
}

.odai-all-siblings-table thead th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    background: #f8fafc;
    position: sticky;
    top: 0;
    z-index: 1;
}

.odai-all-siblings-table tbody tr:hover {
    background: #f8fafc;
}

.odai-all-siblings-td-check {
    width: 2.25rem;
    white-space: nowrap;
}

.odai-all-siblings-check {
    margin: 0;
}

.odai-all-siblings-td-slip,
.odai-all-siblings-td-order {
    white-space: nowrap;
}

.odai-all-siblings-td-customer {
    min-width: 6rem;
    max-width: 9rem;
}

.odai-all-siblings-td-delivery {
    min-width: 10rem;
    max-width: 16rem;
    font-size: 0.75rem;
}

.odai-all-siblings-td-supplier {
    min-width: 6rem;
    max-width: 10rem;
}

.odai-all-siblings-pono {
    width: 5.5rem;
    min-width: 5rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.8125rem;
}

.odai-all-siblings-mail-in {
    width: 100%;
    min-width: 8rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.8125rem;
}

.odai-all-siblings-subject {
    width: 100%;
    min-width: 9rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.8125rem;
}

.odai-all-siblings-td-lines {
    min-width: 8rem;
    max-width: 14rem;
    font-size: 0.75rem;
}

.odai-all-siblings-td-actions {
    white-space: nowrap;
}

.odai-all-siblings-sent {
    display: inline-block;
    margin-left: 0.25rem;
    font-size: 0.6875rem;
}

.odai-all-siblings-bodies {
    padding: 0.65rem 0.75rem;
    margin: 0;
}

.odai-all-siblings-bodies__title {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
}

.odai-all-siblings-bodies__lead {
    margin: 0 0 0.55rem;
    font-size: 0.8125rem;
}

.odai-all-siblings-body-fold {
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    margin-bottom: 0.45rem;
    background: #fff;
}

.odai-all-siblings-body-fold > summary {
    cursor: pointer;
    padding: 0.45rem 0.55rem;
    font-size: 0.8125rem;
    font-weight: 600;
    list-style: none;
    user-select: none;
}

.odai-all-siblings-body-fold > summary::-webkit-details-marker {
    display: none;
}

.odai-all-siblings-body-fold > summary::before {
    content: "▸ ";
    color: var(--muted);
}

.odai-all-siblings-body-fold[open] > summary::before {
    content: "▾ ";
}

.odai-all-siblings-body-fold__label {
    font-weight: 600;
}

.odai-all-siblings-body-fold .order-lead-mail__label--body {
    padding: 0 0.55rem 0.55rem;
    margin: 0;
}

.odai-all-siblings-body {
    min-height: 6rem;
    width: 100%;
}

.odai-sibling-nav__skipped,
.odai-sibling-nav__cur--skipped {
    opacity: 0.72;
    text-decoration: line-through;
    text-decoration-color: rgba(100, 116, 139, 0.65);
}

.om-edit-section-collapsible > summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.15rem 0;
    user-select: none;
}

.om-edit-section-collapsible > summary::-webkit-details-marker {
    display: none;
}

.om-edit-section-collapsible__body {
    padding-top: 0.85rem;
    margin-top: 0.35rem;
    border-top: 1px solid var(--border);
}

.om-edit-section-collapsible--nested {
    margin-top: 1rem;
}

.om-edit-section-collapsible--nested > summary {
    font-size: 0.8125rem;
    font-weight: 500;
}

.om-doc-upload-form--primary {
    margin-bottom: 0.5rem;
}

.om-doc-ingest-card {
    margin-bottom: 1.25rem;
}

.om-doc-ingest-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
}

.om-doc-ingest-card__lead {
    margin: 0 0 1rem;
    font-size: 0.875rem;
}

.om-doc-ingest-form .om-dropzone-label,
.om-doc-upload-form .om-dropzone-label {
    display: block;
    cursor: pointer;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    background: var(--surface);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.om-doc-ingest-form .om-dropzone-label:hover,
.om-doc-ingest-form .om-dropzone-label.is-dragover,
.om-doc-upload-form .om-dropzone-label:hover,
.om-doc-upload-form .om-dropzone-label.is-dragover {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.04);
}

.om-doc-upload-form .om-dropzone-label--reply:hover,
.om-doc-upload-form .om-dropzone-label--reply.is-dragover {
    border-color: #047857;
    background: rgba(4, 120, 87, 0.06);
}

.om-dropzone__inner {
    display: block;
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 0.65rem;
}

.om-doc-ingest-form input[type="file"],
.om-doc-upload-form input[type="file"] {
    max-width: 100%;
    font-size: 0.8125rem;
}

.om-doc-section-title {
    margin: 1.25rem 0 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.om-doc-section-title:first-of-type {
    margin-top: 0;
}

.om-mgmt-no-link {
    text-decoration: none;
    color: inherit;
}

.om-mgmt-no-link:hover .om-management-no-cell,
.om-mgmt-no-link:focus-visible .om-management-no-cell {
    text-decoration: none !important;
}

/* 注文管理一覧: 回答書類（納期回答が複数） */
.om-doc-reply-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem 0.35rem;
    align-items: center;
    max-width: 14rem;
}

.om-doc-reply-stack .om-doc-link {
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 受注明細: 納期回答書類リスト */
.order-lt-reply-doc-list a {
    font-weight: 500;
}

.om-cell--actions {
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
    min-width: 0;
}

.om-table--inline-edit .om-cell-save,
.om-table--inline-edit .om-cell-doc-link {
    padding: 0.2rem 0.4rem;
    font-size: 0.75rem;
    line-height: 1.2;
}

.om-cell--cancel {
    white-space: nowrap;
    vertical-align: middle;
    text-align: center;
    min-width: 3.5rem;
    padding-left: 0.15rem;
    padding-right: 0.2rem;
}

.om-th--cancel {
    text-align: center;
    padding-left: 0.15rem !important;
    padding-right: 0.2rem !important;
    font-size: 0.65rem !important;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

.om-cancel-row-form {
    margin: 0;
    display: inline-block;
}

.om-btn-cancel-row {
    min-width: 2.8rem;
    max-width: none;
    padding: 0.18rem 0.28rem;
    font-size: 0.68rem;
    letter-spacing: 0;
    line-height: 1.15;
}

/* 注文管理一覧: 進行中 / キャンセル タブ */
.om-list-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0 0 0.75rem;
    padding: 0;
    border-bottom: 1px solid var(--border);
}

.om-list-tab {
    display: inline-flex;
    align-items: baseline;
    gap: 0.25rem;
    padding: 0.45rem 0.65rem 0.55rem;
    margin-bottom: -1px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
}

.om-list-tab:hover {
    color: var(--text);
    background: rgba(37, 99, 235, 0.06);
}

.om-list-tab--active {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
    border-bottom-color: var(--surface);
    box-shadow: 0 -1px 0 var(--surface);
}

.om-list-tab__count {
    font-weight: 500;
    font-size: 0.8125rem;
    color: var(--muted);
}

.om-list-tab--active .om-list-tab__count {
    color: var(--muted);
}

.om-table[data-om-visible-tab="active"] tr[data-om-list-tab="cancelled"],
.om-table[data-om-visible-tab="cancelled"] tr[data-om-list-tab="active"] {
    display: none;
}

.om-filter-card--compact {
    padding: 0.38rem 0.6rem;
    margin-bottom: 0.45rem;
}

.om-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem 0.55rem;
    margin: 0;
}

.om-filter-card--compact .om-filter-card__title {
    flex: 0 0 auto;
    margin: 0;
    padding-right: 0.15rem;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    line-height: 1.8rem;
}

.om-filter-field {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.3rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
}

.om-filter-field__lbl {
    flex: 0 0 auto;
    white-space: nowrap;
    line-height: 1.2;
}

.om-filter-field input,
.om-filter-field select {
    padding: 0.26rem 0.42rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8125rem;
    font-family: inherit;
    color: var(--text);
    background: var(--surface);
    min-height: 1.75rem;
    box-sizing: border-box;
}

.om-filter-field input:focus,
.om-filter-field select:focus {
    outline: 2px solid rgba(37, 99, 235, 0.3);
    border-color: var(--accent, #2563eb);
}

.om-filter-field--status select {
    width: 6.75rem;
}

.om-filter-field--supplier input {
    width: 8.5rem;
}

.om-filter-field--date input {
    width: 8.25rem;
}

.om-filter-field--assign input {
    width: 5.5rem;
}

.om-filter-field--keyword {
    flex: 1 1 11rem;
    min-width: 10rem;
}

.om-filter-field--keyword input {
    width: 100%;
    min-width: 9rem;
}

.om-filter-field--actions {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
}

@media (max-width: 900px) {
    .om-filter-field--actions {
        margin-left: 0;
        width: 100%;
    }
}

.om-filter-card__title {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.callout--muted {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
}

.page-title {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.page-lead {
    margin: 0 0 1.5rem;
    color: var(--muted);
    font-size: 0.9375rem;
}

.grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 640px) {
    .grid--2 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid--3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.grid--stats {
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .grid--stats {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    box-shadow: var(--shadow);
}

.card h2 {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.card p {
    margin: 0.35rem 0;
    font-size: 0.9375rem;
}

.card .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

.muted {
    color: var(--muted);
    font-size: 0.875rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 400;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: #111;
}

.btn--primary {
    background: #fff;
    color: #111;
    border: 1px solid #d1d5db;
    font-weight: 400;
}

.btn--primary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #111;
}

.btn--primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn--ghost {
    background: transparent;
    color: #111;
    border: 1px solid var(--border);
    font-weight: 400;
}

.btn--ghost:hover {
    background: #f8fafc;
    color: #111;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
}

.search-input:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    border-color: var(--accent);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

/* 受注手入力: セル境界をはっきり（FLAM 系の入力表イメージ） */
.order-manual-lines-table.data-table {
    border: 1px solid var(--border);
}

.order-manual-lines-table.data-table th,
.order-manual-lines-table.data-table td {
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.order-manual-lines-table.data-table tr:last-child td {
    border-bottom: 1px solid var(--border);
}

.order-manual-lines-table.data-table thead th {
    background: #eef2f7;
    color: var(--text);
}

.order-line-rank-price-val--mismatch {
    color: #b42318;
    font-weight: 600;
}

.order-line-td-rank-price .order-line-apply-rank-price {
    margin-left: 0.25rem;
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
    vertical-align: middle;
}

/* 明細表: Excel 風の詰めた行高（受注明細・手入力受注で --sheet 付与） */
.order-manual-lines-table--sheet.data-table {
    font-size: 0.8125rem;
}

.order-manual-lines-table--sheet.data-table th,
.order-manual-lines-table--sheet.data-table td {
    padding: 0.16rem 0.3rem;
    line-height: 1.22;
}

.order-manual-lines-table--sheet .psp-in {
    padding: 0.15rem 0.28rem;
    font-size: 0.8125rem;
    min-height: 1.42rem;
    line-height: 1.15;
    box-sizing: border-box;
}

.order-manual-lines-table--sheet .order-line-idx-cell {
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
    vertical-align: middle;
}

/* No 列の見た目（幅は税率列と同じ指定を po-v2 / 見積で共有） */
.order-manual-lines-table--sheet {
    --order-line-tax-rate-col-width: 3.75rem;
}

.order-manual-lines-table--sheet col.order-line-col-idx {
    width: var(--order-line-tax-rate-col-width);
}

.order-manual-lines-table--sheet th.order-line-th-idx,
.order-manual-lines-table--sheet .order-line-idx-cell {
    width: var(--order-line-tax-rate-col-width) !important;
    min-width: var(--order-line-tax-rate-col-width) !important;
    max-width: var(--order-line-tax-rate-col-width) !important;
    white-space: nowrap;
    box-sizing: border-box;
    padding-left: 0.08rem !important;
    padding-right: 0.06rem !important;
    vertical-align: middle;
    overflow: visible;
}

.order-manual-lines-table--sheet th.order-line-th-idx {
    text-align: center;
    font-size: inherit;
    font-weight: 600;
}

.order-manual-lines-table--sheet .order-line-idx-cell {
    font-size: 0.7rem;
}

.order-manual-lines-table--sheet .order-line-idx-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 1ch;
    padding-left: 1ch;
    min-height: 1.22rem;
    width: max-content;
    max-width: none;
}

.order-manual-lines-table--sheet .order-line-row-menu-btn {
    width: 1.2rem;
    height: 1.2rem;
}

.order-manual-lines-table--sheet .order-line-row-menu-btn svg {
    width: 12px;
    height: 12px;
}

.order-manual-lines-table--sheet .order-line-idx-wrap .order-line-idx {
    font-size: inherit;
    min-width: 0;
    text-align: right;
}

.order-line-idx-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.1rem;
    min-height: 1.35rem;
    max-width: 100%;
}

.order-line-row-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    padding: 0;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 3px;
    background: var(--surface-muted, #f8fafc);
    color: var(--text-muted, #64748b);
    cursor: pointer;
    flex-shrink: 0;
}

.order-line-row-menu-btn:hover,
.order-line-row-menu-btn:focus-visible {
    background: var(--surface, #fff);
    color: var(--text, #0f172a);
    border-color: var(--border-strong, #94a3b8);
}

.order-line-idx-wrap .order-line-idx {
    font-variant-numeric: tabular-nums;
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    flex: 0 0 auto;
    min-width: 0.65rem;
    text-align: right;
    line-height: 1.2;
}

.order-line-row-menu {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    z-index: 120;
    min-width: 15.5rem;
    margin: 0;
    padding: 0.25rem 0;
    list-style: none;
    border: 1px solid var(--border, #cbd5e1);
    border-radius: 6px;
    background: var(--surface, #fff);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.order-line-row-menu__item {
    display: block;
    width: 100%;
    padding: 0.42rem 0.75rem;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 0.8125rem;
    line-height: 1.35;
    color: var(--text, #0f172a);
    cursor: pointer;
    white-space: nowrap;
}

.order-line-row-menu__item:hover,
.order-line-row-menu__item:focus-visible {
    background: var(--surface-muted, #f1f5f9);
}

.order-line-row-menu__item--primary {
    font-weight: 600;
}

.order-line-row-menu__sep {
    height: 1px;
    margin: 0.25rem 0;
    background: var(--border, #e2e8f0);
}

.order-manual-lines-table--sheet .order-line-remove {
    padding: 0.08rem 0.32rem !important;
    font-size: 0.68rem !important;
    line-height: 1.2;
}

.order-manual-lines-table-wrap.table-wrap {
    border-radius: 4px;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.65rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

/*
 * 一覧画面: 項目名（th）は中央寄せ。明細の行入力表（order-manual-lines-table 等）は除外。
 * 金額列など th の inline text-align より優先する（一覧ヘッダー統一）。
 */
body.page-orders-list--compact-header .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) th,
body.page-order-management-list main.container--om-list .data-table th,
body.page-mail-intake-list main.container--mail-intake-list :is(.om-mail-intake-table, .om-table, .data-table) th,
body.page-payment-list .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) th,
body.page-customers-list main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) th,
body.page-tabular-import-preview main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) th {
    text-align: center !important;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr.order-row--clickable td {
  cursor: pointer;
}

.data-table tbody tr.order-row--clickable:hover {
  background: transparent;
}

.data-table tbody tr.order-row--clickable:hover td {
  background: #f0f4ff;
}

.data-table tbody tr:hover {
    background: #f8fafc;
}

.data-table tbody tr[hidden] {
    display: none;
}

.data-table input.psp-in {
    width: 100%;
    min-width: 5rem;
    box-sizing: border-box;
}

/* 商品マスタ: アイコン付き折りたたみツール */
.product-tools {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.product-tools__item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.product-tools__summary {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 1rem;
    cursor: pointer;
    list-style: none;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text);
    user-select: none;
}

.product-tools__summary::-webkit-details-marker {
    display: none;
}

.product-tools__summary::after {
    content: "";
    margin-left: auto;
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
    opacity: 0.65;
    flex-shrink: 0;
}

.product-tools__item[open] .product-tools__summary::after {
    transform: rotate(-135deg);
}

.product-tools__ic {
    display: flex;
    color: var(--accent);
    flex-shrink: 0;
}

.product-tools__label {
    flex: 1;
    text-align: left;
}

.product-tools__body {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--border);
    background: rgba(248, 250, 252, 0.55);
}

.product-tools__body .form-grid {
    margin-top: 0.75rem;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge--ok {
    background: #d1fae5;
    color: #065f46;
}

.badge--fail {
    background: #fee2e2;
    color: #991b1b;
}

.badge--warn {
    background: #fef3c7;
    color: #92400e;
}

.code-block {
    margin: 0;
    padding: 1rem;
    background: #1e293b;
    color: #e2e8f0;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    overflow-x: auto;
    line-height: 1.45;
}

.dl-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.35rem 1rem;
    font-size: 0.9375rem;
}

.dl-grid dt {
    margin: 0;
    color: var(--muted);
    font-weight: 500;
}

.dl-grid dd {
    margin: 0;
}

.company-profile-dl {
    max-width: 52rem;
    align-items: center;
}

body.page-company-profile .company-profile-dl dt {
    min-height: 2.25rem;
    display: flex;
    align-items: center;
    line-height: 1.35;
}

body.page-company-profile .company-profile-section .psp-in,
body.page-company-profile .company-profile-section select.psp-in {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    min-height: 2.25rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.875rem;
    line-height: 1.4;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    color: var(--text);
}

body.page-company-profile .company-profile-section .psp-in:focus,
body.page-company-profile .company-profile-section select.psp-in:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 0;
    border-color: var(--accent);
}

.company-profile-postal-split {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    width: 100%;
}

.company-profile-postal-part {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
}

.company-profile-inline-num {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.35rem;
    width: 100%;
    white-space: nowrap;
}

body.page-company-profile .company-profile-section .company-profile-inline-num .psp-in {
    width: 5.5rem;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 5.5rem;
}

.company-profile-section {
    margin: 0;
}

body.page-company-profile form.stack {
    gap: 1rem;
}

body.page-settings-inventory .stack {
    gap: 1rem;
}

body.page-settings .integration-layout-list-toolbar {
    margin: 0 0 0.75rem;
    justify-content: flex-start;
}

body.page-settings .integration-layout-list-toolbar__actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

body.page-settings .integration-layout-kind-filter {
    margin: 0;
}

body.page-settings .integration-layout-kind-select {
    margin: 0;
    box-sizing: border-box;
    min-height: 2.375rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.25;
    font-family: inherit;
    color: #111;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
}

body.page-settings-integration-layout .integration-layout-editor-screen {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 42rem;
}

body.page-settings-integration-layout .integration-layout-editor-card,
body.page-settings-integration-layout .integration-layout-editor-export-card {
    margin: 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #fff;
}

body.page-settings-integration-layout .integration-layout-editor-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0 0 0.75rem;
    font-weight: 500;
    color: var(--muted);
}

body.page-settings-integration-layout .integration-layout-editor-field__lbl {
    font-size: 0.8125rem;
    line-height: 1.25;
}

body.page-settings-integration-layout .integration-layout-editor-input,
body.page-settings-integration-layout .integration-layout-editor-col-select {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 0.45rem 0.6rem;
    font-size: 0.875rem;
    line-height: 1.35;
    font-family: inherit;
    color: #111;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
}

body.page-settings-integration-layout .integration-layout-editor-col-select {
    max-width: 22rem;
}

body.page-settings-integration-layout .integration-layout-editor-input--count {
    width: 4.5rem;
    max-width: 4.5rem;
}

body.page-settings-integration-layout .integration-layout-editor-hint {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.55;
}

body.page-settings-integration-layout .integration-layout-editor-hint--tight {
    margin-bottom: 0;
}

body.page-settings-integration-layout .integration-layout-editor-column-count {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem;
}

body.page-settings-integration-layout .integration-layout-editor-table-wrap {
    margin-top: 0.25rem;
}

body.page-settings-integration-layout .integration-layout-editor-table-wrap .data-table th,
body.page-settings-integration-layout .integration-layout-editor-table-wrap .data-table td {
    font-size: 0.875rem;
    vertical-align: middle;
}

body.page-settings-integration-layout .integration-layout-editor-export-links {
    margin: 0 0 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

body.page-settings-integration-layout .integration-layout-editor-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.25rem;
}

body.page-settings-integration-layout .integration-layout-editor-delete-form {
    margin: 0;
}

body.page-settings-integration-layout .integration-layout-editor-delete-btn {
    color: var(--danger, #b91c1c);
}

/* 在庫設定: 日付・select など入力枠の高さを揃える（期首残基準日＝評価集計など） */
body.page-settings-inventory #inventory-settings-form select.psp-in,
body.page-settings-inventory #inventory-settings-form input.psp-in:not([type="checkbox"]) {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0;
    padding: 0.45rem 0.65rem;
    font-size: 0.9375rem;
    line-height: 1.25;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    height: 2.35rem;
    min-height: 2.35rem;
    max-height: 2.35rem;
}

body.page-settings-inventory #inventory-settings-form .inventory-settings-date-unified {
    display: flex;
    flex: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
    height: 2.35rem;
    min-height: 2.35rem;
    max-height: 2.35rem;
    font-weight: 400;
    color: var(--text);
}

body.page-settings-inventory #inventory-settings-form .inventory-settings-date-unified .order-filter-date-unified__text {
    font-size: 0.9375rem;
    line-height: 1.25;
    padding: 0 0.65rem;
    display: flex;
    align-items: center;
}

body.page-settings-inventory #inventory-settings-form .inventory-settings-date-unified .order-filter-date-unified__pick {
    flex: 0 0 2.35rem;
    min-width: 2.35rem;
    min-height: 0;
    align-self: stretch;
}

body.page-company-profile form.stack + .company-profile-section {
    margin-top: 1rem;
}

.company-profile-section__summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.company-profile-section__summary::-webkit-details-marker {
    display: none;
}

.company-profile-section__summary::before {
    content: "▶";
    flex-shrink: 0;
    font-size: 0.75em;
    line-height: 1;
    color: var(--muted);
}

.company-profile-section[open] > .company-profile-section__summary::before {
    content: "▼";
}

.company-profile-section__body {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.company-profile-logo-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
}

.company-profile-logo-preview {
    max-width: 220px;
    max-height: 88px;
    object-fit: contain;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.35rem;
    background: #fff;
}

.company-profile-logo-empty {
    margin: 0;
    font-size: 0.8125rem;
}

.company-profile-logo-form,
.company-profile-logo-delete-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
}

.company-profile-logo-file {
    font-size: 0.8125rem;
    max-width: 100%;
}

/* 得意先マスタ（FLAM 得意先登録レイアウト） */
.master-flam-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.master-flam-section {
    margin: 0;
    padding: 0.65rem 0.85rem 0.75rem;
}

.master-flam-section__title {
    margin: 0 0 0.55rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.35rem;
}

.master-flam-dl {
    max-width: none;
}

.master-flam-dl dt {
    background: #d6e7f1;
    color: #1a3a4d;
    font-size: 0.8125rem;
    padding: 0.35rem 0.5rem;
    border-radius: 2px;
    align-self: stretch;
    display: flex;
    align-items: center;
}

.master-flam-dl dd {
    padding: 0.28rem 0;
    font-size: 0.875rem;
}

.master-flam-hint {
    margin: 0.35rem 0 0;
    font-size: 0.75rem;
    line-height: 1.45;
}

.master-flam-dl .psp-in,
.master-flam-dl select.psp-in,
.master-flam-dl textarea.psp-in {
    width: 100%;
    max-width: 28rem;
}

.master-flam-code {
    max-width: 8rem;
    font-variant-numeric: tabular-nums;
}

.master-flam-supplier-slot-table .master-flam-supplier-slot-label {
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-muted, #64748b);
    vertical-align: middle;
}

.master-flam-supplier-code-name-pair {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.master-flam-supplier-code-wrap {
    flex: 0 0 6.5rem;
    max-width: 6.5rem;
    min-width: 0;
}

.master-flam-supplier-code {
    width: 100%;
    max-width: 6.5rem;
    min-width: 0;
    font-variant-numeric: tabular-nums;
}

.master-flam-supplier-name {
    flex: 1 1 auto;
    min-width: 0;
    background: #f8fafc;
    color: var(--text);
    cursor: default;
}

.master-flam-supplier-slot-price {
    width: 7.5rem;
    white-space: nowrap;
}

.master-flam-supplier-slot-price .psp-in {
    width: 100%;
    max-width: 7rem;
}

.master-flam-req {
    color: #b91c1c;
    font-weight: 700;
}

/* 商品登録: 1枠に全項目・仕入先別価格は別枠（本文文字は 0.875rem・ヘッダーは対象外） */
body.page-product-detail.page-order-detail > main.container--order-detail-fit {
    padding: 0.35rem 1rem 0.5rem;
    font-size: 0.875rem;
}

body.page-product-detail > main > .flash,
body.page-product-detail > main .order-detail-screen,
body.page-product-detail > main .order-detail-screen * {
    font-size: 0.875rem;
}

body.page-product-detail .master-flam-form--product-compact {
    gap: 0.35rem;
}

body.page-product-detail .master-flam-form__fields {
    margin: 0;
    padding: 0.38rem 0.55rem 0.45rem;
}

body.page-product-detail .master-flam-dl--product-fields {
    container-type: inline-size;
    container-name: product-flam-dl;
    grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr) minmax(7rem, 10rem) minmax(0, 1fr);
    gap: 0.14rem 0.35rem;
    column-gap: 0.55rem;
    align-items: center;
}

body.page-product-detail .master-flam-dl--product-fields dt {
    padding: 0.18rem 0.4rem;
    line-height: 1.2;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    font-size: clamp(0.5rem, 0.24rem + 1.5cqi + 0.2vw, 0.6875rem);
}

@container product-flam-dl (max-width: 22rem) {
    body.page-product-detail .master-flam-dl--product-fields dt {
        font-size: 0.5rem;
    }
}

body.page-product-detail .master-flam-dl--product-fields dd {
    padding: 0.08rem 0;
    min-width: 0;
}

body.page-product-detail .master-flam-dl--product-fields .psp-in,
body.page-product-detail .master-flam-dl--product-fields select.psp-in,
body.page-product-detail .master-flam-dl--product-fields textarea.psp-in {
    width: 100%;
    max-width: none;
    min-height: 1.55rem;
    padding: 0.12rem 0.32rem;
    line-height: 1.25;
}

body.page-product-detail .master-flam-dl--product-fields .master-flam-code {
    max-width: none;
}

body.page-product-detail .master-flam-dl--product-fields > dt:last-of-type {
    grid-column: 1;
}

body.page-product-detail .master-flam-dl--product-fields > dd:last-of-type {
    grid-column: 2 / -1;
    min-height: 2.35rem;
}

body.page-product-detail .master-flam-dl--product-fields textarea.psp-in {
    min-height: 2.35rem;
    resize: vertical;
}

body.page-product-detail .master-flam-section--supplier {
    padding: 0.38rem 0.55rem 0.45rem;
}

body.page-product-detail .master-flam-section--supplier .master-flam-section__title {
    margin-bottom: 0.3rem;
    padding-bottom: 0.22rem;
}

body.page-product-detail .master-flam-supplier-slots-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.5rem;
    align-items: start;
}

body.page-product-detail .master-flam-supplier-slots-grid .table-wrap {
    box-shadow: none;
    border-radius: 6px;
}

body.page-product-detail .master-flam-supplier-slot-table th,
body.page-product-detail .master-flam-supplier-slot-table td {
    padding: 0.12rem 0.28rem;
    vertical-align: middle;
}

body.page-product-detail .master-flam-supplier-slot-table .psp-in {
    min-height: 1.5rem;
    padding: 0.1rem 0.28rem;
}

body.page-product-detail .master-flam-supplier-code {
    max-width: 5.25rem;
}

body.page-product-detail .master-flam-meta {
    margin: 0.15rem 0 0;
}

@media (max-width: 1180px) {
    body.page-product-detail .master-flam-supplier-slots-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    body.page-product-detail .master-flam-dl--product-fields {
        grid-template-columns: minmax(7rem, 10rem) minmax(0, 1fr);
    }
}

/* 得意先・仕入先登録: コンテナ幅は受注一覧（1320px）に揃える */
body.page-customer-detail.page-order-detail > main.container--order-detail-fit,
body.page-supplier-detail.page-order-detail > main.container--order-detail-fit {
    padding: 0.35rem 1rem 0.5rem;
    font-size: 0.875rem;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

body.page-customer-detail > main > .flash,
body.page-customer-detail > main .order-detail-screen,
body.page-customer-detail > main .order-detail-screen *,
body.page-supplier-detail > main > .flash,
body.page-supplier-detail > main .order-detail-screen,
body.page-supplier-detail > main .order-detail-screen * {
    font-size: 0.875rem;
}

body.page-customer-detail .container--order-detail,
body.page-supplier-detail .container--order-detail {
    max-width: 1320px;
}

body.page-customer-detail .master-flam-form--customer-compact,
body.page-supplier-detail .master-flam-form--customer-compact {
    gap: 0.35rem;
}

body.page-customer-detail .master-flam-customer-grid,
body.page-supplier-detail .master-flam-customer-grid {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: stretch;
}

body.page-customer-detail .master-flam-section--customer,
body.page-supplier-detail .master-flam-section--customer {
    margin: 0;
    padding: 0.38rem 0.55rem 0.45rem;
}

body.page-customer-detail .master-flam-section--customer .master-flam-section__title,
body.page-supplier-detail .master-flam-section--customer .master-flam-section__title {
    margin-bottom: 0.3rem;
    padding-bottom: 0.22rem;
    font-size: 0.875rem;
}

body.page-customer-detail .master-flam-section__summary,
body.page-supplier-detail .master-flam-section__summary {
    margin: 0 0 0.3rem;
    padding: 0 0 0.22rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    list-style: none;
}

body.page-customer-detail .master-flam-customer-fold[open] .master-flam-section__summary,
body.page-supplier-detail .master-flam-customer-fold[open] .master-flam-section__summary {
    margin-bottom: 0.35rem;
}

body.page-customer-detail .master-flam-customer-fold .master-flam-section__summary::-webkit-details-marker,
body.page-supplier-detail .master-flam-customer-fold .master-flam-section__summary::-webkit-details-marker {
    display: none;
}

body.page-customer-detail .master-flam-customer-fold .master-flam-section__summary::before,
body.page-supplier-detail .master-flam-customer-fold .master-flam-section__summary::before {
    content: "▸ ";
    color: var(--muted);
}

body.page-customer-detail .master-flam-customer-fold[open] .master-flam-section__summary::before,
body.page-supplier-detail .master-flam-customer-fold[open] .master-flam-section__summary::before {
    content: "▾ ";
}

body.page-customer-detail .master-flam-dl--customer-fields,
body.page-supplier-detail .master-flam-dl--customer-fields {
    container-type: inline-size;
    container-name: customer-flam-dl;
    grid-template-columns: minmax(7.25rem, 10.5rem) minmax(0, 1fr) minmax(7.25rem, 10.5rem) minmax(0, 1fr);
    gap: 0.24rem 0.35rem;
    column-gap: 0.5rem;
    align-items: center;
}

body.page-customer-detail .master-flam-dl--customer-fields dt,
body.page-supplier-detail .master-flam-dl--customer-fields dt {
    min-height: 2.25rem;
    padding: 0.18rem 0.4rem;
    line-height: 1.35;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    font-size: clamp(0.5rem, 0.22rem + 1.55cqi + 0.2vw, 0.625rem);
}

body.page-customer-detail .master-flam-dl--customer-fields dt,
body.page-supplier-detail .master-flam-dl--customer-fields dt {
    background: #fff;
    color: var(--muted);
    font-weight: 500;
    border: none;
    border-radius: 0;
}

/* セクション2列並び（枠が狭い）ではラベルをさらに縮小 */
@media (min-width: 1281px) and (max-width: 1580px) {
    body.page-customer-detail .master-flam-dl--customer-fields dt,
    body.page-supplier-detail .master-flam-dl--customer-fields dt {
        font-size: clamp(0.5rem, 0.2rem + 1.45cqi + 0.15vw, 0.5625rem);
    }
}

@container customer-flam-dl (max-width: 22rem) {
    body.page-customer-detail .master-flam-dl--customer-fields dt,
    body.page-supplier-detail .master-flam-dl--customer-fields dt {
        font-size: 0.5rem;
    }
}

body.page-customer-detail .master-flam-dl--customer-fields dd,
body.page-supplier-detail .master-flam-dl--customer-fields dd {
    padding: 0.1rem 0;
    min-width: 0;
    font-size: 0.875rem;
}

body.page-customer-detail .master-flam-dl--customer-fields .psp-in,
body.page-customer-detail .master-flam-dl--customer-fields select.psp-in,
body.page-customer-detail .master-flam-dl--customer-fields textarea.psp-in,
body.page-supplier-detail .master-flam-dl--customer-fields .psp-in,
body.page-supplier-detail .master-flam-dl--customer-fields select.psp-in,
body.page-supplier-detail .master-flam-dl--customer-fields textarea.psp-in {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    min-height: 2.25rem;
    padding: 0.45rem 0.65rem;
    line-height: 1.4;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    color: var(--text);
}

body.page-customer-detail .master-flam-dl--customer-fields .psp-in:focus,
body.page-customer-detail .master-flam-dl--customer-fields select.psp-in:focus,
body.page-customer-detail .master-flam-dl--customer-fields textarea.psp-in:focus,
body.page-supplier-detail .master-flam-dl--customer-fields .psp-in:focus,
body.page-supplier-detail .master-flam-dl--customer-fields select.psp-in:focus,
body.page-supplier-detail .master-flam-dl--customer-fields textarea.psp-in:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 0;
    border-color: var(--accent);
}

body.page-customer-detail .master-flam-dl--customer-fields .master-flam-code,
body.page-supplier-detail .master-flam-dl--customer-fields .master-flam-code {
    max-width: none;
}

body.page-customer-detail .master-flam-dl--customer-fields > dt.master-flam-dl__pair--full,
body.page-supplier-detail .master-flam-dl--customer-fields > dt.master-flam-dl__pair--full {
    grid-column: 1 / 2;
    align-self: start;
}

body.page-customer-detail .master-flam-dl--customer-fields > dd.master-flam-dl__pair--full,
body.page-supplier-detail .master-flam-dl--customer-fields > dd.master-flam-dl__pair--full {
    grid-column: 2 / -1;
    min-width: 0;
}

body.page-customer-detail .master-flam-dl--customer-fields textarea.psp-in,
body.page-supplier-detail .master-flam-dl--customer-fields textarea.psp-in {
    min-height: 4.5rem;
    resize: vertical;
}

body.page-customer-detail .master-flam-hint,
body.page-supplier-detail .master-flam-hint {
    margin: 0.2rem 0 0;
    font-size: 0.6875rem;
    line-height: 1.35;
}

body.page-customer-detail .customer-collection-setup-prompt {
    padding: 0.35rem 0.5rem;
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

body.page-customer-detail .customer-collection-setup-prompt p {
    margin: 0;
    font-size: inherit;
}

body.page-customer-detail .master-flam-meta,
body.page-supplier-detail .master-flam-meta {
    margin: 0.15rem 0 0;
}

body.page-customer-detail .customer-zip-field,
body.page-supplier-detail .supplier-zip-field {
    gap: 0.25rem 0.5rem;
}

@media (max-width: 900px) {
    body.page-customer-detail .master-flam-dl--customer-fields,
    body.page-supplier-detail .master-flam-dl--customer-fields {
        grid-template-columns: minmax(7.25rem, 10.5rem) minmax(0, 1fr);
    }
}

/* 備考: ラベル＋虫眼鏡＋入力を1行に */
.order-detail-remarks--inline {
    padding: 0.3rem 0.55rem;
}

.order-detail-remarks--inline .order-detail-remarks__grid.form-grid {
    display: block;
    margin: 0;
    gap: 0;
}

.order-detail-remarks--inline .remark-field {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.45rem 0.65rem;
}

.order-detail-remarks--inline .remark-field__head {
    flex: 0 0 auto;
    padding-top: 0.35rem;
}

.order-detail-remarks--inline .remark-field__body {
    flex: 1 1 auto;
    min-width: 0;
}

.order-detail-remarks--inline .remark-field textarea {
    min-height: 2.35rem;
    height: 2.5rem;
    max-height: 6rem;
}

/* 備考（明細直下） */
.order-detail-remarks__grid {
    grid-template-columns: 1fr;
}

.order-detail-remarks__grid .remark-field {
    grid-column: 1 / -1;
}

.remark-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
}

.remark-field__head {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.25rem;
}

.remark-field__body {
    width: 100%;
}

.remark-field__lbl {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text, #1e293b);
}

.remark-field__search-btn {
    flex-shrink: 0;
}

.remark-field textarea {
    width: 100%;
    min-width: 0;
    min-height: 5.5rem;
    resize: vertical;
    white-space: pre-wrap;
    line-height: 1.5;
}

.order-detail-remarks__grid .remark-field + .remark-field {
    margin-top: 0.15rem;
}

.om-combo-list-head--remark-tpl {
    grid-template-columns: minmax(6.5rem, 8.5rem) minmax(0, 1fr);
    font-weight: 400;
}

.om-combo-list-head--remark-tpl .om-combo-list-head__code,
.om-combo-list-head--remark-tpl .om-combo-list-head__name {
    font-weight: 400;
}

.om-combo-li-grid--remark-tpl {
    display: grid;
    grid-template-columns: minmax(6.5rem, 8.5rem) minmax(0, 1fr);
    gap: 0.35rem 0.45rem;
    align-items: start;
    width: 100%;
}

.om-combo-li-grid--remark-tpl .om-combo-li-code {
    font-variant-numeric: tabular-nums;
    font-size: 0.8125rem;
    color: var(--text);
    word-break: break-all;
}

.om-combo-remark-preview--full {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.remark-template-register-link {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--link, #1d4ed8);
    font: inherit;
    cursor: pointer;
}

.remark-template-register-link:hover {
    color: var(--link-hover, #1e40af);
}

.om-combo-panel-footer--remark-add {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.5rem 0.65rem 0.6rem;
}

.remark-template-picker-add {
    margin: 0;
    padding: 0.2rem 0.55rem;
    border: 1px solid var(--border, #d1d5db);
    border-radius: 4px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.35;
    text-decoration: none;
    cursor: pointer;
}

.remark-template-picker-add:hover {
    background: #f8fafc;
    color: inherit;
}

.remark-template-register-note {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.remark-template-master-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-remark-template-list.page-orders-list--compact-header .order-list-screen {
    flex: 1 1 auto;
    min-height: 0;
}

body.page-remark-template-list.page-orders-list--compact-header .order-list-data {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-remark-template-list .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.page-remark-template-list .order-list-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

/* 請求一覧と同様: コードごとに1行・省略表示 */
body.page-remark-template-list.page-orders-list--compact-header .container--orders-fit .remark-template-master-table.data-table th,
body.page-remark-template-list.page-orders-list--compact-header .container--orders-fit .remark-template-master-table.data-table td {
    padding: 0.28rem 0.28rem;
    line-height: 1.25;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
}

body.page-remark-template-list.page-orders-list--compact-header .container--orders-fit .remark-template-master-table.data-table thead th {
    padding: 0.32rem 0.28rem;
    letter-spacing: -0.02em;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 400;
}

body.page-remark-template-list.page-orders-list--compact-header .order-list-screen .remark-template-master-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .order-cell-clip,
    .btn,
    .btn--compact
) {
    font-size: 0.875rem;
}

body.page-remark-template-list .remark-template-master-table .link-order-id {
    color: var(--text);
    font-weight: 400;
}

body.page-remark-template-list .remark-template-master-table .link-order-id:hover {
    color: var(--text);
}

/* 担当者一覧: 荷主・仕入先一覧と同型の文字・余白・フィルタ */
body.page-staff-list .brand,
body.page-staff-list .site-header__context-label,
body.page-staff-list .site-header__quick-btn {
    font-size: 1rem;
    line-height: 1.4;
}

body.page-staff-list .site-header__quick-btn {
    padding: 0.58rem 1rem;
    border-radius: 7px;
    font-weight: 400;
}

body.page-staff-list .order-list-screen :is(
    .muted,
    p,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    th,
    td,
    .empty-state,
    .empty-state strong,
    .order-list-meta,
    .link-order-id
) {
    font-size: 0.875rem;
}

body.page-staff-list .order-filter-panel--compact .order-filter-grid {
    grid-template-columns: 1fr;
}

body.page-staff-list .order-filter-field--kw-actions {
    max-width: none;
    width: 100%;
}

body.page-staff-list .order-filter-kw-actions {
    display: flex;
    flex: 0 0 50%;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
    width: 50%;
    max-width: 50%;
    box-sizing: border-box;
}

body.page-staff-list .order-filter-kw-actions .order-filter-input--kw {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
}

body.page-staff-list .order-filter-kw-actions .btn {
    flex: 0 0 auto;
    align-self: stretch;
    color: var(--text);
    min-height: 1.65rem;
    padding: 0 0.55rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    line-height: 1.25;
    font-weight: 500;
}

body.page-staff-list.page-orders-list--compact-header .order-filter-panel--compact {
    margin-top: 0.55rem;
    margin-bottom: 0.65rem;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

body.page-staff-list .order-filter-panel--compact .order-filter-grid input.order-filter-input {
    min-height: 1.65rem;
    padding: 0.2rem 0.45rem;
    box-sizing: border-box;
}

body.page-staff-list .order-list-screen,
body.page-staff-list.page-orders-list--compact-header .order-list-screen,
body.page-staff-list .order-list-data,
body.page-staff-list.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-staff-list > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
}

body.page-staff-list .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.page-staff-list.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-staff-list .staff-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
}

body.page-staff-list.page-orders-list--compact-header .container--orders-fit .staff-list-table.data-table th,
body.page-staff-list.page-orders-list--compact-header .container--orders-fit .staff-list-table.data-table td {
    padding: 0.5rem 0.55rem;
    line-height: 1.45;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-staff-list.page-orders-list--compact-header .container--orders-fit .staff-list-table.data-table thead th {
    padding: 0.42rem 0.55rem;
}

body.page-staff-list .staff-list-table td.order-list-col-customer,
body.page-staff-list .staff-list-table td.staff-list-col-email,
body.page-staff-list .staff-list-table td.staff-list-col-login {
    overflow: hidden;
    vertical-align: middle;
}

body.page-staff-list .staff-list-table .order-cell-clip,
body.page-staff-list .staff-list-table .order-cell-clip--fill {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.page-staff-list.page-orders-list--compact-header .order-list-screen .staff-list-table :is(
    th,
    td,
    a,
    span,
    strong,
    .link-order-id,
    .order-cell-clip
) {
    font-size: 0.875rem;
}

body.page-staff-list .staff-list-table .order-list-col-no,
body.page-staff-list.page-orders-list--compact-header .container--orders .staff-list-table .order-list-col-no {
    width: 5.75rem;
}

body.page-staff-list .staff-list-table .staff-list-col-login {
    width: 6.5rem;
}

body.page-staff-list .staff-list-table .staff-list-col-status {
    width: 4.5rem;
}

body.page-staff-list .staff-list-table .order-list-col-customer,
body.page-staff-list .staff-list-table .staff-list-col-email {
    width: auto;
}

body.page-staff-list .staff-list-table .link-order-id {
    color: var(--text);
    font-weight: 400;
}

body.page-staff-list .staff-list-table .link-order-id:hover {
    color: var(--text);
}

/* 担当者登録・編集: 本文 0.875rem（サイトヘッダーは page-order-detail 共通の 1rem のまま） */
body.page-staff-detail.page-order-detail > main.container--order-detail-fit {
    padding: 0.35rem 1rem 0.5rem;
    font-size: 0.875rem;
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

body.page-staff-detail > main > .flash,
body.page-staff-detail > main .order-detail-screen,
body.page-staff-detail > main .order-detail-screen :is(
    .muted,
    p,
    .btn,
    .btn--secondary,
    .btn--ghost,
    code,
    label,
    a,
    strong,
    span,
    select,
    input:not([type="checkbox"]),
    textarea,
    .psp-in,
    .master-flam-meta
) {
    font-size: 0.875rem;
}

body.page-staff-detail.page-payment-detail .order-detail-screen :is(.muted, p, .btn, code, label, dt, dd, a) {
    font-size: 0.875rem;
}

body.page-staff-detail .order-detail-screen .form-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
body.page-staff-detail .order-detail-screen .form-grid select,
body.page-staff-detail .order-detail-screen .form-grid textarea {
    font-size: 0.875rem;
}

.remark-template-master-table .remark-template-list-check {
    width: 2.5rem;
    text-align: center;
    vertical-align: middle;
}

.remark-template-master-table .remark-template-list-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    vertical-align: middle;
}

.remark-template-master-table .remark-template-list-code {
    width: 7.5rem;
    white-space: nowrap;
}

.remark-template-master-table .remark-template-list-code .link-order-id {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.remark-template-master-table .remark-template-list-body {
    min-width: 0;
    width: auto;
}

.remark-template-master-table .remark-template-list-body .order-cell-clip {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.remark-template-master-table .remark-template-list-ops {
    width: 5.5rem;
    text-align: center;
    white-space: nowrap;
}

body.page-remark-template-detail .remark-template-header-save {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

body.page-remark-template-detail .remark-template-header-save:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

body.page-remark-template-detail form.remark-template-form {
    gap: 1rem;
    width: 100%;
    max-width: none;
}

/* 備考テンプレート登録: ヘッダー幅に合わせてフォームを横いっぱいに */
body.page-remark-template-detail > main.container--orders-fit {
    width: 100%;
    max-width: min(1760px, 100%);
}

/* 送信履歴: キーワード検索ボックスをやや広め */
body.page-mail-history .order-filter-panel--compact .order-filter-grid {
    grid-template-columns: 1fr;
}

body.page-mail-history .order-filter-field--kw-actions {
    max-width: none;
    width: 100%;
}

body.page-mail-history .order-filter-kw-actions {
    display: flex;
    flex: 0 0 70%;
    align-items: stretch;
    gap: 0.4rem;
    min-width: 0;
    width: 70%;
    max-width: 70%;
    box-sizing: border-box;
}

body.page-mail-history .order-filter-kw-actions .order-filter-input--kw {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    max-width: none;
}

body.page-mail-history .order-filter-kw-actions .btn {
    flex: 0 0 auto;
    align-self: stretch;
}

/* 送信履歴: main 幅は page-orders-list の max-width: 1320px に合わせる（受注一覧と同じ枠） */
body.page-mail-history > main.container--orders-fit {
    overflow: visible;
    flex: 0 1 auto;
    min-height: 0;
    font-size: 0.875rem;
}

/* 表の下に伸びる余白を抑え、番号ページ送りを表直下に寄せる（受注一覧と同様） */
body.page-mail-history .order-list-data,
body.page-mail-history.page-orders-list--compact-header .order-list-data {
    flex: 0 1 auto;
    min-height: 0;
    overflow: visible;
}

body.page-mail-history.page-orders-list--compact-header .container--orders-fit .order-list-table-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: visible;
}

body.page-mail-history .list-pager-bottom {
    margin-top: 0.35rem;
    margin-bottom: 0.15rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

body.page-mail-history main .mail-send-history-screen,
body.page-mail-history main .mail-send-history-screen .order-list-meta,
body.page-mail-history main .mail-send-history-screen .order-list-meta strong,
body.page-mail-history main .mail-send-history-screen .muted,
body.page-mail-history main .mail-send-history-screen .muted code,
body.page-mail-history main .mail-send-history-screen .empty-state,
body.page-mail-history main .mail-send-history-screen .empty-state strong {
    font-size: 0.875rem;
}

/* 送信履歴: 受注一覧より行の縦余白をやや広め */
body.page-mail-history.page-orders-list--compact-header .container--orders-fit .mail-send-history-table.order-list-table.data-table th,
body.page-mail-history.page-orders-list--compact-header .container--orders-fit .mail-send-history-table.order-list-table.data-table td {
    padding: 0.42rem 1.05rem;
    line-height: 1.35;
    vertical-align: middle;
    font-size: 0.875rem;
}

body.page-mail-history.page-orders-list--compact-header .container--orders-fit .mail-send-history-table.order-list-table.data-table thead th {
    padding: 0.46rem 1.05rem;
    font-size: 0.875rem;
    line-height: 1.35;
}

/* 内容に合わせて列幅を取り、省略（…）はしない */
body.page-mail-history main .mail-send-history-table {
    table-layout: auto;
    width: max-content;
    min-width: 100%;
    max-width: none;
}

body.page-mail-history main .mail-send-history-table :is(th, td) {
    vertical-align: middle;
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    text-overflow: clip;
}

body.page-mail-history main .mail-send-history-table th {
    font-weight: 700;
}

body.page-mail-history main .mail-send-history-table :is(th, td).mail-send-history-col-id {
    text-align: left;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.page-mail-history main .mail-send-history-table :is(th, td).mail-send-history-col-dt {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

body.page-mail-history main .mail-send-history-table :is(th, td).mail-send-history-col-dt--accept {
    text-align: center;
}

body.page-mail-history main .mail-send-history-table :is(th, td).mail-send-history-col-dt--complete {
    text-align: right;
}

body.page-mail-history main .mail-send-history-table :is(th, td).mail-send-history-col-person,
body.page-mail-history main .mail-send-history-table :is(th, td).mail-send-history-col-mail,
body.page-mail-history main .mail-send-history-table :is(th, td).mail-send-history-col-screen {
    text-align: left;
    min-width: 6rem;
}

body.page-mail-history main .mail-send-history-table :is(th, td).mail-send-history-col-slip {
    text-align: left;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

body.page-mail-history main .mail-send-history-table :is(th, td).mail-send-history-col-status {
    text-align: center;
    white-space: nowrap;
}

body.page-mail-history main .mail-send-history-id-link,
body.page-mail-history main .mail-send-history-slip-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 0.12em;
}

body.page-mail-history main .mail-send-history-id-link:hover,
body.page-mail-history main .mail-send-history-slip-link:hover {
    color: var(--accent);
}

body.page-mail-history main .mail-send-history-status {
    display: inline-block;
    font-size: inherit;
    line-height: 1.2;
    font-weight: 400;
}

body.page-mail-history main .mail-send-history-status--ok {
    color: var(--text);
}

body.page-mail-history main .mail-send-history-status--fail {
    color: var(--text);
}

/* 同期ログ: 送信履歴と同様に横幅を広げる */
body.page-sync-log > main.container--orders-fit {
    width: 100%;
    max-width: min(1760px, 100%);
}

.remark-template-form-section {
    margin: 0;
    padding: 0.85rem 1rem 1rem;
    width: 100%;
    box-sizing: border-box;
}

.remark-template-form-section__title {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.4rem;
}

.remark-template-form-dl {
    max-width: none;
    align-items: start;
    font-size: 0.875rem;
}

body.page-remark-template-detail .remark-template-form-dl.dl-grid {
    font-size: 0.875rem;
}

body.page-remark-template-detail .remark-template-form-dl.dl-grid > dt,
body.page-remark-template-list.page-remark-template-detail .remark-template-form-dl.dl-grid > dt {
    min-height: 2.25rem;
    display: flex;
    align-items: center;
    line-height: 1.35;
    font-size: 0.875rem;
    color: var(--text);
    font-weight: 400;
}

body.page-remark-template-popup > main .remark-template-form-section__title,
body.page-remark-template-popup > main .remark-template-form-dl.dl-grid > dt {
    font-weight: 400;
}

body.page-remark-template-detail .remark-template-form-dl dd {
    font-size: 0.875rem;
}

body.page-remark-template-detail > main .master-flam-meta {
    font-size: 0.875rem;
}

body.page-remark-template-detail .remark-template-form-section .psp-in,
body.page-remark-template-detail .remark-template-form-section textarea.psp-in {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    min-height: 2.25rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.875rem;
    line-height: 1.4;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    color: var(--text);
}

body.page-remark-template-detail .remark-template-form-section textarea.psp-in {
    min-height: 5rem;
    height: 5rem;
    resize: vertical;
}

body.page-remark-template-detail .remark-template-form-section .psp-in:focus,
body.page-remark-template-detail .remark-template-form-section textarea.psp-in:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 0;
    border-color: var(--accent);
}

.remark-template-code-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    width: 100%;
}

.remark-template-code-in {
    width: 8rem;
    max-width: 8rem;
    font-variant-numeric: tabular-nums;
}

.remark-template-code-field .remark-template-code-in {
    flex: 0 0 8rem;
}

.remark-template-auto-seq {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.remark-template-auto-seq input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
}

.om-combo-remark-preview {
    font-size: 0.8125rem;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-detail-remarks__title {
    margin: 0 0 0.65rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.master-flam-check,
.master-flam-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-right: 0.75rem;
    font-size: 0.875rem;
}

.master-flam-inline-sels {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8125rem;
}

.master-flam-inline-sels label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.master-flam-inline-sels select {
    flex: 1;
    min-width: 10rem;
}

.master-flam-lookup {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.master-flam-meta {
    margin: 0;
    font-size: 0.75rem;
}

/* ヘッダー「保存」画面: 更新日時はフォーム／画面末尾の左下（削除・サブ操作と縦に分離） */
.master-flam-meta--page-foot {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0.85rem 0 0;
    padding: 0;
    text-align: left;
    box-sizing: border-box;
    flex-shrink: 0;
}

.payment-detail-form-layout > .master-flam-meta--page-foot,
form.stack > .master-flam-meta--page-foot,
body.page-company-profile main > .master-flam-meta--page-foot,
body.page-settings-integration-layout .integration-layout-editor-screen > .master-flam-meta--page-foot,
body.page-staff-detail .order-detail-screen > .master-flam-meta--page-foot,
body.page-warehouse-edit form.card > .master-flam-meta--page-foot,
body.page-inventory-hold form > .master-flam-meta--page-foot,
body.page-inventory-adjust form > .master-flam-meta--page-foot {
    align-self: flex-start;
}

.order-detail-meta-details .master-flam-meta,
.order-detail-header__col .master-flam-meta:not(.master-flam-meta--page-foot) {
    margin-top: 0.35rem;
}

body.page-consignor-detail .payment-detail-form-layout > .master-flam-meta--page-foot,
body.page-delivery-site-detail .payment-detail-form-layout > .master-flam-meta--page-foot,
body.page-customer-detail .master-flam-form > .master-flam-meta--page-foot,
body.page-supplier-detail .master-flam-form > .master-flam-meta--page-foot,
body.page-product-detail .master-flam-form > .master-flam-meta--page-foot,
body.page-remark-template-detail form.remark-template-form > .master-flam-meta--page-foot {
    font-size: 0.875rem;
}

body.page-company-profile main > .master-flam-meta--page-foot {
    margin-top: 0.85rem;
    font-size: 0.875rem;
}

.master-flam-inline-del {
    display: inline;
    margin: 0;
}

body.page-customer-list .order-list-data,
body.page-supplier-list .order-list-data,
body.page-product-list .order-list-data,
body.page-consignor-list .order-list-data,
body.page-delivery-site-list .order-list-data {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-customer-list .order-list-toolbar,
body.page-supplier-list .order-list-toolbar,
body.page-product-list .order-list-toolbar,
body.page-consignor-list .order-list-toolbar,
body.page-delivery-site-list .order-list-toolbar {
    flex-shrink: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

body.page-customer-list .order-list-pager-tools,
body.page-supplier-list .order-list-pager-tools,
body.page-product-list .order-list-pager-tools,
body.page-consignor-list .order-list-pager-tools,
body.page-delivery-site-list .order-list-pager-tools {
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--muted);
}

.empty-state strong {
    display: block;
    color: var(--text);
    margin-bottom: 0.35rem;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
    margin-top: 0.75rem;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-self: start;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
}

.form-grid label.full {
    grid-column: 1 / -1;
}

/* チェックボックス＋説明を1行の横並びにする */
.form-grid label.form-grid-check {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    grid-column: 1 / -1;
    font-weight: 400;
    color: var(--text);
    white-space: nowrap;
}

.form-grid label.form-grid-check input[type="checkbox"] {
    width: auto;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    flex-shrink: 0;
}

/* ラベル以外（明細ラップ・ボタン行など）もフォーム全幅に */
.form-grid > .full {
    grid-column: 1 / -1;
}

.form-grid > h3 {
    grid-column: 1 / -1;
}

.form-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal),
.form-grid select,
.form-grid textarea {
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--text);
}

.form-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal):focus,
.form-grid select:focus,
.form-grid textarea:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    border-color: var(--accent);
}

.form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.5rem;
}

.form-inline select {
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-family: inherit;
}

.flash {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.flash--ok {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.flash--err {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.flash--warn {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fdba74;
}

.credit-exposure-panel {
    margin: 0 0 0.65rem;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.credit-exposure-panel__banner {
    margin: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
}

.credit-exposure-panel__banner.flash--warn {
    margin: 0;
}

.credit-exposure-panel__banner-text {
    font-weight: 600;
}

.credit-exposure-panel__warn-note {
    display: inline-block;
    margin-left: 0.35rem;
    font-weight: 500;
    font-size: 0.75rem;
}

.credit-exposure-panel__details {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
}

.credit-exposure-panel__details summary {
    cursor: pointer;
    color: #4b5563;
    font-weight: 600;
    user-select: none;
}

.credit-exposure-panel__dl {
    margin: 0.35rem 0 0;
    padding: 0.45rem 0.55rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
}

.credit-exposure-panel__row {
    display: grid;
    grid-template-columns: minmax(8rem, 42%) 1fr;
    gap: 0.35rem 0.65rem;
    padding: 0.2rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.credit-exposure-panel__row:last-child {
    border-bottom: none;
}

.credit-exposure-panel__row dt {
    margin: 0;
    color: #6b7280;
    font-weight: 500;
}

.credit-exposure-panel__row dd {
    margin: 0;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.om-lt-skip-notice {
    line-height: 1.45;
}

.om-lt-result__lead,
.om-lt-result__reason {
    margin: 0;
}

.om-lt-result__reason {
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

.om-lt-result__details,
.om-lt-skip-details {
    margin-top: 0.4rem;
}

.om-lt-result__details summary,
.om-lt-skip-details summary {
    cursor: pointer;
    font-weight: 600;
}

.om-lt-result__list {
    margin: 0.4rem 0 0;
    padding-left: 1.2rem;
    font-size: 0.875rem;
    line-height: 1.55;
}

.om-lt-result__file {
    padding: 0.05rem 0.3rem;
    border: 1px solid currentColor;
    border-radius: 0.2rem;
    background: rgba(255, 255, 255, 0.55);
}

.om-lt-skip-group {
    margin-top: 0.5rem;
}

.om-lt-skip-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.2rem;
}

.om-lt-skip-items code {
    padding: 0.08rem 0.3rem;
    border: 1px solid currentColor;
    border-radius: 0.2rem;
    background: rgba(255, 255, 255, 0.55);
}

.callout {
    padding: 1rem 1.15rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    border: 1px solid var(--border);
}

.callout--warn {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #78350f;
}

.callout--ok {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e3a5f;
}

.callout ul {
    margin: 0.35rem 0 0;
    padding-left: 1.2rem;
}

.callout p {
    margin: 0 0 0.35rem;
}

.section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1.75rem 0 0.75rem;
}

.section-title:first-of-type {
    margin-top: 0;
}

body.page-dashboard .section-title--hub {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    text-transform: none;
    letter-spacing: 0;
    margin: 1.75rem 0 0.85rem;
}

body.page-dashboard .section-title--hub:first-of-type {
    margin-top: 0;
}

.app-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 0.85rem;
    margin-bottom: 0.25rem;
}

/* ダッシュボード: 横最大7列（8個目から次の段） */
body.page-dashboard .app-tile-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    body.page-dashboard .app-tile-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    body.page-dashboard .app-tile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.app-tile-grid--compact {
    grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
    max-width: 720px;
}

.app-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 1.1rem 0.6rem;
    min-height: 118px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text);
    box-shadow: var(--shadow);
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.12s ease;
}

.app-tile:hover {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
    transform: translateY(-1px);
}

.app-tile__icon {
    color: var(--accent);
    margin-bottom: 0.45rem;
    line-height: 0;
}

.app-tile__icon svg {
    display: block;
}

.app-tile__label {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.3;
}

.app-tile__meta {
    font-size: 0.7rem;
    color: var(--muted);
    margin-top: 0.35rem;
    line-height: 1.35;
    word-break: break-all;
}

/* 一覧の CSV 取込: ダッシュボードと同型のタイル行＋アップロードカード */
.import-dash {
    margin-bottom: 1rem;
}

.product-tools .import-dash {
    margin-bottom: 0.75rem;
}

.import-dash__upload {
    margin-top: 0.85rem;
    padding: 1rem 1.1rem;
}

.import-dash__upload .import-dash__form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.65rem;
}

.import-dash__hint {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.import-dash__foot {
    margin: 0.65rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
}

/* —— 受注（一覧・明細）レイアウト —— 別製品の画面構成を参考にした独自UI */
.order-screen__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.order-screen__title-row h1 {
    margin: 0;
}

.order-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.order-action-bar form {
    margin: 0;
    display: inline;
}

.order-filter-panel {
    margin-bottom: 1rem;
}

.order-filter-panel .order-filter-panel__title {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.order-filter-grid {
    display: grid;
    gap: 0.75rem 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .order-filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .order-filter-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 受注一覧など: 検索欄を常に1列（横並びだとマウス移動が大きい） */
.order-filter-grid.order-filter-grid--stack {
    grid-template-columns: 1fr;
}

/* 入金一覧など: 常に最大2列（大画面でも4列にしない） */
.order-filter-grid.order-filter-grid--cols2 {
    grid-template-columns: 1fr;
}

@media (min-width: 720px) {
    .order-filter-grid.order-filter-grid--cols2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ラベル左・入力右の1行（縦にラベル＋入力を積まない） */
.order-filter-grid.order-filter-grid--inline .order-filter-field {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted);
}

.order-filter-grid.order-filter-grid--inline .order-filter-field__lbl {
    flex: 0 0 8.25rem;
    min-width: 0;
    line-height: 1.2;
}

.order-filter-grid.order-filter-grid--inline .order-filter-field input {
    min-width: 0;
    width: auto;
}

.order-filter-grid.order-filter-grid--inline .order-filter-input--id {
    flex: 0 1 5rem;
    max-width: 5.75rem;
}

.order-filter-grid.order-filter-grid--inline .order-filter-input--kw {
    flex: 0 1 9.5rem;
    max-width: 11rem;
}

.order-filter-grid.order-filter-grid--inline .order-filter-input--cust {
    flex: 1 1 10rem;
    max-width: 16rem;
}

.order-filter-grid.order-filter-grid--inline .order-filter-field--product .order-filter-product-row,
.order-filter-grid.order-filter-grid--inline .order-filter-field--customer .order-filter-customer-row {
    display: flex;
    align-items: stretch;
    flex: 1 1 10rem;
    max-width: 16rem;
    min-width: 0;
    gap: 0.2rem;
}

.order-filter-grid.order-filter-grid--inline .order-filter-field--product .order-filter-input--prod,
.order-filter-grid.order-filter-grid--inline .order-filter-field--customer .order-filter-input--cust {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
}

.order-filter-grid.order-filter-grid--inline .order-filter-field--date-range .order-filter-field__lbl {
    flex: 0 0 4rem;
}

.order-filter-date-range {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    flex: 0 1 auto;
    min-width: 0;
}

.order-filter-date-range__sep {
    flex-shrink: 0;
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1;
    user-select: none;
}

/* 注文日: 年月日テキスト＋カレンダーを1枠内（右端アイコン＝ピッカー） */
.order-filter-date-unified {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    flex: 0 1 10.5rem;
    max-width: 12rem;
    min-width: 0;
    min-height: 1.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    box-sizing: border-box;
    overflow: hidden;
}

.order-filter-date-unified.is-invalid {
    border-color: #c62828;
}

.order-filter-date-unified:focus-within {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 0;
    border-color: var(--accent);
}

.smart-date-error {
    display: block;
    margin: 0.15rem 0 0;
    font-size: 0.68rem;
    line-height: 1.25;
    color: #b00020;
    max-width: 10.5rem;
}

.smart-date-error[hidden] {
    display: none !important;
}

.smart-date-gregorian-popup {
    position: fixed;
    z-index: 10050;
    min-width: 15.5rem;
    padding: 0.55rem 0.6rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 0.45rem;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    box-sizing: border-box;
    font-size: 0.78rem;
    color: var(--text);
}

.smart-date-gregorian-popup__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
}

.smart-date-gregorian-popup__title {
    flex: 1 1 auto;
    text-align: center;
    font-weight: 600;
    font-size: 0.82rem;
}

.smart-date-gregorian-popup__nav {
    flex: 0 0 auto;
    width: 1.65rem;
    height: 1.65rem;
    margin: 0;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 0.35rem;
    background: #fff;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
}

.smart-date-gregorian-popup__nav:hover {
    background: rgba(0, 0, 0, 0.04);
}

.smart-date-gregorian-popup__dow {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.1rem;
    margin-bottom: 0.2rem;
    text-align: center;
    font-size: 0.68rem;
    color: var(--muted);
}

.smart-date-gregorian-popup__dow-cell--sun {
    color: #c62828;
}

.smart-date-gregorian-popup__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.1rem;
}

.smart-date-gregorian-popup__cell {
    min-height: 1.65rem;
}

.smart-date-gregorian-popup__day {
    min-height: 1.65rem;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0.35rem;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.smart-date-gregorian-popup__day:hover {
    background: rgba(37, 99, 235, 0.1);
}

.smart-date-gregorian-popup__day.is-selected {
    background: var(--accent);
    color: #fff;
}

.smart-date-gregorian-popup__day--sun:not(.is-selected) {
    color: #c62828;
}

.smart-date-gregorian-popup__day.is-disabled,
.smart-date-gregorian-popup__cell--pad {
    visibility: hidden;
}

.order-filter-date-unified__text {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    border: none;
    outline: none;
    padding: 0.24rem 0.28rem;
    font-size: 0.75rem;
    font-family: inherit;
    color: inherit;
    background: transparent;
    box-sizing: border-box;
}

.order-filter-date-unified__text:focus {
    outline: none;
}

.order-filter-date-unified__pick {
    position: relative;
    flex: 0 0 2.15rem;
    min-width: 2.15rem;
    min-height: 1.65rem;
    margin: 0;
    padding: 0;
    border: none;
    border-left: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.04);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.order-filter-date-unified__pick:hover {
    background: rgba(0, 0, 0, 0.07);
}

.order-filter-date-unified__pick-icon {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: no-repeat center / 1rem 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2.5' y='3.5' width='11' height='10' rx='1.5'/%3E%3Cpath d='M5 2v2M11 2v2M2.5 6.5h11'/%3E%3C/svg%3E");
    opacity: 0.85;
}

.order-filter-date-unified__cal {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    font-size: 0.75rem;
    opacity: 0;
    cursor: pointer;
    box-sizing: border-box;
    color-scheme: light;
}

.order-filter-date-unified__cal:focus {
    outline: none;
}

.order-filter-date-unified__pick:focus-within {
    background: rgba(37, 99, 235, 0.08);
}

body.page-orders-list--compact-header .order-filter-date-unified {
    flex-basis: 9.75rem;
    max-width: 11.25rem;
}

body.page-orders-list--compact-header .order-filter-date-unified__text {
    padding: 0.2rem 0.24rem;
    font-size: 0.7rem;
}

/* 請求一覧: ヘッダー以外のページ内文字を 0.875rem に確定（後続 compact ルールより優先） */
body.page-invoice-list.page-orders-list--compact-header > main.container--orders-fit,
body.page-invoice-list.page-orders-list--compact-header > main.container--orders-fit :is(
    .muted,
    p,
    h2,
    .btn,
    .btn--compact,
    code,
    label,
    a,
    strong,
    span,
    select,
    button,
    input:not([type="checkbox"]):not([type="radio"]),
    th,
    td,
    .empty-state,
    .order-filter-field,
    .order-filter-field__lbl,
    .order-list-meta,
    .order-list-page-size,
    .order-list-pager-status,
    .order-summary-footer__label,
    .order-summary-footer__value,
    .order-summary-footer__amount,
    .order-summary-footer__yen,
    .order-cell-clip,
    .link-order-id,
    .order-filter-date-unified__text,
    .order-filter-date-range__sep,
    .invoice-filter-amount-mode,
    .payment-upload-modal__body,
    .payment-upload-modal__head h2,
    .payment-upload-modal__templates a,
    .payment-upload-modal__form label,
    .payment-upload-modal__form .btn
) {
    font-size: 0.875rem;
}

body.page-orders-list--compact-header .order-filter-date-unified__pick {
    flex-basis: 2rem;
    min-width: 2rem;
}

body.page-orders-list--compact-header .order-filter-date-unified__pick-icon {
    background-size: 0.92rem 0.92rem;
}

.order-filter-grid label {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--muted);
}

.order-filter-field--product .order-filter-product-row,
.order-filter-field--customer .order-filter-customer-row {
    display: flex;
    align-items: stretch;
    gap: 0.2rem;
    width: 100%;
}

.order-filter-field--product .order-filter-input--prod,
.order-filter-field--customer .order-filter-input--cust {
    flex: 1 1 auto;
    min-width: 0;
}

.order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal) {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    font-family: inherit;
}

.order-filter-grid input:not(.order-filter-date-unified__text):not(.order-filter-date-unified__cal):focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    border-color: var(--accent);
}

.order-filter-dates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.order-filter-dates input {
    flex: 1;
    min-width: 8rem;
}

.order-list-meta {
    font-size: 0.8125rem;
    color: var(--muted);
    margin: 0 0 0.5rem;
}

.order-list-meta strong {
    color: var(--text);
    font-weight: 600;
}

/* リンク下線: 物理 1px（全画面共通。text-decoration は使わない） */
.link-order-id,
.list-sort-link,
.payment-invoice-no-link,
.remark-template-register-link {
    text-decoration: none !important;
    border-bottom: 1px solid currentColor;
    line-height: 1.25;
    box-sizing: border-box;
}

.link-order-id:hover,
.link-order-id:focus-visible,
.list-sort-link:hover,
.list-sort-link:focus-visible,
.payment-invoice-no-link:hover,
.remark-template-register-link:hover {
    text-decoration: none !important;
    border-bottom: 1px solid currentColor;
}

.link-order-id {
    font-weight: 600;
    color: var(--accent);
}

.list-sort-link {
    font-weight: 400;
    color: var(--text);
    cursor: pointer;
}

.order-summary-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.order-summary-footer__box {
    text-align: right;
    min-width: 10rem;
}

.order-summary-footer__label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.2rem;
}

.order-summary-footer__value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text);
}

.order-summary-footer__amount {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.order-list-col-total {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.order-detail__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.order-detail-header {
    display: grid;
    gap: 1rem 2rem;
    grid-template-columns: 1fr;
}

@media (min-width: 800px) {
    .order-detail-header {
        grid-template-columns: 1fr 1fr;
    }
}

.order-detail-header__col h2 {
    margin: 0 0 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.order-detail-header .dl-grid {
    font-size: 0.875rem;
}

/* 受注要約（1行バー） */
.order-detail-summary--bar {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.5rem;
    padding: 0.3rem 0.55rem;
    margin: 0 0 0.45rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.order-detail-summary__item {
    display: inline;
}

.order-detail-summary--bar .order-detail-summary__k {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-right: 0.35rem;
}

.order-detail-summary--bar .order-detail-summary__v {
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.order-detail-summary__sep {
    color: #cbd5e1;
    user-select: none;
    font-weight: 300;
}

/* 受注明細上部: 明細表（order-manual-lines-table--sheet）と同系の Excel 質感 */
.order-detail-header-flam.order-detail-header-flam--sheet.card {
    margin: 0 0 0.45rem;
    padding: 0.34rem 0.48rem 0.4rem;
    border-radius: 4px;
    box-shadow: none;
    background: #fafbfc;
    border-color: var(--border);
}

/* コード＋名称はラッパー内で横並び（グリッド列 minmax(0,1fr) が潰れて入力が重なるのを避ける） */
.order-detail-header-flam__code-name-pair {
    display: flex;
    align-items: stretch;
    flex: 1 1 min(18rem, 100%);
    min-width: 0;
    gap: 0.22rem;
    max-width: 100%;
}

.order-detail-header-flam__row > .order-detail-header-flam__code-name-pair {
    flex: 1 1 14rem;
}

.order-detail-header-flam__strip-fields > .order-detail-header-flam__code-name-pair {
    flex: 1 1 min(16rem, 100%);
}

.order-detail-header-flam__code-name-pair .order-detail-header-flam__combo {
    flex: 0 0 auto;
    min-width: 6.25rem;
    max-width: 9.25rem;
}

.order-detail-header-flam__code-name-pair > .order-detail-header-flam__name,
.order-detail-header-flam__code-name-pair > .order-detail-header-flam__strip-name {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: none;
}

.order-detail-header-flam__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.34rem;
    margin-bottom: 0.18rem;
    width: 100%;
    min-width: 0;
}

.order-detail-header-flam--sheet .order-detail-header-flam__row {
    margin-bottom: 0.16rem;
}

.order-detail-header-flam__subrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    margin: 0 0 0.16rem 2.42rem;
}

.order-detail-header-flam--sheet .order-detail-header-flam__subrow {
    margin-left: 2.28rem;
    gap: 0.24rem;
}

.order-detail-header-flam__subrow--addrzip {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0.28rem;
}

.order-detail-header-flam__subrow--addrzip .order-detail-header-flam__zip {
    flex: 0 0 5.85rem;
    max-width: 6.25rem;
}

.order-detail-header-flam__addr--grow {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

/** 送り先・荷主・納入先 */
.order-detail-header-flam__strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.34rem;
    margin-bottom: 0.18rem;
    width: 100%;
    min-width: 0;
}

.order-detail-header-flam--sheet .order-detail-header-flam__strip {
    margin-bottom: 0.16rem;
}

.order-detail-header-flam__strip-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.22rem;
    flex: 1 1 14rem;
    min-width: 0;
}

.order-detail-header-flam__strip .order-detail-header-flam__zip {
    flex: 0 0 5.5rem;
    max-width: 6rem;
}

.order-detail-header-flam__strip-addr {
    flex: 2 1 11rem;
    min-width: 7rem;
    max-width: min(22rem, 42vw);
}

.order-detail-header-flam__strip-phone {
    flex: 0 0 22ch;
    width: 22ch;
    min-width: 18ch;
    max-width: 22ch;
}

.order-detail-header-flam__strip-register {
    margin-left: 0.15rem;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    align-self: center;
}

.order-detail-header-flam__strip-register .btn {
    padding: 0.15rem 0.4rem;
    min-height: 1.42rem;
    height: 1.42rem;
    line-height: 1.1;
    font-size: 0.75rem;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
}

.order-detail-header-flam__name--cust {
    max-width: min(28rem, 58vw);
}

.order-detail-header-flam__code-name-pair .order-detail-header-flam__name--cust {
    max-width: none;
}

.order-detail-header-flam__subrow--phone {
    margin-top: 0.02rem;
}

.order-detail-header-flam__phone {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 0.15rem 0.28rem;
    min-height: 1.42rem;
    font-size: 0.8125rem;
    line-height: 1.15;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

.order-detail-header-flam__lbl {
    flex: 0 0 2.75rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #64748b;
    line-height: 1.15;
    text-transform: none;
}

.order-detail-header-flam__combo {
    display: flex;
    align-items: stretch;
    gap: 0.16rem;
    flex: 0 1 7.25rem;
    min-width: 0;
}

.order-detail-header-flam .om-combo-search-btn {
    flex-shrink: 0;
    width: 1.72rem;
    min-width: 1.72rem;
    min-height: 1.42rem;
    align-self: stretch;
    border-radius: 4px;
    background: #fff;
    border-color: var(--border);
}

.order-detail-header-flam .om-combo-search-btn svg {
    width: 15px;
    height: 15px;
}

.order-detail-header-flam__code {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 7rem;
    padding: 0.15rem 0.28rem;
    min-height: 1.42rem;
    font-size: 0.8125rem;
    line-height: 1.15;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

.order-detail-header-flam__name {
    flex: 1 1 10rem;
    min-width: 0;
    max-width: min(24rem, 52vw);
    padding: 0.15rem 0.28rem;
    min-height: 1.42rem;
    font-size: 0.8125rem;
    line-height: 1.15;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

.order-detail-header-flam__addr {
    flex: 1 1 12rem;
    min-width: 0;
    padding: 0.15rem 0.28rem;
    min-height: 1.42rem;
    font-size: 0.8125rem;
    line-height: 1.15;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

.order-detail-header-flam__addr--full {
    flex: 1 1 100%;
    max-width: 100%;
}

.order-detail-header-flam__zip {
    flex: 0 0 5.25rem;
    max-width: 5.75rem;
    padding: 0.15rem 0.28rem;
    min-height: 1.42rem;
    font-size: 0.8125rem;
    line-height: 1.15;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

.order-detail-header-flam__code:focus,
.order-detail-header-flam__name:focus,
.order-detail-header-flam__addr:focus,
.order-detail-header-flam__zip:focus,
.order-detail-header-flam__phone:focus {
    outline: 2px solid rgba(37, 99, 235, 0.3);
    outline-offset: 0;
    border-color: var(--accent);
}

.order-detail-header-flam__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    margin-top: 0.08rem;
    padding-top: 0.28rem;
    border-top: 1px solid var(--border);
}

.order-detail-header-flam--sheet .order-detail-header-flam__actions .btn {
    padding: 0.2rem 0.52rem;
    font-size: 0.75rem;
    line-height: 1.25;
    border-radius: 4px;
}

body.page-order-detail .order-detail-header-flam__hint {
    margin-top: 0.25rem !important;
    font-size: 0.72rem !important;
    line-height: 1.35 !important;
}

body.page-order-detail .order-detail-lt-compact-row {
    gap: 0.3rem;
}

body.page-order-detail .order-detail-lt-compact-row__col > .card {
    padding: 0.3rem 0.45rem;
}

.order-detail-header-flam__hint {
    font-size: 0.6875rem;
    line-height: 1.35;
    margin: 0;
}

.order-detail-meta-details {
    margin-top: 1rem;
}

.order-detail-meta-details__summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--accent);
    list-style: none;
    padding: 0.15rem 0;
}

.order-detail-meta-details__summary::-webkit-details-marker {
    display: none;
}

.order-detail-meta-details__summary::before {
    content: "▸ ";
    display: inline-block;
    transition: transform 0.15s ease;
}

.order-detail-meta-details[open] .order-detail-meta-details__summary::before {
    transform: rotate(90deg);
}

.order-detail-meta-details__body {
    padding-top: 0.85rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.order-detail-header-form--compact {
    gap: 0.55rem 0.85rem;
    margin-top: 0.35rem;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

.order-lines-unified-card--primary {
    margin-top: 0.45rem;
    padding: 0.75rem 0.9rem;
}

.order-lines-unified-card--readonly {
    margin-top: 0;
    padding: 0.75rem 0.9rem;
}

.order-detail-screen > .order-lines-unified-card--readonly {
    margin-bottom: 1rem;
}

.order-lines-unified-card--readonly .order-lines-ro-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.875rem;
}

.order-lines-unified-card--readonly .order-lines-ro-name {
    font-size: 0.875rem;
}

.order-lines-unified-card--readonly .order-lines-ro-num {
    font-variant-numeric: tabular-nums;
}

.order-lines-unified-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 1rem;
    margin-bottom: 0.45rem;
}

.order-lines-unified-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text);
    text-transform: none;
}

.order-lines-help {
    font-size: 0.8125rem;
}

.order-lines-help > summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--accent);
    list-style: none;
    user-select: none;
}

.order-lines-help > summary::-webkit-details-marker {
    display: none;
}

.order-lines-help__body {
    margin-top: 0.45rem;
    padding: 0.5rem 0.65rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.order-lines-unified-form {
    width: 100%;
    margin: 0;
}

.order-lines-save-bar {
    margin-top: 0.45rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--border);
}

.container--order-detail .order-manual-lines-wrap {
    width: 100%;
    min-width: 0;
}

.container--order-detail .order-manual-lines-table .order-line-cost-unit {
    min-width: 3.25rem;
    max-width: 9.5rem;
}

.container--order-detail .order-manual-lines-table .order-line-td-code > .order-line-code {
    min-width: calc(var(--order-line-code-input-ch) * 1ch);
    max-width: calc(var(--order-line-code-input-ch) * 1ch);
}

.order-manual-lines-table .order-line-td-code,
.order-manual-lines-table th.order-line-th-code {
    width: var(--order-line-code-col-width);
    max-width: var(--order-line-code-col-width);
    min-width: var(--order-line-code-col-width);
}

.order-manual-lines-table .order-line-td-code {
    position: relative;
    vertical-align: middle;
    overflow: hidden;
}

.order-manual-lines-table .order-line-td-code > .order-line-code {
    width: calc(var(--order-line-code-input-ch) * 1ch);
    max-width: calc(var(--order-line-code-input-ch) * 1ch);
    min-width: calc(var(--order-line-code-input-ch) * 1ch);
    box-sizing: border-box;
}

.order-manual-lines-table .order-line-td-name,
.order-manual-lines-table th.order-line-th-name {
    min-width: 0;
    width: 32rem;
}

.order-manual-lines-table .order-line-name {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

.order-line-name-stack {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}
.order-line-name-stack .order-line-name {
    width: 100%;
}
.order-line-noship,
.lt-review-noship {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #555;
    white-space: nowrap;
    cursor: pointer;
}
.lt-review-noship {
    margin-top: 0.2rem;
}

.order-line-code--kind-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

tr.order-line--kind-pending .order-line-td-code {
    background: #fffbeb;
}

tr.order-line--match-pending .order-line-td-name {
    background: #f8fafc;
}
tr.order-line--match-pending .order-line-name {
    display: none;
}

button.order-line-match-cands {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin-top: 0;
    padding-right: 0.4rem;
    font-size: 0.75rem;
    line-height: 1.3;
    text-align: left;
    cursor: pointer;
    background: #fff;
}
button.order-line-match-cands .order-line-match-cands__text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
button.order-line-match-cands::after {
    content: "";
    flex: 0 0 auto;
    width: 0.38rem;
    height: 0.38rem;
    margin-left: 0.35rem;
    border-right: 1.5px solid #64748b;
    border-bottom: 1.5px solid #64748b;
    transform: translateY(-0.08rem) rotate(45deg);
}
.order-line-match-panel {
    position: fixed;
    z-index: 80;
    margin: 0;
    padding: 0.15rem 0;
    list-style: none;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.12);
    width: max-content;
    max-width: calc(100vw - 16px);
    max-height: 16rem;
    overflow: auto;
}
.order-line-match-panel li {
    margin: 0;
    padding: 0;
}
.order-line-match-panel__opt {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0.28rem 0.55rem;
    border: 0;
    background: transparent;
    text-align: left;
    font: inherit;
    font-size: 0.8125rem;
    line-height: 1.35;
    white-space: nowrap;
    cursor: pointer;
    color: #0f172a;
}
.order-line-match-panel__opt--top {
    background: #f8fafc;
}
.order-line-match-panel__opt:hover,
.order-line-match-panel__opt:focus-visible {
    background: #dbeafe;
    outline: none;
}

.order-line-kind-pick {
    display: flex;
    width: 100%;
    min-width: 5.5rem;
    max-width: 9.5rem;
    box-sizing: border-box;
    padding: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #f1f5f9;
    gap: 2px;
}
.order-line-kind-pick__btn {
    flex: 1 1 50%;
    appearance: none;
    border: none;
    background: transparent;
    color: #334155;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.2;
    min-height: 1.45rem;
    padding: 0.12rem 0.2rem;
    border-radius: 3px;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}
.order-line-kind-pick__btn:hover {
    background: #fff;
    color: #0f172a;
}
.order-line-kind-pick__btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
}
.order-line-kind-pick__btn:active {
    background: #e2e8f0;
}

.container--order-detail .order-manual-lines-table .order-line-td-name,
.container--order-detail .order-manual-lines-table th.order-line-th-name {
    min-width: 0;
    width: 32rem;
}

.container--order-detail .order-manual-lines-table .order-line-name {
    max-width: none;
}

.order-manual-lines-table .order-line-td-supplier,
.order-manual-lines-table th.order-line-th-supplier {
    min-width: 10rem;
    width: 12rem;
    max-width: 14rem;
}

body.page-estimate-detail .order-manual-lines-table .order-line-td-supplier,
body.page-estimate-detail .order-manual-lines-table th.order-line-th-supplier {
    min-width: 0;
    width: 12rem;
    max-width: 13rem;
}

/* 見積明細: 画面幅に収め、横スクロールは出さない */
body.page-estimate-detail .order-manual-lines-table--sheet {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}
body.page-estimate-detail .order-manual-lines-table--sheet th,
body.page-estimate-detail .order-manual-lines-table--sheet td {
    box-sizing: border-box;
    vertical-align: middle;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-rank-price,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-rank-price {
    width: 7.25rem;
    min-width: 7.25rem;
    max-width: 8rem;
    white-space: nowrap;
}
body.page-estimate-detail .order-line-apply-rank-price {
    margin-left: 0.15rem;
    padding: 0.05rem 0.28rem;
    font-size: 0.6875rem;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-gross,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-gross {
    width: 5.75rem;
    min-width: 5.25rem;
    max-width: 6.5rem;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-subtotal,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-subtotal {
    width: 6.75rem;
    min-width: 6.25rem;
    max-width: 7.5rem;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-tax-cat,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-tax-cat {
    width: 5.5rem;
    min-width: 5.5rem;
    max-width: 6rem;
}
body.page-estimate-detail .order-manual-lines-table .order-line-tax-category,
body.page-estimate-detail .order-manual-lines-table .order-line-tax-rate {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding-left: 0.15rem;
    padding-right: 0.05rem;
    font-size: 0.75rem;
}

.order-manual-lines-table .order-line-supplier {
    width: 100%;
    min-width: 10.5rem;
    font-size: 0.75rem;
}

.order-line-source-stack {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 10.5rem;
}

.order-line-source-stack .order-line-other-note {
    width: 100%;
    font-size: 0.75rem;
    padding: 0.2rem 0.35rem;
}

.odai-supplier-summary p strong {
    font-weight: 600;
}

.order-manual-lines-table .order-line-td-cost {
    width: 6.5rem;
    max-width: 8.5rem;
}

.order-manual-lines-table .order-line-cost-unit {
    width: 100%;
    max-width: 7rem;
    min-width: 3.5rem;
    box-sizing: border-box;
    text-align: right;
}

.order-line-cost-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.12rem;
}

.order-line-cost-stack__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
}

.order-line-cost-special {
    font-size: 0.7rem;
    font-weight: 600;
    color: #9a3412;
    letter-spacing: 0.02em;
}

.order-summary-footer--detail .order-summary-footer__box {
    min-width: 8.5rem;
}

.order-lines-card h2 {
    margin: 0 0 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.order-lines-card .data-table tfoot td {
    font-weight: 600;
    background: #f1f5f9;
    border-top: 2px solid var(--border);
}

.data-table tbody tr.order-line--posted td {
    background: #e8eaef;
    color: #5c6578;
}

.data-table tbody tr.order-line--posted:hover td {
    background: #dfe3ea;
}

.data-table tbody tr.order-line--posted-partial td {
    background: #f1f3f7;
    color: #64708b;
}

.data-table tbody tr.order-line--posted-partial:hover td {
    background: #e9ecf2;
}

.data-table tbody tr.order-line--po-gr-posted-full td {
    background: #eef0f4;
    color: #6b7280;
}

.data-table tbody tr.order-line--po-gr-posted-full:hover td {
    background: #e6e9ef;
}

.data-table tbody tr.order-line--po-gr-posted-partial td {
    background: #f5f6f9;
    color: #6b7280;
}

.data-table tbody tr.order-line--po-gr-posted-partial:hover td {
    background: #eceef3;
}

.order-line-posted-badge--partial {
    background: #a8b4c8;
}

/* 発注: 仕入先別単価は「仕入先」列のドロップダウン（単価列は入力のみで行高を抑える） */
.order-line-th-supplier-pick,
.order-line-td-cost {
    vertical-align: middle;
}

.order-line-price-cell .psp-in.order-line-price {
    width: 100%;
    max-width: 6.5rem;
}

.po-line-price-alt {
    margin: 0;
    line-height: 1.3;
    max-width: 100%;
}

.po-line-price-alt .po-line-supplier-price {
    width: 100%;
    max-width: 12rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.35rem;
    height: auto;
    min-height: 1.7rem;
}

.po-line-price-alt__simple {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.15rem 0;
    font-size: 0.75rem;
}

.po-line-price-alt__or {
    font-size: 0.75rem;
    user-select: none;
    padding: 0 0.12rem;
}

.po-line-price-alt__pick {
    margin: 0;
    padding: 0.05rem 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none !important;
    border-bottom: 1px solid currentColor;
    cursor: pointer;
    white-space: normal;
    text-align: left;
    line-height: 1.35;
    box-sizing: border-box;
}

.po-line-price-alt__pick:hover {
    color: var(--accent-hover);
    text-decoration-style: solid;
}

.po-line-price-alt__pick--on {
    color: var(--text);
    text-decoration: none;
    cursor: default;
    font-weight: 700;
}

.po-line-price-alt__note-inline {
    font-weight: 400;
    font-size: 0.6875rem;
}

.order-line-price-cell .psp-in.order-line-price {
    width: 100%;
    max-width: 7.5rem;
}

.order-manual-lines-toolbar--margin {
    align-items: baseline;
}

/* 納期回答: 「明細ごとの納期」表はグリッドで潰れないよう全幅・縦も確保しやすく */
.order-lead-reply-info-form > script[type="application/json"] {
    display: none;
}

/* 納期回答: フォーム全体の縦余白を抑え、下のメール欄が同時に見えやすくする */
.order-lead-reply-info-form.form-grid {
    gap: 0.4rem 0.75rem;
    margin-top: 0;
}

.order-lead-time-reply-info-card {
    margin-bottom: 0.45rem;
    padding: 0.5rem 0.75rem 0.55rem;
}

.order-lead-time-reply-info-card > h2.order-lead-reply-info-card__title {
    margin: 0 0 0.2rem;
}

.order-lead-reply-info-card__lead {
    margin: 0 0 0.3rem !important;
    font-size: 0.8125rem !important;
    line-height: 1.35 !important;
}

/* 全件共通: 1行コンパクトバー */
.line-reply-defaults-bar {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.28rem 0.5rem;
    background: #f8fafc;
}

.line-reply-defaults-bar__title {
    margin: 0;
    padding: 0 0.15rem 0 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.02em;
    white-space: nowrap;
    align-self: center;
    flex: 0 0 auto;
}

.line-reply-defaults-bar__fields {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    gap: 0.35rem 0.5rem;
    overflow-x: auto;
}

.line-reply-defaults-bar__cell {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    flex: 0 0 auto;
}

.line-reply-defaults-bar__cell--date {
    width: 9.5rem;
}

.line-reply-defaults-bar__cell--carrier {
    width: 11.5em;
}

.line-reply-carrier-cell {
    vertical-align: top;
}

.line-reply-print-limit-hint {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.68rem;
    line-height: 1.25;
    color: #a15c00;
    white-space: normal;
    max-width: 11.5em;
}

.line-reply-print-limit-hint[hidden] {
    display: none !important;
}

.line-reply-print-limited--over {
    outline: 1px solid #d4a017;
}

.line-reply-defaults-bar__cell--track {
    width: 18em;
    flex: 0 0 18em;
}

.line-reply-defaults-bar__cell--arrival-text {
    width: 20em;
    flex: 0 1 20em;
    min-width: 12em;
}

.line-reply-defaults-bar__actions {
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    align-self: flex-end;
    padding-bottom: 0.05rem;
    white-space: nowrap;
}

.order-lead-reply-info-form .line-reply-defaults-bar__overwrite {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted);
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 0.28rem;
    white-space: nowrap;
    cursor: pointer;
    align-self: center;
}

.order-lead-reply-info-form .line-reply-defaults-bar__cell {
    flex-direction: column;
}

.line-reply-defaults-bar__lbl {
    white-space: nowrap;
    line-height: 1.2;
}

.line-reply-defaults-bar__cell .psp-in {
    width: 100%;
    box-sizing: border-box;
    padding: 0.26rem 0.4rem;
    font-size: 0.8125rem;
    min-height: 1.42rem;
}

.order-lead-reply-lines-heading {
    margin: 0.4rem 0 0.2rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.order-lead-reply-info-form__actions {
    margin-top: 0.4rem !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.65rem;
    align-items: center;
}

.order-lead-reply-info-card .order-manual-lines-table-wrap {
    min-height: min(10rem, 22vh);
    max-height: min(42vh, 26rem);
}

.order-lead-reply-lines-table.order-manual-lines-table--sheet.data-table {
    font-size: 0.875rem;
    width: 100%;
    table-layout: fixed;
}

.order-lead-reply-lines-table.order-manual-lines-table--sheet.data-table th,
.order-lead-reply-lines-table.order-manual-lines-table--sheet.data-table td {
    padding: 0.28rem 0.2rem;
    line-height: 1.35;
    vertical-align: middle;
}

.order-lead-reply-lines-table.order-manual-lines-table--sheet .psp-in {
    padding: 0.28rem 0.35rem;
    font-size: 0.875rem;
    min-height: 1.55rem;
    line-height: 1.25;
}

.lt-ship-edit-link-wrap {
    margin-top: 0.2rem;
    line-height: 1.25;
}

.lt-ship-edit-link {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.line-reply-line--ship-locked .line-reply-seg-carrier,
.line-reply-line--ship-locked .line-reply-seg-track,
.lt-reply-smart-date--locked .order-filter-date-unified__text {
    background: #f1f5f9;
    color: #334155;
}

.order-lead-reply-info-card .order-manual-lines-table thead th {
    font-size: 0.8125rem;
    padding: 0.3rem 0.2rem;
}

.order-lead-reply-lines-table .order-line-th-name,
.order-lead-reply-lines-table .order-line-td-name,
.container--order-detail .order-lead-reply-lines-table .order-line-th-name,
.container--order-detail .order-lead-reply-lines-table .order-line-td-name,
.container--order-detail .order-lead-reply-lines-table th.order-line-th-name {
    width: auto;
    min-width: 0;
    max-width: none;
}

.order-lead-reply-lines-table .order-lines-ro-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: none;
}

.order-lead-reply-lines-table .lt-th-carrier,
.order-lead-reply-lines-table .lt-td-carrier,
.order-lead-reply-lines-table .line-reply-carrier-cell {
    /* 全角8文字＋余白＋追加2文字 */
    width: 11.6em;
    min-width: 11.6em;
    max-width: 11.6em;
    white-space: nowrap;
    overflow: visible;
}

.order-lead-reply-lines-table .line-reply-seg-carrier {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.order-lead-reply-lines-table .lt-th-track,
.order-lead-reply-lines-table .lt-td-track {
    /* 全角数字14桁＋余白＋追加2文字 */
    width: 17.8em;
    min-width: 17.8em;
    max-width: 17.8em;
    white-space: nowrap;
}

.order-lead-reply-lines-table .lt-th-arrival-text,
.order-lead-reply-lines-table .lt-td-arrival-text {
    width: 20.4em;
    min-width: 14em;
    max-width: 20.4em;
}

.order-lead-reply-lines-table .lt-td-track .psp-in,
.order-lead-reply-lines-table .lt-td-arrival-text .psp-in,
.order-lead-reply-lines-table .lt-td-carrier .psp-in {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.order-lead-reply-lines-table .lt-th-date,
.order-lead-reply-lines-table .lt-reply-date-cell {
    width: 8.6rem;
    min-width: 8.6rem;
    white-space: nowrap;
}

.order-lead-reply-lines-table .lt-th-order-qty,
.order-lead-reply-lines-table .lt-td-order-qty {
    width: 3.6rem;
    min-width: 3.6rem;
    max-width: 3.6rem;
    white-space: nowrap;
    overflow: hidden;
}

.order-lead-reply-lines-table .lt-th-reply-qty,
.order-lead-reply-lines-table .lt-td-reply-qty {
    width: 4.4rem;
    min-width: 4.4rem;
    max-width: 4.4rem;
    white-space: nowrap;
    overflow: hidden;
    padding-left: 0.15rem;
    padding-right: 0.35rem;
}

.order-lead-reply-lines-table .lt-td-reply-qty .line-reply-seg-qty {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding-left: 0.2rem;
    padding-right: 0.2rem;
}

.order-lead-reply-lines-table .lt-th-reply-remain,
.order-lead-reply-lines-table .lt-td-reply-remain {
    width: 3.6rem;
    min-width: 3.6rem;
    max-width: 3.6rem;
    text-align: right;
    white-space: nowrap;
}

.line-reply-remain-hint--warn {
    color: #9a6b00;
    font-weight: 600;
}

.order-lead-reply-lines-table tr.line-reply-line--partial-answer td {
    background: #fffbeb;
}

.line-reply-btn-split--suggested {
    border-color: #d97706 !important;
    color: #92400e !important;
    font-weight: 600;
}

.line-reply-split-hint-banner[hidden] {
    display: none !important;
}

.order-lead-reply-lines-table .lt-th-split,
.order-lead-reply-lines-table .lt-td-split {
    width: 3.5rem;
    min-width: 3.25rem;
    white-space: nowrap;
    text-align: center;
    position: sticky;
    right: 0;
    background: #fff;
    z-index: 2;
    box-shadow: -3px 0 5px -3px rgba(15, 23, 42, 0.12);
}

.order-lead-reply-lines-table thead .lt-th-split {
    z-index: 3;
    background: #f8fafc;
}

.order-lead-reply-lines-table .lt-reply-date-cell {
    vertical-align: middle;
    white-space: nowrap;
}

.lt-reply-smart-date.order-filter-date-unified {
    display: inline-flex;
    flex-wrap: nowrap;
    max-width: 9.2rem;
    min-width: 8rem;
    width: 100%;
    flex: 0 0 auto;
}

.lt-reply-smart-date .order-filter-date-unified__text {
    font-size: 0.78rem;
    padding: 0.2rem 0.25rem;
}

.lt-reply-smart-date.is-invalid {
    border-color: #c62828;
    outline: 1px solid #c62828;
}

.lt-reply-date-cell > .smart-date-error,
.line-reply-defaults-bar__cell--date > .smart-date-error {
    display: block;
    margin: 0.12rem 0 0;
    font-size: 0.65rem;
    line-height: 1.25;
    color: #b00020;
    max-width: 9.2rem;
}

.lt-reply-date-cell > .smart-date-error[hidden],
.line-reply-defaults-bar__cell--date > .smart-date-error[hidden] {
    display: none !important;
}

.line-reply-defaults-bar__cell--date .lt-reply-smart-date {
    width: 100%;
}

/* 納品書一括送信候補 */
.dn-filter-by {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1.15rem;
    align-items: center;
}
.dn-filter-by legend {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    padding: 0;
    margin: 0 0 0.35rem;
    float: none;
    width: 100%;
}
.dn-filter-by label {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    font-weight: 400;
    color: var(--text);
    margin: 0;
}
.dn-filter-by input[type="radio"] {
    width: auto;
    min-width: 0;
    margin: 0;
}

.dn-row--manual-sent td {
    background: #fef2f2;
}

.dn-badge--manual {
    display: inline-block;
    padding: 0.12rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fecaca;
    color: #7f1d1d;
}

.dn-inline-form {
    display: inline;
    margin-left: 0.25rem;
}

.dn-candidate-table tbody tr.dn-row--manual-sent:hover td {
    background: #fee2e2;
}

.order-line-posted-badge {
    display: inline-block;
    padding: 0.12rem 0.42rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
    background: #94a3b8;
    color: #fff;
    letter-spacing: 0.02em;
}

body.page-order-detail.page-po-v2 .order-manual-lines-table--sheet td.order-line-sales-cell,
body.page-so-edit.page-po-v2 .order-manual-lines-table--sheet td.order-line-sales-cell,
body.page-so-create.page-po-v2 .order-manual-lines-table--sheet td.order-line-sales-cell {
    text-align: center;
    vertical-align: middle;
}

.order-cell-clip {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .order-cell-clip {
        max-width: 18rem;
    }
}

.order-doc-upload-card {
    margin-top: 0.75rem;
}

.order-doc-upload-card .order-doc-dropzone {
    margin-top: 0.65rem;
}

/* 受注明細: 納期回答 PDF（AI 取込）のドロップ領域 */
.order-lt-reply-ai-ingest-form .order-lt-reply-ai-ingest-form__zone {
    min-height: 4.25rem;
}

.order-doc-dropzone {
    position: relative;
    margin-top: 0.75rem;
    padding: 1.25rem 1rem;
    min-height: 4.25rem;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background 0.15s ease;
    box-sizing: border-box;
}

.order-doc-dropzone--compact {
    margin-top: 0.35rem;
    padding: 0.4rem 0.45rem;
    min-height: 2.75rem;
}

.order-doc-dropzone--compact .order-doc-dropzone__hint {
    font-size: 0.7rem;
    line-height: 1.35;
}

.order-list-doc-cell {
    vertical-align: middle;
    min-width: 14rem;
    max-width: 22rem;
}

.order-list-doc-stack {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.order-list-doc-stack > a,
.order-list-doc-stack > .muted {
    flex-shrink: 0;
    align-self: center;
}

.order-list-doc-stack .order-doc-dropzone--compact {
    margin-top: 0;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-doc-dropzone:hover,
.order-doc-dropzone--active {
    border-color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

.order-doc-dropzone__input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

.order-doc-dropzone__hint {
    margin: 0;
    font-size: 0.875rem;
    color: var(--muted);
    text-align: center;
}

.order-doc-dropzone__status {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    text-align: center;
}

.order-doc-dropzone__status--err {
    color: var(--danger);
    font-weight: 600;
}

/* 注文書 AI 取込 */
.odai-env {
    font-size: 0.875rem;
    margin: 0 0 1rem;
}
.odai-ok {
    color: var(--success);
}
.odai-upload {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    margin-top: 0.75rem;
}
.odai-upload__label {
    position: relative;
    display: inline-block;
}
.odai-upload__input {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
}
.odai-upload__btn {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--surface);
    cursor: pointer;
    font-size: 0.875rem;
}
.odai-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.odai-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1rem;
}
@media (max-width: 960px) {
    .odai-grid {
        grid-template-columns: 1fr;
    }
}
.odai-card--doc .odai-iframe {
    width: 100%;
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
}
.odai-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 0.65rem;
    font-size: 0.875rem;
    font-weight: 600;
}
.odai-sub {
    margin: 0 0 0.35rem;
    font-size: 0.8125rem;
}
.odai-cand-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}
.odai-lines .odai-td-raw {
    max-width: 14rem;
    word-break: break-word;
}
.odai-lines .odai-td-cand {
    max-width: 18rem;
}
.odai-check {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.75rem;
    font-size: 0.875rem;
}
.odai-match-hints {
    padding: 0.55rem 0.75rem;
}
.odai-match-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.65rem;
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}
.odai-match-hint__lbl {
    color: var(--muted, #64748b);
    min-width: 4.5rem;
}
.odai-match-hint--applied .odai-match-hint__adopt,
.odai-match-hint--applied .odai-match-hint__ocr {
    opacity: 0.75;
}
.odai-match-hint--ocr .odai-match-hint__ocr {
    border-color: #cbd5e1;
}
.odai-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}
.odai-card--footer-actions .odai-actions {
    margin-top: 0.5rem;
}
.odai-raw {
    margin: 0 0 1rem;
}
.odai-pre {
    max-height: 240px;
    overflow: auto;
    font-size: 0.75rem;
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.75rem;
    border-radius: var(--radius);
}
.odai-mono {
    font-family: ui-monospace, monospace;
    font-size: 0.8125rem;
}

/* 注文書 AI: マスタ検索コンボ */
.odai-combo {
    position: relative;
    width: 100%;
}
.odai-combo--in-table {
    min-width: 10rem;
}
.odai-combo-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 30;
    max-height: 240px;
    overflow-y: auto;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e0e0e0);
    border-radius: var(--radius, 6px);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}
.odai-combo-hit {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.45rem 0.65rem;
    border: 0;
    border-bottom: 1px solid var(--border, #eee);
    background: transparent;
    font-size: 0.8125rem;
    cursor: pointer;
    color: inherit;
    line-height: 1.35;
}
.odai-combo-hit:last-child {
    border-bottom: 0;
}
.odai-combo-hit:hover,
.odai-combo-hit:focus-visible {
    background: var(--surface-muted, #f1f5f9);
    outline: none;
}
.odai-combo-empty {
    padding: 0.5rem 0.65rem;
    font-size: 0.8125rem;
}
.odai-td-product {
    vertical-align: top;
}

/* メール送信設定 */
body.page-mail-settings .mail-settings-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

body.page-mail-settings .mail-settings-section {
    margin: 0;
}

body.page-mail-settings .mail-settings-section__summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

body.page-mail-settings .mail-settings-section__summary::-webkit-details-marker {
    display: none;
}

body.page-mail-settings .mail-settings-section__summary::before {
    content: "▶";
    flex-shrink: 0;
    font-size: 0.75em;
    line-height: 1;
    color: var(--muted);
}

body.page-mail-settings .mail-settings-section[open] > .mail-settings-section__summary::before {
    content: "▼";
}

body.page-mail-settings .mail-settings-section__body {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

body.page-mail-settings .mail-settings-status {
    margin: 0 0 0.85rem;
}

body.page-mail-settings .mail-settings-status__ok,
body.page-mail-settings .mail-settings-status .callout p {
    margin: 0;
}

body.page-mail-settings .mail-settings-lead {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.45;
}

body.page-mail-settings .mail-settings-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 40rem;
    margin: 0;
}

body.page-mail-settings #mail-intake-settings .mail-intake-settings-form {
    max-width: none;
}

body.page-mail-settings .mail-intake-settings-dl {
    grid-template-columns: minmax(9rem, 12.5rem) minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
    align-items: center;
    margin: 0;
}

body.page-mail-settings .mail-intake-settings-dl dt {
    min-height: 2.25rem;
    padding: 0.18rem 0.4rem;
    line-height: 1.35;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    font-size: 0.8125rem;
    background: #fff;
    color: var(--muted);
    font-weight: 500;
    border: none;
    border-radius: 0;
    margin: 0;
}

body.page-mail-settings .mail-intake-settings-dl dd {
    margin: 0;
    min-width: 0;
    padding: 0.1rem 0;
    font-size: 0.875rem;
}

body.page-mail-settings .mail-intake-settings-dl .psp-in,
body.page-mail-settings .mail-intake-settings-dl select.psp-in {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    min-height: 2.25rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.875rem;
    line-height: 1.4;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    color: var(--text);
}

body.page-mail-settings .mail-intake-settings-dl .psp-in:focus,
body.page-mail-settings .mail-intake-settings-dl select.psp-in:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    border-color: var(--accent);
}

body.page-mail-settings .mail-intake-settings-dl > dt.master-flam-dl__pair--full {
    grid-column: 1 / 2;
    align-self: start;
}

body.page-mail-settings .mail-intake-settings-dl > dd.master-flam-dl__pair--full {
    grid-column: 2 / -1;
    min-width: 0;
}

body.page-mail-settings .mail-intake-settings-dl--nested {
    margin-top: 0.15rem;
    width: 100%;
    max-width: 36rem;
}

body.page-mail-settings .mail-intake-settings-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
}

body.page-mail-settings .mail-intake-settings-meta {
    font-size: 0.875rem;
    line-height: 1.45;
}

body.page-mail-settings .mail-intake-settings-actions {
    margin-top: 0.75rem;
}

body.page-mail-settings .mail-intake-settings-foot {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
}

body.page-mail-settings #mail-templates .mail-settings-form {
    max-width: none;
}

body.page-mail-settings .mail-settings-template-kind {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.5rem;
    margin: 0 0 0.35rem;
    max-width: 28rem;
}

body.page-mail-settings .mail-settings-template-kind__select {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

body.page-mail-settings .mail-settings-template-kind .mail-settings-template-kind__select,
body.page-mail-settings .mail-settings-template-kind .mail-settings-add-btn {
    height: 2.25rem;
    min-height: 2.25rem;
    box-sizing: border-box;
}

body.page-mail-settings .mail-settings-template-kind .mail-settings-add-btn {
    flex-shrink: 0;
    margin: 0;
    min-width: 2.25rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.page-mail-settings .mail-settings-field--inline {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    max-width: 28rem;
}

body.page-mail-settings .mail-settings-template-panel[hidden] {
    display: none;
}

body.page-mail-settings .mail-settings-table__add-cell {
    padding-top: 0.35rem;
    vertical-align: top;
    border-top: 1px solid var(--border);
}

body.page-mail-settings .mail-settings-table--templates tfoot .btn--compact {
    min-width: 2rem;
}

body.page-mail-settings .mail-settings-form__row {
    display: grid;
    gap: 0.75rem 1rem;
}

body.page-mail-settings .mail-settings-form__row--2 {
    grid-template-columns: minmax(0, 1fr) 7.5rem;
    align-items: end;
}

body.page-mail-settings .mail-settings-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin: 0;
    min-width: 0;
}

body.page-mail-settings .mail-settings-field__lbl {
    display: block;
    min-height: 1.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25rem;
    color: var(--muted);
}

body.page-mail-settings .mail-settings-field__hint {
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--muted);
    margin-left: 0.35rem;
}

body.page-mail-settings .mail-settings-field__in,
body.page-mail-settings .mail-settings-field__ta {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1.35;
}

body.page-mail-settings .mail-settings-field__in {
    height: 2.25rem;
    min-height: 2.25rem;
    padding: 0 0.65rem;
}

body.page-mail-settings .mail-settings-field__ta {
    min-height: 6rem;
    padding: 0.45rem 0.65rem;
    margin-top: 0.4rem;
    resize: vertical;
}

body.page-mail-settings .mail-settings-field__in:focus,
body.page-mail-settings .mail-settings-field__ta:focus {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    outline-offset: 0;
    border-color: var(--accent);
}

body.page-mail-settings .mail-settings-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--text);
    cursor: pointer;
}

body.page-mail-settings .mail-settings-check input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0.15rem 0 0;
    flex: 0 0 auto;
}

body.page-mail-settings .mail-settings-check span {
    flex: 1 1 auto;
    min-width: 0;
}

body.page-mail-settings .mail-settings-note {
    margin: 0;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--muted);
}

body.page-mail-settings .mail-settings-note p {
    margin: 0;
}

body.page-mail-settings .mail-settings-note p + p {
    margin-top: 0.35rem;
}

body.page-mail-settings .mail-settings-meta {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.45;
}

body.page-mail-settings .mail-settings-add-row {
    display: flex;
    align-items: center;
    margin-top: 0.65rem;
}

body.page-mail-settings .mail-settings-add-row .btn,
body.page-mail-settings .mail-settings-add-btn {
    min-width: 2.25rem;
    justify-content: center;
    background: #fff;
    border: 1px solid #d1d5db;
    color: #111;
    font-weight: 400;
}

body.page-mail-settings .mail-settings-add-row .btn:hover,
body.page-mail-settings .mail-settings-add-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #111;
}

body.page-mail-settings .mail-kind-add-modal__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

body.page-mail-settings #mail-kind-add-modal .mail-settings-field {
    max-width: none;
}

body.page-mail-settings .mail-settings-table {
    width: 100%;
    max-width: 100%;
}

body.page-mail-settings .mail-settings-table--profiles {
    max-width: 36rem;
}

body.page-mail-settings .mail-settings-table__row-no {
    width: 2rem;
    padding-right: 0.35rem;
    text-align: right;
    vertical-align: bottom;
    font-size: 0.8125rem;
}

body.page-mail-settings .mail-settings-field--table {
    margin: 0;
    width: 100%;
}

body.page-mail-settings .mail-settings-table th {
    text-align: left;
}

body.page-mail-settings .mail-settings-table__name {
    width: 10rem;
}

body.page-mail-settings .mail-settings-table td {
    vertical-align: top;
}

body.page-mail-settings .mail-settings-table .mail-settings-field__in {
    min-width: 0;
}

@media (max-width: 560px) {
    body.page-mail-settings .mail-settings-form__row--2 {
        grid-template-columns: 1fr;
    }
}

/* 発注新規 No.2 — デザイン確認用（ERP型レイアウト） */
body.page-po-v2 {
    --po-v2-label-bg: #f1f3f4;
    --po-v2-head-bg: #f2fbf8;
    --po-v2-border: #c5cdb8;
    --po-v2-readonly-bg: #eceff3;
}

/* 受注／売上一覧のマスタ検索モーダル: 受注明細（page-po-v2）と同色・同字サイズ */
body.page-so-list,
body.page-sales-list {
    --po-v2-label-bg: #f1f3f4;
    --po-v2-head-bg: #f2fbf8;
    --po-v2-border: #c5cdb8;
    --po-v2-readonly-bg: #eceff3;
}

body.page-so-list .po-supplier-search-modal,
body.page-so-list .po-supplier-search-modal *,
body.page-sales-list .po-supplier-search-modal,
body.page-sales-list .po-supplier-search-modal * {
    font-size: 0.875rem !important;
}

body.page-po-v2 > main {
    font-size: 0.875rem;
}

body.page-po-v2 .po-v2-screen-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    flex: 1 1 auto;
    min-height: 0;
}

/* page-payment-detail の overflow:visible より詳細度を上げ、明細はカード内スクロールに限定 */
body.page-po-v2.page-order-detail .order-detail-screen.po-v2-screen-wrap {
    flex: 1 0 auto;
    min-height: auto;
}

body.page-po-v2.page-order-detail.page-payment-detail .po-v2-lines--editor {
    padding: 0;
    flex: 1 0 auto;
    min-height: min(42vh, 20rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.page-po-v2.page-order-detail .order-detail-screen > .order-inventory-alloc {
    flex: 0 0 auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    margin: 0;
    padding: 0.35rem 0.75rem;
}

body.page-po-v2.page-order-detail .order-inventory-alloc__summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.875rem;
}

body.page-po-v2.page-order-detail .order-inventory-alloc__body {
    max-height: 12rem;
    overflow: auto;
}

body.page-po-v2.page-order-detail.page-payment-detail .po-v2-lines--editor > .order-lines-unified-card--primary {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow: hidden;
}

body.page-po-v2.page-order-detail.page-payment-detail .po-v2-lines--editor .order-lines-unified-form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.page-po-v2.page-order-detail.page-payment-detail .po-v2-lines--editor .order-manual-lines-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.page-po-v2.page-order-detail.page-payment-detail .po-v2-lines--editor .order-manual-lines-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding-bottom: 0.45rem;
    scroll-padding-bottom: 0.45rem;
}

body.page-po-v2 .order-detail-screen > .order-summary-footer,
body.page-po-v2 .order-detail-screen > .order-detail-remarks,
body.page-po-v2 .order-detail-screen > .order-detail-remarks.card,
body.page-po-v2 .order-detail-screen > .order-detail-meta-details,
body.page-po-v2 .order-detail-screen > .odai-remarks-card {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

body.page-po-v2.page-order-detail .po-v2-lines--editor .order-lines-unified-card--primary,
body.page-po-v2 .po-v2-lines--editor .order-lines-unified-card--primary {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

body.page-po-v2 .po-v2-lines--editor .order-lines-unified-card__head {
    display: none;
}

body.page-po-v2.page-order-detail .po-v2-lines--editor .order-lines-unified-form,
body.page-po-v2 .po-v2-lines--editor .order-lines-unified-form {
    padding: 0;
    background: #fff;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table th,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table td {
    padding: 0.22rem 0.3rem;
    line-height: 1.3;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet .psp-in,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet select.psp-in {
    padding: 0.15rem 0.28rem;
    min-height: 1.4rem;
    line-height: 1.2;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet .order-line-idx-cell {
    padding-top: 0.2rem;
    padding-bottom: 0.2rem;
}

body.page-po-v2 .po-v2-search-wrap--customer,
body.page-po-v2 .po-v2-search-wrap--supplier,
body.page-po-v2 .po-v2-search-wrap--delivery,
body.page-po-v2 .po-v2-search-wrap--payee {
    flex-wrap: nowrap;
}

body.page-po-v2 .po-v2-search-wrap--customer .om-combo-search-btn,
body.page-po-v2 .po-v2-search-wrap--supplier .om-combo-search-btn,
body.page-po-v2 .po-v2-search-wrap--delivery .om-combo-search-btn,
body.page-po-v2 .po-v2-search-wrap--payee .om-combo-search-btn {
    margin-right: 0.2rem;
}

body.page-po-v2 .po-v2-search-wrap--customer .po-v2-in--master-code,
body.page-po-v2 .po-v2-search-wrap--supplier .po-v2-in--master-code,
body.page-po-v2 .po-v2-search-wrap--delivery .po-v2-in--master-code,
body.page-po-v2 .po-v2-search-wrap--payee .po-v2-in--master-code {
    flex: 1 1 auto;
    width: auto;
    min-width: 3.5rem;
    max-width: 100%;
}

body.page-po-v2 .po-v2-search-wrap--customer .po-v2-in--master-code,
body.page-po-v2 .po-v2-search-wrap--supplier .po-v2-in--master-code,
body.page-po-v2 .po-v2-search-wrap--delivery .po-v2-in--master-code,
body.page-po-v2 .po-v2-search-wrap--payee .po-v2-in--master-code {
    flex: 0 1 6rem;
    width: 6rem;
}

body.page-po-v2 .po-v2-search-wrap--customer .om-combo-wrap,
body.page-po-v2 .po-v2-search-wrap--supplier .om-combo-wrap,
body.page-po-v2 .po-v2-search-wrap--delivery .om-combo-wrap,
body.page-po-v2 .po-v2-search-wrap--payee .om-combo-wrap {
    flex: 0 0 6rem;
    width: 6rem;
    min-width: 0;
}

body.page-po-v2 .po-v2-search-wrap--customer .po-v2-in--name,
body.page-po-v2 .po-v2-search-wrap--supplier .po-v2-in--name,
body.page-po-v2 .po-v2-search-wrap--delivery .po-v2-in--name,
body.page-po-v2 .po-v2-search-wrap--payee .po-v2-in--name {
    flex: 1 1 0;
    width: 0;
    min-width: 0;
}

body.page-po-v2 .po-v2-search-wrap .om-combo-search-btn {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    padding: 0;
    border: 1px solid var(--po-v2-border);
    border-radius: 4px;
    background: #fff;
    color: #5c6578;
}

body.page-po-v2 .po-v2-search-wrap .om-combo-search-btn:hover {
    background: #eef2e6;
    border-color: #9aa3b2;
}

/* 新規発注: 仕入先検索モーダル（ERP型） */
.po-supplier-search-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: max(0.75rem, env(safe-area-inset-top, 0px)) max(0.75rem, env(safe-area-inset-right, 0px))
        max(0.75rem, env(safe-area-inset-bottom, 0px)) max(0.75rem, env(safe-area-inset-left, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.po-supplier-search-modal[hidden] {
    display: none !important;
}

.po-supplier-search-modal__backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    padding: 0;
    margin: 0;
    background: rgba(15, 23, 42, 0.45);
    cursor: default;
}

.po-supplier-search-modal__shell {
    position: relative;
    z-index: 1;
    width: min(920px, calc(100vw - 1.5rem));
    max-height: min(calc(100dvh - 1.5rem), 720px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--po-v2-border, #c5cdb8);
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.22);
    overflow: hidden;
    flex-shrink: 0;
    margin: auto 0;
}

.po-supplier-search-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.45rem 0.65rem 0.45rem 0.85rem;
    background: #fff;
    color: var(--text);
    border-bottom: 1px solid var(--po-v2-border, #c5cdb8);
}

.po-supplier-search-modal__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.3;
    color: var(--text);
}

/* 得意先の検索: タイトル行のみ太字（項目名は通常） */
.po-supplier-search-modal--title-bold .po-supplier-search-modal__title {
    font-weight: 700;
}

.po-supplier-search-modal__close {
    flex: 0 0 auto;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.po-supplier-search-modal__close:hover {
    background: rgba(0, 0, 0, 0.06);
}

.po-supplier-search-modal__body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 0.65rem 0.75rem 0.75rem;
    overflow: hidden;
    min-height: 0;
}

.po-supplier-search-modal__filter-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.875rem;
}

.po-supplier-search-modal__filter-table th,
.po-supplier-search-modal__filter-table td {
    border: 1px solid var(--po-v2-border, #c5cdb8);
    padding: 0.28rem 0.45rem;
    vertical-align: middle;
}

.po-supplier-search-modal__filter-table th {
    width: 7.5rem;
    background: #fff;
    color: var(--text);
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.po-supplier-search-modal--title-bold .po-supplier-search-modal__filter-table th {
    font-weight: 400;
}

.po-supplier-search-modal__filter-table td {
    background: #fff;
}

.po-supplier-search-modal__in {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--po-v2-border, #c5cdb8);
    border-radius: 3px;
    padding: 0.22rem 0.4rem;
    font: inherit;
    font-size: 0.875rem;
    background: #fff;
    color: var(--text);
}

.po-supplier-search-modal__in--select {
    max-width: 12rem;
}

.po-supplier-search-modal__in--key:focus,
.po-supplier-search-modal__in--key:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.35);
    background: #fff;
    border-color: var(--accent);
}

.po-supplier-search-modal__check-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

.po-supplier-search-modal__toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.po-supplier-search-modal__btn {
    border: 1px solid #9aa3b2;
    border-radius: 4px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 0.875rem;
    padding: 0.28rem 0.75rem;
    cursor: pointer;
    white-space: nowrap;
}

.po-supplier-search-modal__btn:hover {
    background: #f3f4f6;
}

.po-supplier-search-modal__btn--primary {
    background: var(--primary, #2563eb);
    border-color: var(--primary, #2563eb);
    color: #fff;
}

.po-supplier-search-modal__btn--primary:hover {
    filter: brightness(0.95);
}

.po-supplier-search-modal__summary {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text);
}

.po-supplier-search-modal__table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(42vh, 360px);
    overflow: auto;
    border: 1px solid var(--po-v2-border, #c5cdb8);
}

.po-supplier-search-modal__result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.po-supplier-search-modal__result-table th,
.po-supplier-search-modal__result-table td {
    border: 1px solid var(--po-v2-border, #c5cdb8);
    padding: 0.28rem 0.45rem;
    text-align: left;
    vertical-align: middle;
}

.po-supplier-search-modal__result-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    color: var(--text);
    font-weight: 400;
    white-space: nowrap;
}

.po-supplier-search-modal__result-table tbody tr {
    background: #fff;
    cursor: pointer;
}

.po-supplier-search-modal__result-table tbody tr:hover,
.po-supplier-search-modal__result-table tbody tr:focus-visible {
    background: #f8faf5;
    outline: none;
}

.po-supplier-search-modal__result-table tbody td:first-child {
    width: 7rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.po-supplier-search-modal__empty {
    text-align: center;
    color: var(--muted);
    padding: 1.25rem 0.5rem !important;
}

.po-supplier-search-modal__pager {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    min-height: 1.75rem;
}

.po-supplier-search-modal__page {
    min-width: 1.65rem;
    height: 1.65rem;
    padding: 0 0.35rem;
    border: 1px solid #9aa3b2;
    border-radius: 3px;
    background: #fff;
    font: inherit;
    font-size: 0.8125rem;
    line-height: 1;
    cursor: pointer;
}

.po-supplier-search-modal__page:hover {
    background: #f3f4f6;
}

.po-supplier-search-modal__page.is-active {
    background: #e5e7eb;
    border-color: #d1d5db;
    color: var(--text);
    font-weight: 600;
}

.po-supplier-search-modal__page-ellipsis {
    padding: 0 0.2rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.po-supplier-search-modal__create {
    border: 1px solid var(--po-v2-border, #c5cdb8);
    background: #fafbfc;
    padding: 0.55rem 0.65rem 0.65rem;
}

.po-supplier-search-modal__create-title {
    margin: 0 0 0.45rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text);
}

.po-supplier-search-modal__create-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.po-supplier-search-modal__create-table th,
.po-supplier-search-modal__create-table td {
    border: 1px solid var(--po-v2-border, #c5cdb8);
    padding: 0.28rem 0.45rem;
}

.po-supplier-search-modal__create-table th {
    width: 7.5rem;
    background: #fff;
    color: var(--text);
    font-weight: 600;
    text-align: left;
}

.po-supplier-search-modal--title-bold .po-supplier-search-modal__create-table th,
.po-supplier-search-modal--title-bold .po-supplier-search-modal__register-table th {
    font-weight: 400;
}

.po-supplier-search-modal__req {
    margin-left: 0.15rem;
    color: var(--danger);
}

.po-supplier-search-modal__create-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: 0.55rem;
}

.po-supplier-search-modal--register {
    z-index: 1300;
}

/* 備考テンプレート検索（om-order-product-modal: 10050）より手前に登録モーダルを出す */
.po-supplier-search-modal.po-supplier-search-modal--remark-template {
    z-index: 10100;
}

.po-supplier-search-modal--remark-template .remark-template-register-body {
    width: 100%;
    min-height: 5.5rem;
    resize: vertical;
    font-family: inherit;
    line-height: 1.45;
}

.po-supplier-search-modal--remark-template,
.po-supplier-search-modal--remark-template :is(
    .po-supplier-search-modal__title,
    .po-supplier-search-modal__close,
    .po-supplier-search-modal__filter-table,
    .po-supplier-search-modal__filter-table th,
    .po-supplier-search-modal__filter-table td,
    .po-supplier-search-modal__in,
    .po-supplier-search-modal__check-label,
    .po-supplier-search-modal__req,
    .site-header__quick-btn
) {
    font-size: 0.875rem;
}

.po-supplier-search-modal--remark-template .po-supplier-search-modal__register-table th,
.po-supplier-search-modal--remark-template .po-supplier-search-modal__filter-table th {
    font-weight: 400;
}

.po-supplier-search-modal--remark-template .po-supplier-search-modal__check-label {
    font-weight: 400;
}

.po-supplier-search-modal--remark-template .po-supplier-search-modal__title {
    font-weight: 400;
}

.po-supplier-search-modal--remark-template .po-supplier-search-modal__register-actions .site-header__quick-btn {
    font-weight: 400;
    color: #111;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
    filter: none;
}

.po-supplier-search-modal--remark-template .po-supplier-search-modal__register-actions .site-header__quick-btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
}

.po-supplier-search-modal__shell--register {
    width: min(640px, calc(100vw - 1.5rem));
    max-height: calc(100dvh - 1.5rem);
}

.po-supplier-search-modal__shell--register .po-supplier-search-modal__header {
    flex-shrink: 0;
}

.po-supplier-search-modal__shell--register .po-supplier-search-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.po-supplier-search-modal__shell--register .po-supplier-search-modal__register-actions {
    position: sticky;
    bottom: 0;
    flex-shrink: 0;
    background: #fff;
    padding-top: 0.5rem;
    padding-bottom: 0.1rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--po-v2-border, #c5cdb8);
    z-index: 1;
}

.po-supplier-search-modal__section-title {
    margin: 0.1rem 0 0.2rem;
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text);
}

.po-supplier-search-modal__register-table th {
    width: 8.5rem;
    font-weight: 600;
}

.po-dlv-register-code-field,
.po-dlv-register-zip-field {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

body.page-po-v2 .po-v2-screen {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

body.page-po-v2:not(.page-v2-filter-shell) .po-v2-header.card,
body.page-po-v2:not(.page-v2-filter-shell) .po-v2-lines.card {
    margin: 0;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--po-v2-border);
    background: #fff;
    box-shadow: var(--shadow);
}

body.page-po-v2:not(.page-v2-filter-shell) .po-v2-header.card {
    flex-shrink: 0;
    overflow: visible;
}

body.page-po-v2:not(.page-v2-filter-shell) .po-v2-lines.card {
    overflow: hidden;
}

body.page-v2-filter-shell.page-po-v2 .po-v2-header.card {
    flex-shrink: 0;
    overflow: visible;
}

body.page-v2-filter-shell.page-po-v2 .po-v2-lines.card {
    overflow: hidden;
}

body.page-po-v2.page-order-detail > main.container--order-detail-fit {
    overflow-y: auto;
    min-height: 0;
}

body.page-po-v2 .po-v2-header__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 0;
    margin: 0.35rem;
    border: 1px solid var(--po-v2-border);
    border-radius: 3px;
    align-items: stretch;
}

body.page-po-v2 .po-v2-header__col {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

body.page-po-v2 .po-v2-header__extras {
    margin: 0.35rem 0.35rem 0.4rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--po-v2-border);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

body.page-po-v2 .po-v2-header__strip-val {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

body.page-po-v2 .po-v2-header__strip-val .po-v2-in--zip {
    width: 7.5rem;
    flex: 0 0 auto;
}

body.page-po-v2 .po-v2-header__strip-val .po-v2-in--addr {
    flex: 1 1 12rem;
    min-width: 8rem;
}

body.page-po-v2 .po-v2-header__strip-val .po-v2-in--phone {
    width: 8.5rem;
    flex: 0 0 auto;
}

body.page-po-v2 .po-v2-header__so-readonly,
body.page-po-v2 .po-v2-header__om-readonly {
    min-height: 1.7rem;
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
}

body.page-po-v2 .po-v2-header__so-readonly .po-v2-readonly-val,
body.page-po-v2 .po-v2-header__om-readonly .po-v2-readonly-val {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 1.4rem;
}

/* 右列: 備考（1行） */
body.page-po-v2 .po-v2-field__val--memo .remark-field {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    min-width: 0;
    gap: 0.25rem;
}

body.page-po-v2 .po-v2-field__val--memo .remark-field .remark-field__body {
    flex: 1 1 auto;
    min-width: 0;
}

body.page-po-v2 .po-v2-field__val--memo .remark-field textarea {
    width: 100%;
    min-height: 0;
    height: 1.55rem;
    max-height: 1.55rem;
    padding: 0.05rem 0.3rem;
    line-height: 1.25;
    resize: none;
    box-sizing: border-box;
}

body.page-po-v2 .po-v2-header__col--right {
    border-left: 1px solid var(--po-v2-border);
}

body.page-po-v2 .po-v2-field {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    align-items: stretch;
    min-height: 1.7rem;
    border-bottom: 1px solid var(--po-v2-border);
}

body.page-po-v2 .po-v2-field--wide {
    grid-template-columns: 5.5rem minmax(0, 1fr);
}

body.page-po-v2 .po-v2-field--split {
    grid-template-columns: 5.5rem minmax(0, 1fr) 5.5rem minmax(0, 1fr);
}

body.page-po-v2 .po-v2-field--partners {
    grid-column: 1 / -1;
    grid-template-columns: 5.5rem minmax(0, 1fr) 5.5rem minmax(0, 1fr);
}

body.page-po-v2 .po-v2-field--top-date {
    grid-column: 1 / -1;
    grid-template-columns: 5.5rem minmax(0, 1fr);
}

body.page-po-v2 .po-v2-field--top-date.po-v2-field--split {
    grid-template-columns: 5.5rem minmax(0, 1fr) 5.5rem minmax(0, 1fr);
}

body.page-po-v2 .po-v2-field--top-date.po-v2-field--split .po-v2-field__lbl:nth-child(3) {
    border-left: 1px solid var(--po-v2-border);
}

body.page-po-v2 .po-v2-field--partners .po-v2-field__lbl:nth-child(3) {
    border-left: 1px solid var(--po-v2-border);
}

body.page-po-v2 .po-v2-field--check {
    grid-template-columns: 5.5rem minmax(0, 1fr);
}

body.page-po-v2 .po-v2-field__lbl {
    display: flex;
    align-items: center;
    padding: 0.1rem 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    color: #3d4635;
    background: var(--po-v2-label-bg);
    border-right: 1px solid var(--po-v2-border);
    white-space: nowrap;
}

body.page-po-v2 .po-v2-field--split .po-v2-field__lbl:nth-child(3) {
    border-left: 1px solid var(--po-v2-border);
}

body.page-po-v2 .po-v2-req {
    margin-left: 0.15rem;
    color: var(--danger);
    font-weight: 700;
}

body.page-po-v2 .po-v2-field__val {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.08rem 0.28rem;
    background: #fff;
}

body.page-po-v2 .po-v2-field__val--staff {
    flex-wrap: nowrap;
    overflow: hidden;
}

body.page-po-v2 .po-v2-field__val--staff .po-v2-search-btn,
body.page-po-v2 .po-v2-field__val--staff .om-combo-search-btn {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    padding: 0;
    border: 1px solid var(--po-v2-border);
    border-radius: 4px;
    background: #fff;
    color: #5c6578;
    line-height: 0;
}

body.page-po-v2 .po-v2-field__val--staff .po-v2-search-btn:hover,
body.page-po-v2 .po-v2-field__val--staff .om-combo-search-btn:hover {
    background: #eef2e6;
    border-color: #9aa3b2;
}

body.page-po-v2 .po-v2-field__val--staff .po-v2-search-btn svg,
body.page-po-v2 .po-v2-field__val--staff .om-combo-search-btn svg {
    width: 14px;
    height: 14px;
}

body.page-po-v2 .po-v2-field__val--staff .po-v2-in--staff-code {
    width: 3rem;
    flex: 0 0 3rem;
}

body.page-po-v2 .po-v2-field__val--staff .po-v2-in--staff-name {
    min-width: 0;
}

body.page-po-v2 .po-v2-field__val > .remark-field {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.2rem;
}

body.page-po-v2 .po-v2-field__val > .remark-field .remark-field__head {
    flex: 0 0 auto;
    min-height: 1.4rem;
}

body.page-po-v2 .po-v2-field__val > .remark-field .remark-field__body {
    flex: 1 1 auto;
    min-width: 0;
}

body.page-po-v2 .po-v2-field__val > .remark-field textarea {
    min-height: 2.5rem;
    height: 2.5rem;
}

body.page-po-v2 .po-v2-field__val > .remark-field .remark-field__search-btn {
    width: 1.25rem;
    height: 1.25rem;
    min-width: 1.25rem;
    min-height: 1.25rem;
    border: 1px solid var(--po-v2-border);
    border-radius: 4px;
    color: #5c6578;
}

body.page-po-v2 .po-v2-field__val > .remark-field .remark-field__search-btn svg {
    width: 14px;
    height: 14px;
}

body.page-po-v2 .po-v2-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    width: 100%;
}

body.page-po-v2 .po-v2-search-wrap--customer,
body.page-po-v2 .po-v2-search-wrap--supplier,
body.page-po-v2 .po-v2-search-wrap--delivery,
body.page-po-v2 .po-v2-search-wrap--payee,
body.page-po-v2 .po-v2-search-wrap--order-no {
    gap: 0;
}

body.page-po-v2 .po-v2-search-wrap--order-no {
    min-width: 0;
    flex: 1 1 auto;
}

body.page-po-v2 .po-v2-search-wrap--order-no .po-v2-order-no-wrap,
body.page-po-v2 .po-v2-search-wrap--order-no > .po-v2-in {
    flex: 1 1 auto;
    min-width: 0;
}

body.page-po-v2 .po-v2-field--order-no-row {
    grid-template-columns: 5.5rem minmax(11ch, 1.2fr) 5.5rem minmax(0, 0.8fr);
}

body.page-po-v2 .po-v2-field--order-no-row .po-v2-search-wrap--order-no .po-v2-in--wide,
body.page-po-v2 .po-v2-field--order-no-row #order-detail-order-no-input {
    min-width: 0;
    width: 100%;
    flex: 1 1 auto;
}

.order-detail-order-no-search__dates {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.po-supplier-search-modal--order-no .po-supplier-search-modal__shell {
    max-width: min(52rem, 96vw);
}

body.page-po-v2 .po-v2-date-unified {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    width: 100%;
    max-width: 10.5rem;
    position: relative;
}

body.page-po-v2 .po-v2-field--split .po-v2-field__val > .po-v2-date-unified,
body.page-po-v2 .po-v2-field--top-date.po-v2-field--split .po-v2-field__val > .po-v2-date-unified {
    max-width: none;
    flex: 1 1 auto;
}

body.page-po-v2 .po-v2-field:not(.po-v2-field--split) .po-v2-field__val > .po-v2-date-unified {
    max-width: none;
    flex: 1 1 auto;
}

body.page-po-v2 .po-v2-field__val > .po-v2-search-wrap,
body.page-po-v2 .po-v2-field__val > .remark-field {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

body.page-po-v2 .po-v2-field--split .po-v2-field__val > .po-v2-date-unified .po-v2-in--date,
body.page-po-v2 .po-v2-field--top-date.po-v2-field--split .po-v2-field__val > .po-v2-date-unified .po-v2-in--date {
    flex: 1 1 auto;
    min-width: 0;
    width: 0;
}

body.page-po-v2 .po-v2-date-range {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    min-width: 0;
    width: 100%;
}

body.page-po-v2 .po-v2-date-range .po-v2-date-unified {
    max-width: none;
    flex: 1 1 0;
}

body.page-po-v2 .po-v2-date-cal {
    position: absolute;
    width: 0;
    height: 0;
    opacity: 0;
    pointer-events: none;
}

body.page-po-v2 .po-v2-search-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: 1px solid var(--po-v2-border);
    border-radius: 4px;
    background: #fff;
    color: #5c6578;
    cursor: default;
}

body.page-po-v2 .po-v2-date-trigger {
    cursor: pointer;
}

body.page-po-v2 .po-v2-date-trigger:hover {
    background: #eef2e6;
    border-color: #9aa3b2;
}

body.page-po-v2 .po-v2-in {
    min-width: 0;
    width: 100%;
    height: 1.4rem;
    padding: 0.05rem 0.3rem;
    font: inherit;
    font-size: 0.8125rem;
    line-height: 1.25;
    color: var(--text);
    border: 1px solid #d5dbe3;
    border-radius: 4px;
    background: #fff;
}

body.page-po-v2 .po-v2-in:focus {
    outline: 2px solid rgba(37, 99, 235, 0.25);
    border-color: var(--accent);
}

body.page-po-v2 .po-v2-in--wide {
    flex: 1 1 auto;
}

body.page-po-v2 .po-v2-in--date {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
}

body.page-po-v2 .po-v2-in--code {
    width: 2.5rem;
    flex: 0 0 auto;
}

body.page-po-v2 .po-v2-in--name {
    flex: 1 1 auto;
    min-width: 6rem;
}

body.page-po-v2 .po-v2-in--select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 1.25rem;
    background-image: linear-gradient(45deg, transparent 50%, #5c6578 50%), linear-gradient(135deg, #5c6578 50%, transparent 50%);
    background-position: calc(100% - 10px) calc(50% + 1px), calc(100% - 6px) calc(50% + 1px);
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
}

body.page-po-v2 .po-v2-in--readonly {
    background: var(--po-v2-readonly-bg);
    border-color: #d5dbe3;
    color: #5c6578;
}

body.page-po-v2 .po-v2-in--memo {
    height: auto;
    min-height: 1.6rem;
    resize: vertical;
    padding: 0.15rem 0.3rem;
}

/* 新規発注・見積登録: ヘッダー以外の画面内文字を統一 */
body.page-po-v2 .po-v2-screen-wrap > :not(.po-v2-header),
body.page-po-v2 .po-v2-screen-wrap > :not(.po-v2-header) * {
    font-size: 0.875rem;
}

/* 明細行は詰まりすぎないよう、行間を少し確保 */
body.page-po-v2 .po-v2-lines .order-manual-lines-table--sheet tbody tr + tr td {
    padding-top: 0.34rem;
}

/* 商品コード・品名の入力背景を新規発注と見積登録で統一 */
body.page-po-v2 .po-v2-lines .order-line-code,
body.page-po-v2 .po-v2-lines .order-line-name {
    background: #fff;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table {
    table-layout: fixed;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* 品名は明細の中で一番広い列。画面に収まるよう、はみ出した分だけ縮む */
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td {
    min-width: 0;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table col.order-line-col-idx {
    width: var(--order-line-tax-rate-col-width, 3.75rem);
}

/* No 列 = 税率列と同じ幅（第1列だけ広がる不具合の防止） */
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-idx,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-idx-cell,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-tax-rate,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-tax-rate {
    width: var(--order-line-tax-rate-col-width, 3.75rem) !important;
    min-width: var(--order-line-tax-rate-col-width, 3.75rem) !important;
    max-width: var(--order-line-tax-rate-col-width, 3.75rem) !important;
    overflow: visible;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-name,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-td-name {
    min-width: 0;
    width: auto;
    max-width: none;
    overflow: hidden;
}
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table-wrap {
    overflow-x: hidden;
    overflow-y: auto;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-name {
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

body.page-po-v2 .po-v2-lines--editor .order-line-name-stack {
    min-width: 0;
    max-width: 100%;
}

/* 数値・税・金額列は見出し幅に合わせ、セル内容が隣列へはみ出さないようにする */
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-qty,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-wh,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-price,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-rank-price,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-tax-cat,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-tax-rate,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-cost,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-subtotal,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-gross,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-margin-rate,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-supplier-pick,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-sales-post {
    white-space: nowrap;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-qty {
    width: 5.5rem;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-wh {
    width: 4.5rem;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-qty {
    width: 5.5rem;
    max-width: 5.5rem;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-wh-cell {
    width: 4.5rem;
    max-width: 4.5rem;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-price {
    width: 6.5rem;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-cost {
    width: 6.5rem;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-supplier-pick {
    width: 12rem;
}

body.page-po-v2 .po-v2-lines--editor form[data-order-manual] .order-manual-lines-table td.order-line-td-cost {
    width: 6.5rem;
    max-width: 6.5rem;
}

body.page-po-v2 .po-v2-lines--editor form[data-po-order-lines] .order-manual-lines-table td.order-line-td-cost {
    width: 12rem;
    max-width: 12rem;
}

body.page-po-v2 .po-v2-lines--editor form[data-po-order-lines] .order-manual-lines-table .po-line-supplier-price {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-tax-cat {
    width: 4.75rem;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-subtotal {
    width: 7rem;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-gross {
    width: 6.5rem;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-margin-rate {
    width: 5rem;
}

/* 見積明細は画面幅を100%に分け、横スクロールしない。品名がいちばん広い */
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    table-layout: fixed;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table col.order-line-col-idx {
    width: 4.5%;
}

body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-code,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-code {
    width: 10%;
    min-width: 0;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-name,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-name {
    width: 22%;
    min-width: 0;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-qty,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-qty {
    width: 5%;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-list-price,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-list-price {
    width: 6%;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-price,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-price {
    width: 6%;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-rank-price,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-rank-price {
    width: 7%;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-cost,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-cost {
    width: 6%;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-supplier,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-supplier {
    width: 13%;
    min-width: 0;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-gross,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-gross {
    width: 6%;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-subtotal,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-subtotal {
    width: 7%;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-tax-cat,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-tax-cat {
    width: 4.5%;
    max-width: none;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-idx,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-idx-cell,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-tax-rate,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-tax-rate {
    width: 4.5% !important;
    min-width: 0 !important;
    max-width: none !important;
    overflow: visible;
}
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-code,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-name,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-qty,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-price,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-cost-unit,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-supplier,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-tax-category,
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-tax-rate {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-qty,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-wh-cell,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-price,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-price-cell,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-rank-price,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-tax-cat,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-tax-rate,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-cost,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-subtotal,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-gross,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-margin-rate,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-supplier-pick {
    overflow: hidden;
    white-space: nowrap;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-qty,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-warehouse,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-price,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-tax-category,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-tax-rate,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-cost-unit {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-qty,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table th.order-line-th-price {
    text-align: right;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-qty,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-td-price,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table td.order-line-price-cell {
    text-align: right;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-qty,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table .order-line-price {
    text-align: right;
}

body.page-po-v2:not(.page-v2-filter-shell) .po-v2-lines--editor .order-manual-lines-table--sheet.data-table thead th {
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.25;
    text-align: center;
    color: #3d4635;
    background: var(--po-v2-head-bg);
    border-color: var(--po-v2-border);
    box-shadow: none;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table th,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table td {
    border-color: var(--po-v2-border);
}

/* 受注 po-v2 明細: 表・セル・入力を白背景に統一（発注 po-v2-lines__table と同系） */
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table-wrap.table-wrap,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody {
    background: #fff;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody tr td {
    background-color: #fff;
    color: var(--text);
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody tr:hover,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody tr:hover td,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody tr.order-line--posted td,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody tr.order-line--posted:hover td,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody tr.order-line--posted-partial td,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody tr.order-line--posted-partial:hover td,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody tr.order-line--po-gr-posted-full td,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody tr.order-line--po-gr-posted-partial td {
    background-color: #fff;
    color: var(--text);
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet .psp-in,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet select.psp-in,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet textarea.psp-in,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet input,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet select,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet textarea {
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #d5dbe3;
    border-radius: 4px;
    background: #fff;
    background-color: #fff;
    box-shadow: none;
}

body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet .psp-in:disabled,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet select.psp-in:disabled,
body.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--sheet select:disabled {
    background: #fff;
    background-color: #fff;
    color: var(--text);
    opacity: 1;
}

body.page-po-v2 .po-v2-lines--editor .order-line-row-menu-btn {
    background: #fff;
}

body.page-po-v2 .po-v2-lines--editor .om-combo-wrap--order-line-code .om-combo-search-btn {
    width: var(--order-line-code-btn-width);
    min-width: var(--order-line-code-btn-width);
    height: var(--order-line-code-btn-width);
    min-height: var(--order-line-code-btn-width);
    padding: 0;
    border: 1px solid var(--po-v2-border);
    border-radius: 4px;
    background: #fff;
    color: #5c6578;
}

body.page-po-v2 .po-v2-lines--editor .om-combo-wrap--order-line-code .om-combo-search-btn:hover {
    background: #eef2e6;
    border-color: #9aa3b2;
}

body.page-po-v2 .po-v2-lines--editor .om-combo-wrap--order-line-code .om-combo-search-btn svg {
    width: 14px;
    height: 14px;
}

body.page-po-v2 .order-detail-screen > .order-summary-footer--detail {
    margin-top: 0.15rem;
    padding: 0.2rem 0.45rem;
    gap: 0.25rem 0.85rem;
}

body.page-po-v2:not(.page-v2-filter-shell) .order-detail-screen > .order-detail-remarks.card {
    margin-top: 0.2rem;
    padding: 0.2rem 0.45rem;
}

body.page-po-v2 .order-detail-remarks--inline .remark-field textarea {
    min-height: 1.85rem;
    height: 1.95rem;
    max-height: 4.5rem;
}

body.page-po-v2 .po-v2-check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.875rem;
    cursor: default;
}

body.page-po-v2 .po-v2-lines__wrap {
    overflow: auto;
}

body.page-po-v2 .po-v2-lines__table {
    width: 100%;
    min-width: 1080px;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 0.875rem;
}

body.page-po-v2 .po-v2-lines__table thead th {
    padding: 0.28rem 0.25rem;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.25;
    text-align: center;
    vertical-align: middle;
    color: #3d4635;
    background: var(--po-v2-head-bg);
    border: 1px solid var(--po-v2-border);
    white-space: nowrap;
}

body.page-po-v2 .po-v2-th-sub {
    font-weight: 500;
    font-size: 0.875rem;
    color: #5c6578;
}

body.page-po-v2 .po-v2-lines__table td {
    padding: 0.12rem 0.15rem;
    vertical-align: top;
    border: 1px solid var(--po-v2-border);
    background: #fff;
}

body.page-po-v2 .po-v2-lines__no {
    width: 2.4rem;
    text-align: center;
}

body.page-po-v2 .po-v2-lines__drag {
    display: block;
    margin: 0 auto 0.05rem;
    color: #9aa3b2;
    line-height: 0;
}

body.page-po-v2 .po-v2-lines__num {
    display: block;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

body.page-po-v2 .po-v2-lines__kind {
    width: 4.2rem;
}

body.page-po-v2 .po-v2-lines__product {
    width: 11rem;
}

body.page-po-v2 .po-v2-lines__name {
    width: 14rem;
}

body.page-po-v2 .po-v2-lines__pack,
body.page-po-v2 .po-v2-lines__qty {
    width: 4.8rem;
}

body.page-po-v2 .po-v2-lines__unit {
    width: 4.5rem;
}

body.page-po-v2 .po-v2-lines__price,
body.page-po-v2 .po-v2-lines__amount,
body.page-po-v2 .po-v2-lines__tax {
    width: 5rem;
}

body.page-po-v2 .po-v2-lines__tax-rule {
    width: 5.5rem;
}

body.page-po-v2 .po-v2-lines__alloc {
    width: 4.5rem;
}

body.page-po-v2 .po-v2-stack {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

body.page-po-v2 .po-v2-in--sub {
    height: 1.35rem;
    font-size: 0.875rem;
}

body.page-po-v2 .po-v2-screen :is(.smart-date-error) {
    font-size: 0.875rem;
}

body.page-po-v2 .po-v2-in--num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

body.page-po-v2 .po-v2-lines__table .po-v2-search-wrap {
    width: 100%;
}

body.page-po-v2 .po-v2-lines__table .po-v2-search-btn {
    width: 1.2rem;
    height: 1.2rem;
}

body.page-po-v2:not(.page-v2-filter-shell) .po-v2-header__grid .po-v2-field__lbl {
    background: #f1f3f4;
}

body.page-po-v2 .po-v2-readonly-val {
    display: block;
    box-sizing: border-box;
    min-height: 1.4rem;
    line-height: 1.25;
    padding: 0.05rem 0.3rem;
    color: var(--text);
    border: 1px solid #d5dbe3;
    border-radius: 4px;
    background: #fff;
}

body.page-po-v2 .po-v2-header--readonly .po-v2-search-btn {
    display: none;
}

body.page-po-v2 .po-v2-lt-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #6b7280;
    background: #f3f4f6;
    border-radius: 0.25rem;
    vertical-align: middle;
}

body.page-po-v2 .po-v2-om-link {
    color: var(--link);
    text-decoration: none;
}

body.page-po-v2 .po-v2-om-link {
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    line-height: 1.25;
    box-sizing: border-box;
}

body.page-po-v2 .po-v2-om-link:hover {
    text-decoration: none !important;
    border-bottom-color: currentColor;
}

/* 発注明細ヘッダー: 受注No.・注文管理No.は黒字＋1px下線（文字・下線とも太字にしない） */
body.page-po-v2 .po-v2-header__so-readonly .link-order-id,
body.page-po-v2 .po-v2-header__om-readonly .po-v2-om-link {
    color: var(--text);
    font-weight: 400 !important;
    border-bottom-color: currentColor;
}

body.page-po-v2 .po-v2-header__so-readonly .link-order-id:hover,
body.page-po-v2 .po-v2-header__om-readonly .po-v2-om-link:hover {
    color: var(--text);
    font-weight: 400 !important;
    border-bottom-color: currentColor;
    opacity: 0.72;
}

body.page-po-v2 .po-v2-linked-po-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    min-height: 1.75rem;
    line-height: 1.75rem;
    gap: 0 0.1rem;
}

body.page-po-v2 .po-v2-linked-po-link {
    color: var(--link);
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    box-sizing: border-box;
}

body.page-po-v2 .po-v2-linked-po-link:hover {
    text-decoration: none !important;
    border-bottom-color: currentColor;
}

body.page-po-v2 .po-v2-linked-po-sep {
    color: #6b7280;
}

body.page-po-v2 .po-v2-linked-inv-ship-link {
    color: #0f766e;
    white-space: nowrap;
}

body.page-po-v2 a.po-v2-linked-inv-ship-link:hover {
    color: #0d9488;
}

body.page-po-v2 .po-v2-field--order-no-row .po-v2-order-no-wrap {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    min-width: 0;
}

/* 受注明細ヘッダー: 左右を同一 grid 行に並べて枠線を揃える */
body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: 0;
    margin: 0.35rem;
    border: 1px solid var(--po-v2-border);
    border-radius: 3px;
    align-items: stretch;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field {
    min-height: 1.7rem;
    border-bottom: 1px solid var(--po-v2-border);
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field:nth-child(even) {
    border-left: 1px solid var(--po-v2-border);
}

/* 右列の2段 split: 関連発注No. / 出荷No. / 管理No. のラベル列を揃える */
body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field.po-v2-field--split {
    grid-template-columns: 5.5rem minmax(0, 1fr) 5.5rem minmax(0, 1fr);
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field:last-child {
    border-bottom: none;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-field--remark-rowspan {
    grid-row: span 2;
    min-height: calc(1.7rem * 2 + 1px);
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-field--remark-rowspan-3 {
    grid-row: span 3;
    min-height: calc(1.7rem * 3 + 2px);
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-field--remark-rowspan-1 {
    min-height: 1.7rem;
}

body.page-po-v2:not(.page-v2-filter-shell) .po-v2-header--so-detail .po-v2-field--so-detail-footer {
    background: #f3f4f6;
}

body.page-po-v2:not(.page-v2-filter-shell) .po-v2-header--so-detail .po-v2-field--so-detail-footer .po-v2-field__lbl,
body.page-po-v2:not(.page-v2-filter-shell) .po-v2-header--so-detail .po-v2-field--so-detail-footer .po-v2-field__val {
    background: #f3f4f6;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-field--grid-balance-half {
    pointer-events: none;
    min-height: 1.7rem;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-field--grid-balance-half:not(.po-v2-field--so-detail-footer) .po-v2-field__lbl,
body.page-po-v2 .po-v2-header--so-detail .po-v2-field--grid-balance-half:not(.po-v2-field--so-detail-footer) .po-v2-field__val {
    visibility: hidden;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-field--grid-balance-half.po-v2-field--so-detail-footer .po-v2-field__lbl,
body.page-po-v2 .po-v2-header--so-detail .po-v2-field--grid-balance-half.po-v2-field--so-detail-footer .po-v2-field__val {
    visibility: hidden;
    border-right-color: #f3f4f6;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field--wide .po-v2-field__val {
    align-items: stretch;
    min-height: 0;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field--wide .remark-field {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    min-height: 0;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field--wide .remark-field--search-leading {
    gap: 0.2rem;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field--wide .remark-field--search-leading .remark-field__search-btn {
    flex: 0 0 auto;
    align-self: flex-start;
    margin-top: 0.05rem;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field--wide .remark-field .remark-field__body {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    align-self: stretch;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field--wide .remark-field--search-leading textarea {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 0.05rem 0.3rem;
    line-height: 1.25;
    resize: vertical;
    box-sizing: border-box;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field--wide .remark-field textarea {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    height: 100%;
    padding: 0.05rem 0.3rem;
    line-height: 1.25;
    resize: vertical;
    box-sizing: border-box;
}

body.page-po-v2 .po-v2-header--so-detail .po-v2-field__val--staff {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    min-width: 0;
}

@media (max-width: 1100px) {
    body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail {
        grid-template-columns: 1fr;
    }

    body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field:nth-child(even) {
        border-left: none;
        border-top: 1px solid var(--po-v2-border);
    }

    body.page-po-v2 .po-v2-header--so-detail .po-v2-field--remark-rowspan,
    body.page-po-v2 .po-v2-header--so-detail .po-v2-field--remark-rowspan-3,
    body.page-po-v2 .po-v2-header--so-detail .po-v2-field--remark-rowspan-1 {
        grid-row: auto;
        min-height: 1.7rem;
    }

    body.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field:last-child {
        border-bottom: none;
    }
}

/* 発注明細・新規見積: ヘッダー行の区切り線（共通 po-v2 の border を上書き） */
body.page-v2-filter-shell .po-v2-header--so-detail .po-v2-header__grid--so-detail,
body.page-v2-filter-shell .po-v2-header .po-v2-header__grid {
    border: none;
}

body.page-v2-filter-shell.page-po-v2 .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field {
    min-height: auto;
    border-bottom: none;
}

body.page-v2-filter-shell .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field,
body.page-v2-filter-shell .po-v2-header .po-v2-header__col .po-v2-field,
body.page-v2-filter-shell .po-v2-header .po-v2-field {
    border: none;
    border-bottom: none;
    border-top: none;
    border-left: none;
}

body.page-v2-filter-shell .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field:nth-child(even) {
    border-left: none;
}

body.page-v2-filter-shell .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field:last-child {
    border-bottom: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field__lbl {
    border: none;
    border-right: none;
    border-left: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field--split .po-v2-field__lbl:nth-child(3),
body.page-v2-filter-shell .po-v2-header .po-v2-field--partners .po-v2-field__lbl:nth-child(3),
body.page-v2-filter-shell .po-v2-header .po-v2-field--top-date.po-v2-field--split .po-v2-field__lbl:nth-child(3) {
    border-left: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-header__col--right {
    border: none;
    border-left: none;
    border-top: none;
}

body.page-v2-filter-shell .po-v2-header .po-v2-field--grid-balance-half .po-v2-field__lbl,
body.page-v2-filter-shell .po-v2-header .po-v2-field--grid-balance-half .po-v2-field__val {
    border: none;
}

@media (max-width: 1100px) {
    body.page-v2-filter-shell .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field:nth-child(even) {
        border-top: none;
    }

    body.page-v2-filter-shell .po-v2-header .po-v2-header__col--right {
        border-top: none;
    }
}

/* 発注明細・新規見積: 明細行をヘッダー同型（外枠カード・行内枠線なし・入力1.65rem） */
body.page-v2-filter-shell .po-v2-lines.po-v2-lines--editor.card {
    margin: 0 0 0.45rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #fff;
}

body.page-v2-filter-shell .po-v2-lines--editor > .order-lines-unified-card--primary {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table-wrap.table-wrap {
    border: none;
    background: transparent;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet.data-table,
body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet.data-table thead th,
body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody td {
    border: none;
    background: #fff;
}

body.page-v2-filter-shell .po-v2-lines .order-manual-lines-table--sheet tbody tr + tr td {
    border-top: none;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet.data-table thead th {
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25;
    color: var(--muted);
    background: #fff;
    box-shadow: none;
    padding: 0.2rem 0.35rem 0.35rem;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet.data-table th,
body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet.data-table td {
    padding: 0.4rem 0.45rem;
    line-height: 1.35;
    vertical-align: middle;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet th.order-line-th-idx {
    font-weight: 500;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet .order-line-idx-cell {
    font-size: 0.875rem;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet .psp-in,
body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet select.psp-in,
body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet input,
body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet select {
    height: 1.65rem;
    min-height: 1.65rem;
    padding: 0 0.45rem;
    font-size: 0.875rem;
    line-height: 1.25;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    box-sizing: border-box;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet .psp-in:focus,
body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet select.psp-in:focus {
    box-shadow: none;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet .om-combo-search-btn {
    width: 1.65rem;
    height: 1.65rem;
    min-width: 1.65rem;
    min-height: 1.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet .order-line-row-menu-btn {
    width: 1.65rem;
    height: 1.65rem;
    min-width: 1.65rem;
    min-height: 1.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
    box-shadow: none;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet .order-line-row-menu-btn svg {
    width: 14px;
    height: 14px;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet .order-line-idx-wrap {
    min-height: 1.65rem;
}

body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet .order-line-subtotal,
body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet .order-line-gross,
body.page-v2-filter-shell .po-v2-lines--editor .order-manual-lines-table--sheet .order-line-margin-rate {
    font-weight: 400;
    font-size: 0.875rem;
}

body.page-po-detail.page-v2-filter-shell .po-v2-lines--editor .order-line-th-sales-post,
body.page-po-detail.page-v2-filter-shell .po-v2-lines--editor .order-line-sales-cell {
    display: none;
}

body.page-v2-filter-shell .order-detail-screen > .order-summary-footer.order-summary-footer--margin {
    margin-top: 0;
    padding: 0.38rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #fff;
}

body.page-v2-filter-shell .order-summary-footer--margin .order-summary-footer__label {
    font-weight: 500;
    color: var(--muted);
}

/* shell: 共通 po-v2 の項目名灰帯を上書き（後方の .page-po-v2 ルールより優先） */
body.page-v2-filter-shell.page-po-v2 .po-v2-header .po-v2-field__lbl,
body.page-v2-filter-shell.page-po-v2 .po-v2-header__grid .po-v2-field__lbl {
    background: #fff;
    border: none;
    border-right: none;
    border-left: none;
    padding: 0;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--muted);
}

body.page-v2-filter-shell.page-po-v2 .po-v2-header--so-detail .po-v2-field--so-detail-footer,
body.page-v2-filter-shell.page-po-v2 .po-v2-header--so-detail .po-v2-field--so-detail-footer .po-v2-field__lbl,
body.page-v2-filter-shell.page-po-v2 .po-v2-header--so-detail .po-v2-field--so-detail-footer .po-v2-field__val {
    background: #fff;
}

body.page-v2-filter-shell.page-po-v2 .po-v2-header .po-v2-field__val {
    padding: 0;
    background: #fff;
}

/* 発注明細: ヘッダー（荷主・備考）と明細（No・商品コード）の枠を同色に */
body.page-v2-filter-shell.page-po-detail .po-v2-header.card,
body.page-v2-filter-shell.page-po-detail .po-v2-lines.po-v2-lines--editor.card,
body.page-v2-filter-shell.page-po-detail .order-detail-screen > .order-detail-remarks.card {
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #fff;
}

body.page-v2-filter-shell.page-po-detail .po-v2-header--so-detail,
body.page-v2-filter-shell.page-po-detail .po-v2-lines--editor .order-lines-unified-card--primary,
body.page-v2-filter-shell.page-po-detail .po-v2-lines--editor .order-manual-lines-table-wrap,
body.page-v2-filter-shell.page-po-detail .po-v2-lines--editor .order-manual-lines-table--sheet.data-table,
body.page-v2-filter-shell.page-po-detail .po-v2-lines--editor .order-manual-lines-table--sheet.data-table tbody {
    background: #fff;
}

body.page-v2-filter-shell.page-po-detail .po-v2-lines--editor .order-manual-lines-table--sheet.data-table thead th {
    background: #fff;
    color: var(--muted);
    font-weight: 500;
}

body.page-v2-filter-shell.page-so-create .po-v2-header .po-v2-field__lbl {
    justify-content: center;
    text-align: center;
}

body.page-v2-filter-shell:is(.page-so-create, .page-estimate-create)
    .po-v2-lines--editor
    .order-manual-lines-table--sheet.data-table
    thead
    th {
    text-align: center;
}

body.page-estimate-detail.page-order-detail .order-summary-footer--detail .order-summary-footer__value,
body.page-estimate-detail.page-order-detail .order-summary-footer--margin .order-summary-footer__value,
body.page-order-detail.page-po-v2.page-v2-filter-shell:not(.page-po-detail):not(.page-estimate-detail)
    .order-summary-footer--detail
    .order-summary-footer__value,
body.page-order-detail.page-po-v2.page-v2-filter-shell:not(.page-po-detail):not(.page-estimate-detail)
    .order-summary-footer--margin
    .order-summary-footer__value {
    font-weight: 400;
}

/* 発注ヘッダー: 新規仕入（2列 po-v2-header__grid）と同じ上下余白・行間 */
body.page-v2-filter-shell.page-po-detail:not(.page-gr-detail) .po-v2-header--so-detail .po-v2-header__grid--so-detail {
    margin: 0;
    gap: 0.5rem 1.5rem;
    border: none;
}

body.page-v2-filter-shell.page-po-detail:not(.page-gr-detail) .po-v2-header--so-detail .po-v2-header__grid--so-detail > .po-v2-field {
    padding: 0;
    min-height: auto;
}

body.page-v2-filter-shell.page-po-detail:not(.page-gr-detail) .po-v2-header--so-detail .po-v2-field--grid-balance-half {
    min-height: 0;
}

body.page-v2-filter-shell.page-po-detail:not(.page-gr-detail) .po-v2-header--so-detail .po-v2-field--remark-rowspan .remark-field textarea,
body.page-v2-filter-shell.page-po-detail:not(.page-gr-detail) .po-v2-header--so-detail .po-v2-field--remark-rowspan-1 .remark-field textarea {
    padding: 0 0.45rem;
}

body.page-v2-filter-shell.page-po-detail .order-detail-screen > .order-detail-remarks.card {
    margin-top: 0.45rem;
    padding: 0.45rem 0.65rem;
}

body.page-v2-filter-shell.page-po-detail .order-detail-remarks--inline .remark-field textarea {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

/* 請求明細: ヘッダー・明細表を shell 同型に */
body.page-v2-filter-shell.page-invoice-detail .order-detail-screen > .card,
body.page-v2-filter-shell.page-invoice-detail .invoice-detail-header-fields.card {
    margin: 0 0 0.45rem;
    padding: 0.38rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #fff;
}

body.page-v2-filter-shell.page-invoice-detail .payment-detail-fields-grid {
    gap: 0.45rem 0.85rem;
}

body.page-v2-filter-shell.page-invoice-detail .payment-detail-fields-grid dt {
    padding: 0;
    font-weight: 500;
    color: var(--muted);
    background: transparent;
}

body.page-v2-filter-shell.page-invoice-detail .invoice-detail-ledger-card .order-manual-lines-table-wrap {
    border: none;
    background: transparent;
}

body.page-v2-filter-shell.page-invoice-detail .invoice-detail-ledger-card .order-manual-lines-table--sheet.data-table,
body.page-v2-filter-shell.page-invoice-detail .invoice-detail-ledger-card .order-manual-lines-table--sheet.data-table th,
body.page-v2-filter-shell.page-invoice-detail .invoice-detail-ledger-card .order-manual-lines-table--sheet.data-table td {
    border: none;
    background: #fff;
}

body.page-v2-filter-shell.page-invoice-detail .invoice-detail-ledger-card .order-manual-lines-table--sheet.data-table thead th {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--muted);
    background: #fff;
    box-shadow: none;
    padding: 0.2rem 0.35rem 0.35rem;
}

body.page-v2-filter-shell.page-invoice-detail .invoice-detail-ledger-card .order-manual-lines-table--sheet.data-table th,
body.page-v2-filter-shell.page-invoice-detail .invoice-detail-ledger-card .order-manual-lines-table--sheet.data-table td {
    padding: 0.4rem 0.45rem;
    vertical-align: middle;
    font-size: 0.875rem;
    line-height: 1.35;
}

body.page-v2-filter-shell.page-invoice-detail .invoice-detail-ops-form .psp-in,
body.page-v2-filter-shell.page-invoice-detail .invoice-detail-ops-form select.psp-in {
    height: 1.65rem;
    min-height: 1.65rem;
    padding: 0 0.45rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: none;
    box-sizing: border-box;
}

body.page-v2-filter-shell.page-invoice-detail .invoice-detail-ops-form .btn.btn--compact {
    height: 1.65rem;
    min-height: 1.65rem;
    padding: 0 0.55rem;
    font-size: 0.875rem;
    line-height: 1;
    box-sizing: border-box;
}

body.page-v2-filter-shell.page-invoice-detail .order-manual-lines-heading {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.875rem;
}

/* 商品登録: フォーム・仕入先別価格表 */
body.page-v2-filter-shell.page-product-detail .master-flam-section.card {
    margin: 0 0 0.45rem;
    padding: 0.38rem 0.55rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #fff;
}

body.page-v2-filter-shell.page-product-detail .master-flam-section__title {
    margin: 0 0 0.35rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
}

body.page-v2-filter-shell.page-product-detail .master-flam-dl--product-fields {
    gap: 0.45rem 1rem;
    column-gap: 1rem;
}

body.page-v2-filter-shell.page-product-detail .master-flam-dl--product-fields dt {
    padding: 0;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--muted);
    background: transparent;
    border-radius: 0;
}

body.page-v2-filter-shell.page-product-detail .master-flam-dl--product-fields dd {
    padding: 0.12rem 0;
}

body.page-v2-filter-shell.page-product-detail .master-flam-supplier-slot-table th.master-flam-supplier-slot-label,
body.page-v2-filter-shell.page-product-detail .master-flam-supplier-slot-table thead th {
    background: #fff;
    font-weight: 500;
    color: var(--muted);
}

body.page-v2-filter-shell.page-product-detail .psp-in,
body.page-v2-filter-shell.page-product-detail select.psp-in,
body.page-v2-filter-shell.page-product-detail textarea.psp-in {
    height: 1.65rem;
    min-height: 1.65rem;
    padding: 0 0.45rem;
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: none;
    box-sizing: border-box;
}

body.page-v2-filter-shell.page-product-detail textarea.psp-in {
    height: auto;
    min-height: 3.3rem;
    padding: 0.35rem 0.45rem;
    line-height: 1.25;
}

body.page-v2-filter-shell.page-product-detail .master-flam-supplier-slot-table.data-table,
body.page-v2-filter-shell.page-product-detail .master-flam-supplier-slot-table.data-table th,
body.page-v2-filter-shell.page-product-detail .master-flam-supplier-slot-table.data-table td {
    border: none;
    background: #fff;
}

body.page-v2-filter-shell.page-product-detail .master-flam-supplier-slot-table.data-table thead th {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--muted);
    background: #fff;
    padding: 0.2rem 0.35rem 0.35rem;
}

body.page-v2-filter-shell.page-product-detail .master-flam-supplier-slot-table.data-table td,
body.page-v2-filter-shell.page-product-detail .master-flam-supplier-slot-table.data-table th {
    padding: 0.4rem 0.45rem;
    vertical-align: middle;
    line-height: 1.35;
}

body.page-v2-filter-shell.page-product-detail .master-flam-supplier-slot-table .psp-in {
    width: 100%;
    min-width: 0;
}

body.page-v2-filter-shell.page-product-detail .master-flam-supplier-code-name-pair .om-combo-search-btn {
    width: 1.65rem;
    height: 1.65rem;
    min-width: 1.65rem;
    min-height: 1.65rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: none;
}

@media (max-width: 1100px) {
    body.page-po-v2 .po-v2-header__grid {
        grid-template-columns: 1fr;
    }

    body.page-po-v2 .po-v2-header__col--right {
        border-left: none;
        border-top: 1px solid var(--po-v2-border);
    }
}

.po-supplier-search-modal--staff .po-supplier-search-modal__result-table thead th {
    background: #fff;
    color: var(--text);
}

.po-supplier-search-modal--staff .po-supplier-search-modal__create-cancel {
    display: none;
}

.po-supplier-search-modal--staff .po-supplier-search-modal__create-submit {
    background: #fff;
    border: 1px solid #9aa3b2;
    color: var(--text);
}

.po-supplier-search-modal--staff .po-supplier-search-modal__create-submit:hover {
    background: #f3f4f6;
    filter: none;
}

.po-supplier-search-modal--staff.is-create-open .po-supplier-search-modal__toolbar {
    display: none;
}

/* 見積登録・新規発注 — ページ内文字サイズ 0.875rem（サイトヘッダー・po-v2 ヘッダーは対象外） */
body.page-estimate-detail.page-po-v2 > main .po-v2-screen-wrap > :not(.po-v2-header),
body.page-estimate-detail.page-po-v2 > main .po-v2-screen-wrap > :not(.po-v2-header) *,
body.page-estimate-detail.page-po-v2 .om-order-product-modal,
body.page-estimate-detail.page-po-v2 .om-order-product-modal *,
body.page-estimate-detail.page-po-v2 .po-supplier-search-modal,
body.page-estimate-detail.page-po-v2 .po-supplier-search-modal *,
body.page-so-create.page-po-v2 > main,
body.page-so-create.page-po-v2 > main *,
body.page-so-create.page-po-v2 .om-order-product-modal,
body.page-so-create.page-po-v2 .om-order-product-modal *,
body.page-so-edit.page-po-v2 > main,
body.page-so-edit.page-po-v2 > main *,
body.page-so-edit.page-po-v2 .om-order-product-modal,
body.page-so-edit.page-po-v2 .om-order-product-modal *,
body.page-order-detail.page-po-v2 > main,
body.page-order-detail.page-po-v2 > main *,
body.page-order-detail.page-po-v2 .om-order-product-modal,
body.page-order-detail.page-po-v2 .om-order-product-modal *,
body.page-order-detail.page-po-v2 .po-supplier-search-modal,
body.page-order-detail.page-po-v2 .po-supplier-search-modal *,
body.page-v2-filter-shell > main,
body.page-v2-filter-shell > main *,
body.page-v2-filter-shell .om-order-product-modal,
body.page-v2-filter-shell .om-order-product-modal *,
body.page-v2-filter-shell .po-supplier-search-modal,
body.page-v2-filter-shell .po-supplier-search-modal * {
    font-size: 0.875rem !important;
}

/* 見積・受注入力: 文字色を --estimate-fg (#3b414f) に統一 */
body.page-estimate-detail.page-po-v2 > main,
body.page-order-detail.page-po-v2.page-v2-filter-shell:not(.page-po-detail):not(.page-estimate-detail) > main {
    color: var(--estimate-fg);
}

body.page-estimate-detail.page-po-v2 > main :is(
    input:not([type="checkbox"]),
    select,
    textarea,
    .psp-in,
    .po-v2-in,
    .po-v2-readonly-val,
    .po-v2-field__lbl,
    .order-summary-footer__label,
    .order-summary-footer__value,
    .order-manual-lines-table--sheet thead th,
    .order-manual-lines-table--sheet tbody td,
    .order-line-idx,
    .remark-field__head,
    .po-v2-om-link
),
body.page-order-detail.page-po-v2.page-v2-filter-shell:not(.page-po-detail):not(.page-estimate-detail)
    > main
    :is(
        input:not([type="checkbox"]),
        select,
        textarea,
        .psp-in,
        .po-v2-in,
        .po-v2-readonly-val,
        .po-v2-field__lbl,
        .order-summary-footer__label,
        .order-summary-footer__value,
        .order-manual-lines-table--sheet thead th,
        .order-manual-lines-table--sheet tbody td,
        .order-line-idx,
        .remark-field__head,
        .po-v2-om-link
    ) {
    color: var(--estimate-fg);
}

body.page-estimate-detail.page-po-v2 .om-order-product-modal,
body.page-estimate-detail.page-po-v2 .om-order-product-modal *,
body.page-estimate-detail.page-po-v2 .po-supplier-search-modal,
body.page-estimate-detail.page-po-v2 .po-supplier-search-modal *,
body.page-order-detail.page-po-v2.page-v2-filter-shell:not(.page-po-detail):not(.page-estimate-detail)
    .om-order-product-modal,
body.page-order-detail.page-po-v2.page-v2-filter-shell:not(.page-po-detail):not(.page-estimate-detail)
    .om-order-product-modal
    *,
body.page-order-detail.page-po-v2.page-v2-filter-shell:not(.page-po-detail):not(.page-estimate-detail)
    .po-supplier-search-modal,
body.page-order-detail.page-po-v2.page-v2-filter-shell:not(.page-po-detail):not(.page-estimate-detail)
    .po-supplier-search-modal
    * {
    color: var(--estimate-fg);
}

body.page-estimate-detail.page-po-v2 .po-v2-req,
body.page-order-detail.page-po-v2.page-v2-filter-shell:not(.page-po-detail):not(.page-estimate-detail) .po-v2-req {
    color: var(--danger);
}

body.page-estimate-list .site-header :is(
    .brand,
    .brand span,
    .site-header__context-label,
    .site-header__quick-btn
),
body.page-so-list .site-header :is(
    .brand,
    .brand span,
    .site-header__context-label,
    .site-header__quick-btn
),
body.page-order-detail.page-so-create .site-header :is(
    .brand,
    .brand span,
    .site-header__context-label,
    .site-header__quick-btn
),
body.page-order-detail.page-so-edit.page-po-v2.page-v2-filter-shell:not(.page-po-detail) .site-header :is(
    .brand,
    .brand span,
    .site-header__context-label,
    .site-header__quick-btn
),
body.page-estimate-detail .site-header :is(
    .brand,
    .brand span,
    .site-header__context-label,
    .site-header__quick-btn
),
body.page-estimate-report .site-header :is(
    .brand,
    .brand span,
    .site-header__context-label,
    .site-header__quick-btn
),
body.page-estimate-report-compose .site-header :is(
    .brand,
    .brand span,
    .site-header__context-label,
    .site-header__quick-btn
) {
    color: var(--estimate-fg);
}

body.page-estimate-list .brand:hover,
body.page-estimate-list .brand:focus-visible,
body.page-so-list .brand:hover,
body.page-so-list .brand:focus-visible,
body.page-order-detail.page-so-create .brand:hover,
body.page-order-detail.page-so-create .brand:focus-visible,
body.page-order-detail.page-so-edit.page-po-v2.page-v2-filter-shell:not(.page-po-detail) .brand:hover,
body.page-order-detail.page-so-edit.page-po-v2.page-v2-filter-shell:not(.page-po-detail) .brand:focus-visible,
body.page-estimate-detail .brand:hover,
body.page-estimate-detail .brand:focus-visible,
body.page-estimate-report .brand:hover,
body.page-estimate-report .brand:focus-visible,
body.page-estimate-report-compose .brand:hover,
body.page-estimate-report-compose .brand:focus-visible {
    color: var(--estimate-fg);
}

body.page-estimate-list .site-header .site-header__quick-btn:hover:not(:disabled),
body.page-so-list .site-header .site-header__quick-btn:hover:not(:disabled),
body.page-order-detail.page-so-create .site-header .site-header__quick-btn:hover:not(:disabled),
body.page-order-detail.page-so-edit.page-po-v2.page-v2-filter-shell:not(.page-po-detail)
    .site-header
    .site-header__quick-btn:hover:not(:disabled),
body.page-estimate-detail .site-header .site-header__quick-btn:hover:not(:disabled),
body.page-estimate-report .site-header .site-header__quick-btn:hover:not(:disabled),
body.page-estimate-report-compose .site-header .site-header__quick-btn:hover:not(:disabled),
body.page-estimate-list .site-header__brand-actions .site-header__quick-btn:hover:not(:disabled),
body.page-estimate-list .site-header__quick-actions .site-header__quick-btn:hover:not(:disabled),
body.page-so-list .site-header__brand-actions .site-header__quick-btn:hover:not(:disabled),
body.page-so-list .site-header__quick-actions .site-header__quick-btn:hover:not(:disabled),
body.page-order-detail.page-so-create .site-header__brand-actions .site-header__quick-btn:hover:not(:disabled),
body.page-order-detail.page-so-create .site-header__quick-actions .site-header__quick-btn:hover:not(:disabled),
body.page-order-detail.page-so-edit.page-po-v2.page-v2-filter-shell:not(.page-po-detail)
    .site-header__brand-actions
    .site-header__quick-btn:hover:not(:disabled),
body.page-order-detail.page-so-edit.page-po-v2.page-v2-filter-shell:not(.page-po-detail)
    .site-header__quick-actions
    .site-header__quick-btn:hover:not(:disabled),
body.page-estimate-detail .site-header__brand-actions .site-header__quick-btn:hover:not(:disabled),
body.page-estimate-detail .site-header__quick-actions .site-header__quick-btn:hover:not(:disabled),
body.page-estimate-report .site-header__brand-actions .site-header__quick-btn:hover:not(:disabled),
body.page-estimate-report .site-header__quick-actions .site-header__quick-btn:hover:not(:disabled) {
    color: var(--estimate-fg);
    border-color: var(--border);
    background: rgba(59, 65, 79, 0.06);
}

body.page-estimate-list .site-header .site-header__quick-more-menu__item,
body.page-so-list .site-header .site-header__quick-more-menu__item,
body.page-order-detail.page-so-create .site-header .site-header__quick-more-menu__item,
body.page-order-detail.page-so-edit.page-po-v2.page-v2-filter-shell:not(.page-po-detail)
    .site-header
    .site-header__quick-more-menu__item,
body.page-estimate-detail .site-header .site-header__quick-more-menu__item,
body.page-estimate-report .site-header .site-header__quick-more-menu__item,
body.page-estimate-report-compose .site-header .site-header__quick-more-menu__item {
    color: var(--estimate-fg);
}

body.page-estimate-detail.page-v2-filter-shell.page-po-v2 .po-v2-header .po-v2-field__lbl,
body.page-estimate-detail.page-v2-filter-shell.page-po-v2 .po-v2-header__grid .po-v2-field__lbl,
body.page-order-detail.page-so-create.page-v2-filter-shell.page-po-v2:not(.page-po-detail)
    .po-v2-header
    .po-v2-field__lbl,
body.page-order-detail.page-so-create.page-v2-filter-shell.page-po-v2:not(.page-po-detail)
    .po-v2-header__grid
    .po-v2-field__lbl,
body.page-order-detail.page-so-edit.page-v2-filter-shell.page-po-v2:not(.page-po-detail)
    .po-v2-header
    .po-v2-field__lbl,
body.page-order-detail.page-so-edit.page-v2-filter-shell.page-po-v2:not(.page-po-detail)
    .po-v2-header__grid
    .po-v2-field__lbl {
    color: var(--estimate-fg);
}

/* ログイン・マイ設定 */
.container--auth {
    max-width: 28rem;
    margin-top: 2rem;
}
.auth-card {
    padding: 1.25rem 1.35rem;
}
.auth-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.site-header__auth {
    display: flex;
    align-items: center;
    font-size: 0.8125rem;
    margin-left: auto;
}
.site-header__auth-trigger {
    display: inline-flex;
    align-items: center;
    max-width: 12rem;
    padding: 0.28rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted, #64748b);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.site-header__auth-trigger:hover,
.site-header__auth-trigger:focus-visible {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.06);
    border-color: var(--border);
    outline: none;
}
.site-header__auth-trigger[aria-expanded="true"] {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.1);
    border-color: rgba(37, 99, 235, 0.25);
}
.site-header__logout-form {
    display: inline;
    margin: 0;
}
.site-header__quick-more-menu .site-header__logout-form {
    display: block;
    margin: 0;
}

/* 得意先マスタ: 顧客担当者 */
.customer-contacts { margin-top: 0.75rem; }
.customer-contacts__help { margin: 0 0 0.5rem; font-size: 0.85rem; }
.customer-contacts__table { width: 100%; max-width: 46rem; margin-bottom: 0.5rem; }
.customer-contacts__table td { padding: 0.25rem 0.4rem; }
.customer-contacts__table input[type="text"],
.customer-contacts__table input[type="email"] { width: 100%; }
.customer-contacts__report { white-space: nowrap; width: 7rem; }
.customer-contacts__remove { width: 2.5rem; text-align: center; }

/* 見積: 顧客担当・結果 */
.estimate-contact-field { display: flex; align-items: center; gap: 0.5rem; width: 100%; }
.estimate-contact-select { flex: 1 1 auto; min-width: 0; }
.estimate-contact-field__link { font-size: 0.8rem; white-space: nowrap; }
.estimate-result-chip {
    display: inline-block;
    padding: 0.05rem 0.5rem;
    border-radius: 999px;
    font-size: 0.8rem;
    line-height: 1.5;
    background: #eef1f5;
    color: #334155;
    text-decoration: none;
    white-space: nowrap;
}
.estimate-result-chip--won { background: #e3f4e8; color: #17663a; }
.estimate-result-chip--lost_end { background: #f1f1f1; color: #555; }
.estimate-result-chip--lost_competitor { background: #fdecec; color: #a12a2a; }
.estimate-result-chip--due { background: #fff4dc; color: #8a5a00; }
.estimate-result-list-price { font-size: 0.8rem; color: #475569; white-space: nowrap; }
.estimate-result-card { margin-top: 0.35rem; padding: 0.3rem 0.7rem; flex: 0 0 auto; }
body.page-v2-filter-shell.page-estimate-detail .estimate-result-card.card {
    margin-top: 0.35rem;
    padding: 0.3rem 0.65rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    background: #fff;
}
body.page-estimate-detail .po-v2-screen-wrap:has(.estimate-result-card[open]) .po-v2-lines--editor { min-height: 8rem; }
.estimate-result-card__summary { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; list-style: revert; }
.estimate-result-card__title { font-weight: 600; }
.estimate-result-card__price { font-weight: 600; }
.estimate-result-card__body { display: grid; gap: 0.25rem; margin-top: 0.35rem; }
.estimate-result-card__linked { margin: 0; }
.estimate-result-card__candidates { display: grid; gap: 0.3rem; }
.estimate-result-cand { display: flex; align-items: center; gap: 0.6rem; font-size: 0.9rem; }
.estimate-result-cand--strong { font-weight: 600; }
.estimate-result-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.estimate-result-card [data-result-panel][hidden] { display: none; }
.estimate-result-row__lbl { width: 5rem; color: #475569; font-size: 0.85rem; }
.estimate-result-row__val { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.estimate-result-opt { display: inline-flex; align-items: center; gap: 0.2rem; white-space: nowrap; }
.estimate-result-in { width: 8rem; text-align: right; }
.estimate-result-note { width: 28rem; max-width: 100%; }
.estimate-result-unit { width: auto; min-width: 40rem; }
.estimate-result-unit__name { max-width: 22rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.estimate-result-diff { font-variant-numeric: tabular-nums; white-space: nowrap; }
.estimate-result-diff--under { color: #a12a2a; }
.estimate-result-diff--over { color: #17663a; }
.estimate-result-card__hint { margin: 0; font-size: 0.8rem; }

/* 見積明細: 前回受注単価（列が増えるぶん コード・品名・仕入先・合計を少し詰める） */
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--last-order th.order-line-th-last-order { width: 7%; }
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--last-order th.order-line-th-code { width: 9%; }
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--last-order th.order-line-th-name { width: 19%; }
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--last-order th.order-line-th-supplier { width: 11%; }
body.page-estimate-detail.page-po-v2 .po-v2-lines--editor .order-manual-lines-table--last-order th.order-line-th-subtotal { width: 6%; }
.order-line-td-last-order { text-align: right; white-space: nowrap; vertical-align: middle; overflow: hidden; }
.estimate-last-order-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 100%;
    padding: 0.05rem 0.3rem;
    border: 1px solid #c7d7f0;
    border-radius: 4px;
    background: #f3f7fd;
    color: #1e3a8a;
    font: inherit;
    line-height: 1.15;
    cursor: pointer;
}
.estimate-last-order-btn[hidden],
.estimate-last-order-empty[hidden] { display: none; }
.estimate-last-order-btn:hover { background: #e3edfb; }
.estimate-last-order-btn__val { font-variant-numeric: tabular-nums; font-weight: 600; }
.estimate-last-order-btn__why { font-size: 0.7rem; color: #475569; }
.estimate-last-order-btn--same { border-color: transparent; background: transparent; color: #475569; }
.estimate-last-order-btn--same .estimate-last-order-btn__val { font-weight: 400; }
.estimate-last-order-btn--other { border-style: dashed; background: #fafafa; color: #475569; }

/* 見積の報告依頼 */
.estimate-report-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.estimate-report-toolbar__send { display: flex; align-items: center; gap: 0.6rem; }
.estimate-report-mail { font-size: 0.8rem; }
.estimate-report-reason {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #fff4dc;
    color: #8a5a00;
}
.estimate-report-reason--order { background: #e3f4e8; color: #17663a; }
.estimate-report-order { margin-left: 0.4rem; font-size: 0.8rem; }
.est-report-col-sent,
.est-report-col-rate { width: 4rem; text-align: right; white-space: nowrap; }
.est-report-col-actions { white-space: nowrap; text-align: right; }
.est-report-col-contact { min-width: 14rem; }
.estimate-report-compose { max-width: 56rem; display: grid; gap: 0.75rem; }
.estimate-report-compose__tpl { display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.estimate-report-compose__form { display: grid; gap: 0.5rem; }
.estimate-report-compose__row { display: grid; grid-template-columns: 4rem 1fr; align-items: center; gap: 0.6rem; }
.estimate-report-compose__row--body { align-items: start; }
.estimate-report-compose__row textarea { width: 100%; font-family: inherit; line-height: 1.6; }
.si-invoice-drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.5rem 1rem;
    border: 1px dashed #b7c0c8;
    border-radius: 8px;
    background: #f7f8f9;
    cursor: pointer;
    text-align: center;
}
.si-invoice-drop--over { border-color: #3d6b8c; background: #eef5f8; }
.si-invoice-drop__input { max-width: 100%; }
.si-invoice-drop__hint { font-weight: 600; }
.si-recon-filter { display: flex; gap: 0.35rem; }
.si-recon-filter__btn.is-active { background: #3d6b8c; border-color: #3d6b8c; color: #fff; }
.si-recon-table { table-layout: fixed; width: 100%; min-width: 42rem; }
.si-recon-table th,
.si-recon-table td { padding: 0.3rem 0.35rem; vertical-align: middle; font-size: 0.8125rem; }
.si-recon-table .si-recon-col-no { width: 2rem; text-align: right; font-variant-numeric: tabular-nums; }
.si-recon-table .si-recon-col-date { width: 2.75rem; }
.si-recon-table .si-recon-col-po { width: 4rem; }
.si-recon-table .si-recon-col-item { overflow: hidden; }
.si-recon-table .si-recon-col-num { width: 5.25rem; text-align: right; font-variant-numeric: tabular-nums; }
.si-recon-table .si-recon-col-num:nth-child(5) { width: 3.5rem; }
.si-recon-table .si-recon-col-gr { width: 4.5rem; }
.si-recon-table .si-recon-col-judge { width: 4.75rem; white-space: nowrap; }
.si-recon-table .si-recon-col-act { width: 6rem; text-align: right; }
.si-recon-col-act .btn { font-size: 0.72rem; padding: 0.15rem 0.4rem; white-space: nowrap; }
.si-recon-col-act select { font-size: 0.72rem; }
.si-recon-code { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-recon-name { font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-recon-our { font-size: 0.75rem; }
.si-recon-row--check td { background: #fff6f5; }
.si-recon-diff { color: #b42318; font-weight: 600; }
.si-recon-gr-only { color: #6b7280; }
.si-recon-judge { display: inline-block; padding: 0.05rem 0.45rem; border-radius: 4px; font-size: 0.8125rem; font-weight: 600; }
.si-recon-judge--ok { background: #e3f4e8; color: #17663a; }
.si-recon-judge--ng { background: #fde8e6; color: #b42318; }
.si-recon-how { display: block; font-size: 0.72rem; color: #6b7280; }
.si-recon-col-act select { max-width: 100%; }
.si-recon-col-act form { flex-wrap: wrap; justify-content: flex-end; }

/*
 * 一覧共通: 注文管理と同型のセル枠 + 行の縦余白（やや広め）。
 * 明細の行入力表（order-manual-lines-table 等）は対象外。
 */
body.page-orders-list--compact-header .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet),
body.page-payment-list .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet),
body.page-customers-list main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet),
body.page-tabular-import-preview main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet),
body.page-order-management-list main.container--om-list .data-table.om-table--excel,
body.page-mail-intake-list main.container--mail-intake-list :is(.data-table, .om-table, .om-mail-intake-table) {
    border-collapse: collapse;
}

body.page-orders-list--compact-header .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) th,
body.page-payment-list .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) th,
body.page-customers-list main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) th,
body.page-tabular-import-preview main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) th,
body.page-order-management-list main.container--om-list .data-table.om-table--excel th,
body.page-mail-intake-list main.container--mail-intake-list :is(.data-table, .om-table, .om-mail-intake-table) th {
    background: #f1f5f9;
    color: var(--text, #1e293b);
    border: 1px solid #cbd5e1;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    line-height: 1.32;
}

body.page-orders-list--compact-header .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) td,
body.page-payment-list .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) td,
body.page-customers-list main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) td,
body.page-tabular-import-preview main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) td,
body.page-order-management-list main.container--om-list .data-table.om-table--excel td,
body.page-mail-intake-list main.container--mail-intake-list :is(.data-table, .om-table, .om-mail-intake-table) td {
    border: 1px solid #e2e8f0;
    background: #fff;
    padding-top: 0.36rem;
    padding-bottom: 0.36rem;
    line-height: 1.32;
}

body.page-orders-list--compact-header .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) tr:last-child td,
body.page-payment-list .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) tr:last-child td,
body.page-customers-list main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) tr:last-child td,
body.page-tabular-import-preview main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) tr:last-child td,
body.page-order-management-list main.container--om-list .data-table.om-table--excel tr:last-child td,
body.page-mail-intake-list main.container--mail-intake-list :is(.data-table, .om-table, .om-mail-intake-table) tr:last-child td {
    border-bottom: 1px solid #e2e8f0;
}

body.page-orders-list--compact-header .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) tbody tr:hover td,
body.page-payment-list .order-list-screen .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) tbody tr:hover td,
body.page-customers-list main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) tbody tr:hover td,
body.page-tabular-import-preview main .data-table:not(.order-manual-lines-table):not(.order-manual-lines-table--sheet) tbody tr:hover td,
body.page-order-management-list main.container--om-list .data-table.om-table--excel tbody tr:hover td,
body.page-mail-intake-list main.container--mail-intake-list :is(.data-table, .om-table, .om-mail-intake-table) tbody tr:hover td {
    background: #f0f4ff;
}
