/* ==========================================================================
   ValueStats · Referee profile
   Perfil público alineado con el rediseño del área privada.
   ========================================================================== */

.referee-profile {
    --referee-canvas: var(--vs-color-canvas);
    --referee-surface: var(--vs-color-surface);
    --referee-surface-muted: var(--vs-color-surface-muted);
    --referee-border: var(--vs-color-border);
    --referee-border-strong: var(--vs-color-border-strong);
    --referee-ink: var(--vs-color-ink);
    --referee-muted: var(--vs-color-muted);
    --referee-primary: var(--vs-color-primary);
    --referee-primary-dark: var(--vs-color-primary-strong);
    --referee-hero: #081c15;
    min-height: 100vh;
    color: var(--referee-ink);
    background: var(--referee-canvas);
}

.referee-profile-shell {
    width: 100%;
    margin-inline: auto;
    padding-top: 1.1rem;
    padding-bottom: 2.5rem;
}

/* Cabecera principal */
.referee-profile-hero {
    position: relative;
    overflow: hidden;
    border: 0 !important;
    border-bottom: 1px solid rgba(77, 123, 101, .18) !important;
    border-radius: 0 !important;
    color: #14251c;
    background:
        radial-gradient(circle at 82% 10%, rgba(21, 150, 106, .12), transparent 30%),
        linear-gradient(142deg, #f4f7f5 0%, #e7eee9 62%, #dfe9e3 100%) !important;
    box-shadow: 0 10px 28px rgba(25, 52, 38, .09) !important;
}

.referee-profile-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: .06;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(8, 74, 49, .3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(8, 74, 49, .3) 1px, transparent 1px);
    background-size: 54px 54px;
    -webkit-mask-image: linear-gradient(90deg, #000, transparent 86%);
    mask-image: linear-gradient(90deg, #000, transparent 86%);
}

.referee-profile-hero::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 1px;
    background: linear-gradient(90deg, #23b27d, rgba(35, 178, 125, .18) 40%, transparent 82%);
}

.referee-profile-hero-body,
.referee-profile-nav {
    position: relative;
    z-index: 1;
}

.referee-profile-hero-body {
    min-height: 10.8rem;
    padding: clamp(1.8rem, 3.4vw, 2.8rem) clamp(1rem, 2.6vw, 2rem) !important;
}

.referee-profile-hero-grid {
    align-items: center !important;
    gap: clamp(1rem, 2.4vw, 2rem) !important;
}

.referee-profile-identity {
    align-items: center;
}

.referee-profile-avatar > div {
    width: clamp(5rem, 7.5vw, 7rem) !important;
    height: clamp(5rem, 7.5vw, 7rem) !important;
    padding: .2rem !important;
    border: 1px solid rgba(224, 241, 232, .22) !important;
    border-radius: .48rem !important;
    background: rgba(255, 255, 255, .95) !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18) !important;
}

.referee-profile-avatar img {
    border-radius: .28rem !important;
}

.referee-profile-avatar > div > i {
    color: #789286 !important;
}

.referee-profile-name {
    overflow: visible;
    margin: 0;
    color: #10231a !important;
    font-size: clamp(1.65rem, 3vw, 2.65rem) !important;
    font-weight: 680 !important;
    line-height: 1.12;
    letter-spacing: -.035em;
}

.referee-profile-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .8rem;
}

.referee-profile-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: .38rem;
}

.referee-profile-actions > .relative {
    display: grid;
    width: 1.85rem;
    height: 1.85rem;
    place-items: center;
    border: 1px solid rgba(77, 123, 101, .2);
    border-radius: .34rem;
    background: rgba(255, 255, 255, .55);
}

.referee-profile-actions .fa-bell {
    margin-left: 0 !important;
    color: #b8860b;
    font-size: .78rem;
}

.referee-profile-actions .js-fav-toggle {
    width: 1.85rem;
    height: 1.85rem;
    justify-content: center;
    padding: 0 !important;
    border-color: rgba(77, 123, 101, .2) !important;
    border-radius: .34rem !important;
    color: #607269 !important;
    background: rgba(255, 255, 255, .55) !important;
    box-shadow: none !important;
}

.referee-profile-actions .js-fav-toggle:hover {
    border-color: rgba(250, 204, 21, .35) !important;
    color: #facc15 !important;
    background: rgba(250, 204, 21, .08) !important;
}

.referee-profile-meta {
    margin-top: .55rem !important;
}

.referee-profile-meta > span {
    color: #607269 !important;
}

.referee-profile-meta > span + span {
    position: relative;
    padding-left: .9rem;
}

.referee-profile-meta > span + span::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #8ca097;
    transform: translateY(-50%);
}

.referee-profile-meta img {
    max-width: 1.4rem;
    border-radius: 1px;
}

.referee-profile-metrics {
    display: flex;
    min-width: 28rem;
    justify-content: stretch;
    gap: 1rem !important;
    padding: .9rem 1.1rem !important;
    border: 1px solid rgba(77, 123, 101, .18) !important;
    border-radius: .44rem !important;
    background: rgba(255, 255, 255, .5) !important;
}

.referee-profile-metrics > div:not(.w-px) {
    min-width: 0;
    flex: 1 1 0;
}

.referee-profile-metrics .text-gray-900 {
    color: #173026 !important;
    font-size: 1.65rem;
    letter-spacing: -.04em;
}

.referee-profile-metrics .text-gray-500 {
    color: #607269 !important;
}

.referee-profile-metrics .text-gray-400 {
    color: #819188 !important;
}

.referee-profile-metrics > .w-px {
    background: rgba(77, 123, 101, .16) !important;
}

.referee-profile-metric {
    position: relative;
    text-align: left;
}

.referee-profile-metric::before {
    content: '';
    position: absolute;
    top: -.9rem;
    right: 0;
    left: 0;
    height: 2px;
    background: rgba(110, 231, 183, .65);
}

.referee-profile-metric--yellow::before {
    background: rgba(250, 204, 21, .78);
}

.referee-profile-metric--red::before {
    background: rgba(239, 68, 68, .78);
}

.referee-profile-next {
    min-width: 15.5rem !important;
    padding: .75rem .9rem !important;
    border: 1px solid rgba(77, 123, 101, .18) !important;
    border-radius: .44rem !important;
    color: #203029;
    background: rgba(255, 255, 255, .5) !important;
    box-shadow: none !important;
}

.referee-profile-next:hover {
    border-color: rgba(21, 150, 106, .35) !important;
    background: rgba(255, 255, 255, .72) !important;
}

.referee-profile-next-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
    color: #607269;
    font-size: .62rem;
    font-weight: 780;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.referee-profile-next-header i {
    color: #087a55;
    font-size: .62rem;
    transition: transform .18s ease;
}

.referee-profile-next:hover .referee-profile-next-header i {
    transform: translateX(3px);
}

.referee-profile-next-teams {
    justify-content: space-between !important;
    gap: .7rem !important;
}

.referee-profile-next-team {
    min-width: 0;
}

.referee-profile-next-team > span {
    overflow: hidden;
    max-width: 6.8rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referee-profile-next-vs {
    color: #71837a !important;
    font-weight: 760 !important;
    text-transform: uppercase;
}

.referee-profile-next-crest {
    border-color: rgba(223, 237, 229, .14) !important;
    border-radius: .28rem !important;
    background: rgba(255, 255, 255, .92) !important;
}

.referee-profile-next .text-gray-800,
.referee-profile-next .text-gray-600 {
    color: #203029 !important;
}

.referee-profile-next .text-gray-400 {
    color: #75877e !important;
}

.referee-profile-next .text-gray-300 {
    color: #8c9b93 !important;
}

.referee-profile-next .text-emerald-600,
.referee-profile-next .text-emerald-500 {
    color: #087a55 !important;
}

.referee-profile-next-date {
    justify-content: flex-start !important;
    margin-top: .7rem !important;
    padding-top: .55rem;
    border-top: 1px solid rgba(77, 123, 101, .14);
}

/* Navegación del perfil */
.referee-profile-nav {
    overflow-x: auto;
    padding-inline: clamp(0, 2.6vw, 2rem);
    border-color: rgba(77, 123, 101, .15) !important;
    background: rgba(255, 255, 255, .38);
    scrollbar-width: none;
}

.referee-profile-nav::-webkit-scrollbar {
    display: none;
}

.referee-profile-nav-list {
    min-width: max-content;
}

.referee-profile-nav-link {
    min-height: 2.85rem;
    padding: .72rem 1rem !important;
    border-bottom-width: 2px !important;
    border-radius: 0 !important;
    color: #66776e !important;
    background: transparent !important;
    font-size: .76rem !important;
    font-weight: 680 !important;
    letter-spacing: .012em;
}

.referee-profile-nav-link:hover {
    border-color: rgba(21, 150, 106, .3) !important;
    color: #075f45 !important;
    background: rgba(255, 255, 255, .4) !important;
}

.referee-profile-nav-link--active {
    border-color: #15966a !important;
    color: #075f45 !important;
    background: rgba(21, 150, 106, .08) !important;
}

/* Contenido, filtros y tablas */
.referee-profile-content {
    margin-top: 0;
    border: 1px solid var(--referee-border) !important;
    border-radius: .64rem !important;
    background: var(--referee-surface) !important;
    box-shadow: 0 9px 26px rgba(25, 45, 35, .055), 0 1px 2px rgba(25, 45, 35, .04) !important;
}

.referee-profile-filters {
    padding: .8rem 1rem !important;
    border-color: var(--referee-border) !important;
    background: var(--referee-surface-muted) !important;
}

.referee-profile-filters > div {
    gap: .65rem 1.15rem !important;
}

.referee-profile-filter-group > span {
    color: #6e7c74 !important;
    font-size: .7rem !important;
    font-weight: 700 !important;
    letter-spacing: .02em;
}

.referee-profile-filter-pills {
    padding: .18rem !important;
    border-color: var(--referee-border) !important;
    border-radius: .36rem !important;
    background: var(--referee-surface) !important;
}

.referee-profile-filter-pills button {
    min-width: 2rem;
    border-radius: .25rem !important;
    box-shadow: none !important;
}

.referee-profile-filter-pills button.bg-emerald-500 {
    background: var(--referee-primary) !important;
}

.referee-profile-filters select {
    border-color: var(--referee-border-strong) !important;
    border-radius: .34rem !important;
}

.referee-profile .select2-container--default .select2-selection--multiple {
    min-height: 2rem;
    padding: .1rem .28rem;
    border: 1px solid var(--referee-border-strong);
    border-radius: .34rem;
    color: var(--referee-ink);
    background: var(--referee-surface);
}

.referee-profile .select2-container--default.select2-container--focus .select2-selection--multiple {
    border-color: #18a777;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .1);
}

.referee-profile .select2-container--default .select2-selection--multiple .select2-selection__choice {
    margin: .16rem .22rem .1rem 0;
    padding: .16rem .36rem;
    border: 1px solid #d7e5de;
    border-radius: .24rem;
    color: #315146;
    background: #edf5f1;
    font-size: .68rem;
}

.referee-profile .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    margin-right: .28rem;
    color: #678177;
}

.referee-profile-filters > .referee-filter-toolbar {
    display: grid;
    grid-template-columns: minmax(9rem, .72fr) repeat(2, minmax(12rem, 1fr)) auto;
    align-items: end;
    gap: .65rem !important;
}

.referee-filter-control,
.referee-filter-picker {
    min-width: 0;
}

.referee-filter-label {
    display: block;
    margin-bottom: .28rem;
    color: var(--referee-muted);
    font-size: .58rem;
    font-weight: 760;
    letter-spacing: .045em;
    line-height: 1.2;
    text-transform: uppercase;
}

.referee-filter-stepper {
    display: grid;
    min-height: 2.2rem;
    grid-template-columns: 2rem 2.6rem minmax(0, 1fr) 2rem;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--referee-border-strong);
    border-radius: .32rem;
    background: var(--referee-surface);
}

.referee-filter-stepper button {
    border: 0;
    color: var(--referee-primary);
    background: var(--vs-color-primary-soft);
    font-size: .9rem;
    font-weight: 760;
    transition: color .16s ease, background-color .16s ease;
}

.referee-filter-stepper button:hover {
    color: var(--referee-primary-dark);
    background: rgba(21, 150, 106, .15);
}

.referee-filter-stepper input {
    width: 100%;
    min-width: 0;
    padding: 0 !important;
    border-width: 0 0 0 1px !important;
    border-color: var(--referee-border) !important;
    border-radius: 0 !important;
    color: var(--referee-ink) !important;
    background: transparent !important;
    font-size: .74rem;
    font-weight: 760;
    text-align: right;
    -moz-appearance: textfield;
}

.referee-filter-stepper input::-webkit-outer-spin-button,
.referee-filter-stepper input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

.referee-filter-stepper > span {
    display: flex;
    min-width: 0;
    align-items: center;
    padding: 0 .28rem;
    border-right: 1px solid var(--referee-border);
    color: var(--referee-muted);
    font-size: .57rem;
    font-weight: 650;
    overflow: hidden;
    white-space: nowrap;
}

.referee-filter-picker {
    position: relative;
}

.referee-filter-picker-trigger {
    display: grid;
    width: 100%;
    min-height: 2.2rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .42rem;
    padding: .42rem .55rem;
    border: 1px solid var(--referee-border-strong);
    border-radius: .32rem;
    color: var(--referee-ink);
    background: var(--referee-surface);
    font-size: .68rem;
    font-weight: 690;
    text-align: left;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.referee-filter-picker-trigger:hover,
.referee-filter-picker-trigger.is-selected {
    border-color: rgba(21, 150, 106, .42);
}

.referee-filter-picker-trigger:focus-visible {
    outline: 0;
    border-color: var(--referee-primary);
    box-shadow: 0 0 0 3px var(--vs-color-focus);
}

.referee-filter-picker-trigger > i:first-child {
    color: var(--referee-primary);
    font-size: .62rem;
}

.referee-filter-picker-trigger > span,
.referee-filter-picker-trigger > span > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referee-filter-picker-trigger > span > span {
    display: block;
}

.referee-filter-picker-trigger > span > .referee-filter-picker-count {
    display: inline;
}

.referee-filter-picker-chevron {
    color: var(--referee-muted);
    font-size: .52rem;
    transition: transform .18s ease;
}

.referee-filter-picker-chevron.is-open {
    transform: rotate(180deg);
}

.referee-filter-picker-menu {
    position: absolute;
    z-index: 60;
    top: calc(100% + .3rem);
    left: 0;
    width: min(20rem, calc(100vw - 2rem));
    max-height: 18rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: .3rem;
    border: 1px solid var(--referee-border-strong);
    border-radius: .4rem;
    background: var(--referee-surface);
    box-shadow: var(--vs-shadow-floating);
    scrollbar-color: rgba(21, 150, 106, .38) transparent;
    scrollbar-width: thin;
}

.referee-filter-picker-menu--teams {
    right: 0;
    left: auto;
}

.referee-filter-picker-all,
.referee-filter-picker-option {
    display: flex;
    width: 100%;
    min-height: 2.45rem;
    align-items: center;
    gap: .5rem;
    padding: .38rem .42rem;
    border-radius: .28rem;
    color: var(--referee-ink);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.referee-filter-picker-all {
    border-bottom: 1px solid var(--referee-border);
    border-radius: .28rem .28rem 0 0;
    color: var(--referee-primary-dark);
    font-size: .68rem;
    font-weight: 720;
}

.referee-filter-picker-all:hover,
.referee-filter-picker-option:hover,
.referee-filter-picker-all.is-selected,
.referee-filter-picker-option.is-selected {
    background: var(--vs-color-primary-soft);
}

.referee-filter-checkbox,
.referee-filter-option-checkbox {
    display: inline-grid;
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid var(--referee-border-strong);
    border-radius: .2rem;
    color: transparent;
    background: var(--referee-surface);
    font-size: .48rem;
}

.referee-filter-picker-all.is-selected .referee-filter-checkbox {
    border-color: var(--referee-primary);
    color: #fff;
    background: var(--referee-primary);
}

.referee-filter-option-checkbox {
    position: relative;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.referee-filter-option-checkbox:checked {
    border-color: var(--referee-primary);
    background: var(--referee-primary);
}

.referee-filter-option-checkbox:checked::after {
    content: '✓';
    color: #fff;
    font-size: .66rem;
    font-weight: 800;
    line-height: 1;
}

.referee-filter-option-checkbox:focus-visible {
    outline: 2px solid var(--referee-primary);
    outline-offset: 2px;
}

.referee-filter-option-logo {
    display: inline-flex;
    width: 1.65rem;
    height: 1.65rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--referee-border);
    border-radius: .26rem;
    color: var(--referee-muted);
    background: #fff;
}

.referee-filter-option-logo img {
    width: 1.3rem;
    height: 1.3rem;
    object-fit: contain;
}

.referee-filter-option-logo i {
    font-size: .58rem;
}

.referee-filter-option-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.referee-filter-option-copy strong,
.referee-filter-option-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referee-filter-option-copy strong {
    color: var(--referee-ink);
    font-size: .67rem;
    font-weight: 720;
}

.referee-filter-option-copy small {
    margin-top: .08rem;
    color: var(--referee-muted);
    font-size: .56rem;
}

.referee-filter-actions {
    display: flex;
    min-height: 2.2rem;
    align-items: center;
    gap: .35rem;
}

.referee-filter-apply,
.referee-filter-clear {
    display: inline-flex;
    min-height: 2.2rem;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .42rem .7rem;
    border-radius: .32rem;
    font-size: .66rem;
    font-weight: 720;
    white-space: nowrap;
    transition: color .16s ease, border-color .16s ease, background-color .16s ease;
}

.referee-filter-apply {
    border: 1px solid var(--referee-primary);
    color: #fff;
    background: var(--referee-primary);
}

.referee-filter-apply:hover {
    border-color: var(--referee-primary-dark);
    background: var(--referee-primary-dark);
}

.referee-filter-clear {
    border: 1px solid var(--referee-border);
    color: var(--referee-muted);
    background: var(--referee-surface);
}

.referee-filter-clear:hover {
    border-color: rgba(220, 38, 38, .28);
    color: #b4232f;
    background: rgba(220, 38, 38, .06);
}

.referee-profile-stats {
    padding: 1rem !important;
}

.referee-profile-stats-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .85rem;
}

.referee-profile-stats-heading h2 {
    margin: 0;
    color: var(--referee-ink);
    font-size: .92rem;
    font-weight: 740;
    letter-spacing: -.018em;
}

.referee-profile-stats-heading p {
    margin: .16rem 0 0;
    color: var(--referee-muted);
    font-size: .7rem;
}

.referee-profile-stats-heading > span {
    padding: .28rem .5rem;
    border: 1px solid var(--referee-border);
    border-radius: .28rem;
    color: var(--referee-primary-dark);
    background: var(--referee-surface-muted);
    font-size: .66rem;
    font-weight: 700;
}

.referee-data-card {
    border: 1px solid var(--referee-border);
    border-radius: .46rem !important;
    background: var(--referee-surface) !important;
}

.referee-data-scroll {
    scrollbar-color: #aebdb5 transparent;
    scrollbar-width: thin;
}

.referee-data-table {
    border-color: var(--referee-border) !important;
}

.referee-data-table thead {
    background: #f4f7f5 !important;
}

.referee-data-table thead tr,
.referee-data-table tbody,
.referee-data-table tbody tr {
    border-color: #e0e7e3 !important;
}

.referee-data-table thead th {
    border-color: #dde5e1 !important;
    background-color: #f4f7f5 !important;
}

.referee-data-table thead tr:nth-child(2) th {
    background-color: #fafcfb !important;
}

.referee-data-table thead th span,
.referee-data-table thead th div {
    letter-spacing: .015em;
}

.referee-data-table tbody {
    background: var(--referee-surface) !important;
}

.referee-data-table tbody tr:hover,
.referee-data-table tbody tr:hover td {
    background-color: #eff7f3 !important;
}

.referee-data-table tbody td {
    border-color: #e2e9e5 !important;
}

.referee-data-table tbody td.bg-white,
.referee-data-table tbody td.group-hover\:bg-emerald-50 {
    background: var(--referee-surface) !important;
}

.referee-data-table tbody tr:hover td.bg-white,
.referee-data-table tbody tr:hover td.group-hover\:bg-emerald-50 {
    background: #eff7f3 !important;
}

.referee-data-table tbody td:first-child span {
    color: var(--referee-primary-dark) !important;
    font-weight: 650;
}

.referee-profile-section {
    border-color: var(--referee-border) !important;
}

.referee-profile-season > div {
    padding: 1.2rem 1rem !important;
}

.referee-profile-section h2 {
    margin: 0;
    color: var(--referee-ink) !important;
    font-size: .9rem !important;
    font-weight: 720 !important;
    letter-spacing: -.012em;
}

.referee-profile-season-scroll {
    overflow: hidden auto;
    border: 1px solid var(--referee-border);
    border-radius: .44rem;
}

.referee-profile-season-table {
    border-color: var(--referee-border) !important;
}

.referee-profile-season-table thead tr {
    background: #f4f7f5 !important;
}

.referee-profile-season-table thead th {
    padding-top: .68rem !important;
    padding-bottom: .68rem !important;
    color: #68776f !important;
    font-size: .64rem !important;
    font-weight: 750 !important;
}

.referee-profile-season-table tbody {
    background: var(--referee-surface) !important;
}

.referee-profile-season-table tbody tr {
    border-color: #e2e9e5 !important;
}

.referee-profile-season-table tbody tr.bg-gray-100 {
    background: #edf2ef !important;
}

.referee-profile-season-table tbody tr:not(.bg-gray-100):hover {
    background: #f4f8f6 !important;
}

.referee-profile-season-table button {
    border-radius: .28rem !important;
}

.referee-profile-bio {
    padding: 1.2rem 1rem !important;
}

.referee-profile-bio h2 {
    margin-bottom: .75rem;
}

.referee-profile-bio .prose {
    max-width: 72ch;
    margin: 0;
    padding: 0 !important;
    color: var(--referee-muted) !important;
    line-height: 1.72;
}

.referee-profile-bio .prose > :first-child {
    margin-top: 0;
}

.referee-profile-bio .prose > :last-child {
    margin-bottom: 0;
}

/* Cabecera compacta durante el scroll */
.referee-profile-sticky {
    border-color: rgba(148, 181, 165, .17) !important;
    color: #eef7f2;
    background: rgba(8, 28, 21, .97) !important;
    box-shadow: 0 8px 22px rgba(3, 15, 11, .2) !important;
    backdrop-filter: blur(14px);
}

.referee-profile-sticky-inner {
    width: 100%;
    margin-inline: auto;
}

.referee-profile-sticky-avatar {
    border-color: rgba(213, 232, 222, .2) !important;
    border-radius: .32rem !important;
}

.referee-profile-sticky h2 {
    color: #f5faf7 !important;
}

.referee-profile-sticky .text-gray-500 {
    color: #9dafA5 !important;
}

.referee-profile-sticky .text-gray-300 {
    color: #52695e !important;
}

.referee-profile-sticky .sticky-tab {
    border: 1px solid transparent;
    border-radius: .3rem !important;
    color: #9dafA5 !important;
    background: transparent !important;
}

.referee-profile-sticky .sticky-tab:hover {
    border-color: rgba(205, 228, 216, .13);
    color: #f4faf7 !important;
    background: rgba(255, 255, 255, .05) !important;
}

.referee-profile-sticky .sticky-tab.bg-emerald-100 {
    border-color: rgba(110, 231, 183, .22) !important;
    color: #8af0c1 !important;
    background: rgba(52, 211, 153, .11) !important;
}

/* Panel avanzado */
.referee-filter-overlay {
    background: rgba(4, 14, 10, .7) !important;
    backdrop-filter: blur(3px);
}

.referee-filter-drawer {
    border-left: 1px solid #d5dfda;
    background: #fff !important;
    box-shadow: -18px 0 44px rgba(3, 18, 13, .17) !important;
}

.referee-filter-header {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
    background: #081c15 !important;
}

.referee-filter-header h2 {
    font-weight: 680 !important;
    letter-spacing: -.018em;
}

.referee-filter-header button {
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(213, 233, 222, .16);
    border-radius: .34rem !important;
    color: #a9beb3 !important;
    background: rgba(255, 255, 255, .04);
}

.referee-filter-header button:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, .08);
}

.referee-filter-body label {
    color: #28362f !important;
    font-size: .78rem !important;
    font-weight: 680 !important;
}

.referee-filter-body label > i {
    color: #087a55 !important;
}

.referee-filter-body select,
.referee-filter-body .select2-selection--multiple {
    border-width: 1px !important;
    border-color: #cbd7d0 !important;
    border-radius: .34rem !important;
}

.referee-filter-footer {
    border-color: #d9e2dd !important;
    background: #f4f7f5 !important;
}

.referee-filter-footer button {
    min-height: 2.45rem;
    border-radius: .34rem !important;
    box-shadow: none !important;
}

.referee-filter-footer button[type='submit'] {
    background: #087a55 !important;
}

/* Dark mode */
[data-theme="dark"] .referee-profile {
    color-scheme: dark;
    background: var(--referee-canvas) !important;
}

[data-theme="dark"] .referee-profile-hero {
    border-bottom-color: rgba(151, 190, 171, .17) !important;
    color: #f5faf7;
    background:
        radial-gradient(circle at 82% 10%, rgba(52, 211, 153, .15), transparent 28%),
        linear-gradient(142deg, #0b241b 0%, var(--referee-hero) 62%, #061711 100%) !important;
    box-shadow: 0 12px 32px rgba(3, 18, 13, .18) !important;
}

[data-theme="dark"] .referee-profile-hero::before {
    opacity: .09;
    background-image:
        linear-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .16) 1px, transparent 1px);
}

[data-theme="dark"] .referee-profile-name {
    color: #f6fbf8 !important;
}

[data-theme="dark"] .referee-profile-actions > .relative {
    border-color: rgba(218, 232, 224, .18);
    background: rgba(255, 255, 255, .055);
}

[data-theme="dark"] .referee-profile-actions .fa-bell {
    color: #facc15;
}

[data-theme="dark"] .referee-profile-actions .js-fav-toggle {
    border-color: rgba(218, 232, 224, .18) !important;
    color: #d9e7df !important;
    background: rgba(255, 255, 255, .055) !important;
}

[data-theme="dark"] .referee-profile-meta > span {
    color: #aebfb6 !important;
}

[data-theme="dark"] .referee-profile-meta > span + span::before {
    background: #5f756a;
}

[data-theme="dark"] .referee-profile-metrics {
    border-color: rgba(207, 229, 218, .14) !important;
    background: rgba(255, 255, 255, .045) !important;
}

[data-theme="dark"] .referee-profile-metrics .text-gray-900 {
    color: #f7fbf9 !important;
}

[data-theme="dark"] .referee-profile-metrics .text-gray-500 {
    color: #adbbb4 !important;
}

[data-theme="dark"] .referee-profile-metrics .text-gray-400 {
    color: #7f958a !important;
}

[data-theme="dark"] .referee-profile-metrics > .w-px {
    background: rgba(209, 229, 218, .14) !important;
}

[data-theme="dark"] .referee-profile-next {
    border-color: rgba(207, 229, 218, .14) !important;
    color: #eaf3ee;
    background: rgba(255, 255, 255, .045) !important;
}

[data-theme="dark"] .referee-profile-next:hover {
    border-color: rgba(110, 231, 183, .38) !important;
    background: rgba(52, 211, 153, .075) !important;
}

[data-theme="dark"] .referee-profile-next-header {
    color: #a8bcb1;
}

[data-theme="dark"] .referee-profile-next-header i {
    color: #6ee7b7;
}

[data-theme="dark"] .referee-profile-next-vs {
    color: #6f8278 !important;
}

[data-theme="dark"] .referee-profile-next .text-gray-800,
[data-theme="dark"] .referee-profile-next .text-gray-600 {
    color: #e8f2ed !important;
}

[data-theme="dark"] .referee-profile-next .text-gray-400 {
    color: #8fa198 !important;
}

[data-theme="dark"] .referee-profile-next .text-gray-300 {
    color: #60746a !important;
}

[data-theme="dark"] .referee-profile-next .text-emerald-600,
[data-theme="dark"] .referee-profile-next .text-emerald-500 {
    color: #6ee7b7 !important;
}

[data-theme="dark"] .referee-profile-next-date {
    border-top-color: rgba(209, 229, 218, .11);
}

[data-theme="dark"] .referee-profile-nav {
    border-color: rgba(205, 226, 214, .13) !important;
    background: rgba(0, 0, 0, .14);
}

[data-theme="dark"] .referee-profile-nav-link {
    color: #a7b8af !important;
}

[data-theme="dark"] .referee-profile-nav-link:hover {
    border-color: rgba(110, 231, 183, .28) !important;
    color: #eef8f3 !important;
    background: rgba(255, 255, 255, .035) !important;
}

[data-theme="dark"] .referee-profile-nav-link--active {
    border-color: #34d399 !important;
    color: #8cf0c2 !important;
    background: rgba(52, 211, 153, .07) !important;
}

[data-theme="dark"] .referee-profile-content,
[data-theme="dark"] .referee-data-card,
[data-theme="dark"] .referee-data-table tbody,
[data-theme="dark"] .referee-profile-season-table tbody {
    background: var(--referee-surface) !important;
}

[data-theme="dark"] .referee-profile-filters,
[data-theme="dark"] .referee-profile-season-table tbody tr.bg-gray-100 {
    background: var(--referee-surface-muted) !important;
}

[data-theme="dark"] .referee-profile-filter-group > span,
[data-theme="dark"] .referee-profile-season-table thead th {
    color: #93a69c !important;
}

[data-theme="dark"] .referee-profile-filter-pills,
[data-theme="dark"] .referee-profile .select2-container--default .select2-selection--multiple {
    border-color: var(--referee-border-strong) !important;
    color: #e2ebe6;
    background: #0b1712 !important;
}

[data-theme="dark"] .referee-profile .select2-container--default .select2-selection--multiple .select2-selection__choice {
    border-color: #304a3d;
    color: #bcebd4;
    background: #14281f;
}

[data-theme="dark"] .referee-profile .select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #84a093;
}

[data-theme="dark"] .referee-profile .select2-search__field {
    color: #e5eee9 !important;
}

[data-theme="dark"] .referee-data-table thead,
[data-theme="dark"] .referee-data-table thead th,
[data-theme="dark"] .referee-profile-season-table thead tr {
    border-color: #2a4035 !important;
    background: #0c1813 !important;
}

[data-theme="dark"] .referee-data-table thead tr:nth-child(2) th {
    background: #0f1c16 !important;
}

[data-theme="dark"] .referee-data-table thead tr,
[data-theme="dark"] .referee-data-table tbody,
[data-theme="dark"] .referee-data-table tbody tr,
[data-theme="dark"] .referee-data-table tbody td,
[data-theme="dark"] .referee-profile-season-table tbody tr {
    border-color: #263a30 !important;
}

[data-theme="dark"] .referee-data-table tbody td.bg-white,
[data-theme="dark"] .referee-data-table tbody td.group-hover\:bg-emerald-50 {
    background: var(--referee-surface) !important;
}

[data-theme="dark"] .referee-data-table tbody tr:hover,
[data-theme="dark"] .referee-data-table tbody tr:hover td,
[data-theme="dark"] .referee-data-table tbody tr:hover td.bg-white,
[data-theme="dark"] .referee-data-table tbody tr:hover td.group-hover\:bg-emerald-50,
[data-theme="dark"] .referee-profile-season-table tbody tr:not(.bg-gray-100):hover {
    background: #16281f !important;
}

[data-theme="dark"] .referee-data-table .bg-gray-50,
[data-theme="dark"] .referee-profile-season-table .bg-gray-50 {
    background: #0c1813 !important;
}

[data-theme="dark"] .referee-data-table .text-gray-900,
[data-theme="dark"] .referee-data-table .text-gray-800,
[data-theme="dark"] .referee-data-table .text-gray-700,
[data-theme="dark"] .referee-profile-season-table .text-gray-900,
[data-theme="dark"] .referee-profile-season-table .text-gray-700,
[data-theme="dark"] .referee-profile-season-table .text-gray-600 {
    color: #dfeae4 !important;
}

[data-theme="dark"] .referee-data-table .text-gray-500,
[data-theme="dark"] .referee-profile-season-table .text-gray-500 {
    color: #91a39a !important;
}

[data-theme="dark"] .referee-profile-bio .prose,
[data-theme="dark"] .referee-profile-bio .prose p,
[data-theme="dark"] .referee-profile-bio .prose li {
    color: var(--referee-muted) !important;
}

[data-theme="dark"] .referee-profile-bio .prose {
    --tw-prose-body: #a8b8af;
    --tw-prose-headings: #e7f0eb;
    --tw-prose-lead: #b9c8c0;
    --tw-prose-links: #6ee7b7;
    --tw-prose-bold: #e4ede8;
    --tw-prose-counters: #91a39a;
    --tw-prose-bullets: #557065;
    --tw-prose-hr: #2a4035;
    --tw-prose-quotes: #d8e5de;
    --tw-prose-quote-borders: #3d5b4c;
    --tw-prose-captions: #91a39a;
    --tw-prose-code: #b8f3d7;
    --tw-prose-pre-code: #dce7e1;
    --tw-prose-pre-bg: #09130f;
    --tw-prose-th-borders: #3a5044;
    --tw-prose-td-borders: #2a4035;
}

[data-theme="dark"] .referee-profile-bio .prose h1,
[data-theme="dark"] .referee-profile-bio .prose h2,
[data-theme="dark"] .referee-profile-bio .prose h3,
[data-theme="dark"] .referee-profile-bio .prose h4,
[data-theme="dark"] .referee-profile-bio .prose strong {
    color: #e7f0eb !important;
}

[data-theme="dark"] .referee-profile-bio .prose a {
    color: #6ee7b7 !important;
}

[data-theme="dark"] .referee-filter-drawer {
    border-color: #2a4035;
    background: #101d17 !important;
}

[data-theme="dark"] .referee-filter-body,
[data-theme="dark"] .referee-filter-footer {
    color: #e5eee9;
    background: #101d17 !important;
}

[data-theme="dark"] .referee-filter-footer {
    border-color: #2a4035 !important;
    background: #0c1813 !important;
}

[data-theme="dark"] .referee-filter-body label,
[data-theme="dark"] .referee-filter-body label span {
    color: #c4d2ca !important;
}

[data-theme="dark"] .referee-filter-body .text-gray-500,
[data-theme="dark"] .referee-filter-body .text-gray-700 {
    color: #91a39a !important;
}

[data-theme="dark"] .referee-filter-body select,
[data-theme="dark"] .referee-filter-body .select2-selection--multiple,
[data-theme="dark"] .referee-filter-footer button:first-child {
    border-color: #344a3e !important;
    color: #dce7e1 !important;
    background: #0b1712 !important;
}

[data-theme="dark"] .referee-filter-panel .select2-dropdown {
    border-color: #344a3e;
    color: #dce7e1;
    background: #101d17;
}

[data-theme="dark"] .referee-filter-panel .select2-results__option[aria-selected='true'] {
    background: #16281f;
}

[data-theme="dark"] .referee-filter-panel .select2-results__option--highlighted[aria-selected] {
    background: #087a55;
}

/* Breadcrumb específico del perfil: transición compacta hacia el footer. */
.referee-profile-breadcrumbs {
    position: relative;
    border-color: #cfdbd4 !important;
    background: #e9eeeb !important;
}

.referee-profile-breadcrumbs::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: min(32rem, 62%);
    height: 1px;
    background: linear-gradient(90deg, #15966a, rgba(21, 150, 106, 0));
}

.referee-profile-breadcrumbs .site-breadcrumbs-inner {
    width: 100%;
    max-width: none !important;
    padding: .8rem clamp(1rem, 2.6vw, 2rem) !important;
}

.referee-profile-breadcrumbs .site-breadcrumbs-list {
    gap: .35rem .55rem !important;
}

.referee-profile-breadcrumbs .site-breadcrumbs-item {
    gap: .55rem !important;
}

.referee-profile-breadcrumbs .site-breadcrumbs-link,
.referee-profile-breadcrumbs .site-breadcrumbs-current {
    font-size: .68rem;
    font-weight: 680;
    letter-spacing: .015em;
}

.referee-profile-breadcrumbs .site-breadcrumbs-link {
    color: #66776e;
}

.referee-profile-breadcrumbs .site-breadcrumbs-link:hover {
    color: #087a55 !important;
}

.referee-profile-breadcrumbs .site-breadcrumbs-current {
    overflow: hidden;
    max-width: min(34rem, 46vw);
    color: #203029 !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.referee-profile-breadcrumbs .site-breadcrumbs-separator {
    color: #a1afa7 !important;
    font-size: .62rem;
}

[data-theme="dark"] .referee-profile-breadcrumbs {
    border-color: #263a30 !important;
    background: #0c1813 !important;
}

[data-theme="dark"] .referee-profile-breadcrumbs .site-breadcrumbs-link {
    color: #91a39a;
}

[data-theme="dark"] .referee-profile-breadcrumbs .site-breadcrumbs-link:hover {
    color: #6ee7b7 !important;
}

[data-theme="dark"] .referee-profile-breadcrumbs .site-breadcrumbs-current {
    color: #dbe7e1 !important;
}

[data-theme="dark"] .referee-profile-breadcrumbs .site-breadcrumbs-separator {
    color: #4f675b !important;
}

@media (max-width: 1023px) {
    .referee-profile-hero-grid {
        align-items: stretch !important;
    }

    .referee-profile-identity {
        align-items: flex-start;
    }

    .referee-profile-metrics {
        display: grid !important;
        width: 100%;
        min-width: 0;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: stretch !important;
        gap: .55rem !important;
        padding: .7rem !important;
    }

    .referee-profile-metrics > .w-px {
        display: none;
    }

    .referee-profile-metric {
        min-width: 0;
        padding: .1rem .55rem .05rem;
    }

    .referee-profile-metric::before {
        top: -.7rem;
    }

    .referee-profile-filters > .referee-filter-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .referee-filter-actions {
        justify-content: flex-end;
    }
}

@media (min-width: 1024px) {
    .referee-profile-hero-grid {
        display: grid !important;
        grid-template-columns: minmax(18rem, 1fr) minmax(28rem, .9fr);
    }

    .referee-profile-hero-grid--fixture {
        grid-template-columns: minmax(17rem, 1fr) minmax(28rem, .95fr) minmax(15.5rem, .72fr);
    }

    .referee-profile-next {
        width: 100%;
    }
}

@media (max-width: 639px) {
    .referee-profile-shell {
        padding-top: .45rem !important;
        padding-bottom: 1.4rem;
    }

    .referee-profile-hero,
    .referee-profile-content {
        border-right: 0 !important;
        border-left: 0 !important;
        border-radius: 0 !important;
    }

    .referee-profile-content {
        margin-top: 0;
    }

    .referee-profile-hero-body {
        min-height: 0;
        padding: 1.35rem 1rem !important;
    }

    .referee-profile-identity {
        gap: .8rem !important;
    }

    .referee-profile-avatar > div {
        width: 4.5rem !important;
        height: 4.5rem !important;
    }

    .referee-profile-name {
        font-size: 1.45rem !important;
    }

    .referee-profile-title-row {
        align-items: flex-start;
        gap: .55rem;
    }

    .referee-profile-title-row .referee-profile-name {
        min-width: min(11rem, 100%);
        flex: 1 1 11rem;
    }

    .referee-profile-actions {
        margin-top: -.15rem;
    }

    .referee-profile-meta {
        gap: .3rem .6rem !important;
    }

    .referee-profile-meta > span + span {
        width: 100%;
        padding-left: 0;
    }

    .referee-profile-meta > span + span::before {
        display: none;
    }

    .referee-profile-metrics {
        gap: .25rem !important;
        padding: .62rem .4rem .55rem !important;
    }

    .referee-profile-metric {
        padding-inline: .2rem;
        text-align: center;
    }

    .referee-profile-metric > div {
        justify-content: center;
        gap: .35rem !important;
    }

    .referee-profile-metrics .text-gray-900 {
        font-size: 1.2rem;
    }

    .referee-profile-metric p {
        font-size: .58rem !important;
        line-height: 1.2;
    }

    .referee-profile-metric p:last-child {
        display: none;
    }

    .referee-profile-next {
        min-width: 0 !important;
        width: 100%;
        margin-top: .15rem;
        padding: .68rem .75rem !important;
    }

    .referee-profile-next-header {
        margin-bottom: .55rem;
    }

    .referee-profile-next-team {
        flex: 1 1 0;
    }

    .referee-profile-next-team:last-child {
        justify-content: flex-end;
    }

    .referee-profile-next-team > span {
        max-width: min(7rem, 25vw);
    }

    .referee-profile-next-date {
        margin-top: .55rem !important;
        padding-top: .45rem;
    }

    .referee-profile-nav-link {
        padding-inline: .85rem !important;
    }

    .referee-profile-filters {
        padding: .7rem .65rem !important;
    }

    .referee-profile-filters > .referee-filter-toolbar {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }

    .referee-filter-actions {
        justify-content: flex-start;
    }

    .referee-filter-apply {
        flex: 1 1 auto;
    }

    .referee-filter-picker-menu,
    .referee-filter-picker-menu--teams {
        right: auto;
        left: 0;
        width: 100%;
        max-height: 15rem;
    }

    .referee-profile-filters > div,
    .referee-profile-filter-group {
        align-items: flex-start;
    }

    .referee-profile-filter-group {
        width: 100%;
        flex-wrap: wrap;
    }

    .referee-profile-filter-group .select2-container {
        width: 100% !important;
    }

    .referee-profile-stats {
        padding: .65rem 0 !important;
    }

    .referee-data-card,
    .referee-profile-season-scroll {
        border-right: 0;
        border-left: 0;
        border-radius: 0 !important;
    }

    .referee-profile-season > div {
        padding-inline: .75rem !important;
    }

    .referee-profile-bio {
        padding-inline: .75rem !important;
    }

    .referee-profile-sticky-inner > div {
        gap: .55rem !important;
    }

    .referee-profile-sticky .sticky-tab {
        padding-inline: .45rem !important;
    }
}

@media (max-width: 380px) {
    .referee-profile-identity {
        gap: .65rem !important;
    }

    .referee-profile-avatar > div {
        width: 3.8rem !important;
        height: 3.8rem !important;
    }

    .referee-profile-metric {
        padding-inline: .1rem;
    }

    .referee-profile-next-team > span {
        max-width: 22vw;
    }
}

@media (prefers-reduced-motion: reduce) {
    .referee-profile *,
    .referee-profile *::before,
    .referee-profile *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
