/* 請求書管理画面専用スタイル */

/* 請求書管理コンテナ */
.invoice-management {
    padding: 32px;
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ページヘッダー */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ビュー切り替えボタン */
.view-toggle {
    display: flex;
    background-color: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
}

.view-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-btn.active {
    background-color: white;
    color: #3b82f6;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.view-btn:hover:not(.active) {
    color: #374151;
}

.add-invoice-btn {
    background-color: #3b82f6;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.add-invoice-btn:hover {
    background-color: #2563eb;
}

/* コントロールセクション */
.controls-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    display: flex;
    gap: 16px;
    align-items: center;
}

.invoice-search {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.invoice-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
}

.invoice-search input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background-color: #f8fafc;
}

.invoice-search input:focus {
    outline: none;
    border-color: #3b82f6;
    background-color: white;
}

.filter-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    transition: all 0.2s;
}

.filter-btn:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

/* 統計カード */
.invoice-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stat-text h3 {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.stat-icon.blue {
    background-color: #3b82f6;
}

.stat-icon.gray {
    background-color: #6b7280;
}

.stat-icon.green {
    background-color: #10b981;
}

.stat-icon.red {
    background-color: #ef4444;
}

/* テーブルコンテナ */
.invoice-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

/* テーブル */
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
}

.invoice-table th:nth-child(1) {
    width: 120px;
}

/* 請求書番号 */
.invoice-table th:nth-child(2) {
    width: 160px;
}

/* 顧客名 */
.invoice-table th:nth-child(3) {
    width: 100px;
}

/* 発行日 */
.invoice-table th:nth-child(4) {
    width: 100px;
}

/* 支払期限 */
.invoice-table th:nth-child(5) {
    width: 180px;
}

/* 項目 */
.invoice-table th:nth-child(6) {
    width: 100px;
}

/* 支払方法 */
.invoice-table th:nth-child(7) {
    width: 100px;
}

/* 作成者 */
.invoice-table th:nth-child(8) {
    width: 100px;
}

/* 金額 */
.invoice-table th:nth-child(9) {
    width: 100px;
}

/* ステータス */
.invoice-table th:nth-child(10) {
    width: 60px;
}

/* 操作 */

.invoice-table thead {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.invoice-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s;
}

.invoice-table tbody tr:hover {
    background-color: #f8fafc;
}

.invoice-table tbody tr:last-child {
    border-bottom: none;
}

.invoice-table td {
    padding: 16px 12px;
    vertical-align: top;
}

.invoice-id {
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

/* 請求書IDリンクスタイル */
.invoice-id-link {
    color: #3b82f6;
    text-decoration: none;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s;
}

.invoice-id-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.customer-name {
    font-weight: 500;
    color: #1e293b;
}

.issue-date,
.due-date {
    color: #6b7280;
    font-size: 13px;
}

.items {
    color: #374151;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-method {
    color: #6b7280;
    font-size: 13px;
}

.creator {
    color: #374151;
    font-size: 13px;
}

.amount {
    font-weight: 600;
    color: #059669;
    text-align: right;
}

/* ステータスバッジ */
.status-badge {
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status-badge.issued {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.status-badge.paid {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.draft {
    background-color: #f3f4f6;
    color: #6b7280;
}

.status-badge.overdue {
    background-color: #fee2e2;
    color: #dc2626;
}

/* アクションボタン */
.actions {
    text-align: center;
}

.action-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 4px;
    transition: all 0.2s;
    position: relative;
}

.action-btn:hover {
    background-color: #f3f4f6;
    color: #374151;
}

/* ページネーション */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 20px 0;
}

.pagination-btn {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-info {
    color: #64748b;
    font-size: 14px;
}

/* モーダル拡張（大きなモーダル用） */
.modal.large {
    max-width: 800px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-group textarea {
    resize: vertical;
}

/* アクションメニュー */
.action-menu {
    position: fixed;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.2s;
    min-width: 170px;
}

.action-menu.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.action-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}

.action-menu-item:hover {
    background-color: #f8fafc;
}

.action-menu-item.delete {
    color: #dc2626;
}

.action-menu-item.delete:hover {
    background-color: #fef2f2;
}

/* モーダル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 24px;
    max-height: 400px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-secondary {
    background-color: white;
    color: #6b7280;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background-color: #f8fafc;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

/* プレビュー表示 */
.invoice-content {
    flex: 1;
}

.invoice-preview-container {
    display: flex;
    gap: 24px;
    height: calc(100vh - 400px);
    min-height: 600px;
}

.invoice-list-panel {
    width: 400px;
    flex-shrink: 0;
}

.invoice-simple-table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    height: 100%;
}

.invoice-simple-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.invoice-simple-table thead {
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.invoice-simple-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.invoice-simple-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background-color 0.2s;
}

.invoice-simple-table tbody tr:hover {
    background-color: #f8fafc;
}

.invoice-simple-table tbody tr.selected {
    background-color: #eff6ff;
    border-left: 3px solid #3b82f6;
}

.invoice-simple-table tbody tr:last-child {
    border-bottom: none;
}

.invoice-simple-table td {
    padding: 12px;
    vertical-align: middle;
}

.invoice-detail-panel {
    flex: 1;
    overflow-y: auto;
}

.invoice-preview {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    min-height: 100%;
}

.invoice-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.invoice-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
}

.invoice-number {
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}

.invoice-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.invoice-from h3,
.invoice-to h3 {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.company-info,
.customer-info {
    line-height: 1.6;
}

.company-name,
.customer-name {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.company-address,
.customer-address,
.company-contact,
.customer-contact {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 2px;
}

.invoice-dates {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

.date-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.date-value {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
}

.invoice-items {
    margin-bottom: 40px;
}

.invoice-items h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 16px;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.items-table thead {
    background-color: #f8fafc;
}

.items-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.items-table th:last-child {
    text-align: right;
}

.items-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #374151;
}

.items-table td:last-child {
    text-align: right;
    font-weight: 500;
}

.invoice-total {
    border-top: 2px solid #e2e8f0;
    padding-top: 16px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.total-label {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.total-value {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
}

/* レスポンシブデザイン */
@media (max-width: 1400px) {
    .invoice-table-container {
        overflow-x: auto;
    }

    .invoice-table {
        min-width: 1200px;
    }

    .invoice-table th,
    .invoice-table td {
        white-space: nowrap;
    }
}

@media (max-width: 1024px) {
    .invoice-stats {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

@media (max-width: 1024px) {
    .invoice-preview-container {
        flex-direction: column;
        height: auto;
    }

    .invoice-list-panel {
        width: 100%;
        height: 300px;
    }

    .invoice-parties {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .invoice-dates {
        flex-direction: column;
        gap: 16px;
    }

    .invoice-preview {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .controls-section {
        flex-direction: column;
        align-items: stretch;
    }

    .invoice-search {
        max-width: none;
    }

    .invoice-stats {
        grid-template-columns: 1fr 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .modal.large {
        width: 95%;
        margin: 16px;
    }

    .invoice-preview {
        padding: 16px;
    }

    .invoice-header h2 {
        font-size: 24px;
    }
}

/* A4サイズ請求書スタイル */
.invoice-preview {
    background: white;
    max-width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    padding: 20mm;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-family: 'Hiragino Kaku Gothic Pro', 'ヒラギノ角ゴ Pro W3', Meiryo, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* 請求書ヘッダー */
.header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 3px solid #3b82f6;
}

.company-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: bold;
    color: #3b82f6;
}

.company-logo i {
    font-size: 32px;
}

.invoice-title-section {
    text-align: right;
}

.invoice-title {
    font-size: 36px;
    font-weight: bold;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.invoice-number {
    font-size: 18px;
    font-weight: 600;
    color: #6b7280;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* 請求元・請求先 */
.invoice-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.invoice-parties h3 {
    font-size: 16px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.company-info,
.customer-info {
    font-size: 14px;
    line-height: 1.8;
}

.company-name,
.customer-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #1e293b;
}

.company-address,
.customer-address {
    margin-bottom: 12px;
    color: #4b5563;
}

.company-contact {
    margin-bottom: 12px;
}

.company-contact div {
    margin-bottom: 4px;
}

.company-registration {
    font-size: 12px;
    color: #6b7280;
    margin-top: 8px;
}

.company-registration div {
    margin-bottom: 2px;
}

/* 請求書詳細情報 */
.invoice-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    padding: 20px;
    background-color: #f8fafc;
    border-radius: 8px;
}

.invoice-dates .date-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.date-label {
    font-weight: 600;
    color: #374151;
}

.date-value {
    font-weight: 500;
    color: #1e293b;
}

.invoice-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.total-amount {
    background: #3b82f6;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: bold;
}

.summary-label {
    font-size: 16px;
}

.summary-value {
    font-size: 24px;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* 請求項目テーブル */
.invoice-items {
    margin-bottom: 40px;
}

.invoice-items h3 {
    font-size: 18px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3b82f6;
}

.items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    font-size: 13px;
}

.items-table th {
    background: #f1f5f9;
    padding: 12px 8px;
    border: 1px solid #d1d5db;
    font-weight: 600;
    color: #374151;
    text-align: center;
}

.items-table td {
    padding: 12px 8px;
    border: 1px solid #d1d5db;
    text-align: center;
    vertical-align: top;
}

.item-no {
    width: 8%;
}

.item-description {
    width: 35%;
    text-align: left;
}

.item-period {
    width: 20%;
}

.item-quantity {
    width: 8%;
}

.item-unit {
    width: 8%;
}

.item-price {
    width: 12%;
    text-align: right;
}

.item-amount {
    width: 12%;
    text-align: right;
}

.item-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
}

.item-detail {
    font-size: 12px;
    color: #6b7280;
}

.empty-row {
    height: 40px;
}

.empty-row td {
    background-color: #fafafa;
}

/* 合計セクション */
.invoice-totals {
    margin-bottom: 40px;
}

.totals-section {
    width: 50%;
    margin-left: auto;
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.total-row.subtotal {
    background: #f8fafc;
}

.total-row.tax {
    background: #f8fafc;
}

.total-row.grand-total {
    background: #3b82f6;
    color: white;
    font-weight: bold;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    margin-top: 8px;
}

.total-label {
    font-weight: 600;
}

.total-value {
    font-family: 'Monaco', 'Menlo', monospace;
    font-weight: 600;
}

/* 支払い情報 */
.payment-info {
    margin-bottom: 40px;
}

.payment-info h3 {
    font-size: 16px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.payment-details {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.method-title {
    font-size: 16px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 12px;
}

.bank-info {
    margin-bottom: 16px;
}

.bank-row {
    display: flex;
    margin-bottom: 8px;
}

.bank-label {
    width: 100px;
    font-weight: 600;
    color: #374151;
}

.bank-value {
    color: #1e293b;
    font-family: 'Monaco', 'Menlo', monospace;
}

.payment-notes {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d1d5db;
}

.note-item {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
}

/* 備考欄 */
.invoice-notes {
    margin-bottom: 40px;
}

.invoice-notes h3 {
    font-size: 16px;
    font-weight: bold;
    color: #1e293b;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
}

.notes-content {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.8;
}

.notes-content p {
    margin-bottom: 12px;
    color: #374151;
}

.notes-list {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #d1d5db;
}

.notes-list div {
    margin-bottom: 8px;
    color: #4b5563;
    font-size: 13px;
}

/* フッター */
.invoice-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid #3b82f6;
}

.footer-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6b7280;
}

.page-number {
    font-family: 'Monaco', 'Menlo', monospace;
}

/* 印刷用スタイル */
@media print {
    .invoice-preview {
        box-shadow: none;
        margin: 0;
        padding: 15mm;
        max-width: none;
        min-height: 0;
    }

    .page-break {
        page-break-before: always;
    }
}