/* V3.1 — G2 customer acceptance feedback (G2-ISSUE-001〜042). Loaded last; presentation only. */

/* G2-ISSUE-001: FocusOnNavigate moves programmatic focus to the page h1 (tabindex=-1) for
   screen readers. The heading is not an interactive control, so it does not need a focus ring.
   Interactive controls keep their :focus-visible styles. */
h1[tabindex="-1"]:focus,
h1[tabindex="-1"]:focus-visible {
    outline: none;
    box-shadow: none;
}

/* G2-ISSUE-002: the production login form had no inner padding and touched the card border. */
.demo-login-card .production-login-form {
    display: grid;
    gap: 17px;
    padding: 26px 30px 24px;
}

.demo-login-card .production-login-form .demo-login-button,
.demo-login-card .demo-login-form .demo-login-button {
    width: 100%;
}

.demo-login-card > .demo-login-divider {
    margin: 4px 30px -8px;
}

@media (max-width: 700px) {
    .demo-login-card .production-login-form {
        gap: 15px;
        padding: 22px 20px 20px;
    }

    .demo-login-card > .demo-login-divider {
        margin: 4px 20px -8px;
    }
}

/* G2-ISSUE-013: the settings entry uses the same group/card design as the other admin work groups. */
.proposal-a-view .admin-work-group.admin-settings-work {
    border-color: #d9e1ec;
    border-left-color: #64748b;
    background: #f8fafc;
}

.proposal-a-view .admin-settings-work .admin-work-heading-icon {
    background: #eef2f7;
    color: #475569;
}

.proposal-a-view .admin-settings-work .admin-section-kicker {
    color: #64748b;
}

.proposal-a-view .admin-settings-grid {
    grid-template-columns: minmax(0, calc((100% - 30px) / 3));
}

.proposal-a-view .admin-settings-grid .v3-portal-icon {
    background: #eef2f7;
    color: #475569;
}

@media (max-width: 700px) {
    .proposal-a-view .admin-settings-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* G2-ISSUE-030: low-frequency company settings live at the bottom, collapsed by default. */
.settings-company-disclosure {
    margin: 0 0 18px;
    border: 1px solid var(--border, #dde3ec);
    border-radius: 12px;
    background: #fff;
}

.settings-company-disclosure > summary {
    display: grid;
    gap: 3px;
    padding: 13px 16px;
    cursor: pointer;
    list-style-position: inside;
}

.settings-company-disclosure > summary strong {
    display: inline;
    font-size: 14px;
}

.settings-company-disclosure > summary span {
    color: var(--muted, #667085);
    font-size: 12px;
}

.settings-company-disclosure[open] > summary {
    border-bottom: 1px solid var(--border, #dde3ec);
}

.settings-company-disclosure > .company-settings-panel {
    margin: 0;
    border: 0;
    box-shadow: none;
}

/* G2-ISSUE-008: one profile expression (initial avatar) for the person shown on a sheet. */
.subject-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gp-primary-soft, #fff0e3);
    color: var(--gp-primary, #e87722);
    font-size: 15px;
    font-weight: 800;
}

/* G2-ISSUE-011 / 021 / 022 / 023: people list — fixed current period, local filters, timeline. */
.team-period-scope { margin-bottom: 16px; }
.team-period-scope-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.team-period-scope-item { display: grid; gap: 4px; min-width: 0; }
.team-period-scope-item > span { color: var(--muted, #667085); font-size: 11px; font-weight: 700; }
.team-period-scope-item > strong { font-size: 14px; }
.team-period-scope-item > strong.is-empty { color: var(--muted, #667085); font-weight: 600; }
.team-period-scope-item select, .team-history-periods select { min-height: 36px; max-width: 100%; }
.team-history-periods { margin-top: 12px; font-size: 12px; }
.team-history-periods summary { cursor: pointer; color: var(--gp-primary, #e87722); font-weight: 700; }
.team-history-periods select { margin-top: 8px; }
.team-inline-button { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.proposal-a-view .v3-team-filters.team-local-filters, .v3-team-filters.team-local-filters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.team-filter-summary { margin: 0 0 10px; font-size: 12px; color: var(--muted, #667085); }
.team-progress-table { min-width: 760px; }
/* Compact progress: one line per item, fixed label width, never wraps into a box grid. */
.team-progress-summary { display: grid; gap: 3px; margin: 0; min-width: 180px; font-size: 12px; }
.team-progress-summary > div { display: grid; grid-template-columns: 5.2em auto; align-items: start; gap: 8px; }
.team-progress-summary dt { color: var(--muted, #667085); white-space: nowrap; }
.team-progress-summary dd { margin: 0; font-weight: 700; white-space: nowrap; }
.team-progress-summary > .is-complete dd { color: #047857; }
.team-progress-summary > .is-open dd { color: #b45309; }
.team-monthly-detail > summary { cursor: pointer; list-style-position: inside; }
.team-monthly-detail[open] > summary { margin-bottom: 4px; }
.team-monthly-detail ul { display: grid; gap: 2px; margin: 0; padding: 6px 8px; border: 1px solid #e6ebf2; border-radius: 8px; background: #fbfcfe; list-style: none; font-weight: 500; white-space: normal; }
.team-monthly-detail li { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.team-monthly-detail li.is-complete strong { color: #047857; }
.team-monthly-detail li.is-open strong { color: #b45309; }
.team-monthly-detail li.is-future { color: var(--muted, #98a2b3); }
.team-next-action strong { display: block; font-size: 12.5px; }
@media (max-width: 900px) {
    .proposal-a-view .v3-team-filters.team-local-filters, .v3-team-filters.team-local-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .team-period-scope-grid, .proposal-a-view .v3-team-filters.team-local-filters, .v3-team-filters.team-local-filters { grid-template-columns: minmax(0, 1fr); }
}

/* G2-ISSUE-024 / 027: target employee picker (GPicker first, searchable local fallback). */
.target-employee-picker { display: grid; gap: 6px; min-width: min(100%, 320px); }
.target-employee-picker .target-employee-select { display: grid; gap: 4px; }
.target-employee-picker .target-employee-select > span { font-size: 11px; font-weight: 700; color: var(--muted, #667085); }
.target-employee-picker select { min-height: 36px; max-width: 100%; }
.target-employee-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.target-employee-search { flex: 1 1 180px; min-height: 32px; padding: 0 10px; border: 1px solid #d7dce4; border-radius: 8px; font-size: 12px; }
.target-employee-note { color: var(--muted, #667085); font-size: 10.5px; }
.target-employee-message { margin: 0; color: var(--gp-danger, #b42318); font-size: 12px; }

/* G2-ISSUE-005 / 026: monthly sidebar summary and half-year month links. */
.a-monthly-half-year-link { display: inline-block; margin-top: 4px; font-size: 12px; }
.a-half-year-month-pending { color: var(--muted, #667085); font-size: 12px; }

/* G2-ISSUE-008: the half-year subject card styles every span as small meta text; keep the avatar. */
.proposal-a-view[data-proposal-a-screen='half-year'] .a-half-year-subject-person span.subject-avatar.a-half-year-subject-icon {
    display: grid;
    place-items: center;
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
    color: var(--gp-primary, #e87722);
    background: var(--gp-primary-soft, #fff0e3);
}

/* G2-ISSUE-025: the read-only 部門長評価 / 管理部評価 status card in the right rail uses the same
   padding, heading and body scale as the neighbouring "この月の評価" card. */
.monthly-a-page .v3-summary .fidelity-action-card.monthly-read-only {
    padding: 20px;
}
.monthly-a-page .v3-summary .fidelity-action-card.monthly-read-only h2 {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.5;
}
.monthly-a-page .v3-summary .fidelity-action-card.monthly-read-only p {
    margin: 0;
    color: var(--muted, #667085);
    font-size: 12px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}
.monthly-a-page .v3-summary .fidelity-action-card.monthly-read-only .table-action {
    margin: 12px 0 0;
}

/* G2-ISSUE-040: confirmation before changing an employee-agreed goal. */
.reagreement-confirm-backdrop { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; background: rgb(15 23 42 / 45%); }
.reagreement-confirm { width: min(100%, 460px); margin: 0; padding: 22px; border-radius: 14px; box-shadow: 0 24px 60px rgb(15 23 42 / 25%); }
.reagreement-confirm h2 { margin: 0 0 10px; font-size: 16px; }
.reagreement-confirm p { margin: 0 0 12px; font-size: 13px; line-height: 1.8; }
.reagreement-confirm-action { display: grid; gap: 2px; padding: 10px 12px; border-radius: 9px; background: #fff7ef; }
.reagreement-confirm-action span { color: var(--muted, #667085); font-size: 11px; }
.reagreement-confirm-buttons { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.reagreement-confirm-buttons .demo-login-button { width: auto; min-height: 38px; padding: 0 14px; }
.nav-item.is-attention { gap: 6px; padding-right: 7px; }
.nav-item.is-attention > span:not(.nav-icon):not(.nav-late-badge) { min-width: 0; white-space: nowrap; }
.nav-item.is-attention .nav-late-badge { flex: 0 0 auto; margin-left: auto; padding: 1px 4px; border-radius: 999px; background: #fff1e6; color: #b45309; font-size: 10px; font-weight: 800; line-height: 18px; white-space: nowrap; overflow-wrap: normal; }

/* G2-ISSUE-017 / 018 / 019: in-place dashboard refresh, single-department breakdown, goal warning. */
.dashboard-refresh-status { min-width: 4em; align-self: end; color: var(--muted, #667085); font-size: 11px; }
.proposal-a-admin[aria-busy="true"] .a-kpi-grid, .proposal-a-admin[aria-busy="true"] .a-admin-grid { opacity: .72; transition: opacity .12s ease; }
.a-single-department-progress p { margin: 0 0 8px; font-size: 12px; }
.a-single-department-progress dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.a-single-department-progress dl > div { display: flex; justify-content: space-between; gap: 8px; padding: 9px 11px; border: 1px solid #e6ebf2; border-radius: 9px; font-size: 12px; }
.a-single-department-progress dd { margin: 0; font-weight: 800; }
.a-goal-incomplete-warning { display: grid; gap: 4px; margin-top: 12px; }
.a-goal-incomplete-warning a { font-weight: 700; }

/* G2-ISSUE-028 / 029: goal-setting progress aggregation scope (period + department). */
.goal-progress-scope { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 0; padding: 10px 12px; border: 1px solid #e3e8ef; border-radius: 12px; background: #fff; }
.goal-progress-scope legend { padding: 0 4px; color: var(--muted, #667085); font-size: 11px; font-weight: 800; }
.goal-progress-scope-note { margin: 0 0 10px; color: var(--muted, #667085); font-size: 12px; }
.goal-progress-list-note { grid-column: 1 / -1; margin: 0; color: var(--muted, #667085); font-size: 11px; }

/* G2-ISSUE-034 / 035: archive eligibility, archived list and unarchive. */
.evaluation-period-archive-confirm { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid #f1d2b8; border-radius: 10px; background: #fffaf5; font-size: 12px; }
.evaluation-period-archive-confirm ul { margin: 0; padding-left: 1.2em; }
.evaluation-period-archive-impact { display:grid; gap:6px; padding:10px 11px; border:1px solid #eadccf; border-radius:8px; background:#fff; color:#5f5146; }
.evaluation-period-archive-impact > strong { color:#754315; }
.evaluation-period-archive-impact li { margin:3px 0; line-height:1.55; }
.evaluation-period-archive-buttons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.evaluation-period-action-guide { display:flex; flex-wrap:wrap; gap:6px 18px; margin:0 20px 12px; padding:8px 10px; border:1px solid #e6eaf0; border-radius:8px; background:#fafbfc; color:#687386; font-size:10px; line-height:1.5; }
.evaluation-period-action-guide strong { color:#465366; }
.evaluation-period-condition-link { display:inline-flex; align-items:center; gap:3px; min-height:26px; padding:2px 4px; border:0; background:transparent; color:#78869a; font:inherit; font-size:9px; font-weight:700; line-height:1; cursor:pointer; }
.evaluation-period-condition-link:hover { color:#4b5d73; text-decoration:underline; }
.evaluation-period-condition-link > span { display:grid; place-items:center; width:14px; height:14px; border:1px solid #b8c2cf; border-radius:50%; font-size:9px; font-weight:800; }
.evaluation-period-unavailable-action { color:#9aa5b3; background:#f8fafc; border-color:#dfe5ec; }
.evaluation-period-unavailable-action:hover { color:#667386; background:#f3f6f9; border-color:#cfd7e1; }
.evaluation-period-condition-list { display:grid; gap:5px; min-width:min(360px, 100%); }
.evaluation-period-condition-row { display:grid; grid-template-columns:18px minmax(0,1fr) auto; align-items:center; gap:7px; padding:6px 8px; border:1px solid #e4e9ef; border-radius:7px; background:#fff; color:#536174; }
.evaluation-period-condition-row small { color:#7b8797; font-size:10px; white-space:nowrap; }
.evaluation-period-condition-mark { display:grid; place-items:center; width:16px; height:16px; border-radius:50%; font-size:10px; font-weight:900; }
.evaluation-period-condition-row.is-met .evaluation-period-condition-mark { background:#e8f6f0; color:#14785e; }
.evaluation-period-condition-row.is-pending .evaluation-period-condition-mark { background:#f1f3f6; color:#7d8998; }
.evaluation-period-condition-note { margin:0; color:#6f7c8d; font-size:10px; line-height:1.55; }
.evaluation-period-dev-delete { justify-self:start; color:#7b4b20; border-style:dashed; background:#fffdf9; }
.evaluation-period-dev-delete-panel { display:grid; gap:7px; padding:8px 9px; border:1px dashed #d7b68d; border-radius:7px; background:#fffdf8; color:#6b5137; }
.evaluation-period-dev-delete-panel > span { font-size:10px; line-height:1.5; }
.evaluation-period-archived-card { margin-top:16px; padding:0; overflow:hidden; }
.evaluation-period-archived-card > summary { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:15px 18px; cursor:pointer; font-weight:800; list-style:none; }
.evaluation-period-archived-card > summary::-webkit-details-marker { display:none; }
.evaluation-period-archived-card > summary::after { content:"＋"; color:#76879a; font-size:15px; }
.evaluation-period-archived-card[open] > summary { border-bottom:1px solid #e7ecf2; }
.evaluation-period-archived-card[open] > summary::after { content:"−"; }
.evaluation-period-archived-count { margin-left:auto; padding:2px 8px; border-radius:999px; background:#eef2f6; color:#64748b; font-size:10px; }
.evaluation-period-archived-body { padding:14px 18px 18px; }
.evaluation-period-archived-body > .table-note { margin:0 0 13px; line-height:1.7; }
.evaluation-period-archived-body > .period-list { margin:0; }
.evaluation-period-archived-empty { margin:0; padding:14px; border:1px dashed #dbe2ea; border-radius:9px; background:#fafbfd; color:#728196; font-size:12px; text-align:center; }
.period-card.is-archived { background: #f8fafc; }

/* G2-ISSUE-033: compact archive-condition checklist on the evaluation period detail. */
.closeout-checklist { display: grid; gap: 6px; margin: 0 0 12px; padding: 0 16px; list-style: none; }
.closeout-checklist li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid #e6ebf2; border-radius: 9px; font-size: 12px; }
.closeout-checklist li::before { content: "・"; color: #94a3b8; }
.closeout-checklist li.is-done::before { content: "✓"; color: #047857; font-weight: 800; }
.closeout-checklist li span { flex: 1; }
.evaluation-period-archive-guidance { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(260px,.9fr) auto; align-items:center; gap:14px; margin:12px 16px 16px; padding:13px 14px; border:1px solid #cfe7dc; border-radius:10px; background:#f6fcf9; }
.evaluation-period-archive-guidance p { margin:4px 0 0; color:#587168; font-size:11px; line-height:1.65; }
.evaluation-period-archive-guidance ul { margin:0; padding-left:1.2em; color:#4f675f; font-size:10.5px; line-height:1.65; }
.evaluation-period-archive-guidance .table-action { white-space:nowrap; }
@media (max-width: 900px) { .evaluation-period-archive-guidance { grid-template-columns:minmax(0,1fr); } .evaluation-period-archive-guidance .table-action { justify-self:start; } }

/* G2-ISSUE-031 / 032: master source and delete rules. */
.master-source-badge { display: inline-flex; margin-left: 6px; padding: 1px 7px; border: 1px solid #d8e0ea; border-radius: 999px; color: #475569; font-size: 10px; font-weight: 700; vertical-align: middle; }
.master-source-badge[data-master-source="gportal"] { border-color: #bfd7f3; color: #1d4ed8; background: #eff6ff; }
.behavior-delete-note { display: block; margin-top: 4px; color: var(--muted, #667085); font-size: 10.5px; }
.behavior-delete-confirm { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 11px; }

/* Build identification for acceptance records. */
.demo-environment { margin-top: 4px; color: #475569; font-size: 10.5px; font-weight: 700; overflow-wrap: anywhere; }
.goal-progress-department-selector { display: grid; gap: 4px; font-size: 11px; font-weight: 700; color: var(--muted, #667085); }
.goal-progress-department-selector select { min-height: 36px; padding: 0 10px; border: 1px solid #d7dce4; border-radius: 9px; color: var(--text, #1f2937); background: #fff; font-size: 13px; font-weight: 600; }

/* G2-ISSUE-007: bottom navigation uses the same icons as the side menu. */
.bottom-nav-icon { display: grid; place-items: center; line-height: 1; }
.bottom-nav-icon svg { width: 20px; height: 20px; }

/* People list on phones: each employee becomes a card instead of a horizontally scrolled row. */
@media (max-width: 700px) {
    .team-progress-table { min-width: 0; }
    .team-progress-table thead { display: none; }
    .team-progress-table, .team-progress-table tbody, .team-progress-table tr, .team-progress-table td { display: block; width: 100%; }
    .team-progress-table tr { padding: 10px 0; border-bottom: 1px solid #e6ebf2; }
    .team-progress-table td,
    .proposal-a-view .data-table.team-progress-table td,
    .proposal-a-view .data-table.team-progress-table tbody td { padding: 3px 0; border: 0; text-align: left; }
    .team-progress-table td.team-next-action strong { display: inline; margin-right: 6px; }
    .team-progress-table td.v3-goal-cell { font-size: 11px; }
    .team-progress-table td.v3-goal-cell::before { content: "次期の目標設定："; color: var(--muted, #667085); }
    .team-progress-table td.v3-goal-cell > div, .team-progress-table td.v3-goal-cell .v3-cell-note { display: inline; }
    .team-progress-table td.v3-team-actions .table-action { margin: 4px 6px 0 0; }
    .team-progress-summary { min-width: 0; }
}
