/* App móvil (usuarios): cabecera, contenido y barra de 4 pestañas */
body.app { min-height: 100dvh; padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); }

.app-header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: var(--white); border-bottom: 1px solid var(--line); }
.app-header__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.app-header .wordmark__main { font-size: 22px; }
.app-header form { margin: 0; }
.icon-button { width: 44px; height: 44px; border-radius: 22px; border: 0; background: var(--surface-2); color: var(--green); display: grid; place-items: center; cursor: pointer; }

.app-main { max-width: 640px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 20px; }


.page-title { font-family: var(--display); font-weight: 700; text-transform: uppercase; font-size: 32px; line-height: 1; }
.section { display: flex; flex-direction: column; gap: 10px; }
.section-title { font-size: 17px; font-weight: 700; }

.link-list { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.link-list__item { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; min-height: 56px; text-decoration: none; color: var(--ink); }
.link-list__item + .link-list__item { border-top: 1px solid var(--surface-2); }
.link-list__item span { font-size: 13px; color: var(--muted); }
.link-list__item:hover { background: var(--surface); color: var(--ink); }

.empty-state { background: var(--white); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 24px 20px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; color: var(--ink-2); }

.tab-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: repeat(3, 1fr); height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--white); border-top: 1px solid var(--line); }
.tab-bar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); text-decoration: none; }
.tab-bar__item:hover { color: var(--ink); }
.tab-bar__item.is-active { color: var(--green); }
.tab-bar__item.is-active svg { stroke-width: 2.2; }

/* ---------- Caballos ---------- */
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-header--back { justify-content: flex-start; }
.page-header--back .page-title { font-size: 26px; }
.back-link { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; background: var(--white); color: var(--ink); flex-shrink: 0; border: 1px solid var(--line); }
.button--small { height: 40px; padding: 0 14px; font-size: 13px; }
.button--danger { border-color: var(--live); color: #A3221A; background: var(--white); }
.button--danger:hover { background: var(--danger-bg); color: var(--danger-fg); }
.button--whatsapp { background: #1F7A4D; border-color: #1F7A4D; color: var(--white); }
.button--whatsapp:hover { background: #17633E; color: var(--white); }
form.button_to { margin: 0; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 10px; padding: 3px; }
.segmented__item { height: 38px; display: grid; place-items: center; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.segmented__item.is-active { background: var(--white); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .08); }

.horse-list { display: flex; flex-direction: column; gap: 12px; }
.horse-card { display: flex; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; text-decoration: none; color: var(--ink); }
.horse-card:hover { color: var(--ink); border-color: var(--line-2); }
.horse-card__photo { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; flex-shrink: 0; background: #CFD8D2; }
.is-placeholder { display: grid; place-items: center; background: var(--surface-2); }
.is-placeholder .emblem { width: 48%; opacity: .45; }
.horse-card__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 2px; }
.horse-card__top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.horse-card__name { font-family: var(--display); font-size: 22px; font-weight: 700; text-transform: uppercase; line-height: 1.05; }
.horse-card__meta { font-size: 13px; color: var(--ink-2); }
.horse-card__sub { font-size: 12px; color: var(--muted); }
.horse-card__price { font-weight: 700; margin-top: 4px; }

.storage { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.storage__row { display: flex; justify-content: space-between; gap: 8px; }
.storage__row span:first-child { font-weight: 600; }
.meter { display: block; height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--green); border-radius: 4px; }

.horse-hero { position: relative; margin: -16px -16px 0; }
.horse-hero__photo { width: 100%; height: 260px; object-fit: cover; background: #CFD8D2; }
.horse-hero .back-link { position: absolute; top: 12px; left: 12px; border: 0; box-shadow: 0 1px 4px rgb(0 0 0 / .15); }
.horse-head { display: flex; flex-direction: column; gap: 4px; }
.horse-head__top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sale-price { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--green); margin-top: 4px; }

.action-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }

.tabs { display: flex; box-shadow: inset 0 -1px var(--line-2); overflow-x: auto; scrollbar-width: none; }
.tabs__item { flex: 1; text-align: center; padding: 12px 8px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs__item.is-active { color: var(--green); border-bottom-color: var(--green); }

.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.timeline__item { display: flex; gap: 12px; position: relative; padding-bottom: 18px; }
.timeline__item::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.timeline__item:last-child::before { display: none; }
.timeline__dot { width: 14px; height: 14px; border-radius: 7px; flex-shrink: 0; margin-top: 3px; border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--line-2); }
.timeline__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; align-items: flex-start; }
.timeline__when { font-size: 12px; font-weight: 600; color: var(--muted); }
.timeline__title { font-weight: 700; }
.timeline__detail { font-size: 13px; color: var(--ink-2); }

.media-strip { display: flex; gap: 8px; overflow-x: auto; width: 100%; padding: 6px 0 2px; }
.media-strip .media-item, .media-strip .media-item-link { width: 132px; height: 96px; flex-shrink: 0; }
.media-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.media-grid .media-item, .media-grid .media-item-link { aspect-ratio: 4 / 3; width: 100%; height: auto; }
.media-item { border-radius: 10px; object-fit: cover; background: #1A1F21; width: 100%; height: 100%; }
.media-item-link { display: block; }

.pedigree { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.pedigree__cell { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.pedigree__cell small { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.pedigree__cell--self { background: var(--green); border-color: var(--green); color: var(--white); grid-column: 1 / -1; }
.pedigree__cell--self small { color: var(--gold-2); }

.data-list { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.data-list div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; }
.data-list div + div { border-top: 1px solid var(--surface-2); }
.data-list dt { color: var(--muted); font-size: 14px; }
.data-list dd { margin: 0; font-weight: 600; text-align: right; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field select, .field textarea { border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 0 14px; font: 400 16px var(--font); color: var(--ink); background: var(--white); width: 100%; }
.field select { height: 48px; }
.field textarea { padding: 12px 14px; resize: vertical; }
.field input[type=file] { height: auto; padding: 12px; border-style: dashed; }
.fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fieldset legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.hint { font-size: 12px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; }
.chip span { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--white); font-size: 14px; font-weight: 600; cursor: pointer; }
.chip input:checked + span { background: var(--green); border-color: var(--green); color: var(--white); }
.chip input:focus-visible + span { outline: 3px solid var(--gold-2); outline-offset: 2px; }

.option { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; cursor: pointer; }
.option span { display: flex; flex-direction: column; flex: 1; }
.option small { color: var(--muted); font-size: 12px; }
.option input { width: 20px; height: 20px; accent-color: var(--green); flex-shrink: 0; }

.upload-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.upload-list:empty { display: none; }
.upload { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.upload__name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload__meta { font-size: 12px; color: var(--muted); }
.upload__bar { display: block; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.upload__bar span { display: block; height: 100%; width: 0; background: var(--green); transition: width .2s; }
.upload.is-error .upload__bar span { background: var(--live); }

.share-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.share-box > div { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.share-box__url { font-size: 13px; overflow-wrap: anywhere; }
.prose p { margin: 0 0 8px; }
.public-footer { text-align: center; font-size: 13px; color: var(--muted); padding: 12px 0 8px; }
body.app--public { padding-bottom: 0; }

/* ---------- Eventos ---------- */
.event-list { display: flex; flex-direction: column; gap: 16px; }
.event-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink); }
.event-card:hover { color: var(--ink); border-color: var(--line-2); }
.event-card__banner { min-height: 132px; display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; padding: 14px 16px; color: var(--white); }
.event-card__kind { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: #D7E6DE; }
.event-card__kind strong { color: var(--gold-2); }
.event-card__name { font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1; text-transform: uppercase; }
.event-card__body { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 16px; }
.event-card__initials { width: 44px; height: 44px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--green); flex-shrink: 0; }
.event-card__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; font-size: 15px; }
.event-card__text small { font-size: 13px; color: var(--muted); }
.cal-box { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 58px; height: 52px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 10px; flex-shrink: 0; }
.cal-box__month { font-size: 11px; font-weight: 700; color: var(--muted); }
.cal-box__days { font-family: var(--display); font-size: 18px; font-weight: 700; line-height: 1.1; }

.show-hero { margin: -16px -16px 0; padding: 12px 16px 18px; color: var(--white); display: flex; flex-direction: column; gap: 2px; min-height: 160px; }
.show-hero .back-link { border: 0; margin-bottom: auto; }
.show-hero__meta { font-size: 12px; color: #CFE0D7; margin-top: 18px; }
.show-hero__name { font-family: var(--display); font-size: 34px; font-weight: 700; line-height: 1; text-transform: uppercase; }
.show-hero__venue { font-size: 13px; color: #CFE0D7; }

.day-grid { display: grid; grid-template-columns: repeat(var(--days, 4), minmax(0, 1fr)); gap: 8px; }
.day-grid__item { height: 44px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.day-grid__item.is-active { background: var(--ink); color: var(--white); }
.group-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }

.class-list { display: flex; flex-direction: column; gap: 10px; }
.class-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.class-row:hover { color: var(--ink); border-color: var(--line-2); }
.class-row.is-live { border: 2px solid var(--green); padding: 11px; }
.class-row__number { width: 46px; height: 46px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 15px; font-weight: 700; flex-shrink: 0; }
.class-row__text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; font-size: 15px; line-height: 1.25; }
.class-row__text small, .class-row__side small { font-size: 12px; color: var(--muted); }
.class-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }

.class-head { display: flex; gap: 10px; align-items: flex-start; }
.class-head__text { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; padding-top: 4px; }
.class-head__eyebrow { font-family: var(--display); font-size: 15px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.class-head__name { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.05; text-transform: uppercase; }
.class-head .muted { font-size: 13px; }
.class-head > .badge { margin-top: 10px; }
.live-button { width: 64px; height: 64px; border-radius: 14px; background: var(--live); color: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; text-decoration: none; flex-shrink: 0; margin-top: 4px; }
.live-button:hover { color: var(--white); background: #A3221A; }

.results-note { font-size: 12px; }
.results { list-style: none; margin: 0 -16px; padding: 0; background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.result { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.result + .result { border-top: 1px solid var(--surface-2); }
.result.is-first { background: var(--gold-bg); }
.result.is-live { background: var(--danger-bg); }
.result.is-mine .result__who small::after { content: "Tu caballo"; margin-left: 6px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--green-soft); color: var(--green); text-transform: uppercase; vertical-align: 2px; }
.result__place { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 17px; font-weight: 700; flex-shrink: 0; color: var(--ink); }
.result.is-live .result__place { color: var(--live); }
.medal-1 { background: #F2C230; }
.medal-2 { background: #C9CED1; }
.medal-3 { background: #D6955B; }
.result__who { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.result__who strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result__who strong span { font-weight: 500; color: var(--muted); }
.result__who small { font-size: 13px; color: var(--muted); }
.result__score { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.result__score strong { font-size: 15px; }
.result__score small { font-size: 12px; color: var(--muted); }

/* ---------- Apuestas ---------- */
.points-chip { height: 40px; padding: 0 14px; border-radius: 20px; background: var(--green); color: var(--white); display: inline-flex; align-items: center; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.small-note { font-size: 12px; margin-top: -8px; }
.market-list { display: flex; flex-direction: column; gap: 14px; }
.market-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.market-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.market-card__top .muted { font-size: 12px; }
.market-card__name { font-family: var(--display); font-size: 24px; font-weight: 700; line-height: 1.05; text-transform: uppercase; }
.market-card__meta { font-size: 13px; color: var(--ink-2); }
.favorites { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--surface-2); }
.favorites li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--surface-2); }
.favorites__num { width: 28px; font-size: 12px; font-weight: 700; color: var(--muted); }
.favorites__who { flex: 1; font-size: 14px; font-weight: 600; min-width: 0; }
.favorites__who span { font-weight: 400; color: var(--muted); }
.odds { font-size: 14px; font-weight: 700; color: var(--green); font-variant-numeric: tabular-nums; }

.bet-list, .ranking { list-style: none; margin: 0; padding: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.bet-row { display: flex; gap: 12px; padding: 12px 14px; align-items: center; }
.bet-row + .bet-row, .ranking__row + .ranking__row { border-top: 1px solid var(--surface-2); }
.bet-row__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.bet-row__text small { font-size: 12px; color: var(--muted); }
.bet-row__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.bet-row__payout { color: var(--green); font-size: 14px; }
.ranking__row { display: flex; align-items: center; gap: 12px; padding: 8px 14px; }
.ranking__row.is-me { background: var(--green-soft); }
.ranking__name { flex: 1; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking__points { font-variant-numeric: tabular-nums; }

.bet-form { display: flex; flex-direction: column; margin: 0 -16px; }
.bet-head { display: flex; justify-content: space-between; padding: 0 16px 6px; font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.entry-picker { border: 0; margin: 0; padding: 0; background: var(--white); border-top: 1px solid var(--line); }
.entry-option { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--surface-2); cursor: pointer; }
.entry-option input { position: absolute; opacity: 0; }
.entry-option__ring { width: 22px; height: 22px; border-radius: 11px; border: 2px solid #9AA3A5; flex-shrink: 0; }
.entry-option input:checked ~ .entry-option__ring { border: 7px solid var(--green); }
.entry-option:has(input:checked) { background: #EAF2EE; }
.entry-option input:focus-visible ~ .entry-option__ring { outline: 3px solid var(--gold-2); outline-offset: 2px; }
.entry-option__num { width: 26px; font-size: 13px; font-weight: 700; color: var(--muted); }
.entry-option__who { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.entry-option__who small { font-size: 12px; color: var(--muted); }
.entry-option .odds { font-size: 15px; }
.bet-bar { position: sticky; bottom: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding: 14px 16px; background: var(--white); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgb(20 24 26 / .06); display: flex; flex-direction: column; gap: 12px; }
.bet-bar__top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.bet-bar__top .muted { font-size: 13px; white-space: nowrap; }
.amounts { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.amount { position: relative; }
.amount input { position: absolute; opacity: 0; inset: 0; }
.amount span { height: 44px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line-2); background: var(--white); font-size: 14px; font-weight: 600; cursor: pointer; }
.amount input:checked + span { background: var(--green); border-color: var(--green); color: var(--white); }
.amount input:disabled + span { opacity: .4; cursor: not-allowed; }
.amount input:focus-visible + span { outline: 3px solid var(--gold-2); outline-offset: 2px; }
.button--tall { height: 52px; border-radius: 14px; font-size: 16px; }

/* ---------- Administrador dentro de la app ---------- */

.viewing-as { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 10px 16px; background: var(--ink); color: var(--white); font-size: 13px; }
.viewing-as a { color: var(--gold-2); font-weight: 700; }

/* Menú del usuario (cabecera) */
.user-menu { position: relative; margin-left: auto; }
.user-menu__toggle { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 4px 4px 4px 12px; border-radius: 22px; background: var(--surface-2); color: var(--green); cursor: pointer; font-weight: 600; font-size: 14px; }
.user-menu__toggle::-webkit-details-marker { display: none; }
.user-menu__name { max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu__avatar { width: 36px; height: 36px; border-radius: 18px; background: var(--green); color: var(--white); display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.user-menu[open] .user-menu__toggle { box-shadow: 0 0 0 2px var(--green); }
.user-menu__panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; max-width: calc(100vw - 32px); background: var(--white); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(20, 24, 26, .14); padding: 8px; display: flex; flex-direction: column; gap: 2px; z-index: 20; }
.user-menu__who { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.user-menu__who small { color: var(--muted, #5B6466); overflow-wrap: anywhere; }
.user-menu__panel form { margin: 0; }
.user-menu__item { display: flex; align-items: center; width: 100%; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--ink, #14181A); font: inherit; font-weight: 600; text-decoration: none; text-align: left; cursor: pointer; }
.user-menu__item:hover, .user-menu__item:focus-visible { background: var(--surface-2); }
.user-menu__logout { color: var(--danger-fg); }

/* Aviso al administrador dentro de Apuestas */
.admin-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--gold-bg); border: 1px solid var(--gold-soft); font-size: 13px; color: var(--ink-2); }
.admin-notice a { color: var(--green); font-weight: 700; white-space: nowrap; }
.show-hero__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; }
.show-hero__links a { color: var(--gold-2); font-weight: 700; }

/* Búsqueda de jinetes y caballos */
.rider-search { position: relative; margin: 0 0 12px; }
.rider-search input { width: 100%; height: 48px; padding: 0 14px 0 42px; border: 1px solid var(--line-2); border-radius: 24px; background: var(--white); font: 400 16px var(--font); color: var(--ink); }
.rider-search input:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 3px var(--green-soft); }
.rider-search__icon { position: absolute; left: 15px; top: 15px; color: var(--muted); pointer-events: none; }
.rider-results { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.rider-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.rider-card__head { display: flex; align-items: center; gap: 10px; }
.rider-card__avatar { width: 40px; height: 40px; border-radius: 20px; background: var(--green); color: var(--white); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.rider-card__who { display: flex; flex-direction: column; min-width: 0; }
.rider-card__who strong { font-size: 16px; }
.rider-card__who strong span { color: var(--muted); font-weight: 600; font-size: 13px; }
.rider-card__who small { color: var(--ink-2); font-size: 14px; }
.rider-card__stats { margin: 0; font-size: 13px; color: var(--muted); }
.rider-card__label { margin: 6px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.rider-runs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rider-run { border-top: 1px solid var(--line); }
.rider-run:first-child { border-top: 0; }
.rider-run__link { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "when result" "what result"; gap: 2px 10px; padding: 9px 0; text-decoration: none; color: var(--ink); }
.rider-run__when { grid-area: when; font-size: 12px; color: var(--muted); }
.rider-run__what { grid-area: what; display: flex; flex-direction: column; min-width: 0; }
.rider-run__what strong { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rider-run__what small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rider-run__result { grid-area: result; align-self: center; min-width: 44px; padding: 4px 8px; border-radius: 8px; background: var(--surface-2); font-size: 13px; font-weight: 700; text-align: center; white-space: nowrap; }
.rider-run__result.medal-1 { background: var(--gold-soft); }
.rider-run.is-upcoming .rider-run__result { background: var(--green-soft); color: var(--green); font-weight: 600; font-size: 12px; }
.rider-run__bets { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; }
.bet-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px; background: var(--green); color: var(--white); font-size: 13px; font-weight: 600; text-decoration: none; }
.bet-chip strong { color: var(--gold-2); }
.rider-more summary { cursor: pointer; padding: 8px 0 2px; font-size: 13px; font-weight: 700; color: var(--green); }

/* "En pista ahora": la marca el administrador desde el control en vivo y se actualiza sola */
.on-course { display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: var(--radius); background: var(--green); color: var(--white); }
.on-course__label { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--gold-2); }
.on-course__who { display: flex; align-items: center; gap: 12px; }
.on-course__who strong { display: block; font-family: var(--display); font-size: 24px; line-height: 1.05; text-transform: uppercase; }
.on-course__who small { color: #CFE0D7; font-size: 14px; }
.on-course__order { flex: none; width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; background: var(--gold-2); color: var(--green); font: 700 18px var(--display); }
.on-course__wait { margin: 0; color: #CFE0D7; font-size: 14px; }
.on-course__next { border-top: 1px solid var(--green-2); padding-top: 10px; display: flex; gap: 10px; font-size: 13px; }
.on-course__next > span { color: var(--gold-2); font-weight: 700; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; padding-top: 2px; }
.on-course__next ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; color: #E7EFEA; min-width: 0; }
.on-course__next li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.on-course__next b { color: var(--white); margin-right: 4px; }
.class-row__oncourse { color: var(--live) !important; font-weight: 600; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 rgba(200, 40, 30, .6); animation: live-pulse 1.6s infinite; flex: none; }
@keyframes live-pulse { 70% { box-shadow: 0 0 0 10px rgba(200, 40, 30, 0); } 100% { box-shadow: 0 0 0 0 rgba(200, 40, 30, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
