/* =============================================================
   LEAGUE CONTRACTS REPORT — league_contracts_v4.css
   PLA-11. Player-first contracts modal.

   Theming: uses --jt-* tokens from jt_theme_v4.css; auto-flips on
   [data-theme="light"] via the token system. The header gradient is
   theme-independent (matches PCR/SalaryReport convention).

   Hardcoded values are intentional in two places:
     - Header gradient (matches PCR/SalaryReport — always dark)
     - Unsigned-row tint (#FAEEDA + #BA7517) — intent-coded signal
       that should look the same in both light + dark themes.

   Batch C adds: shell layout, side-car styles, action chip row,
   dirty-form confirm overlay, edit-toggle active state.
   ============================================================= */

/* ── Backdrop + positioning ───────────────────────────────────── */
#leagueContractsReportModal {
    position: fixed;
    inset: 0;
    z-index: 10003;       /* sits above PCR (10002) and SalaryReport (10001) */
    display: flex;
    align-items: center;
    justify-content: center;
}

.lcr-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

/* ── Shell: modal + sidecar as siblings ───────────────────────── */
/* Always present; sidecar is hidden by default and revealed when
   .lcr-edit-mode is added to the shell. Keeping sidecar in the DOM
   avoids reflow when first pin happens. */
.lcr-shell {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 6px;
    max-width: 98vw;
    max-height: 88vh;
}
.lcr-shell .lcr-sidecar { display: none; }
.lcr-shell.lcr-edit-mode .lcr-sidecar { display: flex; }

/* ── Modal shell ──────────────────────────────────────────────── */
.lcr-modal {
    position: relative;
    background: var(--jt-bg-deep);
    border: 1px solid var(--jt-border-muted);
    border-radius: 12px;
    /* Wider than PCR — table has 10 columns. Sidecar (340px) attaches
       outside the modal, so we don't reserve room for it here. */
    width: min(1360px, 96vw);
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    flex: 0 1 auto;
}

/* ── Header (always dark — matches PCR/SalaryReport gradient) ─── */
.lcr-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #1a2942 100%);
    border-bottom: 1px solid var(--jt-border-muted);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.lcr-title-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.lcr-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.lcr-context {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
    letter-spacing: 0.01em;
}
.lcr-unsigned-count {
    color: #fbbf24;
    font-weight: 500;
}
.lcr-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lcr-year-select {
    background: var(--jt-on-dark-bg);
    color: var(--jt-on-dark-text-bright);
    border: 1px solid var(--jt-on-dark-border);
    border-radius: 5px;
    padding: 4px 8px;
    font-size: 0.78rem;
    font-family: inherit;
    cursor: pointer;
}
.lcr-year-select:hover { background: var(--jt-on-dark-bg-hover); }
.lcr-year-select:focus { outline: none; border-color: var(--jt-on-dark-border-hover); }

/* ── Buttons ──────────────────────────────────────────────────── */
.lcr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s, background 0.12s, transform 0.05s;
}
.lcr-btn:hover  { opacity: 0.9; }
.lcr-btn:active { transform: translateY(1px); }
.lcr-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.lcr-btn-on-dark {
    background: var(--jt-on-dark-bg);
    color: var(--jt-on-dark-text-bright);
    border-color: var(--jt-on-dark-border);
}
.lcr-btn-on-dark:hover {
    background: var(--jt-on-dark-bg-hover);
    opacity: 1;
}

.lcr-btn-ghost {
    background: transparent;
    color: var(--jt-text-secondary);
    border-color: var(--jt-border-primary);
}
.lcr-btn-ghost:hover {
    border-color: var(--jt-accent-blue);
    color: var(--jt-text-primary);
    opacity: 1;
}

.lcr-btn-primary {
    background: var(--jt-accent-blue);
    color: #fff;
    border-color: var(--jt-accent-blue);
}
.lcr-btn-primary:hover {
    background: var(--jt-accent-blue-hover);
    border-color: var(--jt-accent-blue-hover);
    opacity: 1;
}

/* Edit toggle — active state when edit mode is on */
.lcr-edit-active {
    background: var(--jt-accent-blue) !important;
    color: #fff !important;
    border-color: var(--jt-accent-blue) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.lcr-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: color 0.12s, background 0.12s;
}
.lcr-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* ── Filters bar ──────────────────────────────────────────────── */
.lcr-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--jt-bg-primary);
    border-bottom: 1px solid var(--jt-border-muted);
    flex-shrink: 0;
    flex-wrap: wrap;
}
.lcr-filter-input,
.lcr-filter-select {
    background: var(--jt-bg-secondary);
    color: var(--jt-text-primary);
    border: 1px solid var(--jt-border-primary);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.82rem;
    font-family: inherit;
}
.lcr-filter-input { min-width: 200px; }
.lcr-filter-input:focus,
.lcr-filter-select:focus {
    outline: none;
    border-color: var(--jt-border-focus);
}

.lcr-chips {
    display: inline-flex;
    gap: 4px;
    padding: 2px;
    background: var(--jt-bg-secondary);
    border: 1px solid var(--jt-border-primary);
    border-radius: 6px;
}
.lcr-chip {
    background: transparent;
    color: var(--jt-text-secondary);
    border: none;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    font-family: inherit;
}
.lcr-chip:hover {
    background: var(--jt-bg-tertiary);
    color: var(--jt-text-primary);
}
.lcr-chip-active {
    background: var(--jt-accent-blue);
    color: #fff;
}
.lcr-chip-active:hover {
    background: var(--jt-accent-blue-hover);
    color: #fff;
}

.lcr-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--jt-text-secondary);
    cursor: pointer;
    user-select: none;
}
.lcr-toggle-label input { cursor: pointer; accent-color: var(--jt-accent-blue); }

/* ── Loading / empty / error ──────────────────────────────────── */
.lcr-loading,
.lcr-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 20px;
    color: var(--jt-text-muted);
    text-align: center;
    font-size: 0.9rem;
}
.lcr-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--jt-border-primary);
    border-top-color: var(--jt-accent-blue);
    border-radius: 50%;
    animation: lcrSpin 0.7s linear infinite;
}
@keyframes lcrSpin { to { transform: rotate(360deg); } }

.lcr-error {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 20px;
    color: var(--jt-accent-red);
    font-size: 0.9rem;
    text-align: center;
}
.lcr-error strong { color: var(--jt-text-primary); font-size: 1rem; }
.lcr-error p { margin: 0; max-width: 500px; color: var(--jt-text-secondary); }

/* Collapsed technical-detail block on the error screen. Hidden behind a
   <summary> click so the user-facing message stays clean; devs can still
   eyeball the raw HTTP error when triaging. */
.lcr-error-details {
    margin: 4px 0;
    font-size: 0.78rem;
    max-width: 600px;
    width: 100%;
}
.lcr-error-details summary {
    cursor: pointer;
    user-select: none;
    color: var(--jt-text-secondary);
    text-align: center;
}
.lcr-error-details summary:hover { color: var(--jt-text-primary); }
.lcr-error-details code {
    display: block;
    margin-top: 6px;
    padding: 8px 10px;
    background: var(--jt-bg-secondary);
    border: 1px solid var(--jt-border-muted);
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--jt-text-secondary);
    text-align: left;
    word-break: break-word;
}

/* ── Table ────────────────────────────────────────────────────── */
.lcr-table-wrapper {
    flex: 1;
    overflow: auto;
}
.lcr-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}
.lcr-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background: var(--jt-bg-primary);
}
.lcr-th {
    text-align: left;
    padding: 9px 12px;
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--jt-text-secondary);
    border-bottom: 1px solid var(--jt-border-muted);
    white-space: nowrap;
    user-select: none;
}
.lcr-th-sortable { cursor: pointer; }
.lcr-th-sortable:hover { color: var(--jt-text-primary); }
.lcr-th-active   { color: var(--jt-accent-blue); }
.lcr-th-num      { text-align: right; }

.lcr-table tbody tr {
    border-bottom: 1px solid var(--jt-border-muted);
    transition: background 0.1s;
}
.lcr-table tbody tr:hover { background: var(--jt-bg-hover); }
.lcr-table td {
    padding: 7px 12px;
    vertical-align: middle;
    color: var(--jt-text-primary);
}

.lcr-td-player    { white-space: nowrap; }
.lcr-player-name  { font-weight: 500; }

.lcr-pos {
    display: inline-block;
    padding: 1px 6px;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 4px;
    color: #fff;
}
.lcr-pos-QB  { background: var(--jt-pos-qb-accent); }
.lcr-pos-RB  { background: var(--jt-pos-rb-accent); }
.lcr-pos-WR  { background: var(--jt-pos-wr-accent); }
.lcr-pos-TE  { background: var(--jt-pos-te-accent); }
.lcr-pos-K   { background: var(--jt-pos-k-accent); }
.lcr-pos-DEF, .lcr-pos-DST { background: var(--jt-pos-def-accent); }

.lcr-td-franchise {
    color: var(--jt-text-secondary);
    font-size: 0.78rem;
    white-space: nowrap;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Cap the Contract column width — longest label is ~19 chars
   ("Guaranteed – Rookie"). Width on the th anchors the column, max-width
   + ellipsis on the td truncates the (rare) overflow case. */
.lcr-th[data-sort-column="contract"] {
    width: 160px;
}
.lcr-td-contract {
    font-size: 0.78rem;
    color: var(--jt-text-primary);
    white-space: nowrap;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lcr-td-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
}
.lcr-td-revisions {
    color: var(--jt-text-secondary);
    font-size: 0.78rem;
    white-space: nowrap;
}
.lcr-revisions {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: help;
}
.lcr-expand-icon {
    display: inline-block;
    font-size: 0.65rem;
    color: var(--jt-text-muted);
    width: 10px;
    transition: transform 0.15s;
}

/* ── Parent / child rows ──────────────────────────────────────── */
.lcr-row-parent {
    cursor: pointer;
    background: var(--jt-bg-secondary);
}
.lcr-row-parent:hover { background: var(--jt-bg-hover); }
.lcr-row-expanded > .lcr-td-revisions { color: var(--jt-text-primary); }

.lcr-row-child {
    background: var(--jt-bg-primary);
}
.lcr-row-child:hover { background: var(--jt-bg-hover); }
.lcr-td-child-marker {
    padding-left: 28px;
    color: var(--jt-text-muted);
    font-weight: 400;
}
.lcr-td-child-detail {
    font-size: 0.78rem;
    color: var(--jt-text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.lcr-child-amount {
    font-variant-numeric: tabular-nums;
    font-family: 'Courier New', monospace;
    color: var(--jt-text-primary);
    font-weight: 500;
}
.lcr-child-year   { color: var(--jt-text-muted); }
.lcr-child-extra  { color: var(--jt-text-secondary); }
.lcr-child-clause {
    color: var(--jt-text-muted);
    font-style: italic;
    /* flex-grow into remaining cell width; ellipsis at the cell edge.
       min-width: 0 is required so the flex item can shrink below its
       content size — without it, the clause would push the cell wider. */
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lcr-kind {
    display: inline-block;
    padding: 1px 7px;
    font-size: 0.68rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: capitalize;
    letter-spacing: 0.01em;
}
.lcr-kind-deferral         { background: #1e40af; color: #dbeafe; }
.lcr-kind-trade_held       { background: #6d28d9; color: #ede9fe; }
.lcr-kind-advance          { background: #047857; color: #d1fae5; }
.lcr-kind-holdout          { background: #c2410c; color: #ffedd5; }
.lcr-kind-holdout_paid     { background: #92400e; color: #fef3c7; }
.lcr-kind-stash            { background: #4b5563; color: #f3f4f6; }
.lcr-kind-ps_steal         { background: #b91c1c; color: #fee2e2; }
.lcr-kind-initial_contract { background: #065f46; color: #d1fae5; }
.lcr-kind-restructure      { background: #5b21b6; color: #ede9fe; }
.lcr-kind-extension        { background: #1e40af; color: #dbeafe; }
.lcr-kind-franchise_tag    { background: #9a3412; color: #ffedd5; }
.lcr-kind-other            { background: #374151; color: #d1d5db; }

/* ── Unsigned row tint ─────────────────────────────────────────
   Light theme: warm yellow fill + brown stripe — reads as "needs
   attention" without a separate badge.
   Dark theme: orange stripe stays (the signal), but the fill drops
   to a soft alpha overlay so the row doesn't burn against the dark
   surrounds. */
.lcr-row-unsigned {
    background: #FAEEDA !important;
    box-shadow: inset 3px 0 0 #BA7517;
    color: #422006;
}
.lcr-row-unsigned td       { color: #422006; }
.lcr-row-unsigned .lcr-td-contract,
.lcr-row-unsigned .lcr-td-franchise,
.lcr-row-unsigned .lcr-td-revisions { color: #6b4118; }
.lcr-row-unsigned:hover    { background: #f6e0c1 !important; }

[data-theme="dark"] .lcr-row-unsigned {
    background: rgba(186, 117, 23, 0.08) !important;
    color: var(--jt-text-primary);
}
[data-theme="dark"] .lcr-row-unsigned td { color: var(--jt-text-primary); }
[data-theme="dark"] .lcr-row-unsigned .lcr-td-contract,
[data-theme="dark"] .lcr-row-unsigned .lcr-td-franchise,
[data-theme="dark"] .lcr-row-unsigned .lcr-td-revisions { color: var(--jt-text-secondary); }
[data-theme="dark"] .lcr-row-unsigned:hover {
    background: rgba(186, 117, 23, 0.14) !important;
}

/* ── Edit mode: row affordances ───────────────────────────────── */
/* In edit mode, every signed player row is clickable to pin. Unsigned
   rows are also clickable (auto-Sign). The cursor + subtle hover ring
   communicate it. Pinned row gets a left accent stripe + boosted bg. */
.lcr-row-clickable {
    cursor: pointer;
}
.lcr-row-pinned {
    background: rgba(59, 130, 246, 0.08) !important;
    box-shadow: inset 3px 0 0 var(--jt-accent-blue);
}
.lcr-row-pinned:hover {
    background: rgba(59, 130, 246, 0.12) !important;
}
/* When a pinned row is ALSO unsigned (the auto-Sign case), let the
   pinned blue stripe override the warm-yellow left border, but keep
   the warm fill so commissioner sees both signals at once. */
.lcr-row-unsigned.lcr-row-pinned {
   background: #FAEEDA !important;
   box-shadow: inset 3px 0 0 var(--jt-accent-blue);
}
[data-theme="dark"] .lcr-row-unsigned.lcr-row-pinned {
   background: rgba(186, 117, 23, 0.08) !important;
   box-shadow: inset 3px 0 0 var(--jt-accent-blue);
}

/* ── Action chip row (under expanded parent in edit mode) ────── */
.lcr-row-chips {
    background: var(--jt-bg-secondary);
}
.lcr-row-chips:hover { background: var(--jt-bg-secondary); }  /* no hover; not interactive itself */
.lcr-td-chips {
    /* Slightly less vertical padding than child rows; chip row is a
       footer to the player group, not a content row. */
    padding: 5px 12px 7px 28px !important;
    border-top: 1px solid var(--jt-border-muted);
}
.lcr-chip-row {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}
.lcr-chip-sep {
    display: inline-block;
    width: 1px;
    height: 14px;
    background: var(--jt-border-secondary);
    margin: 0 6px;
}

/* Action chips themselves — 3 states per spec.
   Tiny dense buttons (padding 1px 5px, font 10px), no dashed borders. */
.lcr-action-chip {
    padding: 1px 5px;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
    /* Use a min-height so all three states render at the same dimensions
       (border swap doesn't cause layout shift). */
    min-height: 18px;
    transition: background 0.1s, color 0.1s, border-color 0.1s, opacity 0.1s;
}
/* Available — outline-style chip waiting to be picked */
.lcr-action-chip-available {
    background: transparent;
    color: var(--jt-text-primary);
    border: 0.5px solid var(--jt-border-secondary);
}
.lcr-action-chip-available:hover {
    border-color: var(--jt-accent-blue);
    color: var(--jt-accent-blue);
}
/* Active — currently selected; filled with accent blue */
.lcr-action-chip-active {
    background: var(--jt-accent-blue);
    color: #fff;
    border: 0.5px solid var(--jt-accent-blue);
    font-weight: 500;
}
.lcr-action-chip-active:hover {
    background: var(--jt-accent-blue-hover);
    border-color: var(--jt-accent-blue-hover);
}
/* Disabled — same outline as Available but dimmed */
.lcr-action-chip-disabled {
    background: transparent;
    color: var(--jt-text-disabled);
    border: 0.5px solid var(--jt-border-secondary);
    opacity: 0.45;
    cursor: not-allowed;
}

/* ── Footer ───────────────────────────────────────────────────── */
.lcr-footer {
    flex-shrink: 0;
    padding: 8px 20px;
    border-top: 1px solid var(--jt-border-muted);
    background: var(--jt-bg-primary);
    color: var(--jt-text-muted);
    font-size: 0.78rem;
}

/* =================================================================
   SIDE-CAR ACTION PANEL  (.lcr-sidecar wraps the LeagueContracts-
   ActionPanel-rendered DOM). Visible only when shell has .lcr-edit-mode.
   ================================================================= */
.lcr-sidecar {
    width: 340px;
    flex: 0 0 340px;
    max-height: 88vh;
    background: var(--jt-bg-deep);
    border: 1px solid var(--jt-border-muted);
    border-radius: 12px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    flex-direction: column;     /* applied via .lcr-edit-mode .lcr-sidecar */
    overflow: hidden;
}

/* Side-car header (LeagueContractsActionPanel's .lcsp-header) — also
   uses the dark gradient so it visually belongs with the LCR modal. */
.lcsp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #1e3a5f 0%, #1a2942 100%);
    border-bottom: 1px solid var(--jt-border-muted);
    flex-shrink: 0;
}
.lcsp-pin {
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.lcsp-pin-icon { font-size: 0.9rem; }
.lcsp-sync-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.72rem;
    cursor: pointer;
    user-select: none;
}
.lcsp-sync-toggle input { accent-color: var(--jt-accent-blue); cursor: pointer; }
.lcsp-sync-toggle input:disabled { cursor: not-allowed; }
.lcsp-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 4px;
    transition: color 0.12s, background 0.12s;
}
.lcsp-close:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }

/* Placeholder state — empty pinned card */
.lcsp-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 16px;
    color: var(--jt-text-muted);
    text-align: center;
}
.lcsp-placeholder-icon {
    font-size: 2rem;
    opacity: 0.55;
}
.lcsp-placeholder-text {
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Player banner — visible after pin */
.lcsp-banner {
    padding: 12px 14px;
    border-bottom: 1px solid var(--jt-border-muted);
    background: var(--jt-bg-secondary);
}
.lcsp-banner-row1 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.lcsp-banner-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--jt-text-primary);
}
.lcsp-banner-row2 {
    color: var(--jt-text-secondary);
    font-size: 0.78rem;
    margin-bottom: 2px;
}
.lcsp-banner-row3 {
    color: var(--jt-text-primary);
    font-size: 0.82rem;
    font-family: 'Courier New', monospace;
}

/* Active action header — sticky-feeling separator above form */
.lcsp-action-header {
    padding: 10px 14px;
    background: var(--jt-bg-primary);
    border-bottom: 1px solid var(--jt-border-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--jt-text-primary);
    font-weight: 600;
    font-size: 0.85rem;
}
.lcsp-action-icon {
    font-size: 1rem;
    color: var(--jt-accent-blue);
}

/* Form body — placeholder text in Batch C */
.lcsp-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: var(--jt-bg-deep);
    min-height: 80px;
}
.lcsp-form-placeholder {
    color: var(--jt-text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    background: var(--jt-bg-secondary);
    border: 1px dashed var(--jt-border-primary);
    border-radius: 6px;
    padding: 16px;
    text-align: center;
}

/* MFL preview — stub in Batch C */
.lcsp-preview {
    padding: 0 14px 14px;
    background: var(--jt-bg-deep);
}
.lcsp-preview-stub {
    background: var(--jt-bg-secondary);
    border: 1px solid var(--jt-border-muted);
    border-radius: 6px;
    padding: 10px 12px;
}
.lcsp-preview-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--jt-text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}
.lcsp-preview-body {
    font-size: 0.78rem;
    color: var(--jt-text-secondary);
    font-style: italic;
}

/* Footer — sync checkbox + buttons + hint */
.lcsp-footer {
    flex-shrink: 0;
    padding: 12px 14px;
    border-top: 1px solid var(--jt-border-muted);
    background: var(--jt-bg-primary);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.lcsp-mfl-sync {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--jt-text-secondary);
    font-size: 0.78rem;
    cursor: pointer;
    user-select: none;
}
.lcsp-mfl-sync input { accent-color: var(--jt-accent-blue); cursor: pointer; }
.lcsp-mfl-sync input:disabled { cursor: not-allowed; }
.lcsp-mfl-pending {
    color: var(--jt-text-muted);
    font-size: 0.7rem;
    font-style: italic;
    margin-left: 2px;
}
.lcsp-footer-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}
.lcsp-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s, background 0.12s;
}
.lcsp-btn:hover { opacity: 0.9; }
.lcsp-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.lcsp-btn-primary {
    background: var(--jt-accent-blue);
    color: #fff;
    border-color: var(--jt-accent-blue);
}
.lcsp-btn-primary:hover { background: var(--jt-accent-blue-hover); }
.lcsp-btn-ghost {
    background: transparent;
    color: var(--jt-text-secondary);
    border-color: var(--jt-border-primary);
}
.lcsp-btn-ghost:hover {
    color: var(--jt-text-primary);
    border-color: var(--jt-accent-blue);
}
.lcsp-footer-hint {
    font-size: 0.7rem;
    color: var(--jt-text-muted);
    text-align: center;
    font-style: italic;
}

/* =================================================================
   DIRTY-FORM CONFIRM OVERLAY
   Used when the commissioner tries to switch players (or exit edit
   mode) with an unsaved form. Sits above the LCR modal (z-index 10010)
   so it always wins focus.
   ================================================================= */
.lcr-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 10010;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.lcr-confirm-box {
    background: var(--jt-bg-deep);
    border: 1px solid var(--jt-border-muted);
    border-radius: 10px;
    padding: 20px 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.7);
}
.lcr-confirm-msg {
    color: var(--jt-text-primary);
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 16px;
}
.lcr-confirm-msg strong {
    color: var(--jt-accent-blue);
}
.lcr-confirm-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* =================================================================
   PRINT — invoked by ReportActions toolbar's Print button.
   Mirrors PCR's strategy: visibility-hidden everywhere except the
   modal subtree, drop the dark gradient, flatten parent/child rows.
   Side-car + chip rows are hidden in print.
   ================================================================= */
@media print {
    html, body {
        background: #fff !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
        height: auto !important;
    }
    body * { visibility: hidden !important; }
    #leagueContractsReportModal,
    #leagueContractsReportModal * { visibility: visible !important; }

    @page { size: letter landscape; margin: 0.4in; }

    #leagueContractsReportModal {
        position: absolute !important;
        left: 0 !important; top: 0 !important;
        width: 100% !important; height: auto !important;
        display: block !important;
        background: #fff !important;
        padding: 0 !important; margin: 0 !important;
        inset: auto !important; z-index: auto !important;
    }
    .lcr-backdrop { display: none !important; }
    .lcr-shell {
        display: block !important;
        max-width: none !important; max-height: none !important;
    }
    .lcr-modal {
        position: static !important;
        display: block !important;
        width: 100% !important; max-width: none !important;
        max-height: none !important; height: auto !important;
        box-shadow: none !important; border: none !important;
        border-radius: 0 !important;
        background: #fff !important; color: #000 !important;
        overflow: visible !important;
    }
    /* Side-car + chip row + dirty-confirm: print as not-there */
    .lcr-sidecar,
    .lcr-row-chips,
    .lcr-confirm-overlay { display: none !important; }

    .lcr-header {
        background: none !important;
        color: #000 !important;
        padding: 0 0 8px 0 !important;
        border-bottom: 2px solid #000 !important;
        margin-bottom: 12px !important;
    }
    .lcr-title, .lcr-context { color: #000 !important; }
    .lcr-title   { font-size: 18pt !important; }
    .lcr-context { font-size: 10pt !important; }

    .lcr-actions-mount,
    .lcr-close,
    .lcr-year-select,
    .lcr-btn { display: none !important; }
    .lcr-filters { display: none !important; }

    .lcr-footer {
        background: none !important;
        color: #000 !important;
        border-top: 1px solid #ccc !important;
        margin-top: 8px !important;
        padding: 4px 0 !important;
        font-size: 9pt !important;
    }

    .lcr-table-wrapper {
        overflow: visible !important;
        height: auto !important;
        flex: none !important;
    }
    .lcr-table {
        width: 100% !important;
        font-size: 9pt !important;
        color: #000 !important;
        page-break-inside: auto;
    }
    .lcr-table thead { display: table-header-group; }
    .lcr-table tbody tr { page-break-inside: avoid; }
    .lcr-th {
        background: #f5f5f5 !important;
        color: #000 !important;
        border-bottom: 1px solid #000 !important;
    }
    .lcr-table td { border-bottom: 1px solid #ddd !important; color: #000 !important; }

    .lcr-row-child[hidden] { display: table-row !important; }
    .lcr-expand-icon { display: none !important; }

    .lcr-row-unsigned {
        background: #f5f5f5 !important;
        box-shadow: inset 3px 0 0 #999 !important;
        color: #000 !important;
    }
    .lcr-row-unsigned td { color: #000 !important; }
}
