body {
    font-family: Arial, sans-serif;
    margin: 20px;
}

body.input-page {
    background-color: #fbe9e7; /* データ入力画面の背景色 (薄いピンク) */
}

body.view-edit-page {
    background-color: #e0f7fa; /* データ参照・修正画面の背景色 (薄いブルー) */
}


.container {
    width: 80%;
    margin: 0 auto;
    text-align: center;
}

h1, h2 {
    color: #333;
}

form {
    margin: 20px 0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

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

.form-row .form-group {
    flex: 1;
    margin-right: 10px; /* フィールド間の余白 */
}

.form-row .form-group:last-child {
    margin-right: 0; /* 最後の要素の余白をなくす */
}

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

table th, table td {
    border: 1px solid #ddd;
    padding: 8px;
}

table th {
    background-color: #f2f2f2;
    text-align: center;
}

.btn {
    display: inline-block;
    margin: 10px 5px;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #007bff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #0056b3;
}

/* 印刷時にタイトルを変更 */
@media print {
    .print-title {
        visibility: hidden; /* 元のタイトルを非表示に */
        position: relative; /* 疑似要素を正常に表示するために relative を設定 */
    }
    .print-title::before {
        content: "作業日報"; /* 印刷時のタイトル */
        visibility: visible; /* 疑似要素を表示する */
        position: absolute; /* 元のタイトルと重ならないように */
        top: 0;
        left: 0;
        right: 0;
        text-align: center; /* 中央揃え */
        font-size: 20px; /* 必要に応じてサイズを調整 */
        margin-bottom: 10px; /* 下部余白を設定 */
        color: black; /* 必要に応じて色を変更 */
    }

    body {
        font-size: 12px; /* 印刷時の全体フォントサイズ */
        line-height: 1.4; /* 行間を調整して詰める */
        margin: 0;
        padding: 0;
    }

    .article-container { 
        /* border: 1px solid black; /* 全体を囲む枠線 */
        padding: 10px; /* 内側の余白 */
        margin-bottom: 10px; /* 下部の余白 */
     }

    /* 各記事のラベルと入力欄の間隔を調整 */
    /* .form-group { */
        /* border: 1px solid black; */
        /* margin-bottom: 10px; /* 各項目の間隔 */
     /* } */

    table {
        width: 100%; /* テーブルをページ全体に広げる */
        border-collapse: collapse; /* 枠線を統一 */
        /* table-layout: fixed; */ /* 列幅を固定 */
    }

    table th, table td {
        border: 1px solid #ddd;
        padding: 5px; /* セル内余白を最小化 */
        font-size: 10px; /* テーブル内フォントを小さく */
        word-wrap: break-word; /* 長い単語を折り返し */
        word-break: break-all; /* 必要に応じて全体を折り返す */
    }
   /* 生産品目のフォーム内要素をテキスト化 */
    .product-container input, 
    .product-container select {
        border: none; /* フォーム要素の枠線を非表示に */
        background: transparent; /* 背景色を透明に */
        font-size: inherit; /* テーブルと同じフォントサイズを継承 */
        padding: 0; /* 不要な余白を除去 */
    }

    /* A4サイズの横幅に収める */
    @page {
        size: A4;
        margin: 10mm; /* 用紙の余白設定 */
    }

    /* フォームの要素をテキスト化 */
    input, select {
        border: 1px solid #ddd;
        /*border: none; */
        /* background: none; */
        background: transparent; /* 背景色を透明にする */
        font-size: inherit;
        width: 100%; /* 入力要素をセル幅にフィット */
    }

    /* 不要な要素を非表示に */
    .btn, .no-print {
        display: none;
    }
}

