/* 標準LIST — 請求書一覧と同じコンパクト表（白地・縞・積み上げセル）
 *
 * 使い方（見本: b_invoice_unit/invoices.php / b_template_unit/list.php）:
 *   <div class="data-list-section compact-list">
 *     <p class="list-scope-count">一覧 (N件)</p>
 *     <div class="desktop-table">
 *       <div class="table-scroll-wrapper">
 *         <table class="data-table compact-list-table">
 */
.data-list-section.compact-list {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 24px;
}
.data-list-section.compact-list > .list-scope-count,
.data-list-section.compact-list > h3 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}
.desktop-table:has(.compact-list-table) .table-scroll-wrapper,
.desktop-table:has(.invoice-list-table) .table-scroll-wrapper {
    overflow-x: hidden;
    max-width: 100%;
}
.unit_main table.compact-list-table,
.unit_main table.invoice-list-table {
    table-layout: fixed;
    width: 100%;
    max-width: 100%;
    background: #fff;
    margin: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-size: 13px;
}
.compact-list-table tbody tr td,
.invoice-list-table tbody tr td {
    background-color: #fff;
}
.compact-list-table tbody tr:nth-child(even) td,
.invoice-list-table tbody tr:nth-child(even) td {
    background-color: #f3f4f6;
}
.compact-list-table tbody tr:hover td,
.invoice-list-table tbody tr:hover td {
    background-color: #eef0f3;
}
.compact-list-table th,
.compact-list-table td,
.invoice-list-table th,
.invoice-list-table td {
    padding: 8px 6px;
}
.compact-list-table th.checkbox-col,
.compact-list-table td.checkbox-col,
.invoice-list-table th.checkbox-col,
.invoice-list-table td.checkbox-col {
    width: 28px;
    min-width: 28px;
    max-width: 28px;
    text-align: center;
    padding-left: 4px;
    padding-right: 4px;
    overflow: hidden;
}
.compact-list-table .checkbox-col input[type="checkbox"],
.invoice-list-table .checkbox-col input[type="checkbox"] {
    width: 13px;
    height: 13px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    cursor: pointer;
}
.compact-list-table .list-col-id { width: 48px; }
.compact-list-table .list-col-day { width: 88px; }
.compact-list-table .list-col-date { width: 78px; }
.compact-list-table .list-col-status { width: 90px; }
.compact-list-table .list-col-actions {
    width: 100px;
    overflow: visible;
}
.compact-list-table th.list-col-actions,
.compact-list-table td.list-col-actions {
    padding-left: 8px;
    padding-right: 12px;
}

.data-table td.list-ellipsis-col,
.data-table th.list-ellipsis-col {
    overflow: hidden;
}
.list-ellipsis-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.data-table td.list-nowrap-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-title-stack-col {
    overflow: hidden;
}
.compact-list-table th.list-title-stack-col {
    white-space: normal;
}
.compact-list-table th.list-title-stack-col a {
    display: block;
    font-size: 11px;
    line-height: 1.35;
}
.list-title-stack {
    min-width: 0;
}
.list-title-stack-sub {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}
.list-title-stack-main {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    line-height: 1.35;
}

.data-table th.list-amount-col,
.data-table td.list-amount-col,
.list-amount-col {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.list-amount-col-total {
    font-weight: 700;
}
.list-amount-stack-col {
    width: 118px;
    vertical-align: middle;
}
.compact-list-table th.list-amount-stack-col {
    white-space: normal;
}
.compact-list-table th.list-amount-stack-col a {
    display: block;
    font-size: 11px;
    line-height: 1.35;
}
.list-amount-stack {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
    font-size: 12px;
    white-space: nowrap;
}
.list-amount-stack-line {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}
.list-amount-stack-line span:first-child {
    color: #888;
    font-size: 10px;
    font-weight: 600;
}
.list-amount-stack-line.is-total {
    font-weight: 700;
    font-size: 13px;
}

/* 請求一覧の既存クラス名も同じ見た目にする */
.invoice-list-table .invoice-col-id { width: 48px; }
.invoice-list-table .invoice-col-day { width: 52px; }
.invoice-list-table .invoice-col-date { width: 78px; }
.invoice-list-table .invoice-col-status { width: 90px; }
.invoice-list-table .invoice-col-actions {
    width: 100px;
    overflow: visible;
}
.invoice-list-table th.invoice-col-actions,
.invoice-list-table td.invoice-col-actions {
    padding-left: 8px;
    padding-right: 12px;
}
.data-table td.invoice-ellipsis-col,
.data-table th.invoice-ellipsis-col {
    overflow: hidden;
}
.invoice-ellipsis-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}
.data-table td.invoice-nowrap-col {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.invoice-title-stack-col { overflow: hidden; }
.compact-list-table th.list-title-stack-col,
.invoice-list-table th.invoice-title-stack-col {
    white-space: normal;
}
.compact-list-table th.list-title-stack-col a,
.invoice-list-table th.invoice-title-stack-col a {
    display: block;
    font-size: 11px;
    line-height: 1.35;
}
.invoice-title-stack { min-width: 0; }
.invoice-title-stack-number {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: #666;
    line-height: 1.3;
}
.invoice-title-stack-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
    line-height: 1.35;
}
.data-table th.invoice-amount-col,
.data-table td.invoice-amount-col,
.invoice-amount-col {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.invoice-amount-col-total { font-weight: 700; }
.invoice-amount-stack-col {
    width: 118px;
    vertical-align: middle;
}
.compact-list-table th.list-amount-stack-col,
.invoice-list-table th.invoice-amount-stack-col {
    white-space: normal;
}
.compact-list-table th.list-amount-stack-col a,
.invoice-list-table th.invoice-amount-stack-col a {
    display: block;
    font-size: 11px;
    line-height: 1.35;
}
.invoice-amount-stack {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-variant-numeric: tabular-nums;
    line-height: 1.35;
    font-size: 12px;
    white-space: nowrap;
}
.invoice-amount-stack-line {
    display: flex;
    justify-content: space-between;
    gap: 6px;
}
.invoice-amount-stack-line span:first-child {
    color: #888;
    font-size: 10px;
    font-weight: 600;
}
.invoice-amount-stack-line.is-total {
    font-weight: 700;
    font-size: 13px;
}
