/* ProClubs World Theme - Dark Esports with Cyan Accent */

:root {
    --pcw-bg: #0b0f14;
    --pcw-surface: #141a22;
    --pcw-surface2: #10161e;
    --pcw-text: #ffffff;
    --pcw-text-muted: #a7b0be;
    --pcw-accent: #0087b3;
    --pcw-accent-2: #00a0cc;
    --pcw-border: rgba(255,255,255,0.08);
    --pcw-shadow: rgba(0, 135, 179, 0.15);
}

/* Team Management dashboard layer */
.fm-content {
    --fm-bg: #070b12;
    --fm-surface: rgba(13, 21, 34, 0.88);
    --fm-surface-strong: rgba(17, 27, 43, 0.94);
    --fm-surface-soft: rgba(255, 255, 255, 0.035);
    --fm-border: rgba(122, 210, 255, 0.14);
    --fm-border-soft: rgba(255, 255, 255, 0.07);
    --fm-cyan: #00c8ff;
    --fm-blue: #169ee8;
    --fm-purple: #6d3dff;
    --fm-green: #22c76f;
    --fm-orange: #ffae21;
    --fm-red: #ef5350;
    --fm-muted: #99a7ba;
    --fm-shadow: 0 18px 48px rgba(0, 0, 0, 0.34), 0 0 32px rgba(0, 160, 204, 0.08);
}

.fm-content .pcw-card,
.fm-content .fm-panel,
.fm-content .fm-card {
    background:
        linear-gradient(180deg, rgba(19, 31, 50, 0.88), rgba(8, 14, 24, 0.94)),
        var(--fm-surface);
    border: 1px solid var(--fm-border);
    border-bottom: 1px solid rgba(0, 200, 255, 0.24);
    border-radius: 12px;
    box-shadow: var(--fm-shadow);
    overflow: hidden;
}

.fm-content .pcw-card:hover {
    transform: none;
    border-color: rgba(0, 200, 255, 0.24);
    border-bottom-color: rgba(0, 200, 255, 0.34);
    box-shadow: var(--fm-shadow);
}

.fm-content .fm-section-card,
.fm-content .fm-filter-card,
.fm-content .fm-table-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(109, 61, 255, 0.12), transparent 36%),
        linear-gradient(180deg, rgba(17, 27, 43, 0.92), rgba(9, 15, 25, 0.94));
    border: 1px solid var(--fm-border);
    border-radius: 12px;
    box-shadow: var(--fm-shadow);
}

.fm-content .fm-filter-card,
.fm-content .fm-scout-filters,
.fm-content .ftp-filter-bar {
    padding: 16px;
    border: 1px solid var(--fm-border);
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(0, 160, 204, 0.08), rgba(109, 61, 255, 0.08)),
        rgba(12, 19, 31, 0.9);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.fm-content .mud-input-control {
    margin-top: 0;
}

.fm-content .mud-input-control > .mud-input-control-input-container > .mud-input-label-inputcontrol {
    color: rgba(219, 235, 255, 0.76);
    font-size: 0.78rem;
    font-weight: 700;
}

.fm-content .mud-input-outlined,
.fm-content .mud-input-outlined-border {
    border-color: rgba(122, 210, 255, 0.22) !important;
}

.fm-content .mud-input-root {
    color: #eef7ff;
}

.fm-content .mud-input-root:hover .mud-input-outlined-border,
.fm-content .mud-input-root.mud-focused .mud-input-outlined-border {
    border-color: rgba(0, 200, 255, 0.64) !important;
}

.fm-content .mud-button-filled-primary {
    background: linear-gradient(135deg, #04aee8, #00c8c8) !important;
    color: #04121b !important;
    box-shadow: 0 10px 26px rgba(0, 200, 255, 0.2);
}

.fm-content .mud-button-outlined-primary {
    border-color: rgba(0, 200, 255, 0.36) !important;
    color: #4bdcff !important;
}

.fm-content .mud-button-root {
    border-radius: 8px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.fm-content .mud-chip {
    border-radius: 999px;
    font-weight: 800;
    letter-spacing: 0;
}

.fm-content .mud-chip-filled-success {
    background: rgba(34, 199, 111, 0.94) !important;
    color: #062011 !important;
}

.fm-content .mud-chip-filled-warning {
    background: rgba(255, 174, 33, 0.96) !important;
    color: #211300 !important;
}

.fm-content .mud-chip-filled-info {
    background: rgba(43, 146, 255, 0.96) !important;
    color: #eff8ff !important;
}

.fm-content .mud-chip-filled-secondary,
.fm-content .mud-chip-filled-default {
    background: rgba(140, 153, 172, 0.22) !important;
    color: #c2ccd8 !important;
}

.fm-content .fm-data-table .mud-table-container,
.fm-content .mud-table-container {
    background: transparent !important;
}

.fm-content .fm-data-table .mud-table-root,
.fm-content .pcw-card .mud-table-root {
    background: transparent !important;
}

.fm-content .fm-data-table .mud-table-head .mud-table-row,
.fm-content .pcw-card .mud-table-head .mud-table-row {
    background: rgba(0, 160, 204, 0.075) !important;
}

.fm-content .fm-data-table .mud-table-head th,
.fm-content .pcw-card .mud-table-head th {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(122, 210, 255, 0.16);
    color: rgba(198, 218, 238, 0.68);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.fm-content .fm-data-table .mud-table-body td,
.fm-content .pcw-card .mud-table-body td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    color: #e9f2ff;
}

.fm-content .fm-data-table .mud-table-body .mud-table-row:hover,
.fm-content .pcw-card .mud-table-body .mud-table-row:hover {
    background: rgba(0, 200, 255, 0.065) !important;
}

.fm-content .mud-table-pagination {
    background: rgba(5, 11, 20, 0.45) !important;
    border-top: 1px solid rgba(122, 210, 255, 0.12);
    color: var(--fm-muted);
}

.fm-empty,
.fm-scout-empty,
.ftp-empty,
.tmpp-empty,
.tmpp-create-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    border: 1px dashed rgba(122, 210, 255, 0.18);
    border-radius: 12px;
    background:
        radial-gradient(circle at center top, rgba(0, 200, 255, 0.08), transparent 46%),
        rgba(255, 255, 255, 0.025);
    color: var(--fm-muted, var(--pcw-text-muted));
    text-align: center;
    padding: 24px;
}

@media (max-width: 768px) {
    .fm-content .fm-filter-card,
    .fm-content .fm-scout-filters,
    .fm-content .ftp-filter-bar {
        padding: 12px;
        border-radius: 10px;
    }

    .fm-content .fm-data-table .mud-table-body td,
    .fm-content .pcw-card .mud-table-body td {
        padding: 8px 10px;
    }
}

body {
    background-color: var(--pcw-bg);
    color: var(--pcw-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.pcw-card {
    background-color: var(--pcw-surface);
    border: 1px solid var(--pcw-border);
    border-bottom: 3px solid var(--pcw-accent);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
    max-width: 100%;
}

.pcw-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--pcw-shadow);
    border-bottom-color: var(--pcw-accent-2);
}

.pcw-card-large {
    min-height: 200px;
}

.pcw-card-small {
    min-height: 120px;
}

.pcw-hero {
    background: linear-gradient(135deg, var(--pcw-surface2) 0%, var(--pcw-bg) 100%);
    border-bottom: 2px solid var(--pcw-accent);
    padding: 4rem 2rem;
    text-align: center;
}

.pcw-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--pcw-text) 0%, var(--pcw-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pcw-hero p {
    font-size: 1.25rem;
    color: var(--pcw-text-muted);
    margin-bottom: 2rem;
}

.pcw-btn {
    background-color: var(--pcw-accent);
    color: var(--pcw-bg);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.pcw-btn:hover {
    background-color: var(--pcw-accent-2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--pcw-shadow);
}

.pcw-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pcw-feature-card {
    background-color: var(--pcw-surface);
    border: 1px solid var(--pcw-border);
    border-bottom: 3px solid var(--pcw-accent);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pcw-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--pcw-shadow);
    border-bottom-color: var(--pcw-accent-2);
}

.pcw-feature-card .icon {
    font-size: 3rem;
    color: var(--pcw-accent);
    margin-bottom: 1rem;
}

.pcw-feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pcw-feature-card p {
    color: var(--pcw-text-muted);
    font-size: 0.95rem;
}

.pcw-status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.pcw-status-upcoming {
    background-color: rgba(0, 200, 255, 0.2);
    color: var(--pcw-accent);
    border: 1px solid var(--pcw-accent);
}

.pcw-status-active {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid #4caf50;
}

.pcw-status-finished {
    background-color: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid #9e9e9e;
}

.pcw-rule-bullet {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.pcw-rule-bullet::before {
    content: "▸";
    color: var(--pcw-accent);
    font-size: 1.5rem;
    margin-right: 0.75rem;
    font-weight: bold;
}

.pcw-section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    border-left: 4px solid var(--pcw-accent);
    padding-left: 1rem;
}

@media (max-width: 768px) {
    .pcw-hero h1 {
        font-size: 2.5rem;
    }

    .pcw-feature-grid {
        grid-template-columns: 1fr;
    }
}

/* Lineup Builder Styles */
.lineup-builder-page {
    min-height: 100vh;
    padding: 1rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--pcw-surface);
    border: 1px solid var(--pcw-border);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.layout-root {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 1.5rem;
    margin-top: 1.5rem;
    max-height: calc(100vh - 200px);
}

.pitch-container {
    background-color: var(--pcw-surface);
    border: 1px solid var(--pcw-border);
    border-radius: 8px;
    padding: 1rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pitch {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 2/3;
    max-height: calc(100vh - 250px);
    background: linear-gradient(to bottom, #1a5f1a 0%, #2d8f2d 50%, #1a5f1a 100%);
    border-radius: 8px;
    border: 4px solid #fff;
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3);
}

/* Pitch markings */
.pitch-center-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    border: 3px solid rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pitch-center-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pitch-penalty-top,
.pitch-penalty-bottom {
    position: absolute;
    width: 50%;
    height: 80px;
    border: 3px solid rgba(255, 255, 255, 0.7);
    left: 50%;
    transform: translateX(-50%);
}

.pitch-penalty-top {
    top: 0;
    border-top: none;
}

.pitch-penalty-bottom {
    bottom: 0;
    border-bottom: none;
}

.pitch-goal-area-top,
.pitch-goal-area-bottom {
    position: absolute;
    width: 30%;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.7);
    left: 50%;
    transform: translateX(-50%);
}

.pitch-goal-area-top {
    top: 0;
    border-top: none;
}

.pitch-goal-area-bottom {
    bottom: 0;
    border-bottom: none;
}

/* Player cards */
.player-slot {
    position: absolute;
    z-index: 10;
}

.player-card {
    width: 80px;
    height: 110px;
    background: linear-gradient(135deg, var(--pcw-surface) 0%, var(--pcw-surface2) 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
    padding: 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid var(--pcw-accent);
    border-bottom: 3px solid var(--pcw-accent);
}

.player-card:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px var(--pcw-shadow);
    border-color: var(--pcw-accent-2);
}

.player-rating {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pcw-accent);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
}

.player-position {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--pcw-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pcw-accent);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
}

.player-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--pcw-text);
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
}

/* Side panel */
.side-panel {
    background-color: var(--pcw-surface);
    border: 1px solid var(--pcw-border);
    border-radius: 8px;
    padding: 1.5rem;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.slot-list-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.slot-list-row label {
    min-width: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

.slot-list-row select {
    flex: 1;
    padding: 0.5rem;
    background-color: var(--pcw-bg);
    color: var(--pcw-text);
    border: 1px solid var(--pcw-border);
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .layout-root {
        grid-template-columns: 1fr;
    }

    .side-panel {
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .top-bar-left,
    .top-bar-right {
        justify-content: center;
    }

    .player-card {
        width: 60px;
        height: 85px;
        padding: 4px;
    }

    .player-rating {
        font-size: 1.2rem;
    }

    .player-number {
        font-size: 1rem;
    }

    .player-name {
        font-size: 0.55rem;
    }
}

/* Lineup Viewer Styles */
.lineup-viewer {
    width: 100%;
}

.pitch-container-viewer {
    display: flex;
    justify-content: center;
    padding: 1rem;
    background-color: var(--pcw-surface);
    border-radius: 8px;
}

.lineup-viewer .player-card {
    width: 60px;
    height: 80px;
    padding: 4px;
}

.lineup-viewer .player-position {
    font-size: 0.65rem;
}

.lineup-viewer .player-name {
    font-size: 0.6rem;
}

/* ── Shared PCW Tabs (used by Club, Home, Tournaments) ───── */

.pcw-tabs.mud-tabs {
    background: transparent;
}

.pcw-tabs .mud-tabs-toolbar {
    background: #161d27;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px 10px 0 0;
    padding: 0 8px;
}

.pcw-tabs .mud-tabs-panels {
    background: #111720;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 20px;
    min-height: 200px;
}

.pcw-tabs .mud-tab-active {
    color: #42a5f5 !important;
}

/* Legacy alias — keep ClubTabs working unchanged */
.club-tabs.mud-tabs { background: transparent; }
.club-tabs .mud-tabs-toolbar { background: #161d27; border: 1px solid rgba(255,255,255,0.08); border-radius: 10px 10px 0 0; padding: 0 8px; }
.club-tabs .mud-tabs-panels { background: #111720; border: 1px solid rgba(255,255,255,0.08); border-top: none; border-radius: 0 0 10px 10px; min-height: 200px; padding: 20px; }

/* -- Body Modifier range cards (lightweight, no MudBlazor components in hot loop) --- */
.bm-range-card { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.bm-range-header { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.bm-bounds-row { display: flex; gap: 10px; flex-wrap: wrap; flex: 1; }
.bm-field { display: flex; flex-direction: column; gap: 3px; }
.bm-label { font-size: 0.68rem; font-weight: 600; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 0.4px; }
.bm-input { width: 110px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: 5px; color: #fff; padding: 5px 8px; font-size: 0.85rem; font-family: monospace; outline: none; transition: border-color 0.15s; }
.bm-input:focus { border-color: rgba(0,200,255,0.5); background: rgba(0,200,255,0.06); }
.bm-range-actions { display: flex; align-items: center; gap: 6px; padding-bottom: 2px; }
.bm-row-count { font-size: 0.72rem; font-weight: 700; color: rgba(0,200,255,0.8); background: rgba(0,200,255,0.1); border: 1px solid rgba(0,200,255,0.25); border-radius: 10px; padding: 2px 9px; white-space: nowrap; }
.bm-note-input { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); border-radius: 5px; color: rgba(255,255,255,0.7); padding: 5px 10px; font-size: 0.82rem; outline: none; margin-bottom: 10px; transition: border-color 0.15s; }
.bm-note-input:focus { border-color: rgba(0,200,255,0.4); }
.bm-mods-label { font-size: 0.68rem; font-weight: 700; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.bm-mods-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bm-btn { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 5px; cursor: pointer; transition: background 0.15s, opacity 0.15s; padding: 0; }
.bm-btn:hover { opacity: 0.85; }
.bm-btn-secondary { width: 32px; height: 32px; background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.7); }
.bm-btn-secondary:hover { background: rgba(255,255,255,0.13); }
.bm-btn-danger { width: 32px; height: 32px; background: rgba(244,67,54,0.15); color: #f44336; }
.bm-btn-danger:hover { background: rgba(244,67,54,0.28); }
.bm-btn-xs { width: 18px; height: 18px; font-size: 0.65rem; border-radius: 3px; }
.bm-btn-add { background: rgba(100,181,246,0.12); color: rgba(100,181,246,0.9); border: 1px solid rgba(100,181,246,0.2); border-radius: 5px; padding: 4px 10px; font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.bm-btn-add:hover { background: rgba(100,181,246,0.22); }
.club-tabs .club-tab-panel { padding: 24px !important; }
.club-tabs .club-tab-active { color: #42a5f5 !important; }

/* ── LineupBuilder Mobile — PitchView size overrides ──────────────────────────*/
.lbm-pitch-area:not(.lbm-exporting) .pitch-container {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}
.lbm-pitch-area:not(.lbm-exporting) .pitch-export-area {
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
}
.lbm-pitch-area:not(.lbm-exporting) .pitch-scene {

    max-height: 100% !important;
    max-width: min(100%, calc((100dvh - 134px) * 0.75)) !important;
    margin: 0 auto !important;
}

/* ── Top Nav: Dropdown Popovers (rendered at document root, not reachable by CSS isolation) ── */

.pcw-nav-popover .mud-list {
    background: #141a22 !important;
    border: 1px solid rgba(0, 135, 179, 0.2) !important;
    border-radius: 8px !important;
    padding: 6px 0 !important;
    min-width: 220px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 200, 255, 0.06) !important;
}

.pcw-nav-popover .mud-list-item {
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 13px !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

.pcw-nav-popover .mud-list-item:hover {
    background: rgba(0, 200, 255, 0.08) !important;
    color: #00c8ff !important;
}

.pcw-nav-popover-inner {
    padding: 4px 0;
}

.pcw-pop-label {
    padding: 6px 16px 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(0, 200, 255, 0.5);
    margin: 0;
    pointer-events: none;
}

/* Team calendar toolbar children are emitted by a third-party component. */
@media (max-width: 480px) {
    .tc-mud-calendar .mud-cal-toolbar {
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: stretch !important;
    }

    .tc-mud-calendar .mud-cal-toolbar-nav {
        flex: 1 1 100% !important;
        justify-content: space-between !important;
        gap: 6px !important;
    }

    .tc-mud-calendar .mud-width-full.justify-end.d-flex {
        justify-content: flex-start !important;
        width: 100% !important;
    }

    .tc-mud-calendar .mud-button-group-root {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        width: 100% !important;
    }

    .tc-mud-calendar .mud-button-group-root .mud-button-root {
        min-width: 0 !important;
        padding-inline: 8px !important;
    }
}

/* League lineup dialog content is emitted by MudBlazor outside component CSS isolation. */
.fm-lineup-dialog-content {
    height: 100% !important;
    padding: 12px 24px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
}

@media (max-width: 700px) {
    .fm-lineup-dialog-content {
        padding: 12px !important;
    }
}

/* ── Page Content AppBar Clearance ──────────────────── */
/* MudMainContent.pcw-main-content handles AppBar + DevWarningBanner offset.
   pcw-page-wrap only needs consistent breathing room on all viewports. */
.pcw-page-wrap {
    padding-top: 20px !important;
}

/* -- Archetype Workspace section styles (shared) --------------------------- */
.apc-table { width:100%; border-collapse:collapse; font-size:0.83rem; }
.apc-table th { text-align:left; padding:6px 10px; color:rgba(255,255,255,0.4); font-weight:700; font-size:0.7rem; text-transform:uppercase; letter-spacing:0.6px; border-bottom:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.02); }
.apc-table td { padding:3px 6px; border-bottom:1px solid rgba(255,255,255,0.04); vertical-align:middle; }
.apc-table tr:last-child td { border-bottom:none; }
.apc-row-num { color:rgba(255,255,255,0.25); font-size:0.72rem; width:28px; text-align:right; padding-right:8px !important; }
.apc-cell { width:90px; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1); border-radius:5px; color:#fff; padding:4px 7px; font-size:0.83rem; font-family:monospace; outline:none; transition:border-color 0.15s, background 0.15s; }
.apc-cell:focus { border-color:rgba(0,200,255,0.55); background:rgba(0,200,255,0.07); }
.apc-curve-header { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; cursor:pointer; background:rgba(255,255,255,0.025); transition:background 0.15s; }
.apc-curve-header:hover { background:rgba(255,255,255,0.05); }
.sc-stat-cell { display:inline-flex; align-items:center; gap:5px; background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.09); border-radius:6px; padding:5px 7px; }
.sc-stat-key { font-size:0.7rem; font-weight:700; color:rgba(255,255,255,0.45); text-transform:uppercase; letter-spacing:0.4px; min-width:34px; }
.sc-key-input { font-size:0.7rem !important; font-weight:700; text-transform:uppercase; }
.sc-stat-input { width:54px !important; }

/* -- Partner dashboard/news studio shared polish -------------------------- */
.partner-dashboard-shell,
.news-editor-page.partner-news-studio {
    display:flex;
    flex-direction:column;
    gap:22px;
}

.pd-loading,
.ne-loading {
    display:flex;
    justify-content:center;
    padding:72px 0;
}

.pd-hero,
.ne-hero {
    min-height:260px;
    border:1px solid rgba(82,201,255,0.16);
    border-radius:8px;
    background:
        radial-gradient(circle at 10% 0%, rgba(0,212,255,0.18), transparent 32%),
        linear-gradient(135deg, rgba(7,18,36,0.98), rgba(9,21,39,0.8));
    background-size:cover;
    background-position:center;
    box-shadow:0 26px 62px rgba(0,0,0,0.34);
}

.pd-hero {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:24px;
    padding:28px;
}

.ne-hero {
    overflow:hidden;
}

.ne-hero-glass {
    min-height:260px;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    padding:24px;
    background:linear-gradient(180deg, rgba(4,10,22,0.34), rgba(4,10,22,0.82));
}

.pd-kicker,
.ne-brand-chip {
    display:inline-flex;
    align-items:center;
    gap:10px;
    padding:7px 12px;
    border:1px solid rgba(255,255,255,0.12);
    border-radius:999px;
    background:rgba(7,18,34,0.7);
    color:#40d1ff;
    font-weight:800;
}

.pd-kicker img,
.ne-brand-chip img {
    width:24px;
    height:24px;
    object-fit:contain;
}

.pd-hero-content .mud-typography-h3,
.ne-title-block .mud-typography-h3 {
    margin:10px 0 8px;
    font-weight:800;
    letter-spacing:0;
}

.pd-brand-strip {
    display:flex;
    align-items:center;
    gap:10px;
    min-width:190px;
    padding:12px;
    border:1px solid rgba(255,255,255,0.12);
    border-radius:8px;
    background:rgba(5,14,28,0.72);
}

.pd-brand-strip > span {
    width:34px;
    height:34px;
    border-radius:999px;
}

.pd-stat-card,
.pd-panel,
.ne-panel,
.ne-sidebar-card {
    border:1px solid rgba(122,190,230,0.14);
    border-radius:8px;
    background:linear-gradient(180deg, rgba(17,31,51,0.94), rgba(9,18,32,0.97)), #0b1422;
    box-shadow:0 18px 46px rgba(0,0,0,0.22);
}

.pd-stat-card {
    min-height:118px;
    display:flex;
    align-items:center;
    gap:18px;
    padding:18px;
}

.pd-stat-card strong,
.pd-stat-card span,
.pd-stat-card small,
.pd-brand-strip strong,
.pd-brand-strip small {
    display:block;
}

.pd-stat-card strong {
    color:#f7fbff;
    font-size:2rem;
    line-height:1;
}

.pd-stat-card small,
.pd-brand-strip small {
    color:rgba(223,238,255,0.56);
}

.pd-stat-icon {
    display:inline-flex;
    width:58px;
    height:58px;
    align-items:center;
    justify-content:center;
    border-radius:8px;
}

.pd-stat-icon.tournament { background:rgba(32,172,255,0.16); color:#33cfff; }
.pd-stat-icon.leaderboard { background:rgba(38,221,151,0.14); color:#27e29c; }
.pd-stat-icon.teams { background:rgba(166,120,255,0.16); color:#b58aff; }
.pd-stat-icon.news { background:rgba(255,184,66,0.16); color:#ffb842; }

.pd-panel,
.ne-panel,
.ne-sidebar-card {
    padding:18px;
}

.pd-panel-heading,
.ne-section-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin-bottom:16px;
}

.pd-tournament-list,
.pd-actions-panel,
.pd-news-grid,
.ne-sidebar {
    display:flex;
    flex-direction:column;
    gap:10px;
}

.pd-tournament-row,
.pd-action-row,
.pd-news-card,
.ne-target-row {
    display:grid;
    align-items:center;
    gap:14px;
    min-height:76px;
    padding:12px;
    border:1px solid rgba(255,255,255,0.09);
    border-radius:8px;
    background:rgba(255,255,255,0.035);
    color:#f5f9ff;
    text-decoration:none;
}

.pd-tournament-row { grid-template-columns:86px 1fr auto; }
.pd-action-row { grid-template-columns:46px 1fr auto; }
.pd-news-card { grid-template-columns:96px 1fr auto; }

.pd-tournament-art,
.pd-action-row > span {
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:8px;
    background:rgba(40,200,255,0.12);
    color:#32cfff;
}

.pd-tournament-art {
    width:86px;
    height:52px;
    background-size:cover !important;
    background-position:center !important;
}

.pd-tournament-art img,
.pd-news-card img {
    object-fit:cover;
    border-radius:6px;
}

.pd-tournament-art img { width:38px; height:38px; object-fit:contain; }
.pd-news-card img { width:96px; height:56px; }

.pd-brand-preview {
    min-height:132px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:18px;
    border-radius:8px;
    background-size:cover;
    background-position:center;
}

.pd-brand-preview img { width:62px; height:62px; object-fit:contain; }
.pd-brand-preview strong { color:#35d1ff; font-size:1.5rem; letter-spacing:0; text-transform:uppercase; }
.pd-brand-meta { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-top:12px; }
.pd-brand-meta div { padding:12px; border:1px solid rgba(255,255,255,0.09); border-radius:8px; background:rgba(255,255,255,0.035); }

.ne-grid { align-items:flex-start; }
.ne-writing-panel { display:flex; flex-direction:column; gap:18px; }
.ne-sidebar { position:sticky; top:90px; gap:16px; }
.ne-editor-shell { display:flex; flex-direction:column; gap:8px; }
.pcw-rte { min-height:520px; border:1px solid rgba(80,210,255,0.14); border-radius:8px; background:rgba(5,13,24,0.76); overflow:hidden; }
.pcw-rte-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:6px; padding:10px; border-bottom:1px solid rgba(0,200,255,0.12); background:linear-gradient(180deg, rgba(11,18,29,0.98), rgba(7,12,20,0.98)); }
.pcw-rte-button { min-width:34px; min-height:32px; padding:0 9px; border:1px solid transparent; border-radius:8px; color:rgba(255,255,255,0.72); background:transparent; font:inherit; font-size:0.78rem; font-weight:800; cursor:pointer; }
.pcw-rte-button:hover,
.pcw-rte-button-selected { color:#00c8ff; border-color:rgba(0,200,255,0.34); background:rgba(0,200,255,0.08); }
.pcw-rte-content { min-height:520px; padding:22px; color:#e7eef8; font-size:1rem; line-height:1.72; outline:none; }
.pcw-rte-content.pcw-rte-drop-active { outline:2px solid rgba(0,200,255,0.7); outline-offset:-6px; background:rgba(0,200,255,0.05); }
.pcw-rte-image { margin:18px 0; }
.pcw-rte-image img,
.pcw-rte-content img { max-width:100%; border-radius:8px; border:1px solid rgba(0,200,255,0.16); }
.pcw-rte-image-selected { outline:3px solid rgba(0,200,255,0.9); outline-offset:3px; }
.pcw-rte-content:empty::before { content:"Write your article content here..."; color:rgba(255,255,255,0.34); }
.pcw-rte-content h2 { margin:0 0 12px; color:#fff; font-weight:850; }
.pcw-rte-content blockquote { margin:16px 0; padding:12px 16px; border-left:3px solid #00c8ff; border-radius:8px; background:rgba(0,200,255,0.08); color:rgba(255,255,255,0.82); }
.partner-news-preview { display:grid; grid-template-columns:minmax(160px,260px) 1fr; gap:18px; align-items:center; }
.partner-news-preview img,
.ne-cover-preview { width:100%; aspect-ratio:16/9; border-radius:8px; object-fit:cover; border:1px solid rgba(255,255,255,0.12); }

.ne-upload-dropzone {
    position:relative;
    display:flex;
    min-height:144px;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:18px;
    border:1px dashed rgba(80,210,255,0.32);
    border-radius:8px;
    background:rgba(7,20,36,0.72);
    cursor:pointer;
    text-align:center;
}

.ne-upload-dropzone input {
    position:absolute;
    inset:0;
    opacity:0;
    cursor:pointer;
}

.ne-asset-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:12px; }
.ne-asset-tile { padding:0; border:1px solid rgba(255,255,255,0.1); border-radius:6px; overflow:hidden; background:rgba(255,255,255,0.04); cursor:pointer; }
.ne-asset-tile img { width:100%; aspect-ratio:1; object-fit:cover; display:block; }
.ne-target-list { display:flex; flex-direction:column; gap:8px; margin-top:12px; max-height:280px; overflow:auto; }
.ne-target-row { display:flex; justify-content:space-between; width:100%; text-align:left; cursor:pointer; }
.ne-target-row.selected { border-color:rgba(45,204,255,0.55); background:rgba(45,204,255,0.12); }
.ne-block-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }

.news-page-wrapper.partner-mode {
    border-radius:8px;
    background:radial-gradient(circle at 12% 0%, rgba(0,212,255,0.12), transparent 34%), linear-gradient(180deg, rgba(14,24,41,0.98), rgba(9,17,30,0.98));
}

.partner-news-header {
    display:flex;
    align-items:center;
    gap:18px;
    margin-bottom:22px;
    padding:20px;
    border:1px solid rgba(82,201,255,0.16);
    border-radius:8px;
    background:linear-gradient(135deg, rgba(18,36,58,0.9), rgba(8,18,34,0.92)), rgba(9,19,34,0.96);
}

.partner-news-header img {
    width:62px;
    height:62px;
    object-fit:contain;
    border-radius:8px;
    padding:8px;
    background:rgba(255,255,255,0.06);
}

.partner-news-header span { color:#35d1ff; font-size:0.78rem; font-weight:800; letter-spacing:0; text-transform:uppercase; }
.partner-news-header h1 { margin:4px 0 0; color:#f7fbff; font-size:clamp(1.7rem,4vw,2.6rem); font-weight:800; letter-spacing:0; }
.partner-news-header p { margin:4px 0 0; color:rgba(226,240,255,0.68); }

@media (max-width:900px) {
    .pd-hero,
    .ne-hero-actions {
        align-items:flex-start;
        flex-direction:column;
    }

    .pd-brand-strip,
    .partner-news-preview {
        width:100%;
        grid-template-columns:1fr;
    }

    .pd-news-card,
    .pd-tournament-row {
        grid-template-columns:1fr;
    }
}

@media (max-width:640px) {
    .pd-hero,
    .pd-panel,
    .pd-stat-card,
    .ne-hero-glass,
    .ne-panel,
    .ne-sidebar-card,
    .partner-news-header {
        padding:16px;
    }

    .partner-news-header,
    .ne-action-row {
        align-items:flex-start;
        flex-direction:column !important;
    }
}
