/* web/static/style.css */

/* --- Fonts (loaded via <link> in index.html for performance) --- */

:root {
    --navy-1: #0a1628;
    --navy-2: #0d2147;
    --navy-3: #122b5e;
    --accent: #2563eb;
    --accent-light: #3b82f6;
    --green: #16a34a;
    --green-bg: #dcfce7;
    --green-text: #166534;
    --red: #dc2626;
    --red-bg: #fef2f2;
    --red-text: #991b1b;
    --orange: #ea580c;
    --yellow: #ca8a04;
    --cyan: #06b6d4;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --shadow-card: 0 1px 2px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04), 0 4px 8px rgba(0,0,0,0.03);
    --shadow-card-hover: 0 2px 4px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.06), 0 8px 24px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 10px 20px rgba(0,0,0,0.05), 0 20px 40px rgba(0,0,0,0.03);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 9999px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* --- Login --- */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    padding-top: 15vh;
}
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}
.login-card h1 {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--navy-2), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-subtitle {
    text-align: center;
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 28px;
}
.login-input {
    width: 100%;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    margin-bottom: 16px;
}
.login-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.login-btn {
    width: 100%;
    padding: 11px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), var(--navy-3));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.login-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }
.login-btn:disabled:hover { opacity: 0.5; transform: none; }

/* --- Registration Validation --- */
.reg-field {
    margin-bottom: 0;
    position: relative;
}
.reg-field .login-input {
    margin-bottom: 4px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.reg-field .login-input.input-valid {
    border-color: var(--green);
}
.reg-field .login-input.input-valid:focus {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.10);
}
.reg-field .login-input.input-invalid {
    border-color: #ef4444;
}
.reg-field .login-input.input-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.10);
}
.reg-hint-row {
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 22px;
    margin-bottom: 8px;
    padding: 0 2px;
    transition: opacity 0.2s ease;
}
.reg-hint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    flex-shrink: 0;
    font-size: 9px;
    line-height: 1;
    font-weight: 700;
    transition: background 0.25s ease, color 0.25s ease;
}
.reg-hint-icon--error {
    background: #fef2f2;
    color: #ef4444;
}
.reg-hint-icon--ok {
    background: var(--green-bg);
    color: var(--green);
}
.reg-hint-text {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--gray-500);
    transition: color 0.25s ease;
}
.reg-hint-text--error { color: #ef4444; }
.reg-hint-text--ok { color: var(--green-text); }

/* Password strength bar */
.pw-strength-track {
    height: 3px;
    background: var(--gray-200);
    border-radius: 2px;
    margin: 0 2px 2px;
    overflow: hidden;
    transition: opacity 0.3s ease;
}
.pw-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s ease;
}

/* Disabled button refined */
.login-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: saturate(0.3);
    transform: none;
}
.login-btn:disabled:hover {
    opacity: 0.45;
    transform: none;
}

/* --- Auth Toggle --- */
.auth-toggle {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    color: var(--gray-500);
}
.auth-toggle a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}
.auth-toggle a:hover {
    text-decoration: underline;
}

/* --- Header --- */
.app-header {
    background: var(--navy-1);
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.app-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(37,99,235,0.4) 30%, rgba(6,182,212,0.3) 50%, rgba(37,99,235,0.4) 70%, transparent 95%);
}
.header-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 28px;
    height: 56px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: relative;
}

/* Left zone */
.header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.header-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.3px;
}
.header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-pill);
    padding: 3px 12px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    letter-spacing: 0.2px;
}
.header-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 6px rgba(52,211,153,0.5);
    animation: pulse-dot 2.5s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Center zone */
.header-center {
    display: flex;
    justify-content: center;
}
.season-switcher {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-pill);
    padding: 4px 6px 4px 12px;
    transition: border-color 0.2s, background 0.2s;
}
.season-switcher:hover,
.season-switcher:focus-within {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}
.season-switcher__icon {
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
}
.season-select {
    padding: 4px 8px 4px 2px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    background: transparent;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
.season-select option {
    background: var(--navy-1);
    color: #fff;
}

/* Right zone */
.header-right {
    display: flex;
    justify-content: flex-end;
    position: relative;
}
.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-pill);
    padding: 4px 14px 4px 4px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    color: rgba(255,255,255,0.8);
    font-family: inherit;
}
.header-user:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.15);
}
.header-user__avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #6366f1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.header-user__name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
.header-user__chevron {
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
    transition: transform 0.2s;
}

/* --- Profile Popover --- */
.profile-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    z-index: 1000;
    overflow: hidden;
}
.profile-popover__header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--gray-100);
}
.profile-popover__info {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--gray-100);
}
.profile-popover__actions {
    padding: 10px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.profile-popover__action-btn {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    background: var(--gray-50);
    color: var(--gray-700);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.profile-popover__action-btn:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}
.profile-popover__logout {
    width: 100%;
    padding: 8px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--red-bg);
    color: var(--red);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}
.profile-popover__logout:hover {
    background: var(--red);
    color: #fff;
}

/* --- Tabs --- */
.tabs-bar {
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.tabs-inner {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    gap: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tabs-inner::-webkit-scrollbar { display: none; }
.tab-btn {
    padding: 12px 16px;
    font-size: 13px;
    white-space: nowrap;
    font-weight: 500;
    font-family: inherit;
    color: var(--gray-500);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    border-bottom: 2px solid transparent;
}
.tab-btn:hover { color: var(--gray-700); }
.tab-active {
    color: var(--accent) !important;
    font-weight: 600;
    border-bottom-color: var(--accent);
}

/* Scouting tab highlight */
.tab-btn-scouting {
    color: var(--yellow);
    font-weight: 600;
}
.tab-btn-scouting:hover { color: #b47a00; }
.tab-btn-scouting.tab-active { color: var(--yellow) !important; border-bottom-color: var(--yellow); }

/* Admin tab highlight */
.tab-btn-admin {
    color: var(--orange);
    font-weight: 600;
}
.tab-btn-admin:hover { color: #c04a07; }
.tab-btn-admin.tab-active { color: var(--orange) !important; border-bottom-color: var(--orange); }

/* --- Content --- */
.content-area {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 28px;
}

/* --- Global Search --- */
.search-bar-container {
    margin-bottom: 16px;
}
.search-input {
    width: 100%;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    padding: 12px 18px;
    font-size: 15px;
    font-family: inherit;
    background: #fff;
    color: var(--gray-800);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-shadow: var(--shadow-card);
}
.search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1), var(--shadow-card);
}
.search-input::placeholder {
    color: var(--gray-400);
}
.search-wrap {
    position: relative;
}
.search-wrap .search-input {
    padding-left: 38px;
}
.search-clear {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: var(--gray-400);
    padding: 4px 8px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.search-clear:hover {
    color: var(--gray-700);
    background: var(--gray-100);
}

/* --- Filter Bar (Glassmorphic) --- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: end;
    padding: 18px 22px;
    border-radius: var(--radius);
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: var(--shadow-card);
    margin-bottom: 16px;
    transition: box-shadow 0.25s;
}
.filter-bar:hover {
    box-shadow: var(--shadow-card-hover);
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.filter-group--inline {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}
.filter-group--inline label {
    margin: 0;
    white-space: nowrap;
}
.filter-group--inline select {
    min-width: 70px;
}
.filter-bar label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.filter-bar select,
.filter-bar input[type="number"] {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 7px 12px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: var(--gray-800);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    max-width: 220px;
    min-width: 100px;
    height: 36px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.filter-bar select:focus,
.filter-bar input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.filter-bar select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

/* --- Custom Select Dropdown --- */
.csel {
    position: relative;
    display: inline-block;
    min-width: 100px;
    max-width: 220px;
}
.csel__toggle {
    width: 100%;
    height: 36px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 0 28px 0 12px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    background: #fff;
    color: var(--gray-800);
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    outline: none;
    position: relative;
    -webkit-appearance: none;
    appearance: none;
}
.csel__toggle::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--gray-400);
    transition: transform 0.2s;
}
.csel--open .csel__toggle::after {
    transform: translateY(-50%) rotate(180deg);
}
.csel__toggle:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}
.csel--open .csel__toggle,
.csel__toggle:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.csel__toggle--placeholder {
    color: var(--gray-400);
}
.csel__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1), 0 1px 3px rgba(0,0,0,0.06);
    z-index: 60;
    padding: 4px;
}
.csel__dropdown::-webkit-scrollbar { width: 5px; }
.csel__dropdown::-webkit-scrollbar-track { background: transparent; }
.csel__dropdown::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
.csel__option {
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.csel__option:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}
.csel__option--active {
    background: rgba(37,99,235,0.08);
    color: var(--accent);
    font-weight: 600;
}
.csel__option--active:hover {
    background: rgba(37,99,235,0.14);
}

/* --- Searchable Select (csel-search) --- */
.csel-search .csel__dropdown {
    min-width: 240px;
    max-height: 280px;
    display: flex;
    flex-direction: column;
}
.csel-search__input-wrap {
    padding: 6px 8px;
    border-bottom: 1px solid var(--gray-200);
    flex-shrink: 0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
}
.csel-search__input {
    width: 100%;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: var(--gray-50);
    color: var(--gray-800);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.csel-search__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
    background: #fff;
}
.csel-search__input::placeholder {
    color: var(--gray-400);
}
.csel-search__options {
    overflow-y: auto;
    flex: 1;
}
.csel-search__options::-webkit-scrollbar {
    width: 5px;
}
.csel-search__options::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}
.csel-search__empty {
    padding: 16px 12px;
    font-size: 12px;
    color: var(--gray-400);
    text-align: center;
}

.reset-btn {
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 7px 16px;
    font-size: 13px;
    font-family: inherit;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
}
.reset-btn:hover {
    background: var(--gray-100);
    color: var(--gray-700);
    border-color: var(--gray-400);
}

/* --- All Players Filter Layout (two rows) --- */
.filter-bar--all {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: relative;
    z-index: 20;
}
.filter-bar__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: end;
    padding-bottom: 14px;
}
.filter-bar__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    border-top: 1px solid var(--gray-200);
    padding-top: 14px;
}
.filter-bar__categories .reset-btn {
    margin-left: auto;
}

/* --- Scouting Presets --- */
.scout-presets {
    position: relative;
}
.scout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px 0 10px;
    background: linear-gradient(135deg, var(--navy-2) 0%, var(--accent) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(37,99,235,0.25);
    white-space: nowrap;
    -webkit-appearance: none;
    appearance: none;
}
.scout-btn:hover {
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
    transform: translateY(-1px);
}
.scout-btn--active {
    background: linear-gradient(135deg, var(--accent) 0%, #1d4ed8 100%);
    box-shadow: 0 2px 12px rgba(37,99,235,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
}
.scout-btn__icon {
    font-size: 15px;
    line-height: 1;
    opacity: 0.85;
}
.scout-btn__label {
    line-height: 1;
}
.scout-btn__arrow {
    font-size: 9px;
    opacity: 0.7;
    transition: transform 0.2s;
    margin-left: 2px;
}
.scout-btn__arrow--open {
    transform: rotate(180deg);
}

/* Scouting dropdown */
.scout-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(10,22,40,0.15), 0 2px 8px rgba(10,22,40,0.08);
    z-index: 60;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.scout-preset {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
    -webkit-appearance: none;
    appearance: none;
}
.scout-preset:hover {
    background: var(--gray-50);
    border-color: var(--gray-200);
}
.scout-preset--active {
    background: linear-gradient(135deg, rgba(37,99,235,0.06) 0%, rgba(37,99,235,0.03) 100%);
    border-color: var(--accent-light);
}
.scout-preset--active:hover {
    background: linear-gradient(135deg, rgba(37,99,235,0.1) 0%, rgba(37,99,235,0.05) 100%);
}
.scout-preset__icon {
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37,99,235,0.08);
    border-radius: 8px;
}
.scout-preset--active .scout-preset__icon {
    background: rgba(37,99,235,0.15);
}
.scout-preset__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.scout-preset__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.2;
}
.scout-preset__desc {
    font-size: 11px;
    color: var(--gray-500);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.scout-preset__check {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

/* Horizontal separator for categories row */
.filter-sep--h {
    width: 1px;
    height: 22px;
    align-self: center;
    margin: 0 6px;
}

/* --- Filter Separator --- */
.filter-sep {
    width: 1px;
    align-self: stretch;
    background: linear-gradient(
        to bottom,
        transparent 10%,
        var(--gray-300) 35%,
        var(--gray-300) 65%,
        transparent 90%
    );
    margin: 0 4px;
    flex-shrink: 0;
}

/* --- Range Pair (birth year, height) --- */
.filter-group--pair .range-pair {
    display: flex;
    align-items: center;
    gap: 4px;
}
.filter-group--pair .range-pair input {
    width: 72px;
    min-width: 60px;
    max-width: 80px;
    text-align: center;
}
.range-sep {
    color: var(--gray-400);
    font-size: 13px;
    font-weight: 500;
    user-select: none;
    flex-shrink: 0;
}

/* --- Combobox (searchable select) --- */
.filter-group--club {
    position: relative;
}
.combobox {
    position: relative;
}
.combobox__input {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 7px 28px 7px 12px;
    font-size: 13px;
    font-family: inherit;
    background: #fff;
    color: var(--gray-800);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    width: 170px;
    min-width: 130px;
    height: 36px;
    box-sizing: border-box;
}
.combobox__input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.combobox__input::placeholder {
    color: var(--gray-500);
    font-weight: 500;
}
.combobox__clear {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
    transition: color 0.15s;
}
.combobox__clear:hover {
    color: var(--gray-700);
}
.combobox__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 220px;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 50;
}
.combobox__dropdown::-webkit-scrollbar {
    width: 5px;
}
.combobox__dropdown::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}
.combobox__option {
    padding: 7px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s;
    color: var(--gray-700);
}
.combobox__option:hover {
    background: rgba(37,99,235,0.06);
    color: var(--gray-800);
}
.combobox__option--active {
    background: rgba(37,99,235,0.1);
    color: var(--accent);
    font-weight: 600;
}
.combobox__empty {
    padding: 12px;
    font-size: 12px;
    color: var(--gray-400);
    text-align: center;
}

/* --- Multiselect (citizenship etc.) --- */
.multiselect {
    position: relative;
}
.multiselect__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
    min-width: 110px;
    height: 36px;
    padding: 0 10px;
    background: white;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    color: var(--gray-800);
    cursor: pointer;
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}
.multiselect__toggle:hover { border-color: var(--accent-light); }
.multiselect__toggle:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(37,99,235,0.12); }
.multiselect__label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.multiselect__arrow {
    font-size: 10px;
    color: var(--gray-400);
    transition: transform 0.15s;
    flex-shrink: 0;
}
.multiselect__arrow--open { transform: rotate(180deg); }
.multiselect__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    padding: 4px 0;
}
.multiselect__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.1s;
    white-space: nowrap;
}
.multiselect__option:hover { background: var(--gray-50); }
.multiselect__option input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}
.multiselect__clear {
    display: block;
    width: calc(100% - 8px);
    margin: 4px auto;
    padding: 5px 8px;
    font-size: 12px;
    color: var(--gray-500);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}
.multiselect__clear:hover { background: var(--gray-100); color: var(--gray-700); }
.multiselect__option--empty {
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 2px;
    padding-bottom: 8px;
}

/* --- League Chips --- */
.filter-group-wide {
    flex-basis: 100%;
}
.league-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.chip {
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--gray-300);
    background: #fff;
    font-size: 12px;
    font-family: inherit;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s;
}
.chip:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.chip-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.chip-active:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: #fff;
}
.chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    margin-left: 4px;
    background: var(--gray-200);
    color: var(--gray-500);
}
.chip-active .chip-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* --- Count badge --- */
.count-badge {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.count-badge span {
    font-weight: 800;
    color: var(--gray-800);
}

/* --- AG Grid Overrides --- */
/* ═══ AG Grid Premium Theme ═══ */
.ag-theme-alpine,
.ag-theme-alpine * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.ag-theme-alpine {
    --ag-header-background-color: #fff;
    --ag-odd-row-background-color: transparent;
    --ag-row-hover-color: transparent;
    --ag-selected-row-background-color: #d0e2fc;
    --ag-range-selection-background-color: #c4d9fa;
    --ag-range-selection-border-color: var(--accent);
    --ag-border-color: transparent;
    --ag-row-border-color: var(--gray-100);
    --ag-header-foreground-color: var(--gray-500);
    --ag-cell-horizontal-border: none;
    --ag-font-family: 'Manrope', sans-serif;
    --ag-font-size: 14px;
    --ag-row-height: 48px;
    --ag-header-height: 46px;
    --ag-borders: none;
    --ag-header-column-separator-display: none;
    --ag-side-bar-panel-width: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 4px 16px rgba(0,0,0,0.03);
    border: 1px solid var(--gray-200);
    background: #fff;
    position: relative;
}
/* Accent top edge */
.ag-theme-alpine::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--cyan));
    z-index: 2;
    border-radius: var(--radius) var(--radius) 0 0;
}

/* Header — clean white, strong typography */
.ag-theme-alpine .ag-header {
    border-bottom: 1px solid var(--gray-200);
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--gray-400);
    min-height: 46px !important;
    background: #fff !important;
}
.ag-theme-alpine .ag-header-row {
    height: 46px !important;
}
.ag-theme-alpine .ag-header-cell {
    padding-left: 16px;
    padding-right: 16px;
    height: 46px !important;
    line-height: 46px;
    transition: color 0.15s;
}
.ag-theme-alpine .ag-header-cell:hover {
    color: var(--gray-700);
}
.ag-theme-alpine .ag-header-cell-label {
    gap: 6px;
}
/* Sorted column — accent underline */
.ag-theme-alpine .ag-header-cell-sorted-asc,
.ag-theme-alpine .ag-header-cell-sorted-desc {
    color: var(--accent) !important;
    box-shadow: inset 0 -2px 0 0 var(--accent);
}
.ag-theme-alpine .ag-sort-ascending-icon,
.ag-theme-alpine .ag-sort-descending-icon {
    color: var(--accent);
}

/* Rows */
.ag-theme-alpine .ag-cell {
    padding-left: 16px;
    padding-right: 16px;
    display: flex;
    align-items: center;
    line-height: 1.45;
    color: var(--gray-600);
    font-size: 14px;
}
.ag-theme-alpine .ag-cell[col-id="surname"] {
    font-weight: 700;
    color: var(--gray-800);
    font-size: 14.5px;
}
.ag-theme-alpine .ag-cell[col-id="first_name"] {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 14px;
}
.ag-theme-alpine .ag-row {
    border-bottom: 1px solid var(--gray-100);
    transition: background-color 0.12s, box-shadow 0.12s;
}
.ag-theme-alpine .ag-row:last-child {
    border-bottom: none;
}
.ag-theme-alpine .ag-row-odd {
    background-color: rgba(248,250,252,0.6) !important;
}
/* Hover — left accent bar */
.ag-theme-alpine .ag-row-hover {
    background-color: rgba(37,99,235,0.035) !important;
    box-shadow: inset 3px 0 0 0 var(--accent);
}
.ag-theme-alpine .ag-row-selected {
    background-color: #d0e2fc !important;
    box-shadow: inset 3px 0 0 0 var(--accent) !important;
}
/* Active cell focus — blue accent instead of default gray */
.ag-theme-alpine .ag-cell-focus:not(.ag-cell-range-selected) {
    border-color: rgba(37,99,235,0.4) !important;
    outline: none;
}
.ag-theme-alpine .ag-ltr .ag-cell-focus {
    border-color: rgba(37,99,235,0.4) !important;
}
.ag-theme-alpine .ag-row-focus {
    background-color: rgba(37,99,235,0.06);
}

/* Pagination */
/* ── Pagination bar ── */
.ag-theme-alpine .ag-paging-panel {
    border-top: 1px solid var(--gray-200);
    color: var(--gray-600);
    font-size: 13px;
    font-weight: 600;
    height: 48px;
    padding: 0 18px;
    background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%);
    gap: 8px;
}

/* ── Hide first/last page buttons globally ── */
.ag-paging-button[data-ref="btFirst"],
.ag-paging-button[data-ref="btLast"] {
    display: none !important;
}

/* ── Unified pagination pill: [ < | Page 1 of 89 | > ] ── */
.ag-theme-alpine .ag-paging-page-summary-panel {
    background: #fff;
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    display: inline-flex !important;
    align-items: center;
    gap: 0 !important;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

/* ── Buttons inside the pill ── */
.ag-theme-alpine .ag-paging-button {
    cursor: pointer;
    min-width: 34px;
    height: 32px;
    border-radius: 0;
    background: transparent;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    opacity: 1;
    box-shadow: none;
}
.ag-theme-alpine .ag-paging-button:hover {
    background: rgba(37,99,235,0.06);
    border: none;
    box-shadow: none;
}
.ag-theme-alpine .ag-paging-button:active {
    transform: none;
    background: rgba(37,99,235,0.12);
}
.ag-theme-alpine .ag-paging-button.ag-disabled {
    opacity: 0.25;
    cursor: default;
    background: transparent;
    border: none;
    box-shadow: none;
}
.ag-theme-alpine .ag-paging-button .ag-icon {
    color: var(--gray-500);
    font-size: 14px;
}
.ag-theme-alpine .ag-paging-button:hover .ag-icon {
    color: var(--accent);
}
/* Dividers between button and label */
.ag-theme-alpine .ag-paging-button[data-ref="btPrevious"] {
    border-right: 1px solid var(--gray-200);
}
.ag-theme-alpine .ag-paging-button[data-ref="btNext"] {
    border-left: 1px solid var(--gray-200);
}

/* ── Page description "Страница X из Y" — center of pill ── */
.ag-theme-alpine .ag-paging-description {
    background: transparent;
    padding: 4px 14px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    letter-spacing: 0.2px;
    margin: 0;
    white-space: nowrap;
}
.ag-theme-alpine .ag-paging-number {
    color: var(--accent);
    font-weight: 800;
}

/* ── Row summary "1-50 из 4,420" ── */
.ag-theme-alpine .ag-paging-row-summary-panel {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-400);
}
.ag-theme-alpine .ag-paging-row-summary-panel-number {
    font-weight: 700;
    color: var(--gray-600);
}

/* Page size selector dropdown */
.ag-theme-alpine .ag-paging-page-size .ag-picker-field-wrapper {
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 3px 8px;
    min-height: 28px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-weight: 500;
    color: var(--gray-700);
}
.ag-theme-alpine .ag-paging-page-size .ag-picker-field-wrapper:hover {
    border-color: var(--gray-400);
}
.ag-theme-alpine .ag-paging-page-size .ag-picker-field-wrapper:focus-within,
.ag-theme-alpine .ag-paging-page-size .ag-picker-field-wrapper.ag-picker-expanded {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.ag-theme-alpine .ag-paging-page-size .ag-picker-field-display {
    color: var(--gray-700);
    font-weight: 600;
    font-size: 12px;
}
.ag-theme-alpine .ag-paging-page-size .ag-picker-field-icon .ag-icon {
    color: var(--gray-400);
}

/* Page size popup — force width on every nested layer */
.ag-popup .ag-popup-child {
    min-width: 80px !important;
    width: auto !important;
}
.ag-popup .ag-select-list {
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04);
    background: #fff;
    padding: 4px;
    min-width: 80px !important;
    width: auto !important;
    overflow: visible;
}
.ag-popup .ag-virtual-list-viewport {
    min-width: 72px !important;
    width: auto !important;
    overflow: visible !important;
}
.ag-popup .ag-virtual-list-container {
    min-width: 72px !important;
    width: auto !important;
}
.ag-popup .ag-select-list-item {
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    font-family: 'Manrope', sans-serif;
    white-space: nowrap;
    min-width: 60px;
}
.ag-popup .ag-select-list-item:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}
.ag-popup .ag-select-list-item.ag-active-item {
    background: rgba(37,99,235,0.06);
    color: var(--accent);
    font-weight: 600;
}

/* Scrollbar */
.ag-theme-alpine .ag-body-horizontal-scroll-viewport::-webkit-scrollbar,
.ag-theme-alpine .ag-body-viewport::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
.ag-theme-alpine .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb,
.ag-theme-alpine .ag-body-viewport::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}
.ag-theme-alpine .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-thumb:hover,
.ag-theme-alpine .ag-body-viewport::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}
.ag-theme-alpine .ag-body-horizontal-scroll-viewport::-webkit-scrollbar-track,
.ag-theme-alpine .ag-body-viewport::-webkit-scrollbar-track {
    background: transparent;
}

/* No rows overlay */
.ag-theme-alpine .ag-overlay-no-rows-wrapper {
    padding: 40px;
}
.ag-theme-alpine .ag-overlay-no-rows-center {
    font-size: 14px;
    color: var(--gray-400);
    font-weight: 500;
}

/* --- Bookmark Star in Grid --- */
.bookmark-star {
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    color: var(--gray-300);
    transition: color 0.15s, transform 0.15s;
    user-select: none;
}
.bookmark-star:hover {
    color: var(--yellow);
    transform: scale(1.2);
}
.bookmark-star.bookmarked {
    color: var(--yellow);
}
.bookmark-star.bookmarked:hover {
    color: var(--gray-400);
}

/* Bookmark column cell — reduce padding */
.ag-theme-alpine .ag-cell[col-id="_bookmark"] {
    padding-left: 8px;
    padding-right: 4px;
    justify-content: center;
}
.ag-theme-alpine .ag-header-cell[col-id="_bookmark"] {
    padding-left: 8px;
    padding-right: 4px;
}

/* --- Badges --- */
.badge-license {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--green-bg);
    color: var(--green-text);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(22,163,74,0.15);
}
.badge-no-license {
    display: inline-flex;
    align-items: center;
    background: var(--red-bg);
    color: var(--red-text);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(220,38,38,0.1);
}

/* --- Category Badges --- */
.cat-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    margin-right: 3px;
}
.cat-club { background: rgba(37,99,235,0.1); color: #2563eb; border: 1px solid rgba(37,99,235,0.2); }
.cat-national { background: rgba(124,58,237,0.1); color: #7c3aed; border: 1px solid rgba(124,58,237,0.2); }
.cat-youth { background: rgba(22,163,74,0.1); color: #16a34a; border: 1px solid rgba(22,163,74,0.2); }
.cat-university { background: rgba(6,182,212,0.1); color: #0891b2; border: 1px solid rgba(6,182,212,0.2); }
.cat-veteran { background: rgba(234,88,12,0.1); color: #ea580c; border: 1px solid rgba(234,88,12,0.2); }
.cat-other { background: rgba(100,116,139,0.1); color: #64748b; border: 1px solid rgba(100,116,139,0.2); }

/* Category chip colors (for filter bar) */
.cat-chip-club.chip-active { background: #2563eb; border-color: #2563eb; color: #fff; }
.cat-chip-national.chip-active { background: #7c3aed; border-color: #7c3aed; color: #fff; }
.cat-chip-youth.chip-active { background: #16a34a; border-color: #16a34a; color: #fff; }
.cat-chip-university.chip-active { background: #0891b2; border-color: #0891b2; color: #fff; }
.cat-chip-veteran.chip-active { background: #ea580c; border-color: #ea580c; color: #fff; }
.cat-chip-other.chip-active { background: #64748b; border-color: #64748b; color: #fff; }

/* --- Side Panel (Broadcast Card) --- */
.side-panel {
    width: 380px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(10,22,40,0.12), 0 2px 8px rgba(10,22,40,0.06);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}
.side-panel:hover {
    box-shadow: 0 12px 40px rgba(10,22,40,0.16), 0 4px 12px rgba(10,22,40,0.08);
}

/* ── Panel Header — gradient card ── */
.sp-header {
    position: relative;
    padding: 22px 20px 18px;
    background: linear-gradient(135deg, var(--navy-2), var(--accent));
    color: #fff;
    overflow: hidden;
}
.sp-header--f {
    background: linear-gradient(135deg, #831843, #ec4899);
}
.sp-header__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.15s;
    z-index: 2;
}
.sp-header__close:hover {
    background: rgba(255,255,255,0.3);
}
.sp-header__jersey {
    position: absolute;
    top: 6px;
    right: 44px;
    font-size: 52px;
    font-weight: 900;
    opacity: 0.1;
    letter-spacing: -2px;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}
.sp-header__name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.2px;
    padding-right: 36px;
}
.sp-header__surname {
    display: block;
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.sp-header__age {
    font-size: 15px;
    font-weight: 500;
    opacity: 0.5;
    margin-left: 5px;
}
.sp-header__team {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    font-size: 12px;
    font-weight: 500;
    opacity: 0.7;
}
.sp-header__league-tag {
    font-size: 9px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.18);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* ── Header Badges ── */
.sp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}
.sp-badge {
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.16);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: #fff;
}
.sp-badge--role {
    background: rgba(255,255,255,0.25);
    font-weight: 700;
}
.sp-badge--citizenship {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
}
.sp-badge--link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: background 0.15s;
}
.sp-badge--link:hover {
    background: rgba(255,255,255,0.32);
}
.sp-badge--nolic {
    background: rgba(255,80,80,0.25);
    border: 1px solid rgba(255,80,80,0.3);
}

/* ── Panel Body ── */
.sp-body {
    padding: 16px 20px 20px;
    overflow-y: auto;
    flex: 1;
}

/* ── Stat Blocks ── */
.sp-stats {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}
.sp-stat {
    flex: 1;
    padding: 12px 8px;
    text-align: center;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.sp-stat:last-child { border-right: none; }
.sp-stat__val {
    font-size: 20px;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1.2;
}
.sp-stat__val--sm {
    font-size: 13px;
    font-weight: 700;
}
.sp-stat__label {
    font-size: 10px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 3px;
}

/* ── Teams Section ── */
.sp-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 10px 0;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--gray-100);
}
.sp-section-title svg {
    opacity: 0.5;
}

/* ── Team History Rows ── */
.sp-team-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--gray-50);
    font-size: 12px;
}
.sp-team-row:last-child { border-bottom: none; }
.sp-team-row__season {
    flex-shrink: 0;
    font-weight: 800;
    color: var(--accent);
    font-size: 12px;
    min-width: 36px;
}
.sp-team-row__name {
    font-weight: 600;
    color: var(--gray-800);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-team-row__league {
    color: var(--gray-400);
    font-size: 11px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sp-team-row__detail {
    color: var(--gray-500);
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
}

/* ── Action Buttons ── */
.sp-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}
.volley-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(37,99,235,0.06);
    border: 1px solid rgba(37,99,235,0.15);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
}
.volley-link:hover {
    background: rgba(37,99,235,0.1);
    border-color: rgba(37,99,235,0.3);
    transform: translateY(-1px);
}
.history-btn {
    flex: 1;
    padding: 7px 14px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(37,99,235,0.06);
    border: 1px dashed rgba(37,99,235,0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.history-btn:hover {
    background: rgba(37,99,235,0.1);
    border-color: rgba(37,99,235,0.3);
}

/* ── Category badges (allGrid) ── */
.sp-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

/* ── Region info badge ── */
.sp-region-info {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(37,99,235,0.06);
    padding: 5px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: inline-block;
}

/* --- Dashboard Hero --- */
.dash-hero {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    padding: 40px 36px;
}
.dash-hero__bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--navy-1) 0%, var(--navy-2) 40%, var(--navy-3) 70%, #1e3a8a 100%);
    z-index: 0;
}
.dash-hero__bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 300px at 80% 20%, rgba(37,99,235,0.25), transparent),
        radial-gradient(ellipse 400px 400px at 20% 80%, rgba(6,182,212,0.15), transparent);
}
.dash-hero__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
}
.dash-hero__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.dash-hero__eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: rgba(255,255,255,0.45);
    margin-bottom: 8px;
}
.dash-hero__total {
    font-size: 72px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -2px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.dash-hero__subtitle {
    font-size: 16px;
    color: rgba(255,255,255,0.6);
    font-weight: 500;
    margin-top: 6px;
}
.dash-hero__season {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-pill);
    padding: 2px 12px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-left: 8px;
    vertical-align: middle;
}
.dash-hero__rings {
    display: flex;
    gap: 24px;
}
.dash-ring {
    position: relative;
    width: 110px;
    height: 110px;
}
.dash-ring__svg {
    width: 100%;
    height: 100%;
}
.dash-ring__label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.dash-ring__pct {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}
.dash-ring__caption {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- KPI Row --- */
.dash-kpi-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
.dash-kpi {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--gray-200);
    transition: transform 0.2s, box-shadow 0.2s;
}
.dash-kpi:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-card-hover);
}
.dash-kpi__icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-kpi__value {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1.1;
}
.dash-kpi__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* --- Analytics Grid --- */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.dash-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}
.dash-card--wide {
    grid-column: 1 / -1;
}
.dash-card__header {
    padding: 16px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-100);
}
.dash-card__title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
}
.dash-card__badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    background: rgba(37,99,235,0.08);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}
.dash-card__body {
    padding: 16px 20px 20px;
}

/* Bar list (categories) */
.dash-bar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.dash-bar-item__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}
.dash-bar-item__label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
}
.dash-bar-item__count {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-800);
}
.dash-bar-item__track {
    height: 6px;
    background: var(--gray-100);
    border-radius: 3px;
    overflow: hidden;
}
.dash-bar-item__fill {
    height: 100%;
    border-radius: 3px;
    min-width: 2px;
}

/* Team list */
.dash-team-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dash-team-item {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-team-item__rank {
    width: 20px;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-400);
    text-align: center;
    flex-shrink: 0;
}
.dash-team-item__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.dash-team-item__bar-wrap {
    width: 60px;
    height: 4px;
    background: var(--gray-100);
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
}
.dash-team-item__bar {
    height: 100%;
    background: var(--accent);
    border-radius: 2px;
}
.dash-team-item__count {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-600);
    width: 30px;
    text-align: right;
    flex-shrink: 0;
}
.dash-team-item--skip {
    width: 20px;
    display: flex;
    justify-content: center;
    padding: 2px 0;
}
.dash-team-item--skip__line {
    width: 1.5px;
    height: 16px;
    background: var(--gray-300);
    border-radius: 1px;
}
.dash-team-item--pinned {
    background: rgba(37,99,235,0.05);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    margin: 0 -10px;
    border-left: 2.5px solid var(--accent);
}

/* Year chart */
.dash-year-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 120px;
    padding-top: 8px;
}
.dash-year-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
    cursor: default;
}
.dash-year-bar__fill {
    width: 100%;
    background: linear-gradient(to top, var(--accent), var(--accent-light));
    border-radius: 3px 3px 0 0;
    min-height: 2px;
}
.dash-year-bar__label {
    font-size: 9px;
    color: var(--gray-400);
    margin-top: 4px;
    transform: rotate(-45deg);
    white-space: nowrap;
}

/* Physical stats */
.dash-phys {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding-top: 12px;
    padding-bottom: 12px;
}
.dash-phys__stat {
    text-align: center;
}
.dash-phys__value {
    font-size: 42px;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1;
}
.dash-phys__unit {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-400);
    margin-top: 2px;
}
.dash-phys__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    margin-top: 4px;
}
.dash-phys__divider {
    width: 1px;
    height: 60px;
    background: var(--gray-200);
}

/* ═══ Platform Showcase ═══ */
.ps {
    border-radius: 16px;
    overflow: hidden;
    background: var(--navy-1);
    position: relative;
}

/* --- Animated Background --- */
.ps-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}
.ps-bg__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.35;
    animation: ps-drift 25s ease-in-out infinite;
}
.ps-bg__orb--1 {
    width: 350px; height: 350px;
    background: var(--accent);
    top: -120px; right: -60px;
}
.ps-bg__orb--2 {
    width: 250px; height: 250px;
    background: #8b5cf6;
    bottom: 10%; left: 5%;
    animation-delay: -9s;
}
.ps-bg__orb--3 {
    width: 300px; height: 300px;
    background: #06b6d4;
    top: 40%; right: 25%;
    animation-delay: -17s;
}
@keyframes ps-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(25px, -18px) scale(1.06); }
    66%      { transform: translate(-18px, 12px) scale(0.94); }
}
.ps-bg__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black, transparent);
}
.ps-bg__noise {
    position: absolute;
    inset: 0;
    opacity: 0.018;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px;
}

/* --- Hero --- */
.ps-hero {
    position: relative;
    z-index: 2;
    padding: 56px 40px 0;
    animation: ps-fadeUp .7s ease-out both;
}
.ps-hero__eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-light);
    background: rgba(59,130,246,0.12);
    border: 1px solid rgba(59,130,246,0.2);
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    margin-bottom: 20px;
    animation: ps-fadeUp .6s ease-out .1s both;
}
.ps-hero__title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -1.5px;
    margin: 0 0 20px;
    background: linear-gradient(160deg, #fff 30%, rgba(255,255,255,0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: ps-fadeUp .6s ease-out .15s both;
}
.ps-hero__title--accent {
    background: linear-gradient(135deg, #60a5fa 0%, var(--accent-light) 40%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.ps-hero__desc {
    font-size: 17px;
    line-height: 1.75;
    color: rgba(255,255,255,0.55);
    margin: 0;
    max-width: 640px;
    animation: ps-fadeUp .6s ease-out .25s both;
}

/* --- Metrics Bar --- */
.ps-metrics {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 36px;
    padding: 24px 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    animation: ps-fadeUp .6s ease-out .35s both;
}
.ps-metrics__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.ps-metrics__value {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
    text-shadow: 0 0 40px rgba(37,99,235,0.3);
}
.ps-metrics__label {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.ps-metrics__sep {
    width: 1px;
    height: 36px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.1), transparent);
    flex-shrink: 0;
}

/* --- Bento Grid --- */
.ps-bento {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px 24px 24px;
}
.ps-bento__card {
    border-radius: 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: background .3s, border-color .3s, transform .3s, box-shadow .3s;
    overflow: hidden;
}
.ps-bento__card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(37,99,235,0.25);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25), 0 0 0 1px rgba(37,99,235,0.08);
}
.ps-bento__card--wide {
    grid-column: 1 / -1;
}
.ps-bento__inner {
    padding: 28px;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.ps-bento__card--wide .ps-bento__inner {
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
}
.ps-bento__visual {
    flex-shrink: 0;
}
.ps-bento__body {
    flex: 1;
    min-width: 0;
}
.ps-bento__num {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
    display: inline-block;
}
.ps-bento__num--hero {
    font-size: 72px;
    line-height: 1;
    letter-spacing: -3px;
    margin-bottom: 12px;
    text-shadow: 0 0 60px rgba(96,165,250,0.25);
}
.ps-bento__title {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    margin: 0 0 10px;
    letter-spacing: -0.2px;
}
.ps-bento__desc {
    font-size: 15px;
    line-height: 1.7;
    color: rgba(255,255,255,0.4);
    margin: 0;
}
.ps-bento__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}
.ps-bento__pill {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
}

/* Bento: flow diagram visual */
.ps-flow {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 12px 0 8px;
}
.ps-flow__node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.ps-flow__node span {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.3px;
}
.ps-flow__dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: 0 0 20px var(--c);
    position: relative;
}
.ps-flow__dot::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 1.5px solid var(--c);
    opacity: 0.3;
}
.ps-flow__line {
    width: 40px;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.15), rgba(255,255,255,0.06));
    margin: 0 8px;
    margin-bottom: 20px;
}

/* Bento: mock tag pills */
.ps-mock-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}
.ps-mock-tag {
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: var(--c);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    opacity: 0.85;
    box-shadow: 0 2px 12px color-mix(in srgb, var(--c) 40%, transparent);
}

/* Bento: mini chart visual */
.ps-mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 56px;
    padding: 4px 0 8px;
}
.ps-mini-chart__bar {
    flex: 1;
    height: var(--h);
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, rgba(96,165,250,0.5), rgba(96,165,250,0.15));
    transition: height .5s ease;
}
.ps-bento__card:hover .ps-mini-chart__bar {
    background: linear-gradient(180deg, rgba(96,165,250,0.7), rgba(96,165,250,0.25));
}

/* --- Architecture Pipeline --- */
.ps-pipe {
    position: relative;
    z-index: 2;
    padding: 12px 40px 44px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin: 0 24px;
}
.ps-pipe__label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    margin-bottom: 28px;
    text-align: center;
}
.ps-pipe__track {
    display: flex;
    align-items: flex-start;
}
.ps-pipe__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.ps-pipe__dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 16px rgba(37,99,235,0.5);
    position: relative;
}
.ps-pipe__dot::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1.5px solid rgba(37,99,235,0.25);
}
.ps-pipe__name {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
}
.ps-pipe__sub {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
}
.ps-pipe__conn {
    flex: 1;
    height: 1.5px;
    margin: 5px 14px 0;
    background: repeating-linear-gradient(
        90deg,
        rgba(37,99,235,0.3) 0, rgba(37,99,235,0.3) 6px,
        transparent 6px, transparent 12px
    );
    position: relative;
}
.ps-pipe__conn::after {
    content: '';
    position: absolute;
    right: -3px;
    top: -3.5px;
    border-top: 4.5px solid transparent;
    border-bottom: 4.5px solid transparent;
    border-left: 6px solid rgba(37,99,235,0.45);
}

/* --- Animations --- */
@keyframes ps-fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.ps-bento__card:nth-child(1) { animation: ps-fadeUp .5s ease-out .4s both; }
.ps-bento__card:nth-child(2) { animation: ps-fadeUp .5s ease-out .5s both; }
.ps-bento__card:nth-child(3) { animation: ps-fadeUp .5s ease-out .6s both; }
.ps-bento__card:nth-child(4) { animation: ps-fadeUp .5s ease-out .7s both; }
.ps-pipe { animation: ps-fadeUp .5s ease-out .8s both; }

/* Responsive */
@media (max-width: 768px) {
    .ps-hero { padding: 36px 20px 0; }
    .ps-hero__title { font-size: 30px; }
    .ps-metrics { flex-wrap: wrap; gap: 8px; }
    .ps-metrics__item { min-width: 40%; }
    .ps-metrics__sep { display: none; }
    .ps-metrics__value { font-size: 22px; }
    .ps-bento { grid-template-columns: 1fr; padding: 12px 16px 20px; }
    .ps-bento__card--wide .ps-bento__inner { flex-direction: column; gap: 16px; }
    .ps-pipe { padding: 12px 16px 28px; margin: 0 8px; overflow-x: auto; }
    .ps-pipe__track { min-width: 560px; }
    .ps-pipe__name { font-size: 13px; }
}

/* --- Scouting Tab --- */
.scouting-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}
.scouting-search {
    max-width: 500px;
}
.scouting-tags-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

/* Scouting Empty State */
.scouting-empty {
    text-align: center;
    padding: 60px 20px;
}
.scouting-empty-icon {
    font-size: 48px;
    color: var(--gray-300);
    margin-bottom: 12px;
}
.scouting-empty-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
}
.scouting-empty-hint {
    font-size: 14px;
    color: var(--gray-400);
}

/* Scouting Cards — redesigned */
.sc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
    align-items: start;
}
.sc-card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
    padding: 0;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.25s, transform 0.2s;
    overflow: visible;
    position: relative;
}
.sc-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    opacity: 0.85;
    border-radius: var(--radius) var(--radius) 0 0;
}
.sc-card--f::before {
    background: linear-gradient(90deg, #ec4899, #f472b6);
}
.sc-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}

/* Card Top */
.sc-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 18px 20px 0;
}
.sc-card__identity {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.sc-card__name {
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
}
.sc-card__surname {
    font-weight: 800;
}
.sc-card__unbookmark {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--yellow);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sc-card__unbookmark:hover {
    background: var(--red-bg);
    color: var(--red);
}

/* Badges */
.sc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}
.sc-badge--m {
    background: rgba(37,99,235,0.1);
    color: var(--accent);
}
.sc-badge--f {
    background: rgba(236,72,153,0.1);
    color: #ec4899;
}
.sc-card__team {
    font-size: 12px;
    color: var(--gray-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 2px 20px 0;
}
.sc-card__age {
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-400);
    white-space: nowrap;
    flex-shrink: 0;
    padding: 2px 8px;
    background: var(--gray-100);
    border-radius: var(--radius-pill);
    letter-spacing: 0.2px;
}

/* Stats Row */
.sc-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin: 14px 20px 0;
    padding: 12px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
}
.sc-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 16px;
    border-right: 1px solid var(--gray-100);
}
.sc-stat:first-child {
    padding-left: 0;
}
.sc-stat:last-child {
    border-right: none;
}
.sc-stat__label {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}
.sc-stat__value {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}
.sc-stat__value--club {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* License indicator */
.sc-license {
    font-size: 12px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
}
.sc-license--yes {
    background: var(--green-bg);
    color: var(--green-text);
}
.sc-license--no {
    background: var(--gray-100);
    color: var(--gray-400);
    font-weight: 500;
}

/* Tags Row with + button */
.sc-card__tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 12px 20px 0;
    align-items: center;
    min-height: 32px;
}
.sc-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px 3px 10px;
    border-radius: var(--radius-pill);
    background: rgba(37,99,235,0.08);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(37,99,235,0.15);
    transition: background 0.15s;
}
.sc-tag:hover {
    background: rgba(37,99,235,0.14);
}
.sc-tag__del {
    display: none;
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 0 1px;
    opacity: 0.6;
    transition: opacity 0.1s;
}
.sc-tag:hover .sc-tag__del {
    display: inline-flex;
}
.sc-tag__del:hover {
    opacity: 1;
    color: var(--red);
}

/* Tag Add Button */
.sc-tag-add-btn {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed var(--gray-300);
    border-radius: 50%;
    background: none;
    color: var(--gray-400);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    line-height: 1;
}
.sc-tag-add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(37,99,235,0.05);
}

/* Tag Inline Input */
.sc-tag-input-inline {
    padding: 3px 10px;
    border: 1.5px solid var(--accent);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-family: inherit;
    font-weight: 500;
    outline: none;
    width: 100px;
    background: rgba(37,99,235,0.03);
    color: var(--gray-800);
    transition: width 0.2s;
}
.sc-tag-input-inline:focus {
    width: 140px;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Tag Picker Dropdown */
.sc-tag-picker {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 50;
    min-width: 180px;
    max-width: 260px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.06);
    padding: 4px 0;
    animation: tagPickerIn 0.15s ease-out;
}
@keyframes tagPickerIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.sc-tag-picker__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 12px;
    border: none;
    background: none;
    font-size: 13px;
    font-family: inherit;
    color: var(--gray-800);
    cursor: pointer;
    text-align: left;
    transition: background 0.1s;
}
.sc-tag-picker__item:hover:not(.is-disabled) {
    background: rgba(37,99,235,0.06);
}
.sc-tag-picker__item.is-disabled {
    opacity: 0.4;
    cursor: default;
}
.sc-tag-picker__count {
    font-size: 11px;
    color: var(--gray-400);
    margin-left: 8px;
    flex-shrink: 0;
}
.sc-tag-picker__divider {
    height: 1px;
    background: var(--gray-200);
    margin: 4px 0;
}
.sc-tag-picker__new-btn {
    color: var(--accent);
    font-weight: 500;
}
.sc-tag-picker__new-input-wrap {
    padding: 6px 8px;
}
.sc-tag-picker__input {
    width: 100%;
    padding: 5px 10px;
    border: 1.5px solid var(--accent);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: rgba(37,99,235,0.03);
    color: var(--gray-800);
    box-sizing: border-box;
}
.sc-tag-picker__input:focus {
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

/* Watchers */
.sc-card__watchers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 20px 0;
    font-size: 12px;
    color: var(--gray-400);
}
.sc-watcher {
    color: var(--gray-500);
    font-weight: 500;
}
.sc-watcher::after {
    content: ',';
    color: var(--gray-300);
}
.sc-watcher:last-child::after {
    content: '';
}

/* Comments Section */
.sc-card__comments {
    margin-top: 10px;
    border-top: 1px solid var(--gray-100);
}
.sc-comments-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-400);
    padding: 10px 20px;
    transition: color 0.15s, background 0.15s;
}
.sc-comments-toggle:hover {
    color: var(--gray-600);
    background: var(--gray-50);
}
.sc-comments-toggle svg {
    transition: transform 0.2s;
}
.sc-comments-toggle.has-comments {
    color: var(--accent);
}
.sc-comments-toggle.has-comments:hover {
    color: var(--accent-light);
}
.sc-comments-toggle.has-unread {
    color: var(--accent);
    font-weight: 700;
}
.sc-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    padding: 1px 5px;
    border-radius: var(--radius-pill);
    min-width: 18px;
}

.sc-comments-body {
    padding: 0 20px 16px;
}

/* Comment Form */
.sc-comment-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: flex-start;
}
.sc-comment-textarea {
    flex: 1;
    padding: 8px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 40px;
    background: var(--gray-50);
}
.sc-comment-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
    background: #fff;
}
.sc-comment-submit {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
}
.sc-comment-submit:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

/* Comment */
.sc-comment {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    border-left: 3px solid var(--accent);
    transition: border-color 0.15s;
}
.sc-comment:hover {
    border-left-color: var(--accent-light);
}
.sc-comment__head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.sc-comment__author {
    font-size: 12px;
    font-weight: 700;
    color: var(--gray-700);
}
.sc-comment__date {
    font-size: 11px;
    color: var(--gray-400);
}
.sc-comment__del {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-300);
    font-size: 16px;
    line-height: 1;
    padding: 0 4px;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
}
.sc-comment__del:hover {
    color: var(--red);
    background: var(--red-bg);
}
.sc-comment__text {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* --- Admin Tab --- */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--gray-200);
}
.admin-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
}
.admin-table td {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(37,99,235,0.03); }

.admin-user-inactive td {
    opacity: 0.5;
}
.admin-role-badge {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
}
.role-admin { background: rgba(124,58,237,0.1); color: #7c3aed; }
.role-user { background: var(--gray-100); color: var(--gray-600); }
.admin-status-active { color: var(--green); font-weight: 600; font-size: 12px; }
.admin-status-inactive { color: var(--red); font-weight: 600; font-size: 12px; }

.admin-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.admin-btn {
    padding: 5px 12px;
    border: 1px solid;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.admin-btn-danger {
    color: var(--red);
    border-color: rgba(220,38,38,0.3);
    background: var(--red-bg);
}
.admin-btn-danger:hover { background: rgba(220,38,38,0.15); }
.admin-btn-success {
    color: var(--green);
    border-color: rgba(22,163,74,0.3);
    background: var(--green-bg);
}
.admin-btn-success:hover { background: rgba(22,163,74,0.15); }
.admin-btn-warning {
    color: var(--orange);
    border-color: rgba(234,88,12,0.3);
    background: rgba(234,88,12,0.06);
}
.admin-btn-warning:hover { background: rgba(234,88,12,0.12); }

.admin-temp-password {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    background: var(--green-bg);
    border: 1px solid rgba(22,163,74,0.2);
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--green-text);
}

/* --- Toast Notification --- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--navy-1);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    pointer-events: none;
}

/* --- Confirm Dialog --- */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.confirm-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    min-width: 320px;
    max-width: 480px;
}

/* --- Player Modal --- */
.pm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 22, 40, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.pm-enter { transition: opacity 0.25s ease; }
.pm-enter { opacity: 0; }
.pm-leave { transition: opacity 0.2s ease; opacity: 0; }
.pm-dialog-enter {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
    transform: scale(0.92) translateY(20px); opacity: 0;
}
.pm-dialog-leave {
    transition: transform 0.2s ease, opacity 0.15s ease;
    transform: scale(0.95) translateY(10px); opacity: 0;
}

.pm-dialog {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25), 0 10px 20px rgba(0,0,0,0.15);
}

/* Modal Header */
.pm-header {
    position: relative;
    padding: 32px 28px 24px;
    background: linear-gradient(135deg, var(--navy-2), var(--accent));
    color: #fff;
}
.pm-header--f {
    background: linear-gradient(135deg, #831843, #ec4899);
}
.pm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.pm-close:hover {
    background: rgba(255,255,255,0.3);
}
.pm-header__name {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.3px;
}
.pm-header__surname {
    display: block;
    font-size: 32px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pm-header__badges {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.pm-badge {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.18);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.pm-badge--link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    text-decoration: none;
    transition: background 0.15s;
    cursor: pointer;
}
.pm-badge--link:hover {
    background: rgba(255,255,255,0.32);
}
/* Jersey Number - large watermark in header corner */
.pm-header__jersey {
    position: absolute;
    top: 12px;
    right: 56px;
    font-size: 48px;
    font-weight: 900;
    opacity: 0.12;
    letter-spacing: -2px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
    user-select: none;
}
.pm-header__age {
    font-size: 18px;
    font-weight: 500;
    opacity: 0.55;
    margin-left: 6px;
    letter-spacing: 0;
}
/* Team + League in header */
.pm-header__team {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.75;
}
.pm-header__league-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.18);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
/* Role badge */
.pm-badge--role {
    background: rgba(255,255,255,0.25);
    font-weight: 700;
    letter-spacing: 0.4px;
}
/* Citizenship badge */
.pm-badge--citizenship {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.2);
}
/* Share button */
.pm-badge--share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: #fff;
    font-family: inherit;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255,255,255,0.18);
    transition: background 0.15s;
}
.pm-badge--share:hover {
    background: rgba(255,255,255,0.32);
}

/* Modal Body */
.pm-body {
    padding: 24px 28px 28px;
    overflow-y: auto;
    flex: 1;
}

/* Stat Blocks */
.pm-stats {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}
.pm-stat-block {
    flex: 1;
    padding: 16px;
    text-align: center;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.pm-stat-block:last-child {
    border-right: none;
}
.pm-stat-block__val {
    font-size: 22px;
    font-weight: 800;
    color: var(--gray-800);
    line-height: 1.3;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: break-word;
}
.pm-stat-block__val--small {
    font-size: 14px;
    font-weight: 700;
}
.pm-stat-block__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-top: 4px;
}

/* Section */
.pm-section {
    margin-bottom: 20px;
}
.pm-section__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gray-100);
}

/* History */
.pm-history__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-50);
    font-size: 13px;
}
.pm-history__row:last-child {
    border-bottom: none;
}
.pm-history__season {
    flex-shrink: 0;
    font-weight: 800;
    color: var(--accent);
    font-size: 14px;
    min-width: 42px;
}
.pm-history__team {
    font-weight: 600;
    color: var(--gray-800);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pm-history__league {
    color: var(--gray-400);
    font-size: 12px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.pm-history__detail {
    color: var(--gray-500);
    font-size: 12px;
    font-weight: 500;
}

/* Modal Comment */
.pm-comment {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 8px;
    border-left: 3px solid var(--accent);
}
.pm-comment__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--gray-400);
}
.pm-comment__meta strong {
    color: var(--gray-700);
}
.pm-comment p {
    margin: 0;
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* --- Grid Layout (table + side panel) --- */
.grid-layout {
    display: flex;
    gap: 16px;
}
.grid-main {
    flex: 1;
    min-width: 0;
}

/* --- Mobile filter toggle (hidden on desktop) --- */
.mobile-filter-toggle {
    display: none;
}
.search-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* --- Responsive: tablet and below --- */
@media (max-width: 768px) {
    /* Header */
    .header-inner { padding: 0 12px; height: 48px; grid-template-columns: auto 1fr auto; }
    .header-title { font-size: 15px; }
    .header-badge { display: none; }
    .header-center { justify-content: center; }
    .header-user__name { display: none; }
    .header-user { padding: 4px; }
    .season-switcher { padding: 3px 4px 3px 10px; }

    /* Tabs — scroll indicator via masks */
    .tabs-bar { position: relative; }
    .tabs-inner {
        padding: 0 12px;
        -webkit-mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 28px), transparent);
        mask-image: linear-gradient(to right, transparent, black 12px, black calc(100% - 28px), transparent);
    }
    .tab-btn { padding: 10px 12px; font-size: 12px; }

    /* Content area */
    .content-area { padding: 12px 12px; }

    /* Search row with filter toggle */
    .mobile-filter-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 0 14px;
        height: auto;
        border: 1.5px solid var(--gray-300);
        border-radius: var(--radius);
        background: #fff;
        color: var(--gray-600);
        font-size: 13px;
        font-weight: 600;
        font-family: inherit;
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
        box-shadow: var(--shadow-card);
        flex-shrink: 0;
    }
    .mobile-filter-toggle:hover,
    .mobile-filter-toggle--active {
        border-color: var(--accent);
        color: var(--accent);
        background: rgba(37,99,235,0.04);
    }

    /* Filters — collapsed by default on mobile */
    .filter-bar {
        display: none;
        padding: 14px 12px;
        gap: 10px;
        border-radius: var(--radius-sm);
    }
    .filter-bar--mobile-open {
        display: flex;
    }
    .filter-bar select, .filter-bar input[type="number"] { font-size: 12px; max-width: 100%; }
    .filter-bar__controls {
        gap: 8px;
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar__controls .filter-group {
        width: 100%;
    }
    .filter-bar__controls .filter-sep,
    .filter-bar__controls .filter-sep--h,
    .filter-bar__categories .filter-sep--h { display: none; }
    .filter-bar__controls .csel { max-width: 100%; }
    .filter-bar__controls .csel__toggle { width: 100%; }
    .filter-group--pair .range-pair input { width: 50%; min-width: 50px; flex: 1; }
    .filter-group--pair .range-pair { width: 100%; }
    .combobox__input { width: 100%; min-width: 0; font-size: 13px; }
    .combobox { width: 100%; }
    .filter-bar__categories { gap: 6px; }

    /* Grid + side panel: stack vertically for layout */
    .grid-layout {
        flex-direction: column;
        gap: 12px;
    }

    /* ── Side panel → Bottom sheet overlay on mobile ── */
    .side-panel {
        position: fixed;
        inset: 0;
        z-index: 1000;
        width: 100%;
        max-height: none;
        order: unset;
        /* Overlay backdrop */
        background: rgba(10, 22, 40, 0.55);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        /* Layout: push content to bottom */
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        /* Reset desktop styles */
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    .side-panel:hover {
        box-shadow: none;
    }
    /* The inner content (template x-if child) = the actual sheet */
    .side-panel > template + div,
    .side-panel > div:first-child {
        background: #fff;
        border-radius: 20px 20px 0 0;
        max-height: 88vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 -8px 40px rgba(10,22,40,0.25);
        animation: sp-slideUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    }
    /* Drag handle indicator */
    .side-panel .sp-header::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: rgba(255,255,255,0.4);
        margin: 0 auto 8px;
    }

    /* AG Grid: fill remaining viewport height on mobile */
    /* header=48 + tabs=40 + content-pad=12 + search-row=42 + count=22 + gap=8 + pager=46 + bottom=8 ≈ 226px */
    .ag-theme-alpine { height: calc(100dvh - 226px) !important; min-height: 280px; }
    .count-badge { font-size: 12px; }

    /* AG Grid mobile: spacious rows, readable fonts, compact headers */
    /* NOTE: actual row/header height set via JS gridOptions (rowHeight/headerHeight) */
    .ag-theme-alpine {
        --ag-row-height: 46px;
        --ag-header-height: 38px;
        --ag-font-size: 15px;
    }
    .ag-theme-alpine .ag-header {
        font-size: 10px;
        letter-spacing: 0.5px;
        min-height: 38px !important;
    }
    .ag-theme-alpine .ag-header-row {
        height: 38px !important;
    }
    .ag-theme-alpine .ag-header-cell {
        padding-left: 6px;
        padding-right: 4px;
        height: 38px !important;
        line-height: 38px;
    }
    .ag-theme-alpine .ag-cell {
        padding-left: 6px;
        padding-right: 4px;
        font-size: 15px;
    }
    .ag-theme-alpine .ag-cell[col-id="surname"] {
        font-size: 15.5px;
        font-weight: 700;
    }
    .ag-theme-alpine .ag-cell[col-id="first_name"] {
        font-size: 15px;
    }
    /* No pinned columns on mobile — remove separator */

    /* AG Grid: premium pagination toolbar */
    .ag-paging-panel {
        height: 46px !important;
        padding: 0 16px !important;
        font-size: 12px !important;
        gap: 0 !important;
        background: linear-gradient(135deg, #0a1628 0%, #0d2147 100%) !important;
        border-top: 1px solid rgba(255,255,255,0.06) !important;
        color: rgba(255,255,255,0.7) !important;
        justify-content: center !important;
        border-radius: 0 0 12px 12px;
    }

    /* Hide row summary, page size selector, and first/last buttons */
    .ag-paging-panel .ag-paging-row-summary-panel,
    .ag-paging-panel .ag-paging-page-size { display: none !important; }
    .ag-paging-panel .ag-paging-button[data-ref="btFirst"],
    .ag-paging-panel .ag-paging-button[data-ref="btLast"] { display: none !important; }

    /* Unified pagination pill — [ < | 1/89 | > ] */
    .ag-paging-panel .ag-paging-page-summary-panel {
        gap: 0 !important;
        align-items: center !important;
        display: flex !important;
        background: rgba(255,255,255,0.08) !important;
        border: 1px solid rgba(255,255,255,0.12) !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }

    /* Navigation buttons — inside unified pill */
    .ag-paging-panel .ag-paging-button {
        min-width: 42px !important;
        height: 36px !important;
        border-radius: 0 !important;
        background: transparent !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        transition: background 0.15s ease !important;
        -webkit-tap-highlight-color: transparent !important;
    }
    .ag-paging-panel .ag-paging-button:not(.ag-disabled):active {
        transform: none !important;
        background: rgba(255,255,255,0.18) !important;
    }
    .ag-paging-panel .ag-paging-button.ag-disabled {
        opacity: 0.2 !important;
        background: transparent !important;
    }
    /* Dividers between btn and label */
    .ag-paging-panel .ag-paging-button[data-ref="btPrevious"] {
        border-right: 1px solid rgba(255,255,255,0.12) !important;
    }
    .ag-paging-panel .ag-paging-button[data-ref="btNext"] {
        border-left: 1px solid rgba(255,255,255,0.12) !important;
    }

    /* Arrow icons — crisp white */
    .ag-paging-panel .ag-paging-button .ag-icon {
        color: #fff !important;
        font-size: 16px !important;
    }

    /* "1 / 89" label — center of pill, no own background */
    .ag-paging-panel .ag-paging-description {
        font-size: 13px !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px !important;
        white-space: nowrap !important;
        color: #fff !important;
        background: transparent !important;
        padding: 5px 14px !important;
        border-radius: 0 !important;
        margin: 0 !important;
        border: none !important;
    }
    /* Hide "Страница" and "из" text, show only numbers */
    .ag-paging-panel .ag-paging-description > span[id$="-start-page"],
    .ag-paging-panel .ag-paging-description > span[id$="-of-page"] {
        font-size: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
    /* The page numbers stay visible */
    .ag-paging-panel .ag-paging-number {
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #fff !important;
    }
    /* Add "/" separator between numbers via CSS */
    .ag-paging-panel .ag-paging-description > span[id$="-of-page"]::after {
        content: "/" !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        color: rgba(255,255,255,0.35) !important;
        margin: 0 2px !important;
    }

    /* Search */
    .search-input { padding: 10px 14px; font-size: 14px; padding-left: 34px; }
    .search-wrap .search-input { padding-left: 34px; }

    /* Dashboard */
    .dash-hero { padding: 28px 16px; }
    .dash-hero__total { font-size: 42px; }
    .dash-hero__rings { gap: 12px; }
    .dash-ring { width: 72px; height: 72px; }
    .dash-ring__pct { font-size: 15px; }
    .dash-kpi-row { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .dash-grid { grid-template-columns: 1fr; }

    /* Scouting cards */
    .sc-grid { grid-template-columns: 1fr; }
    .sc-card__top { padding: 14px 16px 0; }
    .sc-card__name { font-size: 15px; }

    /* Player modal — near full-screen on mobile */
    .pm-overlay { padding: 0; align-items: flex-end; }
    .pm-dialog {
        max-width: 100%;
        max-height: 95vh;
        border-radius: 16px 16px 0 0;
        animation: pm-slideUp 0.3s ease-out;
    }
    .pm-header { padding: 24px 20px 20px; }
    .pm-header__surname { font-size: 22px; }
    .pm-stats { flex-direction: column; }
    .pm-stat-block { border-right: none; border-bottom: 1px solid var(--gray-200); }
    .pm-stat-block:last-child { border-bottom: none; }

    /* Login */
    .login-container { padding-top: 8vh; padding-left: 16px; padding-right: 16px; }
    .login-card { padding: 28px 20px; }
}

/* Player modal slide-up animation for mobile */
@keyframes pm-slideUp {
    from { transform: translateY(40px); opacity: 0.8; }
    to { transform: translateY(0); opacity: 1; }
}

/* Side panel bottom sheet slide-up */
@keyframes sp-slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* --- Responsive: small phones (< 480px) --- */
@media (max-width: 480px) {
    .tab-btn { padding: 8px 8px; font-size: 11px; }
    .dash-kpi-row { grid-template-columns: 1fr 1fr; }
    .dash-ring { width: 64px; height: 64px; }
    .dash-ring__pct { font-size: 14px; }
    .pm-header__surname { font-size: 20px; }
    .mobile-filter-toggle span { display: none; }
    .mobile-filter-toggle { padding: 0 10px; }
    .chip { font-size: 11px; padding: 4px 10px; }
}

/* Team name badges in AG Grid cells */
.tm-cell {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    line-height: 1.4;
}
.tm-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
    vertical-align: middle;
}
.tm-badge--youth {
    background: rgba(22,163,74,0.10);
    color: #15803d;
    border: 1px solid rgba(22,163,74,0.22);
}
.tm-badge--vet {
    background: rgba(234,88,12,0.10);
    color: #c2410c;
    border: 1px solid rgba(234,88,12,0.22);
}
.tm-badge--amateur {
    background: rgba(139,92,246,0.10);
    color: #7c3aed;
    border: 1px solid rgba(139,92,246,0.22);
}
.tm-badge--gender {
    background: rgba(100,116,139,0.10);
    color: #475569;
    border: 1px solid rgba(100,116,139,0.22);
}
.tm-badge--league {
    background: #2563eb;
    color: #fff;
    border: none;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-right: 5px;
    box-shadow: 0 1px 2px rgba(37,99,235,0.3);
}

/* --- Accessibility: reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
