/* ============================================================
   体育まとめレポート v1.0.0
   指導用ダッシュボード（画面表示） + 個人票印刷（A4）
   ブランドカラー: 白ベース / 紺 #1e3a5f / 金 #d4af37
   ============================================================ */

.pe-summary-root {
    font-family: "BIZ UDGothic", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    color: #1e3a5f;
    line-height: 1.6;
    box-sizing: border-box;
    max-width: 980px;
    margin: 0 auto;
    padding: 16px;
}

.pe-summary-root *,
.pe-summary-root *::before,
.pe-summary-root *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.pe-summary-root button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

.pe-summary-root select,
.pe-summary-root input {
    font-family: inherit;
    font-size: 15px;
    color: #1e3a5f;
    border: 2px solid #d7dde6;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
}

/* ============ タブ ============ */
.pe-summary-tabbar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eef1f6;
}

.pe-summary-tab {
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 800;
    color: #6b7a8d;
    border-bottom: 3px solid transparent;
    transition: color 0.12s, border-color 0.12s;
}

.pe-summary-tab.active {
    color: #1e3a5f;
    border-bottom-color: #d4af37;
}

/* ============ パネル ============ */
.pe-summary-panel {
    display: none;
}

.pe-summary-panel.active {
    display: block;
}

/* ============ データなし表示 ============ */
.pe-summary-empty {
    display: none;
    background: #fff8e6;
    border: 2px solid #ecd68f;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    font-size: 14px;
}

.pe-summary-empty.active {
    display: block;
}

.pe-summary-hint {
    margin-top: 8px;
    color: #6b7a8d;
    font-size: 13px;
}

/* ============ 共通ボタン ============ */
.pe-summary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    padding: 11px 20px;
    transition: transform 0.12s ease, background 0.12s ease;
}

.pe-summary-btn:active {
    transform: scale(0.97);
}

.pe-summary-btn-primary {
    background: #1e3a5f;
    color: #fff;
    box-shadow: 0 3px 10px rgba(30, 58, 95, 0.25);
}

.pe-summary-btn-primary:hover {
    background: #27496f;
}

/* ============ クラス情報 ============ */
.pe-summary-classinfo {
    font-size: 14px;
    font-weight: 800;
    color: #6b7a8d;
    margin-bottom: 20px;
}

/* ============ セクション ============ */
.pe-summary-section {
    margin-bottom: 32px;
}

.pe-summary-section h2 {
    font-size: 17px;
    font-weight: 800;
    color: #1e3a5f;
    padding-left: 10px;
    border-left: 4px solid #d4af37;
    margin-bottom: 6px;
}

.pe-summary-note {
    font-size: 12px;
    color: #6b7a8d;
    margin-bottom: 12px;
}

.pe-summary-section-empty {
    color: #6b7a8d;
    font-size: 13px;
    padding: 10px 0;
}

/* ============ 種目別クラス平均（バー表示） ============ */
.pe-summary-stat-row {
    display: grid;
    grid-template-columns: 110px 1fr 160px;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #eef1f6;
}

.pe-summary-stat-label {
    font-size: 13px;
    font-weight: 800;
    color: #1e3a5f;
}

.pe-summary-stat-bar-track {
    position: relative;
    height: 16px;
    background: #eef1f6;
    border-radius: 8px;
    overflow: hidden;
}

.pe-summary-stat-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, #1e3a5f, #4a7098);
    border-radius: 8px;
}

.pe-summary-stat-nums {
    font-size: 12px;
    color: #6b7a8d;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

/* ============ 技別習得率 ============ */
.pe-summary-skill-group-title {
    font-size: 13px;
    font-weight: 800;
    color: #b8941f;
    margin: 14px 0 6px;
}

.pe-summary-skill-row {
    display: grid;
    grid-template-columns: 140px 1fr 70px;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid #eef1f6;
}

.pe-summary-skill-name {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
}

.pe-summary-skill-bar-track {
    position: relative;
    height: 14px;
    background: #eef1f6;
    border-radius: 7px;
    overflow: hidden;
}

.pe-summary-skill-bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: linear-gradient(90deg, #d4af37, #b8941f);
    border-radius: 7px;
}

.pe-summary-skill-pct {
    font-size: 12px;
    font-weight: 800;
    color: #6b7a8d;
    text-align: right;
}

/* ============ 入力状況テーブル ============ */
.pe-summary-table-scroll {
    overflow-x: auto;
    border: 2px solid #eef1f6;
    border-radius: 10px;
}

.pe-summary-completion-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}

.pe-summary-completion-table th {
    background: #1e3a5f;
    color: #fff;
    font-weight: 700;
    padding: 8px 10px;
    text-align: center;
    position: sticky;
    top: 0;
}

.pe-summary-completion-table th:first-child,
.pe-summary-completion-table td:first-child {
    text-align: left;
    position: sticky;
    left: 0;
    background: #fff;
}

.pe-summary-completion-table th:first-child {
    background: #1e3a5f;
    left: 0;
    z-index: 1;
}

.pe-summary-completion-table td {
    padding: 6px 10px;
    text-align: center;
    border-bottom: 1px solid #eef1f6;
}

.pe-summary-completion-table tr:nth-child(even) td {
    background: #f8fafc;
}

.pe-summary-completion-table tr:nth-child(even) td:first-child {
    background: #f8fafc;
}

.pe-summary-mark-done {
    color: #1e3a5f;
    font-weight: 800;
}

.pe-summary-mark-partial {
    color: #b8941f;
    font-weight: 800;
}

.pe-summary-mark-none {
    color: #d7dde6;
}

/* ============ 個人票印刷: コントロール ============ */
.pe-summary-print-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px;
    background: #f4f6f9;
    border-radius: 12px;
}

.pe-summary-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pe-summary-field label {
    font-size: 12px;
    font-weight: 700;
    color: #6b7a8d;
}

.pe-summary-checkbox-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
    cursor: pointer;
}

.pe-summary-checkbox-row input {
    width: 17px;
    height: 17px;
    accent-color: #1e3a5f;
}

/* ============ 個人票（印刷対象） ============ */
.pe-summary-report-sheet {
    background: #fff;
    border: 2px solid #eef1f6;
    border-radius: 14px;
    padding: 28px;
    max-width: 720px;
    margin: 0 auto;
}

.pe-summary-report-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 3px solid #d4af37;
    padding-bottom: 12px;
    margin-bottom: 20px;
}

.pe-summary-report-title {
    font-size: 20px;
    font-weight: 800;
    color: #1e3a5f;
}

.pe-summary-report-meta {
    font-size: 13px;
    font-weight: 700;
    color: #6b7a8d;
    text-align: right;
}

.pe-summary-report-section-title {
    font-size: 14px;
    font-weight: 800;
    color: #1e3a5f;
    background: #f4f6f9;
    padding: 6px 10px;
    border-radius: 6px;
    margin: 18px 0 10px;
}

.pe-summary-report-event {
    margin-bottom: 16px;
}

.pe-summary-report-event-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    font-weight: 800;
    color: #1e3a5f;
    margin-bottom: 4px;
}

.pe-summary-report-event-best {
    color: #b8941f;
}

.pe-summary-chart-svg {
    width: 100%;
    height: auto;
    display: block;
}

.pe-summary-report-empty {
    color: #6b7a8d;
    font-size: 13px;
    padding: 6px 0;
}

.pe-summary-gym-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: 10px;
}

.pe-summary-gym-table th,
.pe-summary-gym-table td {
    border: 1px solid #eef1f6;
    padding: 5px 8px;
    text-align: left;
}

.pe-summary-gym-table th {
    background: #f4f6f9;
    font-weight: 700;
    color: #1e3a5f;
}

.pe-summary-report-footer {
    margin-top: 22px;
    padding-top: 10px;
    border-top: 1px solid #eef1f6;
    font-size: 11px;
    color: #6b7a8d;
    text-align: right;
}

/* ============ 印刷用 ============ */
@media print {
    .no-print {
        display: none !important;
    }

    .pe-summary-root {
        max-width: none;
        padding: 0;
    }

    .pe-summary-panel {
        display: none !important;
    }

    .pe-summary-panel#peSummaryPrint {
        display: block !important;
    }

    .pe-summary-report-sheet {
        border: none;
        border-radius: 0;
        max-width: none;
        padding: 0;
    }

    @page {
        size: A4;
        margin: 16mm;
    }
}

/* ============ レスポンシブ ============ */
@media (max-width: 600px) {
    .pe-summary-stat-row,
    .pe-summary-skill-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .pe-summary-stat-nums,
    .pe-summary-skill-pct {
        text-align: left;
    }

    .pe-summary-print-controls {
        flex-direction: column;
        align-items: stretch;
    }
}
