/* ===== 研修報告ビューア ===== */
#tr-viewer-wrap {
    max-width: 1000px;
    margin: 0 auto;
    font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
    font-size: 14px;
    color: #333;
    padding: 0 16px;
    box-sizing: border-box;
}
.tr-title { font-size:1.4em; border-left:5px solid #2c7be5; padding-left:12px; margin-bottom:20px; }

/* メッセージ */
.tr-acc-msg { padding:10px 14px; border-radius:6px; margin-bottom:14px; font-weight:bold; font-size:.9em; }
.tr-acc-msg.success { background:#d4edda; color:#155724; border:1px solid #c3e6cb; }
.tr-acc-msg.error   { background:#f8d7da; color:#721c24; border:1px solid #f5c6cb; }
.tr-acc-error { color:#dc3545; padding:12px; }

/* フィルター */
.tr-filter-form { background:#f8f9fa; border:1px solid #dee2e6; border-radius:8px; padding:16px; margin-bottom:20px; }
.tr-filter-row { display:flex; flex-wrap:wrap; gap:10px; align-items:flex-end; }
.tr-filter-item { display:flex; flex-direction:column; gap:4px; }
.tr-filter-item label { font-size:.85em; font-weight:bold; color:#555; }
.tr-filter-item input,
.tr-filter-item select { padding:8px 10px; border:1px solid #ced4da; border-radius:5px; font-size:.9em; min-width:130px; -webkit-appearance:none; background:#fff; box-sizing:border-box; }
.tr-filter-btn { flex-direction:row; gap:8px; align-items:center; }
.tr-btn-search { padding:9px 18px; background:#2c7be5; color:#fff; border:none; border-radius:5px; cursor:pointer; font-size:.9em; font-weight:bold; white-space:nowrap; }
.tr-btn-search:hover { background:#1a65cc; }
.tr-btn-reset { padding:9px 14px; background:#6c757d; color:#fff; border-radius:5px; text-decoration:none; font-size:.9em; white-space:nowrap; }
.tr-btn-reset:hover { background:#5a6268; color:#fff; }

.tr-result-count { font-size:.9em; color:#666; margin-bottom:10px; }
.tr-no-result { color:#888; padding:20px; text-align:center; }

/* 一覧テーブル */
.tr-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.tr-table { width:100%; border-collapse:collapse; font-size:.9em; min-width:540px; }
.tr-table thead th { background:#2c7be5; color:#fff; padding:10px 12px; text-align:left; white-space:nowrap; }
.tr-table td { padding:9px 12px; border-bottom:1px solid #dee2e6; vertical-align:middle; }
.tr-list-row:hover td { background:#f0f4ff; }
.tr-td-btn { text-align:center; width:64px; padding:6px 8px !important; }
.tr-td-location { font-weight:bold; color:#2c7be5; white-space:nowrap; }
.tr-td-name { font-weight:bold; white-space:nowrap; }

/* 詳細ボタン */
.tr-btn-detail {
    display:inline-block;
    padding:6px 10px;
    background:#17a2b8;
    color:#fff;
    border:none;
    border-radius:4px;
    font-size:.82em;
    cursor:pointer;
    white-space:nowrap;
    font-weight:bold;
    transition:background .15s;
    -webkit-tap-highlight-color:transparent;
}
.tr-btn-detail:hover { background:#138496; }
.tr-btn-detail.active { background:#e67e22; }

/* プログレスバー */
.tr-progress-wrap { display:flex; align-items:center; gap:8px; }
.tr-progress-bar { width:70px; height:10px; background:#dee2e6; border-radius:5px; overflow:hidden; flex-shrink:0; }
.tr-progress-fill { height:100%; background:#28a745; border-radius:5px; transition:width .3s; }
.tr-progress-label { font-size:.82em; color:#555; white-space:nowrap; }

/* アコーディオン行 */
.tr-accordion-row td { padding:0 !important; border-bottom:2px solid #2c7be5; }
.tr-accordion-td { background:#f8faff; }
.tr-accordion-inner { padding:20px; }
.tr-accordion-loading { color:#888; padding:12px; text-align:center; }

/* アコーディオン内 */
.tr-acc-loaded { }

.tr-acc-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:18px;
    flex-wrap:wrap;
    gap:10px;
}
.tr-acc-title { font-size:1.1em; font-weight:bold; color:#2c7be5; }

.tr-acc-btn-edit {
    padding:7px 16px;
    background:#f0a500;
    color:#fff;
    border:none;
    border-radius:5px;
    cursor:pointer;
    font-size:.88em;
    font-weight:bold;
    white-space:nowrap;
    -webkit-tap-highlight-color:transparent;
}
.tr-acc-btn-edit:hover { background:#d4920a; }

.tr-acc-section {
    background:#fff;
    border:1px solid #dee2e6;
    border-radius:8px;
    padding:16px;
    margin-bottom:16px;
}
.tr-acc-section-title {
    font-size:.95em;
    font-weight:bold;
    color:#444;
    border-bottom:2px solid #e9ecef;
    padding-bottom:8px;
    margin-bottom:14px;
}

/* 基本情報グリッド：PCは2列 */
.tr-acc-grid {
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:10px 20px;
}
.tr-acc-field { }
.tr-acc-field-label { font-size:.83em; font-weight:bold; color:#666; margin-bottom:4px; }
.tr-acc-field-val { font-size:.93em; }

/* 入力欄 */
.tr-input {
    width:100%;
    padding:8px 10px;
    border:1px solid #ced4da;
    border-radius:5px;
    font-size:.9em;
    box-sizing:border-box;
    -webkit-appearance:none;
}
.tr-input:focus { outline:none; border-color:#2c7be5; box-shadow:0 0 0 3px rgba(44,123,229,.15); }
.tr-textarea {
    width:100%;
    padding:8px 10px;
    border:1px solid #ced4da;
    border-radius:5px;
    font-size:.9em;
    resize:vertical;
    box-sizing:border-box;
    font-family:inherit;
    -webkit-appearance:none;
}
.tr-textarea:focus { outline:none; border-color:#2c7be5; }
.tr-required { display:inline-block; background:#dc3545; color:#fff; font-size:.72em; padding:1px 5px; border-radius:3px; margin-left:4px; }

/* プログレス（詳細） */
.tr-acc-progress { display:flex; align-items:center; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.tr-progress-bar-lg { width:200px; height:14px; background:#dee2e6; border-radius:7px; overflow:hidden; flex-shrink:0; }
.tr-progress-label-lg { font-size:.92em; font-weight:bold; }
.tr-edit-hint { color:#e67e22; font-size:.85em; margin-bottom:10px; }

/* チェックリスト */
.tr-check-table { width:100%; border-collapse:collapse; font-size:.88em; }
.tr-check-table th { background:#f0f4ff; padding:7px 10px; border:1px solid #dee2e6; text-align:left; }
.tr-check-table td { padding:7px 10px; border:1px solid #dee2e6; vertical-align:middle; }
.tr-check-td-cb { text-align:center; width:44px; }
.tr-row-done td { background:#f6fff8; }
.tr-row-pending td { color:#999; }
.tr-edit-checkbox { width:20px; height:20px; cursor:pointer; accent-color:#2c7be5; }

/* 所見 */
.tr-acc-note { margin-bottom:12px; }
.tr-acc-note-label { font-size:.83em; font-weight:bold; color:#666; margin-bottom:4px; }
.tr-acc-note-val { font-size:.92em; }

/* 編集アクション */
.tr-acc-edit-actions {
    display:flex;
    gap:12px;
    justify-content:center;
    margin-top:20px;
    padding-top:16px;
    border-top:1px solid #dee2e6;
    flex-wrap:wrap;
}
.tr-acc-btn-save {
    padding:12px 40px;
    background:#2c7be5;
    color:#fff;
    border:none;
    border-radius:6px;
    font-size:1em;
    font-weight:bold;
    cursor:pointer;
    transition:background .2s;
    -webkit-tap-highlight-color:transparent;
}
.tr-acc-btn-save:hover { background:#1a65cc; }
.tr-acc-btn-save:disabled { background:#aaa; cursor:not-allowed; }
.tr-acc-btn-cancel {
    padding:12px 28px;
    background:#6c757d;
    color:#fff;
    border:none;
    border-radius:6px;
    font-size:1em;
    font-weight:bold;
    cursor:pointer;
    -webkit-tap-highlight-color:transparent;
}
.tr-acc-btn-cancel:hover { background:#5a6268; }

/* ===== スマホ ===== */
@media (max-width:640px) {
    #tr-viewer-wrap { padding:0 10px; font-size:13px; }
    .tr-filter-row { flex-direction:column; }
    .tr-filter-item { width:100%; }
    .tr-filter-item input,
    .tr-filter-item select { min-width:100%; font-size:16px; }
    .tr-filter-btn { flex-direction:row; width:100%; }
    .tr-btn-search, .tr-btn-reset { flex:1; text-align:center; }

    .tr-acc-grid { grid-template-columns:1fr; }
    .tr-accordion-inner { padding:14px 10px; }

    .tr-acc-btn-save,
    .tr-acc-btn-cancel { flex:1; padding:13px 0; text-align:center; }

    .tr-check-table th:last-child,
    .tr-check-table td:last-child { display:none; }

    .tr-input, .tr-textarea { font-size:16px; }
}
