/* ══════════════════════════════════════════════════════════════════════════════
   ShiftHR — Goals
   ──────────────────────────────────────────────────────────────────────────────
   Goals page mode toggle, scope tabs, goal cards, the built-on path, the opened goal, key result
   rows, the dialogs' key-result rows, and the private goals.
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Mode Toggle ───────────────────────────────────────────────────────────── */
/* Two kit buttons (btn-primary for the chosen view, btn-outline for the other): layout only. */
.goals-mode-toggle { display: inline-flex; gap: 6px; margin-bottom: 16px; }

/* ── Scope Tabs ────────────────────────────────────────────────────────────── */
/* Goals and Feedback use the kit Tabs; Reviews' CycleReviews still uses these (KIT_REGISTER.md 2.2). */
.goals-scope-tabs {
    display: flex; gap: 0;
    border-bottom: 2px solid var(--color-neutral-200);
    margin-bottom: 24px;
}
.goals-scope-tab {
    padding: 8px 16px; background: none; border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: .85rem; font-weight: 500;
    color: var(--color-neutral-500); cursor: pointer;
    transition: color .15s, border-color .15s;
}
.goals-scope-tab:hover { color: var(--color-neutral-700); }
.goals-scope-tab.active {
    color: var(--color-brand); border-bottom-color: var(--color-brand);
}

/* ── Goal Cards ────────────────────────────────────────────────────────────────
   The card surface (border, radius, shadow, padding) is the kit Card primitive
   (ShiftHR.UI); only the interior layout lives here. Muted texts carry explicit
   token colours — the bootstrap .text-muted class is !important and never
   theme-flips (data-bs-theme ≠ data-theme), which made these lines unreadable
   in dark mode (#648). */
.goal-list {
    display: flex; flex-direction: column; gap: 16px;
}
/* The add at the foot of the list (PF-7, Lane P2): the kit's button at its own width, never stretched. */
.goal-list-add { display: flex; }
.goal-card-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 8px;
}
.goal-card-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.goal-card-actions { display: flex; gap: 6px; }
.goal-card-held { font-size: var(--text-sm); color: var(--color-neutral-600); }
/* Step 3 (a), 2026-09-28: the card's tracking row - health (active items) and a goal's recorded progress. */
.goal-card-track { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-top: 8px; }
.goal-card-track-select { width: 150px; }
.goal-card-track-progress { display: flex; gap: 6px; align-items: center; }
.goal-card-track-input { width: 90px; }
.goal-card-title {
    font-size: 1.05rem; font-weight: 700; margin: 0 0 4px;
    color: var(--color-neutral-900);
}
.goal-card-desc {
    font-size: .85rem; color: var(--color-neutral-500);
    margin: 0 0 8px; line-height: 1.5;
}
.goal-card-meta {
    display: flex; gap: 16px; align-items: center;
    font-size: .8rem; margin-bottom: 4px;
}
.goal-card-owner { font-weight: 600; color: var(--color-brand); }
.goal-card-date { font-size: .78rem; color: var(--color-neutral-500); }
.goal-card-children {
    font-size: .78rem; margin-top: 8px; color: var(--color-neutral-500);
    padding-top: 8px; border-top: 1px solid var(--color-neutral-100);
}

/* ── Built on (Feature GMB, #1419) ─────────────────────────────────────────────
   The card's path is the kit's BuildPath (the sweep's CascadeChain row): spacing only. The Open act sits under it. */
.goal-card-path {
    margin-top: 8px; padding-top: 8px;
    border-top: 1px solid var(--color-neutral-100);
}
.goal-card-open { display: flex; margin-top: 8px; }

/* ── One goal opened, whose goals and Add a goal (Feature GMB, #1419): layout only, the parts are the kit's. ── */
.goals-whose { margin-bottom: 16px; }
.goal-opened { display: flex; flex-direction: column; gap: 16px; }
.goal-opened-back { display: flex; }
.goal-opened-title { font-size: 1.25rem; font-weight: 700; margin: 0; color: var(--color-neutral-900); }
.goal-opened-meta, .goal-opened-desc { margin: 0; font-size: var(--text-sm); color: var(--color-neutral-600); }
.goal-commitments-source { margin-top: 16px; }
.goal-add-step { color: var(--color-neutral-600); font-size: var(--text-sm); }
.goal-add-role { display: flex; }

/* ── Key Result Rows ───────────────────────────────────────────────────────── */
.kr-list {
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid var(--color-neutral-100);
}
.kr-list-header {
    font-size: .8rem; font-weight: 700; color: var(--color-neutral-700);
    margin: 0 0 8px;
}
.kr-row {
    display: flex; flex-direction: column; gap: 4px;
    padding: 8px 0; border-bottom: 1px solid var(--color-neutral-50);
}
.kr-row:last-child { border-bottom: none; }
.kr-title {
    display: flex; align-items: center; gap: 6px;
    font-size: .85rem; font-weight: 500;
    color: var(--color-neutral-900);
}
.kr-progress { display: flex; align-items: center; gap: 8px; }
.kr-progress > :first-child { flex: 1; }
.kr-values { font-size: .75rem; white-space: nowrap; color: var(--color-neutral-500); }
.kr-edit-row {
    display: flex; align-items: center; gap: 8px;
}
.kr-edit-input { width: 80px; }
.kr-unit { font-size: .78rem; color: var(--color-neutral-500); white-space: nowrap; }

/* ── The Commitment dialog's key results ─────────────────────────────────── */
/* The surface is the kit FormDialog and every field the kit's FormField; layout only here. */
.kr-form-section {
    margin-top: 16px; padding-top: 16px;
    border-top: 1px solid var(--color-neutral-100);
}
.kr-form-heading {
    font-size: .9rem; font-weight: 700; margin: 0 0 4px;
    /* #714: explicit token colour so the var() resolves at the heading's own scope INSIDE
       [data-theme="dark"]; without it the heading inherits body's pre-resolved
       light-mode neutral-900 and renders dark-on-dark (the #447 inheritance class). */
    color: var(--color-neutral-700);
}
.kr-form-row {
    display: flex; gap: 8px; align-items: center; margin-top: 8px;
}
.kr-form-row > :first-child { flex: 1; }
.kr-form-target { max-width: 100px; }
.kr-form-unit { max-width: 120px; }
.kr-form-hint { font-size: var(--text-sm); color: var(--color-neutral-500); margin: 0; }
.kr-form-add { margin-top: 8px; }

/* ── Private personal goals (A-2 §7.2 / #811) — the ungated lane ── */
/* The surface is the kit Card (raised) and the list the kit's ItemList; only the card's own lines live here. */
.pgl { margin-top: 28px; }
.pgl-sub { font-size: 0.8rem; color: var(--color-neutral-500); margin: 0 0 12px; }
.pgl-closed { font-size: 0.88rem; color: var(--color-neutral-600); }

/* Company goals on Goals & Commitments (Feature GS, #1364, need 7): the card above the tabs and its short list. */
.company-goals-card { margin-bottom: var(--space-4); }
.company-goals-list { margin: var(--space-2) 0 0; padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-1); }
