/* ==========================================================================
   PHL styles — built on the PHL Design System tokens (phl-tokens.css).
   Legacy variable names below alias the tokens so older rules inherit
   the system palette; new code should use the token names directly.
   ========================================================================== */
:root {
    --phl-orange-light: var(--phl-orange-bright);
    --phl-orange-dark: var(--phl-orange-deep);
    --phl-blue: var(--phl-steel);
    --phl-blue-light: var(--phl-steel-bright);
    --phl-blue-dark: var(--phl-steel-deep);
    --phl-gray: var(--phl-surface);
    --phl-gray-dark: var(--phl-muted);
}

/* ---- App shell (1280px max per design system) ---- */
.phl-shell {
    max-width: var(--shell-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
    width: 100%;
}

/* ---- Masthead: 56px sticky ink bar, orange active underline ---- */
.phl-masthead {
    background-color: var(--phl-ink);
    min-height: var(--header-h);
    padding-top: 0;
    padding-bottom: 0;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 8px rgba(23, 34, 46, 0.35);
}

.phl-masthead .navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: 0.01em;
    text-shadow: none;
}

.phl-masthead .nav-link {
    color: rgba(255, 255, 255, 0.82);
    font-family: var(--font-ui);
    font-weight: 500;
    font-size: 0.875rem;
    padding-top: 0.9rem;
    padding-bottom: calc(0.9rem - 2px);
    border-bottom: 2px solid transparent;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.phl-masthead .nav-link:hover,
.phl-masthead .nav-link:focus {
    color: #fff;
}

.phl-masthead .nav-item.active > .nav-link,
.phl-masthead .nav-link.active {
    color: #fff;
    border-bottom-color: var(--phl-orange);
}

.phl-masthead .navbar-text {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.8125rem;
}

.phl-masthead .dropdown-menu {
    border: 1px solid var(--phl-line);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    margin-top: 0;
}

.phl-nav-search input {
    width: 160px;
    background-color: var(--phl-ink-2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.phl-nav-search input::placeholder {
    color: var(--phl-faint);
}

.phl-nav-search input:focus {
    background-color: var(--phl-ink-2);
    border-color: var(--phl-orange);
    box-shadow: 0 0 0 2px rgba(239, 123, 0, 0.25);
    color: #fff;
}

/* ---- Footer on ink ---- */
.phl-footer {
    background-color: var(--phl-ink);
}

.phl-footer .text-muted {
    color: var(--phl-faint) !important;
}

/* Custom Bootstrap Color Classes */
.bg-phl-primary {
    background-color: var(--phl-orange) !important;
}

.bg-phl-secondary {
    background-color: var(--phl-blue) !important;
}

.text-phl-primary {
    color: var(--phl-orange) !important;
}

.text-phl-secondary {
    color: var(--phl-blue) !important;
}

.text-phl-orange {
    color: var(--phl-orange) !important;
}

.border-phl-primary {
    border-color: var(--phl-orange) !important;
}

.border-phl-secondary {
    border-color: var(--phl-blue) !important;
}

/* Button Variants */
/* Realign Bootstrap's default button hues to the PHL palette:
   primary = orange (the one place gradients survive), secondary/info = steel */
.btn-primary {
    --bs-btn-bg: var(--phl-orange);
    --bs-btn-border-color: var(--phl-orange);
    --bs-btn-hover-bg: var(--phl-orange-deep);
    --bs-btn-hover-border-color: var(--phl-orange-deep);
    --bs-btn-active-bg: var(--phl-orange-deep);
    --bs-btn-active-border-color: var(--phl-orange-deep);
    --bs-btn-focus-shadow-rgb: 239, 123, 0;
    background-image: linear-gradient(180deg, var(--phl-orange-bright), var(--phl-orange));
}

.btn-primary:hover, .btn-primary:active {
    background-image: none;
}

.btn-outline-primary {
    --bs-btn-color: var(--phl-steel);
    --bs-btn-border-color: var(--phl-steel);
    --bs-btn-hover-bg: var(--phl-steel);
    --bs-btn-hover-border-color: var(--phl-steel);
    --bs-btn-active-bg: var(--phl-steel-deep);
    --bs-btn-active-border-color: var(--phl-steel-deep);
    --bs-btn-focus-shadow-rgb: 70, 130, 180;
}

.btn-secondary, .btn-info {
    --bs-btn-bg: var(--phl-steel);
    --bs-btn-border-color: var(--phl-steel);
    --bs-btn-hover-bg: var(--phl-steel-deep);
    --bs-btn-hover-border-color: var(--phl-steel-deep);
    --bs-btn-active-bg: var(--phl-steel-deep);
    --bs-btn-active-border-color: var(--phl-steel-deep);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
}

a {
    color: var(--phl-steel);
}

a:hover {
    color: var(--phl-steel-deep);
}

.btn-phl-primary {
    background-color: var(--phl-orange);
    border-color: var(--phl-orange);
    color: white;
}

.btn-phl-primary:hover {
    background-color: var(--phl-orange-dark);
    border-color: var(--phl-orange-dark);
    color: white;
}

.btn-phl-secondary {
    background-color: var(--phl-blue);
    border-color: var(--phl-blue);
    color: white;
}

.btn-phl-secondary:hover {
    background-color: var(--phl-blue-dark);
    border-color: var(--phl-blue-dark);
    color: white;
}

.btn-outline-phl-primary {
    color: var(--phl-orange);
    border-color: var(--phl-orange);
}

.btn-outline-phl-primary:hover {
    background-color: var(--phl-orange);
    border-color: var(--phl-orange);
    color: white;
}

/* Button Sizes */
.btn-phl-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-phl-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-phl-xs {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Button States */
.btn-submitting {
    background-color: var(--phl-gold) !important;
    border-color: var(--phl-gold) !important;
    color: var(--phl-text) !important;
}

.btn-success-state {
    background-color: var(--phl-win) !important;
    border-color: var(--phl-win) !important;
    color: white !important;
}

/* Body and Layout */
body {
    font-family: var(--font-ui);
    background-color: var(--phl-surface);
    color: var(--phl-text);
    font-size: 0.9rem;
}

/* Display headings (Barlow Condensed) */
h1, h2, .phl-display {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.005em;
}

/* Score numerals (Rajdhani — numbers only, card size and up) */
.phl-score {
    font-family: var(--font-score);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* Label style: eyebrows, column headers, chips */
.phl-label {
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: var(--fs-label);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Navigation Enhancements */
.navbar-brand {
    font-size: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

.navbar-nav .dropdown-item {
    transition: all 0.2s ease;
}

.navbar-nav .dropdown-item:hover {
    background-color: rgba(239, 123, 0, 0.1);
    color: var(--phl-orange);
}

/* Cards and Containers */
.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

/* Standardized Card Components */
.phl-card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.phl-card-primary {
    border-left: 4px solid var(--phl-orange);
}

.phl-card-secondary {
    border-left: 4px solid var(--phl-blue);
}

.phl-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: var(--phl-ink);
    color: white;
    border-radius: 12px 12px 0 0 !important;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: none;
    border-bottom: 2px solid var(--phl-orange);
    padding: 0.75rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Tables — Data register: ink header, white 11px uppercase labels,
   orange 2px bottom rule, hover instead of zebra, tabular numerals */
.table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    font-variant-numeric: tabular-nums;
}

.table thead th {
    background: var(--phl-ink);
    border: none;
    border-bottom: 2px solid var(--phl-orange);
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    font-size: var(--fs-label);
    letter-spacing: 0.06em;
    padding: 0.5rem 0.5rem;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table tbody tr:hover {
    background-color: var(--phl-line-soft);
}

.table tbody td {
    border-color: var(--phl-line-soft);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: transparent;
}

/* Sticky ink header for scrolling data tables */
.phl-table-sticky thead th {
    position: sticky;
    top: 0;
    z-index: 5;
}

/* ---- Heat scale: steel (below avg) → white (avg) → orange (above avg) ---- */
.heat-lo-2 { background-color: var(--phl-heat-lo-2); }
.heat-lo-1 { background-color: var(--phl-heat-lo-1); }
.heat-mid  { background-color: var(--phl-heat-mid); }
.heat-hi-1 { background-color: var(--phl-heat-hi-1); }
.heat-hi-2 { background-color: var(--phl-heat-hi-2); }

/* ---- Row highlights (standings/keeper motif) ---- */
.row-div-winner  { background-color: var(--phl-row-divwinner) !important; }
.row-wild-card   { background-color: var(--phl-row-wildcard) !important; }
.row-keeper      { background-color: var(--phl-row-keeper) !important; }
.row-franchise   { background-color: var(--phl-row-franchise) !important; }
.row-ineligible  { background-color: var(--phl-row-ineligible) !important; }
.row-win  { background-color: color-mix(in srgb, var(--phl-win) 12%, white) !important; }
.row-loss { background-color: color-mix(in srgb, var(--phl-loss) 9%, white) !important; }

/* ---- Semantic text/badge helpers on the token palette ---- */
.text-phl-gold { color: var(--phl-gold) !important; }
.badge-phl-gold { background-color: var(--phl-gold) !important; color: #fff !important; }
.badge-phl-steel { background-color: var(--phl-steel) !important; color: #fff !important; }

/* ---- Position badges: 2-3 char, 11px, white on position hue ---- */
.pos-badge {
    display: inline-block;
    min-width: 2.4em;
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-badge);
    color: #fff;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: var(--fs-label);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    line-height: 1.2;
}

.pos-badge.pos-qb   { background-color: var(--pos-qb); }
.pos-badge.pos-rb   { background-color: var(--pos-rb); }
.pos-badge.pos-wr   { background-color: var(--pos-wr); }
.pos-badge.pos-te   { background-color: var(--pos-te); }
.pos-badge.pos-k    { background-color: var(--pos-k); }
.pos-badge.pos-dst  { background-color: var(--pos-dst); }
.pos-badge.pos-flex { background-color: var(--pos-flex); }

/* ---- Game register: matchup card ---- */
.phl-matchup-card {
    background: var(--phl-card);
    border: 1px solid var(--phl-line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.phl-matchup-card .matchup-score {
    font-family: var(--font-score);
    font-weight: 700;
    font-size: var(--fs-score);
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--phl-text);
}

.phl-matchup-card .matchup-score.loser {
    color: var(--phl-muted);
}

.phl-winprob-bar {
    height: 4px;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--phl-steel), var(--phl-orange));
}

/* Owner Summary Cards */
.owner-summary-card {
    transition: all 0.3s ease;
    border-left: 4px solid var(--phl-orange);
    margin-bottom: 1rem;
    max-width: 450px;
}

.owner-summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.owner-summary-card .card-title {
    color: var(--phl-orange);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.owner-summary-card .team-name {
    color: var(--phl-gray-dark);
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.owner-summary-card .owner-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background-color: rgba(248, 249, 250, 0.5);
    border-radius: 6px;
    font-size: 0.8rem;
}

.owner-summary-card .stat-item {
    text-align: center;
    flex: 1;
}

.owner-summary-card .stat-value {
    font-weight: 600;
    color: var(--phl-blue);
    display: block;
}

.owner-summary-card .stat-label {
    color: var(--phl-gray-dark);
    font-size: 0.7rem;
}

.owner-roster {
    margin-top: 0.75rem;
}

.roster-player {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.roster-player .player-info {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 1;
    min-width: 200px;
}

.roster-player .player-details {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.roster-player:hover {
    background-color: rgba(239, 123, 0, 0.05);
}

.roster-player.keeper {
    background-color: rgba(239, 123, 0, 0.1);
    border-left: 3px solid var(--phl-orange);
    font-weight: 500;
}

.roster-player .player-name {
    font-weight: 500;
    color: #333;
}

.roster-player .player-position {
    color: var(--phl-gray-dark);
    font-size: 0.7rem;
    margin-left: 0.15rem;
}

.roster-player .player-salary {
    color: var(--phl-blue);
    font-weight: 500;
    font-size: 0.75rem;
    width: 45px;
    text-align: right;
    display: inline-block;
}

.roster-player .keeper-status-tag {
    color: var(--phl-gray-dark);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    background-color: rgba(108, 117, 125, 0.1);
    width: 32px;
    text-align: center;
    display: inline-block;
}

.roster-player.keeper .keeper-status-tag {
    color: var(--phl-orange);
    background-color: rgba(239, 123, 0, 0.1);
}

/* Keeper Status Badges */
.keeper-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keeper-status.pending {
    background-color: var(--phl-gold-soft);
    color: var(--phl-warn);
    border: 1px solid var(--phl-gold-soft);
}

.keeper-status.complete {
    background-color: var(--phl-row-wildcard);
    color: var(--phl-steel-deep);
    border: 1px solid var(--phl-row-divwinner);
}

.keeper-status.confirmed {
    background-color: #d1e7dd;
    color: var(--phl-win);
    border: 1px solid color-mix(in srgb, var(--phl-win) 25%, white);
}

/* Progress Bars */
.progress {
    height: 8px;
    border-radius: 20px;
    background-color: var(--phl-line);
}

.progress-bar {
    background: linear-gradient(90deg, var(--phl-orange), var(--phl-orange-light));
    border-radius: 20px;
}

/* Filter controls: see the .flt-* kit at the end of this file (Design System §10) */

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.phl-loading {
    text-align: center;
    padding: 2rem;
    color: var(--phl-gray-dark);
}

.phl-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--phl-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--phl-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 1rem;
    color: var(--phl-gray-dark);
    font-weight: 500;
}

/* Alerts and Messages */
.alert-phl-primary {
    background-color: rgba(239, 123, 0, 0.1);
    border-color: var(--phl-orange);
    color: var(--phl-orange-dark);
}

.alert-phl-secondary {
    background-color: rgba(70, 130, 180, 0.1);
    border-color: var(--phl-blue);
    color: var(--phl-blue-dark);
}

/* Trade Cards */
.trade-card {
    border-left: 4px solid var(--phl-blue);
    transition: all 0.2s ease;
}

.trade-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.trade-date {
    color: var(--phl-gray-dark);
    font-size: 0.85rem;
    font-weight: 500;
}

.trade-details .trade-line {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.trade-details .trade-line:last-child {
    margin-bottom: 0;
}

.trade-owners {
    font-weight: 600;
    color: var(--phl-blue);
    font-size: 0.85rem;
    margin-bottom: 0.15rem;
}

.trade-items {
    color: var(--phl-gray-dark);
    font-size: 0.8rem;
    margin-left: 1rem;
    font-style: italic;
}

/* New side-by-side trade layout */
.trade-side {
    padding: 0.5rem;
    border: 1px solid var(--phl-line);
    border-radius: 6px;
    background-color: var(--phl-surface);
}

.trade-direction {
    color: var(--phl-blue);
    font-size: 0.85rem;
}

.trade-item {
    color: var(--phl-gray-dark);
    font-size: 0.8rem;
    padding: 0.1rem 0;
    font-style: italic;
    line-height: 1.4;
}

/* Champions Page Styles */
.champions-page {
    min-height: 100vh;
}

.champions-hero {
    background: var(--phl-surface);
    border-radius: 15px;
    margin: 1rem 0;
}

.champion-trophy-glow {
    filter: drop-shadow(0 0 20px rgba(255, 193, 7, 0.4));
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.champion-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.champion-stats .stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

.champion-stats .stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dynasty Champions Pyramid */
.dynasty-pyramid {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.pyramid-tier {
    position: relative;
    margin-bottom: 0;
    padding: 1rem 0.5rem;
    overflow: hidden;
}

.tier-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

/* Tier 3: 3-Time Champions (Darkest Orange) */
.tier-3 .tier-background {
    background: rgba(239, 123, 0, 0.25);
}

/* Tier 2: 2-Time Champions (Medium Orange) */
.tier-2 .tier-background {
    background: rgba(239, 123, 0, 0.15);
}

/* Tier 1: 1-Time Champions (Lightest Orange) */
.tier-1 .tier-background {
    background: rgba(239, 123, 0, 0.08);
}

/* Dynasty Card Base Styles */
.dynasty-card {
    background: var(--phl-card);
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin: 0.5rem;
    position: relative;
    overflow: hidden;
}

.dynasty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--phl-orange), var(--phl-blue));
}

.dynasty-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 35px rgba(239, 123, 0, 0.2);
    border-color: var(--phl-orange);
}

/* Large Cards (3-Time Champions) */
.dynasty-card-large {
    padding: 2rem 1.75rem;
    min-width: 220px;
    min-height: 150px;
}

.dynasty-card-large .dynasty-crown {
    font-size: 2rem;
    color: #ffd700;
    filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.4));
    animation: crown-glow 3s ease-in-out infinite;
}

@keyframes crown-glow {
    0%, 100% { filter: drop-shadow(0 4px 8px rgba(255, 215, 0, 0.4)) brightness(1); }
    50% { filter: drop-shadow(0 6px 12px rgba(255, 215, 0, 0.6)) brightness(1.1); }
}

.dynasty-card-large h4 {
    font-size: 1.3rem;
    font-weight: bold;
}

.dynasty-card-large .dynasty-icon .fa-trophy {
    font-size: 1.5rem;
    margin: 0 3px;
}

/* Medium Cards (2-Time Champions) */
.dynasty-card-medium {
    padding: 1.5rem 1.25rem;
    min-width: 180px;
    min-height: 120px;
}

.dynasty-card-medium h5 {
    font-size: 1.1rem;
    font-weight: 600;
}

.dynasty-card-medium .dynasty-icon .fa-trophy {
    font-size: 1.3rem;
    margin: 0 2px;
}

/* Small Cards (1-Time Champions) */
.dynasty-card-small {
    padding: 1rem 1rem;
    min-width: 130px;
    min-height: 90px;
}

.dynasty-card-small h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.dynasty-card-small .dynasty-icon .fa-trophy {
    font-size: 1.1rem;
}

/* Dynasty Icon Styling */
.dynasty-icon .fa-trophy {
    filter: drop-shadow(0 2px 4px rgba(255, 193, 7, 0.3));
    color: #ffd700;
}

/* Responsive Pyramid */
@media (max-width: 992px) {
    .dynasty-card-large {
        min-width: 180px;
        padding: 1.75rem 1.5rem;
    }
    
    .dynasty-card-medium {
        min-width: 150px;
        padding: 1.25rem 1rem;
    }
    
    .dynasty-card-small {
        min-width: 120px;
        padding: 1rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .pyramid-tier {
        padding: 1rem 0.25rem;
    }
    
    .dynasty-card-large,
    .dynasty-card-medium,
    .dynasty-card-small {
        min-width: auto;
        width: 100%;
        max-width: 160px;
        margin: 0.25rem;
    }
}

/* Current User Highlight */
.current-user-card {
    border: 2px solid var(--phl-orange) !important;
    box-shadow: 0 4px 15px rgba(239, 123, 0, 0.3) !important;
    position: relative;
}

.current-user-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--phl-orange), var(--phl-orange-light));
    border-radius: inherit;
    z-index: -1;
    animation: current-user-glow 3s ease-in-out infinite;
}

@keyframes current-user-glow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.current-user-card .card-title::after {
    content: " (You)";
    color: var(--phl-orange);
    font-weight: bold;
    font-size: 0.8em;
}

/* Authentication Styles */
.nav-link .fas.fa-user {
    color: var(--phl-orange);
}

.dropdown-item .fas {
    width: 16px;
    text-align: center;
}

/* Password Toggle Styles */
.input-group .btn-outline-secondary {
    border-color: #ced4da;
    color: var(--phl-muted);
    transition: all 0.2s ease;
}

.input-group .btn-outline-secondary:hover {
    background-color: var(--phl-orange);
    border-color: var(--phl-orange);
    color: white;
}

.input-group .btn-outline-secondary:focus {
    box-shadow: 0 0 0 0.2rem rgba(239, 123, 0, 0.25);
    border-color: var(--phl-orange);
}

.input-group .btn-outline-secondary:active {
    background-color: var(--phl-orange-dark);
    border-color: var(--phl-orange-dark);
}

/* Ensure password toggle button doesn't submit forms */
.input-group .btn[type="button"] {
    cursor: pointer;
}

/* Timeline Styles */
.timeline-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--phl-orange), var(--phl-blue));
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    margin: 3rem 0;
    width: 100%;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: var(--phl-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(239, 123, 0, 0.3);
    z-index: 10;
}

.timeline-marker .fa-trophy {
    color: white;
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.timeline-content {
    width: 45%;
    padding: 0 2rem;
}

.timeline-left .timeline-content {
    margin-left: 0;
    text-align: right;
}

.timeline-right .timeline-content {
    margin-left: 55%;
    text-align: left;
}

.champion-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(239, 123, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.champion-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--phl-orange), var(--phl-blue));
}

.champion-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.champion-season {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.champion-name {
    color: var(--phl-blue);
    font-size: 1.4rem;
    font-weight: 600;
}

.champion-details .badge {
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
}

/* Notable Achievements */
.notable-achievements {
    background: var(--phl-surface);
}

.achievement-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.achievement-card h5 {
    color: var(--phl-blue);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .timeline-wrapper::before {
        left: 30px;
    }
    
    .timeline-marker {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: 80px !important;
        text-align: left !important;
        padding: 0 1rem;
    }
    
    .timeline-left .timeline-content,
    .timeline-right .timeline-content {
        margin-left: 80px;
        text-align: left;
    }
    
    .champion-stats {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .champion-stats .stat-item {
        margin-bottom: 1rem;
    }
}

/* Schedule Items */
.schedule-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.schedule-item:hover {
    background-color: rgba(239, 123, 0, 0.05);
}

.schedule-item.next-event {
    background-color: rgba(239, 123, 0, 0.08);
    border: 1px solid rgba(239, 123, 0, 0.3);
    box-shadow: 0 1px 4px rgba(239, 123, 0, 0.15);
}

/* Sortable Table */
.table-sortable th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.table-sortable th.sortable:hover {
    background-color: rgba(239, 123, 0, 0.1);
}

.table-sortable th.sortable i {
    font-size: 0.7rem;
    margin-left: 0.25rem;
    transition: all 0.2s ease;
}

.table-sortable th.sortable.asc i:before {
    content: "\f0de"; /* fa-sort-up */
    color: var(--phl-orange);
}

.table-sortable th.sortable.desc i:before {
    content: "\f0dd"; /* fa-sort-down */
    color: var(--phl-orange);
}

/* DSC Summary Table Gradient Shading */
#dsc-summary-table .dsc-cell {
    position: relative;
}

#dsc-summary-table .dsc-cell .dsc-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 3px;
    opacity: 0.35;
    z-index: 0;
}

#dsc-summary-table .dsc-cell .dsc-value {
    position: relative;
    z-index: 1;
    font-weight: 600;
    color: black; /* Will be updated by JavaScript based on background color */
}

.schedule-item.completed {
    opacity: 0.7;
}

.schedule-item .schedule-date {
    min-width: 120px;
    font-weight: 600;
    color: var(--phl-orange);
}

.schedule-item .schedule-event {
    font-weight: 500;
}

.schedule-item .schedule-status {
    margin-left: auto;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }

    .table {
        font-size: 0.9rem;
    }
    
    .owner-summary-card .card-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }

    .table {
        font-size: 0.8rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-10px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Utility Classes */
.text-muted-light {
    color: var(--phl-faint) !important;
}

.bg-gradient-primary {
    background: var(--phl-ink);
    border-bottom: 2px solid var(--phl-orange);
}

.bg-gradient-secondary {
    background: var(--phl-ink);
}

.shadow-soft {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.shadow-medium {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.border-radius-lg {
    border-radius: 12px !important;
}

.border-radius-xl {
    border-radius: 16px !important;
}

/* ===========================================
   PAGE-SPECIFIC STYLES
   =========================================== */

/* === INDEX PAGE === */
.hero-section {
    padding: 3rem 0;
}

.hero-section h1 {
    font-size: 3rem !important;
    font-weight: bold !important;
    margin-bottom: 2rem !important;
}

.hero-section p {
    font-size: 1.25rem !important;
    margin-bottom: 3rem !important;
}

.feature-card {
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    opacity: 0.8;
}

.status-item {
    padding: 1rem 0;
}

.current-status .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* === OFFSEASON HOME PAGE === */
.dynasty-leaderboard {
    background: linear-gradient(135deg, var(--phl-blue), var(--phl-blue-light));
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.dynasty-leaderboard h5 {
    margin-bottom: 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.keeper-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 450px));
    gap: 1rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

@media (min-width: 1400px) {
    .keeper-summary-grid {
        grid-template-columns: repeat(auto-fill, minmax(400px, 430px));
    }
}

@media (min-width: 1600px) {
    .keeper-summary-grid {
        grid-template-columns: repeat(auto-fill, minmax(380px, 420px));
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--phl-orange);
}

.section-title {
    color: var(--phl-orange);
    font-weight: 700;
    margin: 0;
}

/* === SELECT KEEPERS PAGE === */
.owner-selection {
    background: var(--phl-gray);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.owner-dropdown {
    width: auto;
    min-width: 250px;
    max-width: 400px;
    padding: 0.75rem;
    border: 2px solid var(--phl-line);
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.owner-dropdown:focus {
    border-color: var(--phl-orange);
    box-shadow: 0 0 0 3px rgba(239, 123, 0, 0.1);
    outline: none;
}

.dsc-summary-section {
    background: linear-gradient(135deg, var(--phl-blue), var(--phl-blue-light));
    color: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.dsc-summary-table {
    width: 100%;
    margin-bottom: 0;
}

.dsc-summary-table td {
    padding: 0.5rem 1rem;
    border: none;
    color: white;
}

.dsc-value {
    font-weight: 600;
    font-size: 1.1rem;
}

.keeper-grid {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.keeper-grid-header {
    background: linear-gradient(135deg, var(--phl-orange), var(--phl-orange-light));
    color: white;
    padding: 1rem;
    font-weight: 600;
    text-align: center;
}

.keeper-grid-body {
    max-height: 600px;
    overflow-y: auto;
}

.keeper-row {
    border-bottom: 1px solid var(--phl-line-soft);
    transition: all 0.2s ease;
}

/* Only apply flex to keeper-row when NOT in a table */
.keeper-row:not(tr) {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
}

.keeper-row:hover {
    background: var(--phl-surface);
}

.keeper-row.ineligible {
    background: rgba(220, 53, 69, 0.1);
    color: var(--phl-loss);
}

.keeper-row.rk-player {
    background: rgba(108, 117, 125, 0.1);
    color: var(--phl-text);
}

.keeper-row.franchise-player {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid var(--phl-gold);
}

/* Only apply flex styles to player-info when keeper-row is NOT a table row */
.keeper-row:not(tr) .player-info {
    flex: 1;
    min-width: 0;
    max-width: 300px;
    flex-shrink: 0;
}

.keeper-row .player-name {
    font-weight: 600;
    color: var(--phl-blue);
    text-decoration: none;
    margin-right: 0.5rem;
}

.keeper-row .player-name:hover {
    color: var(--phl-orange);
}

.keeper-row .player-position {
    background: var(--phl-gray-dark);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.keeper-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.keeper-salary {
    font-weight: 500;
    color: var(--phl-blue);
    font-size: 0.75rem;
    width: 45px;
    text-align: right;
    display: inline-block;
}

.keeper-status {
    color: var(--phl-gray-dark);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    background-color: rgba(108, 117, 125, 0.1);
    width: 32px;
    text-align: center;
    display: inline-block;
    margin-left: 0.25rem;
}

.action-button {
    border: none;
    background: var(--phl-orange);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.action-button:hover {
    background: var(--phl-orange-dark);
    transform: scale(1.1);
}

.action-button:disabled {
    background: var(--phl-line);
    color: var(--phl-muted);
    cursor: not-allowed;
    transform: none;
}

.franchise-button {
    background: var(--phl-gold);
    color: var(--phl-text);
}

.franchise-button:hover {
    background: var(--phl-warn);
}

.submit-section {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.empty-grid {
    text-align: center;
    padding: 3rem;
    color: var(--phl-gray-dark);
}

.loading-grid {
    text-align: center;
    padding: 3rem;
}

/* Player row improvements for Select Keepers */
.roster-player .player-position {
    background: none !important;
    color: var(--phl-gray-dark) !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
}

/* === TRADE PAGE === */
.trade-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
}

.trade-summary {
    background: var(--phl-surface);
    border: 1px solid var(--phl-line);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.owner-selector {
    margin-bottom: 1rem;
}

.owner-selector .form-select {
    max-width: 300px;
}

.owner-selector .form-select option {
    color: #333 !important;
    background-color: white !important;
    padding: 0.5rem !important;
    font-size: 1rem !important;
    height: auto !important;
    min-height: 2rem !important;
    display: block !important;
}

/* More specific targeting for trade page dropdowns */
#owner1-select option,
#owner2-select option {
    color: #333 !important;
    background-color: white !important;
    padding: 0.5rem !important;
    font-size: 1rem !important;
    height: auto !important;
    min-height: 2rem !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force dropdown visibility */
#owner1-select,
#owner2-select {
    color: #333 !important;
    background-color: white !important;
    border: 1px solid #ccc !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.player-roster {
    border: 1px solid var(--phl-line);
    border-radius: 6px;
}

.trade-page .player-row {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid var(--phl-line-soft);
    transition: background-color 0.2s;
}

.trade-page .player-row:hover {
    background: rgba(239, 123, 0, 0.1);
}

.trade-page .player-row.keeper {
    background: color-mix(in srgb, var(--phl-win) 12%, white);
    border-left: 4px solid var(--phl-win);
}

.trade-page .player-row.ineligible {
    background: var(--phl-row-ineligible);
    color: var(--phl-loss);
}

.trade-page .player-row.rk-player {
    background: var(--phl-line-soft);
    color: var(--phl-muted);
}

.trade-page .player-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 200px;
    max-width: 300px;
    flex-shrink: 0;
}

.trade-page .player-name {
    font-weight: 500;
    color: var(--phl-text);
}

.position-badge {
    background: var(--phl-orange);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.keeper-status-badge {
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.keeper-status-k1, .keeper-status-k2, .keeper-status-k3, .keeper-status-k4, .keeper-status-k5 {
    background: color-mix(in srgb, var(--phl-win) 18%, white);
    color: var(--phl-win);
}

.keeper-status-rk {
    background: var(--phl-surface);
    color: var(--phl-muted);
}

.keeper-status-ie {
    background: var(--phl-row-ineligible);
    color: var(--phl-loss);
}

.salary-display {
    font-family: var(--font-ui);
    font-variant-numeric: tabular-nums;
    font-weight: bold;
    color: var(--phl-text);
}

.trade-item {
    background: var(--phl-surface);
    border: 1px solid var(--phl-line);
    border-radius: 6px;
    padding: 0.5rem;
    margin: 0.25rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trade-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dollar-input {
    width: 80px;
    text-align: right;
}

.trade-summary-table {
    width: 100%;
}

.trade-summary-table th, .trade-summary-table td {
    padding: 0.5rem;
    text-align: center;
    border: 1px solid var(--phl-line);
}

.trade-summary-table th {
    background: var(--phl-surface);
    font-weight: bold;
}

.validation-error {
    background: var(--phl-row-ineligible);
    color: var(--phl-loss);
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0.5rem 0;
}

.validation-warning {
    background: var(--phl-gold-soft);
    color: var(--phl-warn);
    border: 1px solid var(--phl-gold-soft);
    border-radius: 4px;
    padding: 0.5rem;
    margin: 0.5rem 0;
}



.loading-spinner {
    text-align: center;
    padding: 2rem;
    color: var(--phl-muted);
}

/* Trade page specific roster player improvements */
.trade-page .roster-player button {
    min-width: 80px;
    padding: 0.375rem 0.75rem;
}

.trade-page .roster-player .player-position {
    background: none !important;
    color: var(--phl-gray-dark) !important;
    padding: 0 !important;
    border-radius: 0 !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
}

/* === SEARCH KEEPERS PAGE === */
.search-filters {
    background: var(--phl-gray);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.results-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.results-header {
    background: linear-gradient(135deg, var(--phl-blue), var(--phl-blue-light));
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: between;
    align-items: center;
}

.results-count {
    font-size: 0.9rem;
    opacity: 0.9;
}

.results-table {
    max-height: 600px;
    overflow-y: auto;
}

.keeper-table {
    width: 100%;
    margin-bottom: 0;
}

.keeper-table th {
    background: var(--phl-gray);
    color: var(--phl-blue);
    font-weight: 600;
    padding: 0.75rem 0.5rem;
    border: none;
    position: sticky;
    top: 0;
    z-index: 10;
    cursor: pointer;
    user-select: none;
}

.keeper-table th:hover {
    background: rgba(239, 123, 0, 0.1);
}

.keeper-table th i {
    margin-left: 0.25rem;
    opacity: 0.6;
}

.keeper-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--phl-line-soft);
    vertical-align: middle;
}

.search-keepers-page .keeper-row {
    transition: all 0.2s ease;
}

.search-keepers-page .keeper-row:hover {
    background: rgba(239, 123, 0, 0.05);
}

.search-keepers-page .keeper-row.franchise-player {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid var(--phl-gold);
}

.search-keepers-page .keeper-row.rk-player {
    background: rgba(108, 117, 125, 0.1);
}

.search-keepers-page .keeper-row.ineligible-player {
    background: rgba(220, 53, 69, 0.1);
    color: var(--phl-loss);
}

.search-keepers-page .player-name {
    font-weight: 600;
    color: var(--phl-blue);
    text-decoration: none;
}

.search-keepers-page .player-name:hover {
    color: var(--phl-orange);
}

.search-keepers-page .position-badge {
    background: var(--phl-gray-dark);
    color: white;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.search-keepers-page .keeper-status-badge {
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.search-keepers-page .keeper-status-k1, 
.search-keepers-page .keeper-status-k2, 
.search-keepers-page .keeper-status-k3, 
.search-keepers-page .keeper-status-k4, 
.search-keepers-page .keeper-status-k5 {
    background: var(--phl-orange);
    color: white;
}

.search-keepers-page .keeper-status-rk {
    background: var(--phl-gray-dark);
    color: white;
}

.search-keepers-page .keeper-status-nd {
    background: var(--phl-muted);
    color: white;
}

.search-keepers-page .keeper-status-ie {
    background: var(--phl-loss);
    color: white;
}

.search-keepers-page .salary-amount {
    font-weight: 500;
    color: var(--phl-blue);
}

.search-keepers-page .owner-link {
    color: var(--phl-blue);
    text-decoration: none;
    font-weight: 500;
}

.search-keepers-page .owner-link:hover {
    color: var(--phl-orange);
}

.empty-results {
    text-align: center;
    padding: 3rem;
    color: var(--phl-gray-dark);
}

.loading-results {
    text-align: center;
    padding: 3rem;
}

/* Owner Name Links */
.owner-name-link {
    color: var(--phl-blue) !important;
    font-weight: 600;
    transition: color 0.2s ease;
}

.owner-name-link:hover {
    color: var(--phl-orange) !important;
    text-decoration: underline !important;
}

/* Specific styling for Dynasty Points Leaders */
.dynasty-leaderboard .owner-name-link {
    color: inherit !important;
}

.dynasty-leaderboard .owner-name-link:hover {
    color: var(--phl-orange) !important;
}

/* Specific styling for DSC Summary table */
.dsc-cell .owner-name-link {
    color: inherit !important;
}

.dsc-cell .owner-name-link:hover {
    color: var(--phl-orange) !important;
}

/* === STANDINGS PAGE === */
.standings-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 1rem;
}

.standings-header {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.standings-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.season-selector select,
.standings-type-selector select {
    border: 2px solid var(--phl-line);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.season-selector select:focus,
.standings-type-selector select:focus {
    border-color: var(--phl-orange);
    box-shadow: 0 0 0 3px rgba(239, 123, 0, 0.1);
}

.standings-title {
    color: var(--phl-orange);
    font-weight: 700;
    font-size: 1.5rem;
    margin: 0;
    text-align: center;
}

.playoff-link a {
    color: var(--phl-blue);
    text-decoration: none;
    font-weight: 500;
}

.playoff-link a:hover {
    color: var(--phl-orange);
    text-decoration: underline;
}

.standings-type-selector {
    text-align: right;
}

.simulation-update {
    font-size: 0.85rem;
    color: var(--phl-gray-dark);
    margin-bottom: 0.5rem;
}

.standings-tables {
    margin-bottom: 2rem;
}

.standings-table {
    margin-bottom: 2rem;
    font-size: 0.85rem;
}

.standings-table th {
    background: var(--phl-ink);
    color: #fff;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 0.25rem;
    border: 1px solid var(--phl-ink-2);
    border-bottom: 2px solid var(--phl-orange);
    font-size: var(--fs-label);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.standings-table th[data-sort] {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.standings-table th[data-sort]:hover {
    background: var(--phl-ink-2);
}

.standings-table .table-group-header {
    background: var(--phl-ink-2);
    color: #fff;
    font-weight: 700;
    border-color: var(--phl-ink);
    border-bottom: none;
}

.standings-table td {
    text-align: center;
    padding: 0.4rem 0.25rem;
    vertical-align: middle;
    border: 1px solid var(--phl-line);
    font-size: 0.8rem;
}

.standings-table td.text-left {
    text-align: left;
    padding-left: 0.5rem;
}

.standings-table td.rank-small {
    font-size: 0.7rem;
    color: var(--phl-gray-dark);
    font-weight: 500;
}

.standings-row {
    transition: all 0.2s ease;
}

.standings-row:hover {
    background-color: rgba(239, 123, 0, 0.05);
}

.standings-row.division-winner {
    background-color: var(--phl-row-divwinner);
}

.standings-row.wild-card {
    background-color: var(--phl-row-wildcard);
}

.league-standings,
.advanced-standings {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.division-standings {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.divisions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.division-table h3 {
    color: var(--phl-blue);
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-align: center;
}

.division-table table {
    font-size: 0.85rem;
}

.playoff-standings,
.final-standings {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section-header {
    color: var(--phl-orange);
    font-weight: 700;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--phl-orange);
}

.standings-key {
    background: var(--phl-card);
    border: 1px solid var(--phl-line);
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.key-container h3 {
    text-align: center;
    color: var(--phl-blue);
    font-weight: 700;
    margin-bottom: 1rem;
}

.key-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.key-item {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 600;
    color: #333;
}

.key-item.division-winner {
    background-color: var(--phl-row-divwinner);
    color: var(--phl-text);
}

.key-item.wild-card {
    background-color: var(--phl-row-wildcard);
    color: var(--phl-text);
}

.key-definitions {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.key-definitions div {
    font-size: 0.9rem;
    color: #333;
}

/* Responsive Design for Standings */
@media (max-width: 1200px) {
    .standings-table {
        font-size: 0.75rem;
    }
    
    .standings-table th,
    .standings-table td {
        padding: 0.3rem 0.2rem;
    }
}

@media (max-width: 992px) {
    .standings-controls {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .standings-type-selector {
        text-align: center;
    }
    
    .divisions-container {
        grid-template-columns: 1fr;
    }
    
    .standings-table {
        overflow-x: auto;
        display: block;
        white-space: nowrap;
    }
    
    .standings-table table {
        width: auto;
        min-width: 100%;
    }
}

@media (max-width: 768px) {
    .standings-container {
        padding: 0.5rem;
    }
    
    .standings-header {
        padding: 1rem;
    }
    
    .standings-title {
        font-size: 1.25rem;
    }
    
    .key-definitions {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   SPEC ALIGNMENT LAYER — enforces PHL-Design-System.html component metrics.
   Loaded last in this file so the cascade wins over the legacy rules above.
   Source of truth: C:\Monte\PHL\Design\PHL-Design-System.html (sections
   05 tables, 06 game register, 09 buttons & forms).
   ========================================================================== */

/* ---- Buttons: one size. 13.5px/600, 6px radius, 9x18 padding (spec 09) ---- */
.btn,
.btn-sm,
.btn-lg,
.btn-phl-lg,
.btn-phl-sm {
    font-family: var(--font-ui);
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    padding: 9px 18px !important;
    line-height: 1.2;
    box-shadow: none !important;
    text-shadow: none;
}

.btn-sm, .btn-phl-sm, .btn-phl-xs {
    font-size: 12.5px !important;
    padding: 6px 12px !important;
}

/* Primary: orange gradient at rest, solid deep on hover (the one allowed gradient) */
.btn-primary, .btn-phl-primary {
    background: linear-gradient(180deg, var(--phl-orange-bright), var(--phl-orange)) !important;
    border-color: transparent !important;
    color: #fff !important;
}

.btn-primary:hover, .btn-phl-primary:hover,
.btn-primary:active, .btn-phl-primary:active {
    background: var(--phl-orange-deep) !important;
}

/* Secondary: white with steel outline (spec) — NOT solid steel */
.btn-secondary, .btn-phl-secondary, .btn-info, .btn-outline-primary, .btn-outline-phl-primary {
    background: #fff !important;
    color: var(--phl-steel-deep) !important;
    border: 1px solid var(--phl-steel) !important;
}

.btn-secondary:hover, .btn-phl-secondary:hover, .btn-info:hover,
.btn-outline-primary:hover, .btn-outline-phl-primary:hover {
    background: var(--phl-row-wildcard) !important;
    color: var(--phl-steel-deep) !important;
}

/* Quiet text button */
.btn-quiet {
    background: transparent !important;
    color: var(--phl-muted) !important;
    border-color: transparent !important;
}

.btn-quiet:hover {
    background: var(--phl-line-soft) !important;
    color: var(--phl-text) !important;
}

/* ---- Cards: 10px radius, 1px line border, quiet shadow, NO lift/scale ---- */
.card, .phl-card, .dynasty-card, .champion-card, .achievement-card,
.keeper-grid, .filter-controls, .results-section, .standings-header,
.league-standings, .advanced-standings, .division-standings,
.playoff-standings, .final-standings, .trade-summary, .submit-section {
    border-radius: 10px !important;
    border: 1px solid var(--phl-line) !important;
    box-shadow: var(--shadow-card) !important;
}

.card:hover, .phl-card:hover, .dynasty-card:hover, .champion-card:hover,
.achievement-card:hover, .feature-card:hover, .trade-card:hover,
.owner-summary-card:hover, .current-user-card:hover {
    transform: none !important;
    box-shadow: var(--shadow-hover) !important;
}

/* Kill the glow/pulse animations — the spec has none */
.champion-trophy-glow, .dynasty-crown, .current-user-card::before,
.dynasty-card::before, .champion-card::before {
    animation: none !important;
}

.dynasty-card::before, .champion-card::before, .current-user-card::before {
    display: none !important;
}

.current-user-card {
    border: 2px solid var(--phl-orange) !important;
    box-shadow: var(--shadow-card) !important;
}

/* ---- Card headers: ink, 10x18 padding, Barlow Condensed 600 ~17px (spec 06) ---- */
.card-header, .keeper-grid-header, .results-header {
    background: var(--phl-ink) !important;
    color: #fff !important;
    border: none !important;
    border-bottom: 2px solid var(--phl-orange) !important;
    border-radius: 10px 10px 0 0 !important;
    font-family: var(--font-display) !important;
    font-weight: 600 !important;
    font-size: 17px !important;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    padding: 10px 18px !important;
}

.card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5, .card-header h6 {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 17px;
    margin: 0;
}

/* ---- Data tables: spec 05 metrics ---- */
.table thead th {
    padding: 9px 12px;
    font-size: 11px;
    color: #E4E9EE;
}

.table tbody td {
    padding: 7px 12px;
}

.table {
    box-shadow: none;
    border-radius: 0;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ---- Forms: 2px line border, 6px radius, orange focus WITHOUT glow (spec 09) ---- */
.form-control, .form-select, .owner-dropdown {
    border: 2px solid var(--phl-line) !important;
    border-radius: 6px !important;
    font-family: var(--font-ui);
}

.form-control:focus, .form-select:focus, .owner-dropdown:focus {
    border-color: var(--phl-orange) !important;
    box-shadow: none !important;
    outline: none !important;
}

.form-label, .field label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--phl-muted);
}

/* ---- Status chips: 10.5px/700 uppercase pills (spec 06) ---- */
.keeper-status, .keeper-status-badge, .filter-badge, .chip {
    display: inline-block;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-radius: 999px !important;
    padding: 3px 10px !important;
    border: none !important;
}

/* ---- Game register: score tiles + matchup cards (spec 06) ---- */
.phl-matchup-card {
    background: var(--phl-card);
    border: 1px solid var(--phl-line);
    border-radius: 8px !important;
    box-shadow: none;
    padding: 10px 12px 8px !important;
}

.phl-matchup-card .mc-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
    color: var(--phl-faint);
    margin-bottom: 6px;
}

.phl-matchup-card .mc-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 2px 0;
    font-size: 13px;
}

.phl-matchup-card .mc-row .sc {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.phl-matchup-card .mc-row.winner { color: var(--phl-text); font-weight: 600; }
.phl-matchup-card .mc-row.winner .sc { color: var(--phl-orange-deep); }
.phl-matchup-card .mc-row.loser { color: var(--phl-muted); }
.phl-matchup-card .mc-row.live .sc { color: var(--phl-steel); }

/* The matchup being viewed (BoxScore/Scoreboard strips) */
.phl-matchup-card.current-matchup {
    border-color: var(--phl-orange);
    box-shadow: inset 3px 0 0 var(--phl-orange);
}

/* Bracket band: the label row bleeds to the card edges as a soft tinted
   strip — gold = Championship Bracket, red = Biggest Loser. Consolation
   and regular-season labels stay plain gray lettering. */
.phl-matchup-card .mc-label.band {
    margin: -10px -12px 6px;
    padding: 5px 12px 4px;
    border-radius: 7px 7px 0 0;
}

.phl-matchup-card .mc-label.band-champ {
    background: var(--phl-gold-soft);
    color: #8A6510;
}

.phl-matchup-card .mc-label.band-bl {
    background: var(--phl-row-ineligible);
    color: var(--phl-loss);
}

/* Tile text stays ink even inside an <a> wrapper; whole tile hovers */
.matchup-card-link, .matchup-card-link:hover {
    color: var(--phl-text);
    text-decoration: none;
}

.matchup-card-link:hover .phl-matchup-card {
    background: var(--phl-line-soft);
}

/* DSC$ treatment: steel deep, small prefix (spec: first-class stat) */
.dsc-amount {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--phl-steel-deep);
}

.dsc-amount::before {
    content: "DSC ";
    font-size: 0.72em;
    font-weight: 600;
    color: var(--phl-faint);
    letter-spacing: 0.05em;
}

/* ---- Page titles: h1 at --fs-h1, not hero-sized ---- */
.hero-section h1 {
    font-size: var(--fs-h1) !important;
}

h1 {
    font-size: var(--fs-h1);
}

/* ==========================================================================
   HEADER GRAMMAR — five levels (approved proposal, Option A).
   L1 .page-head · L2 .sec-h2 · L3 .card-header (above) · L4 .kicker ·
   L5 table group bands (.table-group-header).
   ========================================================================== */

/* L1 — page head: eyebrow / ink title / dek / controls slot, 2px ink rule */
.page-head {
    border-bottom: 2px solid var(--phl-ink);
    padding-bottom: 14px;
    margin-bottom: 24px;
}

.page-head .ph-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}

.page-head .eyebrow {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--phl-orange-deep);
    margin-bottom: 3px;
}

.page-head h1 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 34px;
    line-height: 1.05;
    margin: 0;
    color: var(--phl-ink);
    text-wrap: balance;
}

/* Champions gets the trophy-room size */
.page-head.hero h1 {
    font-size: 44px;
}

.page-head .dek {
    font-size: 13.5px;
    color: var(--phl-muted);
    margin: 5px 0 0;
}

.page-head .controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
    padding-bottom: 2px;
}

/* L2 — section header: 22px condensed ink, hairline rule, optional count */
.sec-h2 {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--phl-line);
    padding-bottom: 7px;
    margin: 0 0 14px;
}

.sec-h2 h2, .sec-h2 .sec-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 22px;
    margin: 0;
    color: var(--phl-ink);
}

.sec-h2 .count {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--phl-faint);
    font-variant-numeric: tabular-nums;
}

/* L3 addition — optional action link in card headers */
.card-header .card-action {
    font-family: var(--font-ui);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    color: var(--phl-orange-bright);
    text-decoration: none;
    margin-left: auto;
}

.card-header .card-action:hover {
    color: #fff;
}

/* L4 — kicker: filter groups, sub-groups, chart titles */
.kicker {
    font-family: var(--font-ui);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--phl-muted);
    margin: 0 0 8px;
}

/* Legacy heading hooks remapped onto the grammar so existing markup
   inherits the right level without per-page edits. */

/* Offseason Home ".section-header/.section-title" → L2 */
.section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--phl-line) !important;
    padding-bottom: 7px !important;
    margin-bottom: 14px;
}

.section-header .section-title, .section-header h3 {
    font-family: var(--font-display) !important;
    font-weight: 600 !important;
    font-size: 22px !important;
    color: var(--phl-ink) !important;
    margin: 0;
}

/* Filter group titles are the .kicker L4 style (see .flt-* kit below) */
.standings-key h3 {
    font-family: var(--font-ui) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--phl-muted) !important;
    margin-bottom: 8px;
}

/* Titles carry no icons (headings only — functional icons in buttons stay) */
.card-header h1 i, .card-header h2 i, .card-header h3 i,
.card-header h4 i, .card-header h5 i, .card-header h6 i,
.section-header .section-title i, .section-header h3 i,
.sec-h2 h2 i {
    display: none;
}

/* L5 — table group bands sit on ink-2, one step lighter than columns */
.table thead tr.phl-label th,
.table thead .table-group-header {
    background: var(--phl-ink-2);
    border-bottom: 1px solid var(--phl-ink);
}

/* ---- Legacy gradient section headers → ink (consistency) ---- */
.dsc-summary-section, .dynasty-leaderboard {
    background: var(--phl-ink) !important;
    border-radius: 10px !important;
}

/* ============================================================
   PLAYER IDENTITY BLOCK (.p-id) — approved player-row proposal
   Rendered by Pages/Shared/_PlayerId.cshtml. One identity look
   everywhere; the surrounding row supplies its own data zone.
   ============================================================ */

.p-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.p-id .who { min-width: 0; }
.p-id .pname {
    display: block;
    font-weight: 600; color: var(--phl-ink); font-size: 13px; line-height: 1.25;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-decoration: none;
}
a.pname:hover { color: var(--phl-orange-deep); }
.p-id .psub {
    display: flex; align-items: center; gap: 5px;
    font-size: 10.5px; color: var(--phl-faint); line-height: 1.3; margin-top: 1px;
    white-space: nowrap; overflow: hidden;
}
.p-id .psub .pteam { font-weight: 600; letter-spacing: 0.04em; }
.p-id .psub .pstatus { font-weight: 700; color: var(--phl-loss); }
.p-id.lg .pname { font-size: 16px; }
.p-id.lg .psub { font-size: 11.5px; }

/* avatar: circle headshot; D/ST = team logo; fallback = initials disc */
.p-id .avatar {
    border-radius: 50%;
    background: var(--phl-line-soft);
    border: 1px solid var(--phl-line);
    object-fit: cover; object-position: top;
    flex-shrink: 0; display: block;
}
.p-id .avatar.logo { object-fit: contain; padding: 2px; background: #fff; }
.p-id .avatar.initials {
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 600; color: var(--phl-muted);
}
.p-id.sm .avatar { width: 26px; height: 26px; font-size: 10px; }
.p-id.md .avatar { width: 34px; height: 34px; font-size: 12px; }
.p-id.lg .avatar { width: 52px; height: 52px; font-size: 17px; }

/* mirrored variant (BoxScore right side): avatar outermost, text right-aligned */
.p-id.mirror { flex-direction: row-reverse; text-align: right; }
.p-id.mirror .psub { justify-content: flex-end; }

/* inline variant (dense Data-register tables): no avatar, single line */
.p-id-inline { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.p-id-inline .pname { font-weight: 600; color: var(--phl-ink); font-size: 12.5px; text-decoration: none; }
.p-id-inline a.pname:hover { color: var(--phl-orange-deep); }
.p-id-inline .pteam { color: var(--phl-faint); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; }

/* DSC$ — first-class stat, consistent treatment everywhere (spec §06) */
.dsc { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--phl-steel-deep); font-size: 12.5px; white-space: nowrap; }
.dsc::before { content: "DSC "; font-size: 0.72em; font-weight: 600; color: var(--phl-faint); letter-spacing: 0.05em; }

/* PlayerHome hero headshot (L1 page head) */
.ph-headshot {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--phl-line-soft); border: 1px solid var(--phl-line);
    object-fit: cover; object-position: top; flex-shrink: 0;
}
.ph-headshot.logo { object-fit: contain; padding: 4px; background: #fff; }
.ph-headshot.initials {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--phl-muted);
}

/* =========================================================================
   Filter kit — Design System §10 (one grammar, two tiers)
   Tier 1 page controls live in .page-head .controls (already styled above).
   Tier 2 panel below. Behavior: wwwroot/js/filters.js. Pages must not
   hand-roll filter markup or override these.
   ========================================================================= */
.flt-panel {
    background: var(--phl-card); border: 1px solid var(--phl-line);
    border-radius: 10px; box-shadow: var(--shadow-card, 0 1px 3px rgba(23,34,46,.08));
    margin-bottom: 20px;
}
.flt-head {
    display: flex; align-items: center; gap: 14px; padding: 12px 18px;
    cursor: pointer; user-select: none;
}
.flt-head:focus-visible { outline: 2px solid var(--phl-steel); outline-offset: 2px; border-radius: 10px; }
.flt-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--phl-ink); }
.flt-chev { margin-left: auto; color: var(--phl-faint); font-size: 12px; transition: transform .15s ease; }
.flt-panel.open .flt-chev { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .flt-chev { transition: none; } }
.flt-chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 0; }
.flt-chip {
    font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
    background: var(--phl-row-wildcard); color: var(--phl-steel-deep);
    border: 1px solid var(--phl-line); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.flt-chip.default { background: transparent; color: var(--phl-faint); font-weight: 400; border-style: dashed; }
.flt-body { border-top: 1px solid var(--phl-line); padding: 18px; display: none; }
.flt-panel.open .flt-body { display: block; }
.flt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px 28px; }
.flt-sec-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.flt-sec-head .kicker { margin: 0; }
.flt-links { display: flex; gap: 10px; }
.flt-link {
    font-size: 11.5px; font-weight: 600; color: var(--phl-steel);
    background: none; border: none; cursor: pointer; padding: 0; font-family: var(--font-ui);
}
.flt-link:hover { color: var(--phl-steel-deep); text-decoration: underline; }
.flt-checkgrid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px;
    max-height: 168px; overflow-y: auto;
}
.flt-checkgrid.cols-1 { grid-template-columns: 1fr; }
.flt-checkgrid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.flt-checkgrid label {
    display: flex; align-items: center; gap: 7px; font-size: 13px;
    padding: 3px 4px; border-radius: 4px; cursor: pointer; margin: 0; font-weight: 400;
}
.flt-checkgrid label:hover { background: var(--phl-line-soft); }
.flt-checkgrid label.past-owner { color: var(--phl-faint); }
.flt-checkgrid input[type=checkbox] { accent-color: var(--phl-orange); margin: 0; }
.flt-seg { display: inline-flex; border: 2px solid var(--phl-line); border-radius: 6px; overflow: hidden; }
.flt-seg button {
    font-family: var(--font-ui); font-size: 12.5px; font-weight: 600; padding: 6px 14px;
    background: #fff; color: var(--phl-muted); border: none; cursor: pointer;
    border-right: 1px solid var(--phl-line);
}
.flt-seg button:last-child { border-right: none; }
.flt-seg button[aria-pressed=true] { background: var(--phl-ink); color: #fff; }
.flt-range { display: flex; align-items: center; gap: 8px; }
.flt-range input {
    width: 84px; font-variant-numeric: tabular-nums; font-family: var(--font-ui);
    font-size: 13.5px; padding: 7px 9px; border: 2px solid var(--phl-line);
    border-radius: 6px; background: #fff; color: var(--phl-text);
}
.flt-range input:focus { outline: none; border-color: var(--phl-orange); }
.flt-range .dash { color: var(--phl-faint); }
.flt-actions {
    display: flex; gap: 12px; align-items: center; margin-top: 20px;
    padding-top: 16px; border-top: 1px solid var(--phl-line-soft);
}
.flt-actions .ms-auto, .flt-copy { margin-left: auto; }

/* ============================================================
   OFFSEASON HOME REDESIGN
   Champ-card dynasty strip, owner cards on the spec card shell,
   .oc-row player rows (shared .p-id identity block), spec chips.
   Appended last so these win over the legacy offseason styles.
   ============================================================ */

/* Status chips (spec §06) */
.chip {
    display: inline-block;
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    border-radius: 999px; padding: 2px 9px;
    white-space: nowrap;
}
.chip.keeper { background: var(--phl-row-keeper); color: var(--phl-orange-deep); }
.chip.franchise { background: var(--phl-gold-soft); color: #8A6510; }
.chip.rk { background: var(--phl-line-soft); color: var(--phl-muted); }
.chip.inelig { background: var(--phl-row-ineligible); color: var(--phl-loss); }
.chip.win { background: #E3F0E9; color: var(--phl-win); }
.chip.loss { background: var(--phl-row-ineligible); color: var(--phl-loss); }

/* Dynasty leaders strip (champ-card treatment — gold = dynasty context) */
.champ-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 220px));
    gap: 12px;
}
.champ-strip .champ-card {
    background: var(--phl-card);
    border: 1px solid var(--phl-line);
    border-radius: 10px;
    padding: 12px 16px;
}
.champ-strip .champ-card .yr {
    font-family: var(--font-display);
    font-weight: 700; font-size: 24px;
    color: var(--phl-steel-deep); line-height: 1.1;
}
.champ-strip .champ-card .nm { font-size: 13px; font-weight: 600; margin-top: 2px; }
.champ-strip .champ-card .nm a { color: var(--phl-text); text-decoration: none; }
.champ-strip .champ-card .nm a:hover { color: var(--phl-orange-deep); }
.champ-strip .champ-card .lg {
    font-size: 11px; color: var(--phl-faint);
    text-transform: uppercase; letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
}
.champ-strip .champ-card.latest { background: var(--phl-gold-soft); border-color: var(--phl-gold); }
.champ-strip .champ-card.latest .yr { color: var(--phl-gold); }

/* Trophy stack: one trophy per title (2 for a 2nd title, 3 for a 3rd...) */
.champ-strip .champ-card .champ-trophies {
    display: flex; flex-wrap: wrap; gap: 2px;
    color: var(--phl-gold); font-size: 12px; line-height: 1;
    margin-bottom: 4px; min-height: 12px;
}

/* Inline trophy stack for table rows — one gold trophy per title */
.trophy-stack {
    color: var(--phl-gold);
    font-size: 10px;
    margin-right: 6px;
    white-space: nowrap;
}

.trophy-stack .fa-trophy + .fa-trophy { margin-left: 1px; }

/* Section header row with inline control */
.sec-h2-row {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--phl-line);
    margin-bottom: 16px;
}
.sec-h2-row .sec-h2 { border-bottom: none; margin-bottom: 0; flex: 1; }
.sec-h2-row .form-check { font-size: 12.5px; color: var(--phl-muted); white-space: nowrap; }

/* Owner summary card */
.owner-card {
    background: var(--phl-card);
    border: 1px solid var(--phl-line);
    border-radius: 10px;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.owner-card.current-user-card { box-shadow: inset 0 0 0 2px var(--phl-orange); }

.owner-card .oc-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 14px 8px;
}
.owner-card .oc-owner {
    font-family: var(--font-display);
    font-weight: 600; font-size: 18px;
    color: var(--phl-ink); text-decoration: none;
    line-height: 1.15;
}
.owner-card .oc-owner:hover { color: var(--phl-orange-deep); }
.owner-card .oc-team { font-size: 11.5px; color: var(--phl-faint); }

.owner-card .oc-stats {
    display: flex;
    border-top: 1px solid var(--phl-line-soft);
    border-bottom: 1px solid var(--phl-line-soft);
    background: var(--phl-surface);
    padding: 7px 8px;
}
.owner-card .oc-stat { flex: 1; text-align: center; min-width: 0; }
.owner-card .oc-stat .v {
    display: block;
    font-family: var(--font-score);
    font-weight: 700; font-size: 17px; line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--phl-ink);
}
.owner-card .oc-stat .l {
    font-size: 9.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--phl-faint);
}
.owner-card .oc-stat.gold .v { color: var(--phl-gold); }

.owner-card .oc-roster { padding: 6px 0 2px; }
.owner-card .oc-kicker {
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--phl-muted);
    padding: 2px 14px 4px;
}
.owner-card .oc-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 4px 14px;
    border-bottom: 1px solid var(--phl-line-soft);
    font-size: 13px;
}
.owner-card .oc-row:last-child { border-bottom: none; }
.owner-card .oc-row .p-id { flex: 1; min-width: 0; }
.owner-card .oc-row.keeper { background: var(--phl-row-keeper); box-shadow: inset 3px 0 0 var(--phl-orange); }
.owner-card .oc-row.franchise { background: var(--phl-row-franchise); box-shadow: inset 3px 0 0 var(--phl-gold); }
.owner-card .oc-zone { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.owner-card .oc-zone .dsc { min-width: 46px; text-align: right; }
.owner-card .oc-zone .chip { min-width: 34px; text-align: center; }

.owner-card .oc-open-spots {
    text-align: center; font-size: 11px; color: var(--phl-faint);
    padding: 5px 14px;
}
.owner-card .oc-empty {
    text-align: center; font-size: 12px; color: var(--phl-faint);
    padding: 18px 14px;
}
.owner-card .oc-foot { padding: 10px 14px; margin-top: auto; }

/* Schedule list refresh */
.schedule-item {
    display: flex; align-items: baseline; gap: 10px;
    padding: 7px 2px;
    border-bottom: 1px solid var(--phl-line-soft) !important;
    border-left: none !important;
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}
.schedule-item:last-child { border-bottom: none !important; }
.schedule-item .schedule-date {
    font-size: 11px; font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--phl-muted);
    min-width: 78px; flex-shrink: 0;
}
.schedule-item .schedule-event { font-size: 12.5px; margin: 0 !important; }
.schedule-item .schedule-event strong { font-weight: 600; color: var(--phl-text); }
.schedule-item.completed .schedule-event strong,
.schedule-item.completed .schedule-date { color: var(--phl-faint); text-decoration: none; }
.schedule-item.next-event {
    background: var(--phl-row-keeper) !important;
    box-shadow: inset 3px 0 0 var(--phl-orange) !important;
    border-radius: 0;
    padding-left: 10px;
}

/* Trade tiles */
.trade-card {
    border: 1px solid var(--phl-line) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    transform: none !important;
}
.trade-card:hover { transform: none !important; box-shadow: none !important; }
.trade-card .trade-date {
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--phl-muted);
}
.trade-card .trade-date i { display: none; }
.trade-card .trade-direction { font-size: 11px; color: var(--phl-steel-deep); }
.trade-card .trade-item { font-size: 12px; }

@media (max-width: 576px) {
    .flt-checkgrid.cols-3 { grid-template-columns: 1fr 1fr; }
    .flt-actions { flex-wrap: wrap; }
}

/* ============================================================
   SELECT KEEPERS (redesign) — two Data-register panels of player
   rows (shared .p-id identity + DSC/chip/action zone), DSC tiles
   above, submit bar below. Replaces the legacy .keeper-grid look.
   ============================================================ */
.kp-list { min-height: 120px; }

.kp-list .kp-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 5px 14px;
    border-bottom: 1px solid var(--phl-line-soft);
    font-size: 13px;
}

.kp-list .kp-row:last-child { border-bottom: none; }
.kp-list .kp-row .p-id { flex: 1; min-width: 0; }
.kp-list .kp-row.keeper { background: var(--phl-row-keeper); box-shadow: inset 3px 0 0 var(--phl-orange); }
.kp-list .kp-row.franchise { background: var(--phl-row-franchise); box-shadow: inset 3px 0 0 var(--phl-gold); }
.kp-list .kp-row.inelig { background: var(--phl-row-ineligible); }
.kp-list .kp-row.inelig .pname { color: var(--phl-muted); }

.kp-list .kp-zone { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.kp-list .kp-zone .dsc { min-width: 46px; text-align: right; }
.kp-list .kp-zone .chip { min-width: 34px; text-align: center; }

/* Icon action: 26px, steel outline; keep = orange fill on hover */
.kp-act {
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--phl-steel); border-radius: 6px;
    background: #fff; color: var(--phl-steel-deep);
    font-size: 11px; cursor: pointer; padding: 0;
    transition: background-color .12s ease, color .12s ease;
}

.kp-act:hover { background: var(--phl-orange); border-color: var(--phl-orange); color: #fff; }
.kp-act.remove:hover { background: var(--phl-loss); border-color: var(--phl-loss); }
.kp-act:disabled { border-color: var(--phl-line); color: var(--phl-faint); cursor: not-allowed; background: var(--phl-surface); }

/* Count in the card header, tabular */
.card-header .hdr-count {
    font-family: var(--font-ui);
    font-size: 12px; font-weight: 600; letter-spacing: 0;
    color: var(--phl-faint);
    margin-left: auto;
    font-variant-numeric: tabular-nums;
}

.kp-empty { text-align: center; color: var(--phl-faint); font-size: 13px; padding: 28px 14px; }
.kp-empty i { display: block; font-size: 22px; margin-bottom: 6px; }

/* Owner-card grid: two columns everywhere the container allows it;
   single column only on phones */
.keeper-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
}

@media (max-width: 640px) {
    .keeper-summary-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   SORTABLE TABLE HEADERS (table-sort.js)
   Quiet by default; the active sort column shows an orange arrow.
   Works on the ink Data-register thead (white text) and light heads.
   ============================================================ */
th.sortable-col {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
th.sortable-col:hover { text-decoration: underline; text-underline-offset: 2px; }
th.sortable-col::after {
    content: "\2195";           /* ↕ hint */
    font-size: 0.85em;
    margin-left: 4px;
    opacity: 0.35;
}
th.sortable-col.sorted-asc::after {
    content: "\2191";           /* ↑ */
    opacity: 1;
    color: var(--phl-orange);
}
th.sortable-col.sorted-desc::after {
    content: "\2193";           /* ↓ */
    opacity: 1;
    color: var(--phl-orange);
}
th.sortable-col:focus-visible {
    outline: 2px solid var(--phl-orange);
    outline-offset: -2px;
}

/* ============================================================
   HOME LANDING PAGES (Owner Home · Player Home · Season Home)
   Shared components: résumé stat tiles, quick-links list,
   sample-data chip, DSC$ summary grid.
   ============================================================ */

/* Résumé strip: big Rajdhani figure over an 11px label (numerals-only role) */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.stat-tile {
    background: var(--phl-card);
    border: 1px solid var(--phl-line);
    border-radius: 10px;
    padding: 12px 16px 10px;
}

.stat-tile .v {
    display: block;
    font-family: var(--font-score);
    font-weight: 700;
    font-size: 27px;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--phl-ink);
    white-space: nowrap;
}

.stat-tile .l {
    display: block;
    font-size: var(--fs-label);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--phl-muted);
    margin-top: 2px;
}

.stat-tile .sub {
    display: block;
    font-size: 11.5px;
    color: var(--phl-faint);
    font-variant-numeric: tabular-nums;
}

.stat-tile.gold .v { color: var(--phl-gold); }
.stat-tile.steel .v { color: var(--phl-steel-deep); }

/* Placeholder marker for cards backed by dummy data until a proc exists */
.chip.sample {
    background: transparent;
    color: var(--phl-muted);
    border: 1px dashed var(--phl-faint) !important;
}

/* Quick-links list (Explore cards) */
.quick-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.quick-links li {
    border-bottom: 1px solid var(--phl-line-soft);
}

.quick-links li:last-child { border-bottom: none; }

.quick-links a {
    display: block;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--phl-steel-deep);
    text-decoration: none;
}

.quick-links a:hover { background: var(--phl-line-soft); }

.quick-links a .text-muted {
    font-weight: 400;
    font-size: 12px;
}

/* DSC$ summary grid inside a card body */
.dsc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}

.dsc-grid .dsc-amount { font-size: 19px; }

/* Lineup grid (Owner Home): starters by slot × week, scrolls in its own box */
.lineup-grid { font-size: 12px; }

.lineup-grid td { padding: 5px 9px; }

.lineup-grid .lg-name {
    display: block;
    font-weight: 600;
    color: var(--phl-ink);
    text-decoration: none;
    line-height: 1.2;
}

.lineup-grid .lg-name:hover { color: var(--phl-orange-deep); }

.lineup-grid .lg-pts {
    font-size: 10.5px;
    color: var(--phl-faint);
    font-variant-numeric: tabular-nums;
}

/* Merged DSC$/keeper table (Player Home): upcoming keeper seasons read like
   projections — soft ground, italic */
tr.row-upcoming td { background-color: var(--phl-line-soft); font-style: italic; }

/* Mini standings tables (division boxes on Standings + Season Home):
   compact metrics so a half-column box holds 7-8 columns without
   bleeding into its neighbor */
.table-mini { font-size: 12.5px; }
.table-mini thead th { padding: 6px 7px !important; }
.table-mini tbody td { padding: 5px 7px !important; }

/* Every data table scrolls inside its own container (spec: layout) —
   these shells were clipping columns with overflow: hidden */
.league-standings, .advanced-standings { overflow-x: auto; }
.division-table { overflow-x: auto; }

/* ============================================================
   DATA-TABLE POLISH (2026-07): every .table runs at --fs-data,
   column groups get a hairline on their first column, and season
   cells share one look (year + small faint season name).
   ============================================================ */
.table { font-size: var(--fs-data); }

/* Column-group separator: put .grp on the FIRST th/td of each group */
.table tbody td.grp { border-left: 1px solid var(--phl-line); }
.table thead th.grp { border-left: 1px solid rgba(255, 255, 255, 0.25); }
.table thead tr.phl-label th.grp { border-left: 1px solid rgba(255, 255, 255, 0.25); }

/* Season display: "2025 PHL XX" — the league name rides small and faint */
.season-name {
    font-size: 0.85em;
    color: var(--phl-faint);
    font-weight: 400;
}

/* Season-by-Season finish tiers (Owner Home) — quiet encoding:
   champion gold trophy (row already gold), runner-up silver medal,
   semifinal amber medal; missed playoffs fade, Biggest Loser reads loss. */
.finish-medal-2 { color: #98A2AE; }
.finish-medal-34 { color: var(--phl-warn); opacity: 0.75; }
.finish-missed { color: var(--phl-faint); }
.finish-bl { color: var(--phl-loss); opacity: 0.85; }

/* Lineup grid v2: matchup row + per-player color tracking.
   Cell tint is set inline per player (hue from player id) so the same
   player reads as one band of color across the weeks. */
.lineup-grid .lg-matchup-row td {
    background: var(--phl-surface);
    border-bottom: 2px solid var(--phl-line);
    white-space: nowrap;
}

.lineup-grid .lg-matchup-row .opp {
    display: block;
    font-weight: 600;
    font-size: 11px;
    color: var(--phl-steel-deep);
    text-decoration: none;
    line-height: 1.2;
}

.lineup-grid .lg-matchup-row .opp:hover { color: var(--phl-orange-deep); }

.lineup-grid .lg-matchup-row .res {
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    color: var(--phl-muted);
}

.lineup-grid .lg-matchup-row .res .w { color: var(--phl-win); font-weight: 700; }
.lineup-grid .lg-matchup-row .res .l { color: var(--phl-loss); font-weight: 700; }
