@charset "UTF-8";

/* =========================================
   共通ベーススタイル (画面用)
========================================= */
body {
    font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
    background-color: #f4f7f6;
    color: #2d3748;
    margin: 0;
    padding: 20px;
    line-height: 1.5;
}

h1 {
    color: #1a365d;
    border-bottom: 3px solid #3182ce;
    padding-bottom: 10px;
    margin-top: 0;
    font-size: 1.6em;
}

/* --- 共通ヘッダー入力欄 --- */
.global-header-inputs {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.global-header-inputs div {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 150px;
}

.global-header-inputs label {
    font-size: 0.85em;
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 4px;
}

.global-header-inputs input,
.global-header-inputs select {
    padding: 6px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.95em;
    background-color: #fff;
}

/* --- 共通ボタンデザイン --- */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
    font-size: 0.95em;
}
.btn:hover { opacity: 0.8; }
.btn:disabled { background: #a0aec0 !important; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-primary { background: #3182ce; color: #fff; }
.btn-success { background: #38a169; color: #fff; }
.btn-print { background: #2d3748; color: #fff; }

/* =========================================
   共通印刷スタイル (@media print)
========================================= */
.print-only { display: none; }

@media print {
    /* 画面操作用のUIはすべて隠す */
    .no-print, .global-header-inputs {
        display: none !important;
    }

    body {
        background: #fff;
        padding: 0;
        margin: 0;
        font-size: 9pt;
    }

    /* 印刷用共通ヘッダーを表示 */
    .print-only {
        display: block;
    }

    #global-print-header {
        border-bottom: 2px solid #000;
        padding-bottom: 8px;
        margin-bottom: 15px;
        page-break-inside: avoid;
    }

    .print-header-title {
        font-size: 14pt;
        font-weight: bold;
        text-align: center;
        margin-bottom: 10px;
    }

    .print-header-info {
        display: flex;
        justify-content: space-between;
        font-size: 9pt;
        align-items: flex-end;
    }

    .phi-row {
        display: flex;
        gap: 15px;
        align-items: baseline;
    }

    .phi-lbl {
        font-weight: bold;
        color: #555;
    }

    .phi-val {
        border-bottom: 1px dotted #ccc;
        min-width: 120px;
        display: inline-block;
        padding-bottom: 2px;
    }

    @page {
        size: A4 portrait;
        margin: 15mm;
    }
}