/* ==========================================================================
   Rifas (Mi cuenta > Suerte y Azar > Rifas): rediseño de las 4 pantallas (inicio, cómo ganas, elegir números, herramientas de venta) y de la hoja «Confirmar compra».
   Marcado: includes/template/api_services/rifa.tpl y rifa_board.tpl. Comportamiento: assets/evolution/js/colpay-rifa-ui.js (la lógica de reservas/compra sigue en rifa.tpl).
   Los <p> llevan !important en el tamaño porque el layout fija «p { font-size: 1.2rem !important }».
   ========================================================================== */
.rifa-ui,
.rf-sheet {
    --rf-navy: #20204e;
    --rf-navy-2: #2d2c66;
    --rf-ink: #1d1d4a;
    --rf-muted: #5d6482;
    --rf-line: #e3e6f1;
    --rf-surface: #ffffff;
    --rf-soft: #f1f3fa;
    --rf-mint: #00f2a8;
    --rf-mint-ink: #082f33;
    --rf-mint-soft: #d9f7ee;
    --rf-mint-line: #8fe3c9;
    --rf-mint-strong: #0d8a6a;
    --rf-amber-soft: #fff1cf;
    --rf-amber-line: #efc15a;
    --rf-amber-ink: #8a5a00;
    --rf-sold: #e7e9f2;
    --rf-sold-ink: #4d557a;
    --rf-radius: 8px;
}
.rifa-ui {
    max-width: 760px;
    margin: 0 auto;
    padding: 2px 2px 28px;
    color: var(--rf-ink);
    font-family: inherit;
    text-align: left;
}
.rifa-ui *, .rifa-ui *::before, .rifa-ui *::after { box-sizing: border-box; }
.rifa-ui [hidden] { display: none !important; }
.rifa-ui button { font-family: inherit; }

/* ---- encabezados y navegación ---- */
.rf-crumbs { display: flex; align-items: center; gap: 6px; margin: 4px 0 6px; font-size: .86rem; color: var(--rf-muted); }
.rf-crumbs a { color: var(--rf-muted); text-decoration: none; }
.rf-crumbs a:hover { color: var(--rf-ink); }
.rf-crumbs .bi { font-size: .7rem; }
.rf-headrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rf-title { margin: 0; color: var(--rf-ink); font-weight: 800; line-height: 1.05; letter-spacing: -.015em; }
.rf-title--xl { font-size: 2.4rem; }
.rf-title--fit { font-size: clamp(1.4rem, 7.7vw, 2.05rem); letter-spacing: -.025em; }
.rf-linkbtn { display: inline-flex; align-items: center; gap: 7px; padding: 6px 2px; color: var(--rf-mint-strong); font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.rf-linkbtn:hover { text-decoration: underline; }
/* «Volver»: botón casi cuadrado, azul oscuro de la app, con la flecha adentro y el nombre del destino al lado (más visible que la flecha suelta de antes). */
.rf-back { display: inline-flex; align-items: center; gap: 12px; margin: 2px 0 14px; padding: 0; border: 0; background: none; color: var(--rf-muted); font-size: 1rem; text-decoration: none; cursor: pointer; }
.rf-back__btn { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; background: var(--rf-navy); color: #fff; font-size: 1.35rem; box-shadow: 0 4px 10px rgba(32, 32, 78, .22); }
.rf-back__label { font-weight: 600; }
.rf-back:hover { color: var(--rf-ink); }
.rf-back:hover .rf-back__btn, .rf-back:active .rf-back__btn { background: var(--rf-navy-2); }
.rf-lead { margin: 8px 0 18px; color: var(--rf-muted); font-size: 1.05rem !important; line-height: 1.4; }
.rf-textbtn { display: inline-flex; align-items: center; gap: 7px; padding: 4px 0; border: 0; background: none; color: var(--rf-mint-strong); font-weight: 700; font-size: .95rem; text-decoration: none; cursor: pointer; }
.rf-textbtn:hover { text-decoration: underline; }
.rf-instructions-link { margin: 4px 0 12px; text-align: center; }
.rf-reportlink { margin-top: 6px; }

/* ---- tipos de rifa ---- */
.rf-types { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.rf-type { padding: 9px 16px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); color: var(--rf-ink); font-weight: 700; font-size: .92rem; cursor: pointer; }
.rf-type.active { border-color: var(--rf-navy); background: var(--rf-navy); color: #fff; }

/* ---- tarjeta principal ---- */
.rf-hero { position: relative; overflow: hidden; margin: 6px 0 14px; padding: 22px 22px 16px; border-radius: 8px; color: #fff;
    background: radial-gradient(120% 95% at 88% 8%, rgba(86, 84, 190, .55) 0%, rgba(86, 84, 190, 0) 58%), linear-gradient(140deg, #23225a, #1a1a44); }
.rf-hero__body { position: relative; z-index: 1; max-width: 62%; }
.rf-hero__lottery { display: flex; align-items: center; gap: 8px; color: #8fe9d2; font-size: .86rem; font-weight: 600; }
.rf-hero__title { margin: 14px 0 8px; color: #fff; font-size: 2.35rem; font-weight: 800; line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; }
.rf-hero__sub { margin: 0; color: #c8cbe8; font-size: .92rem !important; }
.rf-hero__art { position: absolute; top: 2px; right: -14px; width: 58%; max-width: 270px; pointer-events: none; }
.rf-ticket-art { display: block; width: 100%; height: auto; }
.rf-hero__date { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: 22px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: 1rem; font-weight: 700; }
.rf-hero__date .bi { color: #8fe9d2; }
.rf-banner { margin: 0 0 14px; border-radius: 8px; overflow: hidden; }

.rf-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.rf-tile { padding: 14px 16px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); }
.rf-tile__label { display: flex; align-items: center; gap: 8px; color: var(--rf-muted); font-size: .88rem; font-weight: 600; }
.rf-tile__value { margin-top: 6px; color: var(--rf-ink); font-size: 1.9rem; font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }

.rf-list { margin-bottom: 18px; border: 1px solid var(--rf-line); border-radius: var(--rf-radius); background: var(--rf-surface); overflow: hidden; }
.rf-list__row { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--rf-ink); }
.rf-list__row + .rf-list__row { border-top: 1px solid var(--rf-line); }
.rf-list__row:hover { background: var(--rf-soft); }
.rf-list__icon { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 8px; font-size: 1.25rem; }
.rf-list__icon--mint { background: var(--rf-mint-soft); color: var(--rf-mint-strong); }
.rf-list__icon--lilac { background: #ebe9fb; color: #3c3a8e; }
.rf-list__icon--sky { background: #dcecf9; color: #1c6fb0; }
.rf-list__row--static { cursor: default; }
.rf-list__row--static:hover { background: none; }
.rf-list__row.d-none { display: none !important; }
.rf-list__text label { margin: 0; color: inherit; font: inherit; cursor: pointer; }
.rf-list__text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rf-list__text strong { font-size: 1.08rem; font-weight: 800; }
.rf-list__text small { color: var(--rf-muted); font-size: .9rem; }
.rf-list__chev { color: var(--rf-muted); }

.rf-cta { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin: 4px 0 0; padding: 0 20px; border: 0; border-radius: 8px; background: var(--rf-mint); color: var(--rf-mint-ink); font-size: 1.1rem; font-weight: 800; cursor: pointer; box-shadow: 0 8px 22px rgba(0, 242, 168, .28); }
.rf-cta:hover { filter: brightness(.96); }
.rf-balance { margin: 12px 0 0; text-align: center; color: var(--rf-muted); font-size: .9rem !important; }
.rf-balance .bi { margin-right: 4px; }
.rf-balance strong { margin-left: 6px; color: var(--rf-ink); }

/* ---- entrada de Rifas sin rifa vigente (raffles.tpl): avisos, horario y lista de respaldo ---- */
.rf-notice { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; padding: 14px 16px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); color: var(--rf-ink); font-weight: 600; }
.rf-notice--danger { border-color: #f1b4b4; background: #fdeeee; color: #8c1d1d; }
.rf-notice .bi { margin-top: 2px; }
.rf-crumbs span { color: var(--rf-muted); }
.rf-lead--tight { margin: 0 0 12px; }
.rf-tool__empty--center { text-align: center; padding: 8px 0; }
.rf-schedule { margin: 0; padding: 0; list-style: none; }
.rf-schedule li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rf-line); font-size: .98rem; }
.rf-schedule li:first-child { border-top: 0; }
.rf-schedule span { color: var(--rf-muted); }
a.rf-list__row { text-decoration: none; }

/* ---- recibo de la compra («Compra confirmada», rifa_receipt.tpl) ---- */
.rf-title--center { text-align: center; }
.rf-receipt__ok { margin: 2px 0 18px; text-align: center; }
/* ÚNICA excepción a la regla de 8 px (pedida por el usuario, mockup 05): el check de «Compra confirmada» es un círculo con un anillo exterior más pálido. */
.rf-receipt__check { display: inline-flex; align-items: center; justify-content: center; width: 66px; height: 66px; margin: 16px 0 26px; border-radius: 50%; background: #baf6de; color: #106b54; font-size: 2.1rem;
    box-shadow: 0 0 0 11px #eaf9f4, 0 0 0 12px #e0f1ec; }
.rf-receipt__sub { margin: 8px 0 0; color: var(--rf-muted); font-size: calc(1.05rem - 2px) !important; }
/* Boleto: dos partes (arriba: rifa y números; abajo: datos y total) unidas por una línea de corte con una muesca semicircular a cada lado. Las muescas son máscaras
   (no dependen del color del fondo de la página). */
.rf-ticket { margin-bottom: 14px; }
.rf-ticket__top, .rf-ticket__bottom { border: 1px solid var(--rf-line); background: var(--rf-surface); overflow: hidden; }
.rf-ticket__top { border-bottom: 0; border-radius: 8px 8px 0 0;
    -webkit-mask: radial-gradient(circle at 0 100%, transparent 6px, #000 6.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 100%, transparent 6px, #000 6.5px) right / 51% 100% no-repeat;
    mask: radial-gradient(circle at 0 100%, transparent 6px, #000 6.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 100%, transparent 6px, #000 6.5px) right / 51% 100% no-repeat; }
.rf-ticket__bottom { border-top: 0; border-radius: 0 0 8px 8px;
    -webkit-mask: radial-gradient(circle at 0 0, transparent 6px, #000 6.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 0, transparent 6px, #000 6.5px) right / 51% 100% no-repeat;
    mask: radial-gradient(circle at 0 0, transparent 6px, #000 6.5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 0, transparent 6px, #000 6.5px) right / 51% 100% no-repeat; }
.rf-ticket__bottom::before { content: ''; display: block; margin: 0 14px; border-top: 2px dashed var(--rf-line); }
.rf-ticket__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px; background: linear-gradient(135deg, var(--rf-mint-soft) 0%, #e4f1fb 100%); }
.rf-ticket__name { margin: 0; color: var(--rf-ink); font-size: calc(1.55rem - 2px); font-weight: 800; line-height: 1.1; letter-spacing: -.01em; }
.rf-ticket__lottery { display: block; margin-top: 4px; color: var(--rf-muted); font-size: calc(.98rem - 2px); }
.rf-ticket__icon { flex: 0 0 auto; width: 38px; height: 38px; color: var(--rf-mint-strong); }
.rf-ticket__body { padding: 14px 18px 16px; }
.rf-ticket__label { color: var(--rf-muted); font-size: calc(.92rem - 2px); font-weight: 600; }
.rf-ticket__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-top: 10px; }
.rf-ticket__nums { display: flex; flex-wrap: wrap; gap: 8px; }
.rf-ticket__num { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; height: 50px; padding: 0 12px; border-radius: 8px; background: var(--rf-navy); color: #fff; font-size: calc(1.65rem - 2px); font-weight: 800;
    -webkit-mask: radial-gradient(circle at 0 50%, transparent 4.5px, #000 5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 4.5px, #000 5px) right / 51% 100% no-repeat;
    mask: radial-gradient(circle at 0 50%, transparent 4.5px, #000 5px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 4.5px, #000 5px) right / 51% 100% no-repeat; }
.rf-ticket__sold { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-sold); color: var(--rf-sold-ink); font-size: calc(.84rem - 2px); font-weight: 600; }
.rf-ticket__facts { display: grid; gap: 10px; margin: 0; }
.rf-ticket__fact { display: flex; justify-content: space-between; gap: 14px; }
.rf-ticket__fact dt { color: var(--rf-muted); font-size: calc(1rem - 2px); font-weight: 400; }
.rf-ticket__fact dd { margin: 0; color: var(--rf-ink); font-size: calc(1rem - 2px); font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.rf-ticket__total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rf-line); }
.rf-ticket__total span { color: var(--rf-ink); font-size: calc(1.1rem - 2px); font-weight: 800; }
.rf-ticket__total strong { color: var(--rf-ink); font-size: calc(2.1rem - 2px); font-weight: 800; letter-spacing: -.02em; }
a.rf-cta { text-decoration: none; }
.rf-cta--outline { margin-top: 12px; border: 1px solid var(--rf-line); background: var(--rf-surface); color: var(--rf-ink); box-shadow: none; }
/* Recibo de la compra: botones más bajos (46 px en vez de 56) y TODOS los textos 2 px más pequeños (los de reglas compartidas se reducen solo aquí). */
.rf-receipt .rf-cta { min-height: 46px; font-size: calc(1.1rem - 2px); }
.rf-receipt .rf-back { font-size: calc(1rem - 2px); }
.rf-receipt .rf-title--fit { font-size: calc(clamp(1.4rem, 7.7vw, 2.05rem) - 2px); }
.rf-receipt .rf-tools-note { font-size: calc(1rem - 2px) !important; }
.rf-share-options { margin-top: 12px; padding: 14px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-soft); }
.rf-share-options.d-none { display: none !important; }
.rf-share-options__lead { margin: 0 0 10px; color: var(--rf-muted); font-size: calc(.95rem - 2px) !important; }
.rf-share-options__buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.rf-share-btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); color: var(--rf-ink); font-size: calc(.98rem - 2px); font-weight: 700; text-decoration: none; cursor: pointer; }
.rf-share-btn:hover { border-color: var(--rf-mint-line); color: var(--rf-ink); }

/* ---- cómo ganas ---- */
.rf-example { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding: 14px 16px; border: 1px solid var(--rf-mint-line); border-radius: var(--rf-radius); background: var(--rf-mint-soft); }
.rf-example__number { flex: 0 0 auto; position: relative; min-width: 64px; padding: 12px 10px; border-radius: 8px; background: var(--rf-navy); color: #fff; font-size: 1.9rem; font-weight: 800; line-height: 1; text-align: center; }
.rf-example__text { display: flex; flex-direction: column; gap: 2px; }
.rf-example__text strong { font-size: 1.12rem; font-weight: 800; }
.rf-example__text span { color: var(--rf-muted); font-size: .88rem; }
.rf-prizes-head { display: flex; justify-content: space-between; margin: 0 8px 8px; color: var(--rf-muted); font-size: .92rem; }
.rf-prizes { margin-bottom: 14px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); }
.rf-prize { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.rf-prize + .rf-prize { border-top: 1px solid var(--rf-line); }
.rf-prize__label { color: var(--rf-muted); font-size: 1.02rem; }
.rf-prize__amount { display: block; margin-top: 4px; color: var(--rf-ink); font-size: 1.9rem; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }
.rf-result { display: inline-flex; gap: 2px; padding: 4px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-soft); }
.rf-result__digit { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 40px; padding: 0 4px; border-radius: 8px; color: var(--rf-muted); font-size: 1.5rem; font-weight: 800; }
.rf-result__digit.is-hit { background: #7be7c6; color: #073c34; }
.rf-total { margin-bottom: 16px; padding: 18px 20px; border-radius: 8px; background: var(--rf-navy); color: #fff; }
.rf-total__line1 { display: flex; align-items: center; gap: 12px; font-size: 1.18rem; line-height: 1.25; }
.rf-total__line1 > .bi { flex: 0 0 auto; color: #7be7c6; font-size: 1.4rem; }
.rf-total__line1 strong { font-weight: 800; }
.rf-total__line2 { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 10px; }
.rf-total__line2 > span { font-size: 1.08rem; font-weight: 600; line-height: 1.25; }
.rf-total__amount { flex: 0 0 auto; color: #7be7c6; font-size: 2.1rem; font-weight: 800; line-height: 1; letter-spacing: -.01em; }

/* ---- elegir números ---- */
.rf-tabs { display: flex; gap: 4px; margin-bottom: 14px; padding: 5px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-soft); overflow-x: auto; scrollbar-width: none; }
.rf-tabs::-webkit-scrollbar { display: none; }
.rf-tab { flex: 1 0 auto; min-width: 64px; padding: 10px 8px; border: 0; border-radius: 8px; background: none; color: var(--rf-muted); font-size: .98rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.rf-tab.active { background: var(--rf-navy); color: #fff; }
.rf-switchrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 2px 14px; }
.rf-switchrow label:first-child { margin: 0; color: var(--rf-ink); font-size: 1.05rem; font-weight: 700; }
.rf-switchrow--flush { margin: 0; }

.rf-switch { position: relative; display: inline-flex; flex: 0 0 auto; padding: 0; border: 0; background: none; cursor: pointer; }
.rf-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.rf-switch__track { position: relative; display: inline-block; width: 54px; height: 32px; border-radius: 8px; background: #d4d8e8; transition: background .15s; }
.rf-switch__knob { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 5px; background: #fff; box-shadow: 0 1px 3px rgba(20, 20, 60, .3); transition: transform .15s; }
.rf-switch[aria-checked="true"] .rf-switch__track, .rf-switch--input input:checked + .rf-switch__track { background: var(--rf-mint-strong); }
.rf-switch[aria-checked="true"] .rf-switch__knob, .rf-switch--input input:checked + .rf-switch__track .rf-switch__knob { transform: translateX(22px); }
.rf-switch:focus-visible .rf-switch__track, .rf-switch--input input:focus-visible + .rf-switch__track { outline: 3px solid rgba(13, 138, 106, .35); outline-offset: 2px; }

/* ---- buscador, avance de ventas y elección al azar (encima de la tabla; colpay-rifa-ui.js) ---- */
.rf-find { margin: 0 0 12px; }
.rf-search { position: relative; display: flex; align-items: center; }
.rf-search > .bi-search { position: absolute; left: 14px; color: var(--rf-muted); font-size: 1.05rem; pointer-events: none; }
.rifa-ui .rf-search__input { width: 100%; min-height: 52px; padding: 0 48px 0 42px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); color: var(--rf-ink); font-size: 1.08rem; font-weight: 700; letter-spacing: .03em; box-shadow: none; }
.rifa-ui .rf-search__input::placeholder { color: var(--rf-muted); font-size: 1rem; font-weight: 600; letter-spacing: 0; opacity: 1; }
.rifa-ui .rf-search__input:focus { outline: 0; border-color: var(--rf-navy); box-shadow: 0 0 0 3px rgba(32, 32, 78, .16); }
.rf-search__clear { position: absolute; right: 6px; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--rf-muted); font-size: 1rem; cursor: pointer; }
.rf-search__clear:hover { color: var(--rf-ink); }
.rf-search__result { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-soft); color: var(--rf-ink); font-size: .98rem; font-weight: 600; line-height: 1.3; }
.rf-search__dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 3px; background: var(--rf-muted); }
.rf-search__result.is-free .rf-search__dot, .rf-search__result.is-mine .rf-search__dot { background: var(--rf-mint-strong); }
.rf-search__result.is-sold .rf-search__dot { background: var(--rf-sold-ink); }
.rf-search__result.is-other .rf-search__dot { background: var(--rf-amber-line); }
.rf-search__result.is-hint .rf-search__dot, .rf-search__result.is-none .rf-search__dot { background: var(--rf-line); }
.rf-search__text { flex: 1 1 auto; min-width: 0; }
.rf-search__pick { flex: 0 0 auto; padding: 7px 14px; border: 0; border-radius: 8px; background: var(--rf-navy); color: #fff; font-size: .92rem; font-weight: 700; cursor: pointer; }
.rf-search__pick:hover { background: var(--rf-navy-2); }
.rf-progress { margin: 0 0 12px; padding: 12px 14px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); }
.rf-progress__row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 12px; }
.rf-progress__row strong { color: var(--rf-ink); font-size: 1.02rem; font-weight: 800; }
.rf-progress__row span { color: var(--rf-muted); font-size: .95rem; font-weight: 700; }
.rf-progress__bar { height: 10px; margin-top: 10px; overflow: hidden; border-radius: 8px; background: var(--rf-soft); box-shadow: inset 0 0 0 1px var(--rf-line); }
.rf-progress__bar > span { display: block; width: 0; height: 100%; border-radius: 8px; background: var(--rf-navy); transition: width .5s ease; }
.rf-progress__extra { margin-top: 8px; color: var(--rf-muted); font-size: .88rem; }
.rf-random { display: flex; align-items: stretch; gap: 10px; margin: 0 0 12px; }
.rf-qty { display: inline-flex; flex: 0 0 auto; align-items: stretch; overflow: hidden; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); }
.rf-qty button { display: inline-flex; align-items: center; justify-content: center; width: 42px; padding: 0; border: 0; background: none; color: var(--rf-ink); font-size: 1rem; cursor: pointer; }
.rf-qty button:disabled { opacity: .4; cursor: not-allowed; }
.rifa-ui .rf-qty input { width: 50px; min-height: 48px; padding: 0; border: 0; border-right: 1px solid var(--rf-line); border-left: 1px solid var(--rf-line); border-radius: 0; background: transparent; color: var(--rf-ink); font-size: 1.1rem; font-weight: 800; text-align: center; box-shadow: none; }
.rifa-ui .rf-qty input:focus { outline: 0; background: var(--rf-soft); }
.rf-random__btn { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 14px; border: 1px solid var(--rf-navy); border-radius: 8px; background: var(--rf-surface); color: var(--rf-navy); font-size: 1.02rem; font-weight: 800; cursor: pointer; }
.rf-random__btn:hover:not(:disabled) { background: var(--rf-navy); color: #fff; }
.rf-random__btn:disabled { opacity: .5; cursor: not-allowed; }
.rf-random__note { margin: -4px 2px 12px; color: var(--rf-muted); font-size: .92rem; line-height: 1.35; }

.rf-board { margin-bottom: 16px; }
.rf-board__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.rifa-ui .number-btn { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 58px; margin: 0 !important; padding: 0; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); color: var(--rf-ink); font-size: 1.35rem; font-weight: 800; line-height: 1; box-shadow: none; transition: border-color .12s, background .12s; }
.rifa-ui .number-btn .bi { font-size: 1rem; }
.rifa-ui .number-btn.btn-light:hover { border-color: var(--rf-navy); background: var(--rf-surface); color: var(--rf-ink); }
.rifa-ui .number-btn.btn-success { border: 2px solid var(--rf-mint-strong); background: var(--rf-mint-soft); color: var(--rf-ink); }
.rifa-ui .number-btn.btn-secondary { border-color: #d9dcea; background: var(--rf-sold); color: var(--rf-sold-ink); }
.rifa-ui .number-btn.btn-warning { border-color: var(--rf-amber-line); background: var(--rf-amber-soft); color: var(--rf-amber-ink); }
.rifa-ui .number-btn:disabled { opacity: 1; cursor: not-allowed; }
.rifa-ui .number-btn.rf-out { display: none !important; }
/* Número encontrado con el buscador: aro y un pequeño latido para ubicarlo en la tabla. */
.rifa-ui .number-btn.rf-found { position: relative; z-index: 1; border-color: var(--rf-navy); box-shadow: 0 0 0 3px var(--rf-navy); animation: rf-found-pulse 1s ease-in-out 3; }
@keyframes rf-found-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@media (prefers-reduced-motion: reduce) { .rifa-ui .number-btn.rf-found { animation: none; } }

.rf-legend { display: grid; grid-template-columns: .85fr 1.3fr; gap: 12px 14px; margin: 0 0 18px; padding: 0 2px; list-style: none; color: var(--rf-muted); font-size: .98rem; }
.rf-legend li { display: flex; align-items: center; gap: 10px; }
.rf-dot { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); font-size: .95rem; }
.rf-dot--own { border: 2px solid var(--rf-mint-strong); background: var(--rf-mint-soft); color: var(--rf-mint-strong); }
.rf-dot--sold { border-color: #d9dcea; background: var(--rf-sold); color: var(--rf-sold-ink); }
.rf-dot--other { border-color: var(--rf-amber-line); background: var(--rf-amber-soft); color: var(--rf-amber-ink); }
.rf-stage { text-align: center; margin-bottom: 12px; }

.rf-select { margin-top: 6px; padding: 16px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-surface); }
.rf-select__head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rf-select__head > strong { font-size: 1.12rem; font-weight: 800; }
.rf-select__chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.rf-clear { margin-left: auto; padding: 4px 2px; border: 0; background: none; color: var(--rf-mint-strong); font-weight: 800; font-size: .98rem; cursor: pointer; }
.rf-clear:disabled { color: var(--rf-muted); opacity: .6; cursor: default; }
.rf-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.rf-chip { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 34px; padding: 0 9px; border: 1px solid var(--rf-mint-line); border-radius: 8px; background: var(--rf-mint-soft); color: var(--rf-ink); font-size: 1.05rem; font-weight: 800; }
.rf-timer { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 13px 14px; border-radius: 8px; background: var(--rf-mint-soft); color: var(--rf-ink); font-size: 1.02rem; }
.rf-timer.d-none { display: none !important; }
.rf-timer > .bi { color: var(--rf-mint-strong); font-size: 1.15rem; }
.rf-timer__label { flex: 1 1 auto; font-weight: 600; }
.rf-timer__count { color: var(--rf-mint-strong); font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rf-select__note { margin: 8px 2px 0; color: var(--rf-muted); font-size: .84rem !important; line-height: 1.35; }
.rf-select__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rf-line); }
.rf-select__total { display: flex; flex-direction: column; gap: 2px; color: var(--rf-muted); font-size: .92rem; }
.rf-select__total strong { color: var(--rf-ink); font-size: 2rem; font-weight: 800; line-height: 1.05; letter-spacing: -.01em; }
.rf-buy { flex: 1 1 52%; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--rf-mint); color: var(--rf-mint-ink); font-size: 1.12rem; font-weight: 800; cursor: pointer; }
.rf-buy:disabled { background: #d5ece4; color: #7d948d; cursor: not-allowed; }
.rf-newraffle { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 50px; border-radius: 8px; background: var(--rf-amber-soft); border: 1px solid var(--rf-amber-line); color: var(--rf-amber-ink); font-weight: 800; text-decoration: none; }

/* ---- herramientas de venta ---- */
.rf-tool { margin-bottom: 14px; padding: 16px; border: 1px solid var(--rf-line); border-radius: var(--rf-radius); background: var(--rf-surface); }
.rf-tool__title { display: flex; align-items: center; gap: 9px; margin: 0 0 12px; color: var(--rf-ink); font-size: 1.1rem; font-weight: 800; }
.rf-tool__title .bi { color: var(--rf-mint-strong); }
.rf-tool__empty { margin: 0; color: var(--rf-muted); font-size: .95rem !important; }
.rf-commission-table { margin: 0; }
.rf-comm { margin-bottom: 14px; padding: 18px 18px 14px; border: 1px solid var(--rf-mint-line); border-radius: 8px;
    background: linear-gradient(135deg, var(--rf-mint-soft) 0%, #e4f1fb 100%); color: var(--rf-ink); }
.rf-comm.d-none { display: none !important; }
.rf-comm__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-bottom: 12px; border-bottom: 1px solid var(--rf-mint-line); }
.rf-comm__title { margin: 0; color: var(--rf-ink); font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; }
.rf-comm__badge { margin-left: auto; color: var(--rf-mint-strong); font-size: .86rem; font-weight: 700; text-align: right; }
/* Texto pequeño para quien no tiene plan: solo se ve con la tarjeta «sin Premium» (.rf-comm--muted); no cambia ningún color de la tarjeta. */
.rf-comm__upgrade { display: none; flex: 0 0 100%; color: var(--rf-muted); font-size: .76rem; line-height: 1.3; text-align: right; }
.rf-comm__upgrade a { color: var(--rf-mint-strong); font-weight: 700; text-decoration: underline; }
.rf-comm--muted .rf-comm__upgrade { display: block; }
.rf-comm__grid { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-top: 16px; }
.rf-comm__item { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 0 14px; }
.rf-comm__item:first-child { padding-left: 0; }
.rf-comm__item:last-child { padding-right: 0; }
.rf-comm__item:not(.d-none) ~ .rf-comm__item:not(.d-none) { border-left: 1px solid var(--rf-mint-line); }
.rf-comm__item.d-none { display: none !important; }
.rf-comm__value { color: var(--rf-ink); font-size: 2.1rem; font-weight: 800; line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere; }
.rf-comm__desc { color: var(--rf-muted); font-size: .92rem; line-height: 1.35; }
.rf-comm__extra { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rf-mint-line); color: var(--rf-muted); font-size: .95rem; }
.rf-comm__extra strong { color: var(--rf-ink); font-weight: 800; text-align: right; }
.rf-comm__extra.d-none { display: none !important; }
.rf-comm__link { padding: 7px 12px; border: 1px solid var(--rf-mint-line); border-radius: 8px; background: var(--rf-surface); color: var(--rf-mint-strong); font-size: .9rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.rf-comm__link:hover { border-color: var(--rf-mint-strong); }
/* Sin plan Premium (.rf-comm--muted) la tarjeta lleva los mismos colores; solo cambia la etiqueta del perfil. */
.rf-comm-wrap > .rf-tool__empty { margin-bottom: 14px; padding: 14px 16px; border: 1px dashed var(--rf-line); border-radius: 8px; }
.rf-tools-note { display: flex; align-items: flex-start; gap: 10px; margin: 4px 2px 18px; color: var(--rf-muted); font-size: 1rem !important; line-height: 1.4; }
.rf-tools-note .bi { margin-top: 2px; color: var(--rf-mint-strong); font-size: 1.15rem; }
.rf-toolbtn { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--rf-line); border-radius: 8px; background: var(--rf-soft); color: var(--rf-ink); text-align: left; cursor: pointer; }
.rf-toolbtn:last-child { margin-bottom: 0; }
.rf-toolbtn:hover { border-color: var(--rf-mint-line); }
.rf-toolbtn > .bi { flex: 0 0 auto; color: var(--rf-mint-strong); font-size: 1.3rem; }
.rf-toolbtn__text { display: flex; flex-direction: column; gap: 2px; }
.rf-toolbtn__text strong { font-weight: 800; }
.rf-toolbtn__text small { color: var(--rf-muted); }
.rf-toolbtn.d-none { display: none !important; }

/* ---- hoja «Confirmar compra» ---- */
.rf-sheet.colpay-sale-confirmation .modal-dialog { width: 100%; max-width: 520px; margin: 1rem auto; }
/* --rf-vv-height = parte VISIBLE de la pantalla (colpay-rifa-ui.js, visualViewport): con el teclado del iPhone abierto es mucho menor que 100vh y la hoja no puede ser más alta que eso. */
.rf-sheet.colpay-sale-confirmation .modal-content { display: flex; flex-direction: column; overflow: hidden; max-height: min(calc(100vh - 2rem), calc(var(--rf-vv-height, 100vh) - 1rem)); border: 0; border-radius: 8px; background: var(--rf-surface, #fff); color: var(--rf-ink, #1d1d4a); box-shadow: 0 -10px 50px rgba(10, 14, 38, .25); }
/* global.css (D4) pone a las hojas inferiores esquinas de 20 px con !important: aquí van las de 8 px de todo el diseño de Rifas. */
.modal.cp-sheet.rf-sheet > .modal-dialog > .modal-content { border-radius: 8px 8px 0 0 !important; }
.rf-sheet.colpay-sale-confirmation .modal-header { align-items: flex-start; min-height: 0; padding: 20px 22px 8px; border: 0; }
.rf-sheet__grab { display: none; width: 46px; height: 5px; margin: 10px auto 0; border-radius: 4px; background: #d6d9e6; }
.rf-sheet .rf-sheet__titles { flex: 1 1 auto; }
.rf-sheet.colpay-sale-confirmation .modal-title { margin: 0; color: var(--rf-ink, #1d1d4a); font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -.015em; }
.rf-sheet .rf-sheet__sub { margin: 6px 0 0; color: var(--rf-muted, #5d6482); font-size: 1rem !important; }
.rf-sheet.colpay-sale-confirmation .btn-close { flex: 0 0 auto; width: 44px; height: 44px; margin: 0; padding: 0; border-radius: 8px; background-color: var(--rf-soft, #f1f3fa); background-size: 14px; opacity: 1; }
.rf-sheet.colpay-sale-confirmation .modal-body { display: block; flex: 1 1 auto; min-height: 0; max-height: none; padding: 8px 22px 6px; overflow-y: auto; overscroll-behavior: contain; }
.rf-sheet-timer { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; padding: 14px 16px; border-radius: 8px; background: var(--rf-mint-soft, #d9f7ee); color: var(--rf-ink, #1d1d4a); font-size: 1.05rem; }
.rf-sheet-timer .bi { color: var(--rf-mint-strong, #0d8a6a); font-size: 1.2rem; }
.rf-sheet-timer span { flex: 1 1 auto; font-weight: 600; }
.rf-sheet-timer strong { color: var(--rf-mint-strong, #0d8a6a); font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rf-sheet-timer.is-off { display: none; }
.rf-sheet-card { margin-bottom: 18px; padding: 16px 18px; border: 1px solid var(--rf-line, #e3e6f1); border-radius: 8px; background: var(--rf-surface, #fff); }
.rf-sheet-card__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 2px dashed var(--rf-line, #e3e6f1); }
.rf-sheet-card__label { font-size: 1.12rem; font-weight: 800; }
/* IVA e Impuestos los muestra u oculta la lógica de la compra (style inline); el «Costo» solo se ve si hay alguno de los dos (colpay-rifa-ui.js pone rf-has-extras). */
.rf-sheet.colpay-sale-confirmation .rf-sheet-small { display: flex; align-items: center; justify-content: space-between; margin: 10px 0 0; padding: 0; border: 0; background: none; font-size: .95rem; }
.rf-sheet.colpay-sale-confirmation #modal-cost-row { display: none; }
.rf-sheet.colpay-sale-confirmation.rf-has-extras #modal-cost-row { display: flex; }
.rf-sheet.colpay-sale-confirmation .rf-sheet-small span, .rf-sheet.colpay-sale-confirmation .rf-sheet-small strong { font-size: .95rem; font-weight: 700; }
.rf-sheet.colpay-sale-confirmation .rf-sheet-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 14px 0 6px; border: 0; background: none; }
.rf-sheet-total__text { display: flex; flex-direction: column; gap: 2px; }
.rf-sheet-total__label { font-size: 1.15rem; font-weight: 800; }
.rf-sheet-total small { color: var(--rf-muted, #5d6482); font-size: .95rem; }
.rf-sheet.colpay-sale-confirmation .rf-sheet-total__amount { color: var(--rf-ink, #1d1d4a); font-size: 2.2rem; font-weight: 800; letter-spacing: -.015em; }
.rf-sheet .rf-sheet-wallet { display: flex; align-items: center; gap: 9px; margin: 8px 0 0; color: var(--rf-muted, #5d6482); font-size: .98rem !important; }
.rf-sheet-h { margin: 4px 0 10px; color: var(--rf-ink, #1d1d4a); font-size: 1.25rem; font-weight: 800; }
.rf-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 14px; padding: 4px; border: 1px solid var(--rf-line, #e3e6f1); border-radius: 8px; background: var(--rf-soft, #f1f3fa); }
.rf-seg__btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 0; border-radius: 8px; background: none; color: var(--rf-muted, #5d6482); font-size: 1.05rem; font-weight: 700; cursor: pointer; }
.rf-seg__btn .bi { display: none; }
.rf-seg__btn.active { background: var(--rf-navy, #20204e); color: #fff; }
.rf-seg__btn.active .bi { display: inline; }
.rf-client { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.rf-client.d-none { display: none !important; }
.rf-field { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 10px 14px; border: 1px solid var(--rf-line, #e3e6f1); border-radius: 8px; background: var(--rf-surface, #fff); }
.rf-field:focus-within { border-color: var(--rf-navy, #20204e); }
.rf-field span { color: var(--rf-muted, #5d6482); font-size: .85rem; }
.rf-field input { width: 100%; padding: 0; border: 0; outline: 0; background: none; color: var(--rf-ink, #1d1d4a); font-size: 1.15rem; font-weight: 600; }
.rf-notebtn { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 6px 0 0; padding: 14px 2px; border: 0; border-bottom: 1px solid var(--rf-line, #e3e6f1); background: none; color: var(--rf-muted, #5d6482); font-size: 1.05rem; text-align: left; cursor: pointer; }
.rf-notebtn[aria-expanded="true"] .bi { transform: rotate(180deg); }
.rf-note { padding-top: 10px; }
.rf-note.d-none { display: none !important; }
.rf-note textarea { border-radius: 8px; }
.rf-notify { margin-top: 4px; }
.rf-notify.d-none { display: none !important; }
.rf-notify .client-receipt-email-control { margin: 0; }
.rf-notify .client-receipt-email-switch { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; margin: 0; padding: 16px 2px; min-height: 0; }
.rf-notify .client-receipt-email-switch .form-check-label { margin: 0; color: var(--rf-ink, #1d1d4a); font-size: 1.15rem; font-weight: 700; }
.rf-notify .client-receipt-email-switch .form-check-input { float: none; flex: 0 0 auto; width: 54px; height: 32px; margin: 0; border-color: #d4d8e8; background-color: #d4d8e8; }
.rf-notify .client-receipt-email-switch .form-check-input:checked { border-color: var(--rf-mint-strong, #0d8a6a); background-color: var(--rf-mint-strong, #0d8a6a); }
.rf-notify .client-receipt-email-switch .form-check-input,
.rf-notify .client-receipt-email-switch .form-check-input:focus,
.rf-notify .client-receipt-email-switch .form-check-input:checked { border-radius: 8px !important; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3crect x='-3' y='-3' width='6' height='6' rx='1.2' fill='%23fff'/%3e%3c/svg%3e"); }
/* campos de la hoja (nota y correo del cliente): el tema global les pone más radio; aquí el tope es el mismo de todo el diseño */
.rf-sheet .form-control, .rf-sheet textarea.form-control { border-radius: 8px !important; }
.rf-sheet .rf-sheet-hint { display: flex; align-items: center; gap: 9px; margin: 0 0 6px; color: var(--rf-muted, #5d6482); font-size: .98rem !important; }
.rf-sheet.colpay-sale-confirmation .modal-footer { flex: 0 0 auto; padding: 12px 22px 22px; border: 0; background: var(--rf-surface, #fff); box-shadow: 0 -8px 18px rgba(20, 20, 60, .06); }
.rf-sheet.colpay-sale-confirmation .modal-footer .rf-confirm { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; margin: 0; border-radius: 8px; font-size: 1.15rem; font-weight: 800; }
/* El estilo global de «Sí, realizar…» (global.css y dark-mode.css) usa !important: aquí el botón es verde menta en claro y en oscuro, como el mockup. */
.rf-sheet.colpay-sale-confirmation .modal-footer .rf-confirm,
.rf-sheet.colpay-sale-confirmation .modal-footer .rf-confirm:hover,
.rf-sheet.colpay-sale-confirmation .modal-footer .rf-confirm:focus,
:root[data-theme="dark"] .rf-sheet.colpay-sale-confirmation .modal-footer .rf-confirm { border: 0 !important; background: var(--rf-mint, #00f2a8) !important; color: var(--rf-mint-ink, #082f33) !important; box-shadow: none !important; }
.rf-sheet.colpay-sale-confirmation .modal-footer .rf-confirm:hover, .rf-sheet.colpay-sale-confirmation .modal-footer .rf-confirm:focus { filter: brightness(.96); }

@media (max-width: 575.98px) {
    .rf-title--xl { font-size: 2.1rem; }
    .rf-title--xl.rf-title--fit { font-size: clamp(1.4rem, 7.7vw, 2.05rem); }
    .rf-hero { padding: 20px 18px 14px; }
    .rf-hero__title { font-size: 2.05rem; }
    .rf-hero__body { max-width: 58%; }
    .rf-tile__value { font-size: 1.6rem; }
    .rf-prize__amount { font-size: 1.65rem; }
    .rf-total__amount { font-size: 1.85rem; }
    .rf-total__line2 > span { font-size: 1rem; }
    .rf-result__digit { min-width: 26px; height: 36px; font-size: 1.3rem; }
    .rf-sheet.colpay-sale-confirmation .modal-dialog { align-items: flex-end; min-height: 100%; margin: 0; }
    .rf-sheet.colpay-sale-confirmation .modal-content { max-height: min(94vh, calc(var(--rf-vv-height, 100vh) - 12px)); border-radius: 8px 8px 0 0; }
    /* global.css (D4) fija el alto máximo de los sheets con !important (88dvh): se conserva ese tope y, con el teclado abierto, la hoja se queda dentro de la parte visible. */
    .modal.cp-sheet.rf-sheet > .modal-dialog > .modal-content { max-height: min(var(--cp-sheet-max-h, 88vh), calc(var(--rf-vv-height, 100vh) - 12px)) !important; }
    .rf-sheet__grab { display: block; }
    .rf-sheet.colpay-sale-confirmation .modal-title { font-size: 1.85rem; }
}

/* ---- modo oscuro ---- */
:root[data-theme="dark"] .rifa-ui,
:root[data-theme="dark"] .rf-sheet {
    --rf-ink: #f2f3f8;
    --rf-muted: #a4a6bf;
    --rf-line: #34344a;
    --rf-surface: #20202e;
    --rf-soft: #181824;
    --rf-mint-soft: rgba(0, 242, 168, .13);
    --rf-mint-line: rgba(0, 242, 168, .38);
    --rf-mint-strong: #3be8b8;
    --rf-amber-soft: rgba(239, 193, 90, .14);
    --rf-amber-line: rgba(239, 193, 90, .5);
    --rf-amber-ink: #f0c872;
    --rf-sold: #2a2a3c;
    --rf-sold-ink: #9ea2c4;
}
:root[data-theme="dark"] .rf-type.active, :root[data-theme="dark"] .rf-tab.active, :root[data-theme="dark"] .rf-seg__btn.active { background: #3b3a82; color: #fff; }
:root[data-theme="dark"] .rf-notice--danger { border-color: rgba(241, 120, 120, .45); background: rgba(241, 120, 120, .12); color: #f6a5a5; }
:root[data-theme="dark"] .rf-comm { background: linear-gradient(135deg, rgba(0, 242, 168, .12) 0%, rgba(86, 130, 230, .12) 100%); }
:root[data-theme="dark"] .rf-back__btn { background: #3b3a82; box-shadow: none; }
:root[data-theme="dark"] .rf-receipt__check { background: #0f4a3d; color: var(--rf-mint-strong); box-shadow: 0 0 0 11px #0d2a27, 0 0 0 12px #14463d; }
:root[data-theme="dark"] .rf-ticket__head { background: linear-gradient(135deg, rgba(0, 242, 168, .12) 0%, rgba(86, 130, 230, .12) 100%); }
:root[data-theme="dark"] .rf-ticket__num { background: #3b3a82; }
:root[data-theme="dark"] .rf-list__icon--sky { background: rgba(86, 160, 230, .18); color: #8cc6f2; }
:root[data-theme="dark"] .rf-list__icon--lilac { background: rgba(120, 118, 230, .2); color: #b1b0ff; }
:root[data-theme="dark"] .rf-example__number { background: #3b3a82; }
:root[data-theme="dark"] .rf-total { background: #2a2970; }
:root[data-theme="dark"] .rf-switch__track { background: #44445c; }
/* Interruptores activados en modo oscuro: el azul de la app (--cp-link, el mismo de los checkbox y «.btn-info»), no el verde del modo claro. */
:root[data-theme="dark"] .rf-switch[aria-checked="true"] .rf-switch__track, :root[data-theme="dark"] .rf-switch--input input:checked + .rf-switch__track { background: var(--cp-link, #2ec4f1); }
:root[data-theme="dark"] .rf-switch:focus-visible .rf-switch__track, :root[data-theme="dark"] .rf-switch--input input:focus-visible + .rf-switch__track { outline-color: rgba(46, 196, 241, .45); }
:root[data-theme="dark"] .rifa-ui .rf-search__input:focus { border-color: var(--cp-link, #2ec4f1); box-shadow: 0 0 0 3px rgba(46, 196, 241, .22); }
:root[data-theme="dark"] .rf-search__pick { background: #3b3a82; }
:root[data-theme="dark"] .rf-search__pick:hover { background: #4a49a0; }
:root[data-theme="dark"] .rf-progress__bar > span { background: var(--cp-link, #2ec4f1); }
:root[data-theme="dark"] .rf-random__btn { border-color: var(--cp-link, #2ec4f1); color: var(--cp-link, #2ec4f1); }
:root[data-theme="dark"] .rf-random__btn:hover:not(:disabled) { background: var(--cp-link, #2ec4f1); color: #0a0a12; }
:root[data-theme="dark"] .rifa-ui .number-btn.rf-found { border-color: var(--cp-link, #2ec4f1); box-shadow: 0 0 0 3px var(--cp-link, #2ec4f1); }
:root[data-theme="dark"] .rf-buy:disabled { background: rgba(0, 242, 168, .12); color: #6f8f86; }
:root[data-theme="dark"] .rf-sheet.colpay-sale-confirmation .modal-content { background: #20202e; box-shadow: 0 -10px 50px rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .rf-sheet.colpay-sale-confirmation .btn-close { filter: none !important; background-color: #2b2b3d !important; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23f2f3f8'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") !important; }
:root[data-theme="dark"] .rf-sheet__grab { background: #44445c; }
:root[data-theme="dark"] .rf-field input, :root[data-theme="dark"] .rf-note textarea { color: #f2f3f8; }
:root[data-theme="dark"] .rf-note textarea { background: #181824; border-color: #34344a; }
:root[data-theme="dark"] .rf-notify .client-receipt-email-switch .form-check-input { border-color: #44445c; background-color: #44445c; }
