/*
 * Tema del web app: el color de cada comercio y los componentes del rediseño.
 *
 * Las variables (--brand, --brand-ink, ...) las pone cada página con los
 * colores de su comercio (App\Support\CommerceTheme). Fuera de un comercio
 * (directorio, errores) quedan los colores de TUKI.
 *
 * Este archivo NO pasa por la compilación de Tailwind: va escrito a mano para
 * no depender de recompilar app.css.
 */

:root {
    --brand: #1F6FD9;
    --brand-ink: #ffffff;
    --brand-soft: #e4eefb;
    --brand-strong: #1a5eb8;
    --brand-text: #1F6FD9;
    --accent: #6500CA;
    --accent-ink: #ffffff;
    --accent-soft: #ede0fa;

    --tk-ground: #F3F4F1;
    --tk-surface: #ffffff;
    --tk-ink: #1C211D;
    --tk-muted: #5B635C;
    --tk-line: #E3E6E1;
    --tk-field: #D5DAD4;
    --tk-radius: 20px;
    --tk-font: 'Plus Jakarta Sans', 'Inter var', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.tk-page {
    font-family: var(--tk-font);
    color: var(--tk-ink);
    background: var(--tk-ground);
    -webkit-font-smoothing: antialiased;
}

/* `hidden` gana aunque la pieza tenga su propio display (botones, avisos). */
.tk-page [hidden], .tk-brand [hidden] { display: none !important; }

/* Todas las pantallas de un comercio usan la letra del rediseño. */
.tk-brand { font-family: var(--tk-font); }

/* El inicio va sobre un fondo apenas gris para que las tarjetas resalten. */
body.tk-home-page { background: var(--tk-ground); color: var(--tk-ink); }

/* ------------------------------------------------------------------ */
/* El morado y el azul de la versión anterior pasan al color del comercio,
   en todas las pantallas a la vez. */

.tk-brand .bg-purple-800,
.tk-brand .bg-purple-700,
.tk-brand .bg-purple-600,
.tk-brand .bg-blue-600,
.tk-brand .bg-blue-700 { background-color: var(--brand) !important; color: var(--brand-ink); }
/* El negro de los botones principales (canjear, redimir, capturar) también. */
.tk-brand .bg-\[\#050708\] { background-color: var(--brand) !important; color: var(--brand-ink) !important; }
.tk-brand .hover\:bg-\[\#050708\]\/90:hover { background-color: var(--brand-strong) !important; }
.tk-brand .hover\:bg-purple-800\/90:hover,
.tk-brand .hover\:bg-purple-900:hover,
.tk-brand .hover\:bg-blue-700:hover,
.tk-brand .hover\:bg-blue-800:hover { background-color: var(--brand-strong) !important; }
.tk-brand .bg-purple-100,
.tk-brand .bg-purple-50,
.tk-brand .bg-blue-100,
.tk-brand .bg-blue-50 { background-color: var(--brand-soft) !important; }
.tk-brand .hover\:bg-purple-100\/90:hover,
.tk-brand .hover\:bg-purple-50:hover { background-color: var(--brand-soft) !important; filter: brightness(0.97); }
.tk-brand .text-purple-800,
.tk-brand .text-purple-700,
.tk-brand .text-purple-600,
.tk-brand .text-purple-500,
.tk-brand .text-blue-900,
.tk-brand .text-blue-800,
.tk-brand .text-blue-600,
.tk-brand .text-blue-500 { color: var(--brand-text) !important; }
.tk-brand .text-purple-200 { color: var(--brand-soft) !important; }
.tk-brand .border-purple-800,
.tk-brand .border-purple-600,
.tk-brand .border-purple-500,
.tk-brand .border-purple-400,
.tk-brand .border-blue-500 { border-color: var(--brand) !important; }
.tk-brand .border-purple-200,
.tk-brand .border-blue-200,
.tk-brand .border-blue-300 { border-color: var(--brand-soft) !important; }
.tk-brand .focus\:ring-blue-500:focus,
.tk-brand .focus\:border-blue-500:focus,
.tk-brand .focus\:ring-purple-800\/50:focus,
.tk-brand .focus\:ring-purple-800\/55:focus { --tw-ring-color: var(--brand) !important; border-color: var(--brand) !important; }

/* ------------------------------------------------------------------ */
/* Piezas comunes */

.tk-shell { max-width: 480px; margin: 0 auto; }

.tk-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    height: 52px; padding: 0 20px; border: 0; border-radius: 16px;
    font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
    transition: filter .15s ease, transform .15s ease;
}
.tk-btn:active { transform: scale(0.98); }
.tk-btn-brand { background: var(--brand); color: var(--brand-ink); }
.tk-btn-brand:hover { background: var(--brand-strong); color: var(--brand-ink); }
.tk-btn-light { background: #ffffff; color: var(--brand-text); }
.tk-btn-light:hover { filter: brightness(0.97); color: var(--brand-text); }
.tk-btn-dark { background: #000000; color: #ffffff; }
.tk-btn-dark:hover { background: #1d1d1f; color: #ffffff; }
.tk-btn-outline { background: transparent; color: var(--tk-ink); box-shadow: inset 0 0 0 1.5px var(--tk-field); }
.tk-btn-block { width: 100%; }

.tk-icon-btn {
    width: 44px; height: 44px; border-radius: 14px; border: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--tk-surface); color: var(--tk-ink); box-shadow: 0 0 0 1px var(--tk-line);
    cursor: pointer; text-decoration: none;
}

.tk-card { background: var(--tk-surface); border-radius: var(--tk-radius); box-shadow: 0 0 0 1px var(--tk-line); }

.tk-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 999px;
}

.tk-section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 24px 0 12px; }
.tk-section-title h2 { margin: 0; font-size: 17px; font-weight: 700; }
.tk-section-title a { font-size: 13px; font-weight: 700; color: var(--brand-text); text-decoration: none; }

.tk-page a:focus-visible,
.tk-page button:focus-visible,
.tk-page input:focus-visible { outline: 3px solid var(--tk-ink); outline-offset: 2px; }

/* ------------------------------------------------------------------ */
/* Inicio */

/* El body ya trae 20px de margen (p-5); aquí solo el espacio de la barra de abajo. */
.tk-home { padding: 0 0 72px; }

.tk-home-header { display: flex; align-items: center; gap: 12px; padding-top: 14px; }
.tk-home-header .tk-logo {
    width: 48px; height: 48px; border-radius: 50%; object-fit: cover;
    background: #ffffff; box-shadow: 0 0 0 1px var(--tk-line); flex-shrink: 0;
}
/* Saludo pegado al nombre: el interlineado heredado los separaba y el saludo se veía alto. */
.tk-home-header .tk-hello { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0; }
.tk-home-header .tk-hello span:first-child { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--tk-muted); }
.tk-home-header .tk-hello span:last-child { font-size: 20px; line-height: 25px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tk-points {
    margin-top: 18px; background: var(--brand); color: var(--brand-ink);
    border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.tk-points-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
/* Nivel y grupo(s): si no caben en una línea, bajan a la siguiente pegados a la derecha. */
.tk-points-chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; min-width: 0; }
.tk-points-top .tk-program { font-size: 13px; font-weight: 600; letter-spacing: .02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 6px; }
.tk-points-top .tk-chip { background: rgba(255,255,255,.2); color: inherit; white-space: nowrap; }
.tk-points-amount { display: flex; align-items: baseline; gap: 8px; }
.tk-points-amount strong { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.tk-points-amount span { font-size: 15px; font-weight: 600; }
.tk-progress { display: flex; flex-direction: column; gap: 8px; }
.tk-progress-track { height: 8px; border-radius: 999px; background: rgba(255,255,255,.25); overflow: hidden; }
.tk-progress-fill { height: 100%; border-radius: 999px; background: currentColor; }
.tk-progress span { font-size: 13px; font-weight: 500; }
/* Mostrar mi QR y, debajo, la cartera: botón completo con su texto para que se vea. */
.tk-points-actions { display: flex; flex-direction: column; gap: 10px; }
.tk-points-actions .tk-btn { width: 100%; height: 50px; }
.tk-points-actions .tk-wallet { font-size: 15px; }
/* Marca casi negra: el botón negro de la cartera lleva un borde claro para no perderse. */
.tk-brand-dark .tk-points-actions .tk-wallet { box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.tk-points-error { margin: 0; font-size: 13px; }

.tk-tiles { margin-top: 14px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tk-tile {
    background: var(--tk-surface); border: 0; border-radius: var(--tk-radius); padding: 14px;
    box-shadow: 0 0 0 1px var(--tk-line); display: flex; flex-direction: column; gap: 10px;
    text-align: left; font: inherit; color: var(--tk-ink); text-decoration: none; cursor: pointer;
}
.tk-tile-icon {
    width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand-text);
    display: flex; align-items: center; justify-content: center;
}
.tk-tile strong { display: block; font-size: 15px; font-weight: 700; }
.tk-tile small { display: block; font-size: 12px; color: var(--tk-muted); margin-top: 2px; }
/* Cuadro a todo lo ancho (Tienda): ícono, texto y flecha en una fila. */
.tk-tile-wide { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 12px; }
.tk-tile-wide .tk-tile-go { margin-left: auto; color: var(--tk-muted); flex-shrink: 0; }

.tk-banner {
    margin-top: 14px; border-radius: var(--tk-radius); padding: 12px 14px;
    display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--tk-ink);
    background: var(--accent-soft);
}
.tk-banner-icon {
    width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
    background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center;
}
.tk-banner-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-banner-text strong { font-size: 14px; font-weight: 700; }
.tk-banner-text small { font-size: 12px; color: var(--tk-muted); }

.tk-carousel {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -20px; padding: 2px 20px 6px; scrollbar-width: none;
}
.tk-carousel::-webkit-scrollbar { display: none; }
.tk-reward {
    width: 156px; flex-shrink: 0; scroll-snap-align: start;
    background: var(--tk-surface); border-radius: 18px; box-shadow: 0 0 0 1px var(--tk-line);
    overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--tk-ink);
}
.tk-reward-img { height: 100px; background: var(--brand-soft); display: block; }
.tk-reward-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-reward-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.tk-reward-body strong {
    font-size: 14px; font-weight: 700; line-height: 1.25;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tk-reward-body span { font-size: 12px; font-weight: 700; color: var(--brand-text); }

.tk-member-banner {
    margin-top: 14px; border-radius: var(--tk-radius); padding: 14px 16px;
    display: flex; align-items: center; gap: 12px; text-decoration: none; color: #ffffff;
}

.tk-footer-mini {
    margin: 32px 0 0; display: flex; flex-direction: column; align-items: center; gap: 6px;
    font-size: 12px; color: var(--tk-muted);
}
.tk-footer-mini nav { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.tk-footer-mini a { color: var(--tk-muted); text-decoration: none; }
.tk-footer-mini a:hover { color: var(--tk-ink); }

/* Hojas de abajo (acumular / pagar) */
.tk-sheet-options { display: flex; flex-direction: column; gap: 10px; padding: 8px 20px 28px; }
.tk-sheet-option {
    display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px;
    background: var(--tk-surface); box-shadow: 0 0 0 1px var(--tk-line); text-decoration: none; color: var(--tk-ink);
}
.tk-sheet-option strong { display: block; font-size: 15px; }
.tk-sheet-option small { display: block; font-size: 12px; color: var(--tk-muted); }

/* ------------------------------------------------------------------ */
/* Barra de abajo */

.tk-bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: #ffffff; border-top: 1px solid var(--tk-line);
    padding: 8px 8px calc(10px + env(safe-area-inset-bottom));
}
.tk-bottom-nav > div { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tk-bottom-nav a {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px;
    text-decoration: none; color: var(--tk-muted); font-family: var(--tk-font);
}
.tk-bottom-nav a .tk-nav-icon { width: 56px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; }
.tk-bottom-nav a span.tk-nav-label { font-size: 11px; font-weight: 600; }
.tk-bottom-nav a[aria-current="page"] { color: var(--brand-text); }
.tk-bottom-nav a[aria-current="page"] .tk-nav-icon { background: var(--brand-soft); }
.tk-bottom-nav a[aria-current="page"] span.tk-nav-label { font-weight: 700; }
.tk-nav-badge {
    position: absolute; top: -2px; left: 50%; margin-left: 8px; min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px; background: #D92D20; color: #ffffff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #ffffff;
}

/* ------------------------------------------------------------------ */
/* Mi QR */

.tk-qr-page { min-height: 100vh; min-height: 100dvh; background: var(--brand); color: var(--brand-ink); padding: 20px; box-sizing: border-box; display: flex; flex-direction: column; }
.tk-qr-top { display: flex; align-items: center; justify-content: space-between; }
.tk-qr-top h1 { margin: 0; font-size: 17px; font-weight: 700; }
.tk-qr-close {
    width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.18); color: inherit;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.tk-qr-card {
    margin: 24px auto 0; width: 100%; max-width: 380px; box-sizing: border-box;
    background: #ffffff; color: var(--tk-ink); border-radius: 28px; padding: 24px;
    display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.tk-qr-who { display: flex; align-items: center; gap: 12px; align-self: stretch; }
.tk-qr-who img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--tk-line); }
.tk-qr-who strong { display: block; font-size: 18px; }
.tk-qr-who small { display: block; font-size: 13px; color: var(--tk-muted); }
.tk-qr-code { padding: 14px; border-radius: 18px; box-shadow: 0 0 0 1px var(--tk-line); line-height: 0; }
.tk-qr-code svg { width: 232px; height: 232px; display: block; }
.tk-qr-code.is-stale { opacity: .35; }
.tk-qr-number { font-size: 16px; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.tk-qr-timer { align-self: stretch; display: flex; align-items: center; gap: 12px; background: var(--tk-ground); border-radius: 16px; padding: 12px 14px; }
.tk-qr-timer svg { flex-shrink: 0; transform: rotate(-90deg); }
.tk-qr-timer strong { display: block; font-size: 14px; }
.tk-qr-timer small { display: block; font-size: 12px; color: var(--tk-muted); }
.tk-qr-note { margin: 20px auto 0; max-width: 340px; text-align: center; font-size: 13px; line-height: 1.45; }
.tk-qr-bottom { margin-top: auto; padding-top: 24px; width: 100%; max-width: 380px; align-self: center; display: flex; flex-direction: column; gap: 12px; }

/* ------------------------------------------------------------------ */
/* Login del comercio */

.tk-login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #ffffff; }
.tk-login-hero {
    background: var(--brand); color: var(--brand-ink); border-radius: 0 0 32px 32px;
    padding: 48px 24px 32px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.tk-login-hero img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; background: #ffffff; box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.tk-login-hero h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.tk-login-hero p { margin: 0; font-size: 14px; line-height: 1.45; max-width: 300px; }
.tk-login-body { width: 100%; max-width: 440px; margin: 0 auto; box-sizing: border-box; padding: 24px 24px 0; display: flex; flex-direction: column; gap: 16px; }
.tk-field { display: flex; flex-direction: column; gap: 8px; }
.tk-field label { font-size: 13px; font-weight: 700; }
.tk-input {
    width: 100%; height: 52px; box-sizing: border-box; border-radius: 14px; border: 1.5px solid var(--tk-field);
    padding: 0 16px; font: inherit; font-size: 16px; color: var(--tk-ink); background: #ffffff;
}
.tk-input::placeholder { color: #7A827B; }
.tk-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tk-password { position: relative; }
.tk-password .tk-input { padding-right: 56px; }
/* Un solo ojo: Edge agrega el suyo a las contraseñas. */
.tk-password input::-ms-reveal, .tk-password input::-ms-clear { display: none; }
.tk-password button {
    position: absolute; top: 4px; right: 4px; width: 44px; height: 44px; border: 0; border-radius: 12px;
    background: transparent; color: var(--tk-muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.tk-link { font-size: 13px; font-weight: 700; color: var(--brand-text); text-decoration: none; }
.tk-divider { display: flex; align-items: center; gap: 12px; color: var(--tk-muted); font-size: 12px; font-weight: 600; }
.tk-divider::before, .tk-divider::after { content: ""; flex: 1; height: 1px; background: var(--tk-line); }
.tk-social { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tk-social a {
    height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 14px; font-weight: 700; text-decoration: none;
}
.tk-social .tk-fb { background: #1877F2; color: #ffffff; }
.tk-social .tk-apple { background: #000000; color: #ffffff; }
.tk-alert {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px;
    background: #FEF3F2; color: #912018; font-size: 14px; font-weight: 600;
}
.tk-alert[hidden] { display: none; }
.tk-alert button { margin-left: auto; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 4px; font-size: 18px; line-height: 1; }
.tk-stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.tk-stores a {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 12px;
    background: #000000; color: #ffffff; text-decoration: none;
}
.tk-stores a span { display: flex; flex-direction: column; line-height: 1.05; text-align: left; }
.tk-stores a span small { font-size: 10px; }
.tk-stores a span b { font-size: 16px; font-weight: 600; }

/* ------------------------------------------------------------------ */
/* Directorio de comercios (antes de entrar), con los colores de TUKI */

.tk-dir { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--tk-ground); }
.tk-dir-hero {
    background: #4A0096; color: #ffffff; border-radius: 0 0 32px 32px;
    padding: 28px 20px 24px;
}
.tk-dir-hero-inner { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.tk-dir-hero img.tk-dir-logo { height: 30px; width: auto; align-self: flex-start; }
.tk-dir-hero h1 { margin: 6px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.15; text-wrap: balance; }
.tk-dir-hero p { margin: 0; font-size: 14px; line-height: 1.45; color: #E6D6FA; }
.tk-search { position: relative; }
.tk-search svg.tk-search-icon { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--tk-muted); pointer-events: none; }
.tk-search input {
    width: 100%; height: 54px; box-sizing: border-box; border: 0; border-radius: 16px;
    padding: 0 52px 0 48px; font: inherit; font-size: 16px; color: var(--tk-ink); background: #ffffff;
}
.tk-search input::placeholder { color: #7A827B; }
/* Una sola "x" para borrar: se oculta la que pone el navegador en type=search. */
.tk-search input[type="search"]::-webkit-search-cancel-button,
.tk-search input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; display: none; }
.tk-search input[type="search"] { -webkit-appearance: none; appearance: none; }
.tk-search input:focus { outline: 3px solid #3397FD; outline-offset: 0; }
.tk-search button {
    position: absolute; right: 5px; top: 5px; width: 44px; height: 44px; border: 0; border-radius: 12px;
    background: transparent; color: var(--tk-muted); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.tk-search button[hidden] { display: none; }
.tk-scan-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; border-radius: 14px;
    border: 0; background: rgba(255,255,255,.14); color: #ffffff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
}
.tk-scan-btn:hover { background: rgba(255,255,255,.22); }
.tk-dir-body { width: 100%; max-width: 640px; margin: 0 auto; box-sizing: border-box; padding: 20px 20px 32px; flex: 1; }
.tk-dir-count { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--tk-muted); }
.tk-dir-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.tk-dir-item a {
    display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 18px; background: #ffffff;
    box-shadow: 0 0 0 1px var(--tk-line); text-decoration: none; color: var(--tk-ink);
    transition: box-shadow .15s ease;
}
.tk-dir-item a:hover { box-shadow: 0 0 0 2px #3397FD; }
.tk-dir-item img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: var(--tk-ground); flex-shrink: 0; }
.tk-dir-item .tk-dir-text { flex: 1; min-width: 0; }
.tk-dir-item strong { display: block; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-dir-item small { display: block; font-size: 12px; color: var(--tk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.tk-dir-item svg { color: var(--tk-muted); flex-shrink: 0; }
.tk-dir-skeleton { height: 76px; border-radius: 18px; background: linear-gradient(90deg, #e9ebe7 0%, #f3f4f1 50%, #e9ebe7 100%); background-size: 200% 100%; animation: tk-shimmer 1.4s infinite linear; }
@keyframes tk-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.tk-dir-empty { text-align: center; padding: 32px 12px; color: var(--tk-muted); font-size: 14px; line-height: 1.5; }
.tk-dir-empty strong { display: block; color: var(--tk-ink); font-size: 16px; margin-bottom: 4px; }
.tk-dir-footer { background: #1C211D; color: #C9CEC8; padding: 24px 20px calc(24px + env(safe-area-inset-bottom)); }
.tk-dir-footer-inner { max-width: 640px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.tk-dir-footer nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; }
.tk-dir-footer a { color: #C9CEC8; text-decoration: none; }
.tk-dir-footer a:hover { color: #ffffff; }
.tk-dir-footer img { height: 24px; width: auto; }

/* ------------------------------------------------------------------ */
/* Pantallas internas (regalos, recompensas, mensajes, movimientos...) */

/* Todas las pantallas del comercio van sobre el fondo apenas gris. */
body.tk-brand { background: var(--tk-ground); color: var(--tk-ink); }

.tk-inner { padding: 0 0 96px; display: flex; flex-direction: column; gap: 16px; }
.tk-inner > * { margin-top: 0; margin-bottom: 0; }

.tk-topbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 12px; }
.tk-topbar h1 {
    margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tk-lead { margin: 0; font-size: 14px; line-height: 1.5; color: var(--tk-muted); }

.tk-heading { display: flex; flex-direction: column; gap: 6px; }
.tk-heading h2 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; text-wrap: balance; }

/* Tarjeta horizontal: imagen a la izquierda, texto y botón (regalos y recompensas). */
.tk-offer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.tk-offer {
    display: flex; align-items: stretch; min-height: 128px; overflow: hidden;
    background: var(--tk-surface); border-radius: var(--tk-radius); box-shadow: 0 0 0 1px var(--tk-line);
    text-decoration: none; color: var(--tk-ink); transition: box-shadow .15s ease;
}
.tk-offer:hover { box-shadow: 0 0 0 2px var(--brand); color: var(--tk-ink); }
.tk-offer-img { width: 40%; max-width: 168px; flex-shrink: 0; background: var(--brand-soft); position: relative; }
.tk-offer-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-offer-body { flex: 1; min-width: 0; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.tk-offer-kicker { font-size: 12px; font-weight: 700; color: var(--brand-text); }
.tk-offer-body strong {
    font-size: 15px; font-weight: 700; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tk-offer-meta { font-size: 12px; font-weight: 600; color: var(--tk-muted); }
.tk-offer-cta {
    margin-top: auto; align-self: flex-start; height: 36px; padding: 0 16px; border-radius: 12px;
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--brand); color: var(--brand-ink); font-size: 14px; font-weight: 700;
}
.tk-tag {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 999px;
    background: var(--accent-soft); color: var(--tk-ink);
}

/* Recompensas que aún no alcanza: atenuadas, como en el app. */
.tk-offer.is-locked .tk-offer-img img,
.tk-reward.is-locked .tk-reward-img img { filter: grayscale(1); opacity: .5; }
.tk-offer.is-locked .tk-offer-kicker { display: inline-flex; align-items: center; gap: 5px; color: var(--tk-muted); }
.tk-offer.is-locked strong { color: var(--tk-muted); }
.tk-offer.is-locked .tk-offer-cta { background: var(--tk-ground); color: var(--tk-muted); }
.tk-offer.is-locked:hover { box-shadow: 0 0 0 1px var(--tk-line), 0 0 0 3px var(--tk-ground); }
.tk-reward.is-locked .tk-reward-body strong { color: var(--tk-muted); }
.tk-reward.is-locked .tk-reward-body span { display: inline-flex; align-items: center; gap: 4px; color: var(--tk-muted); }

/* Mi perfil */
.tk-profile-who { display: flex; align-items: center; gap: 14px; padding: 16px; }
.tk-profile-avatar {
    width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--brand-text); font-size: 18px; font-weight: 800;
}
.tk-profile-who strong { display: block; font-size: 16px; font-weight: 700; }
.tk-profile-who small { display: block; font-size: 13px; color: var(--tk-muted); overflow-wrap: anywhere; }
.tk-field-error { margin: 0; font-size: 13px; font-weight: 600; color: #B42318; }
.tk-req { color: #B42318; margin-left: 2px; }
.tk-input.is-invalid { border-color: #F04438; }
.tk-readonly { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 52px; padding: 0 16px; border-radius: 14px; background: var(--tk-ground); font-size: 16px; font-weight: 600; }
.tk-readonly svg { color: var(--tk-muted); flex-shrink: 0; }
.tk-banner-profile { background: var(--brand-soft); }
.tk-banner-profile .tk-banner-icon { background: var(--brand); color: var(--brand-ink); }

/* Detalle (regalo, recompensa, mensaje) */
.tk-detail-img { border-radius: 24px; overflow: hidden; background: var(--brand-soft); aspect-ratio: 4 / 3; }
.tk-detail-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tk-detail-img.is-natural { aspect-ratio: auto; }
.tk-detail-img.is-natural img { height: auto; }
.tk-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-fact {
    display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 12px; border-radius: 12px;
    background: var(--tk-surface); box-shadow: 0 0 0 1px var(--tk-line); font-size: 13px; color: var(--tk-muted);
}
.tk-fact b { font-size: 15px; font-weight: 800; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.tk-prose { margin: 0; font-size: 15px; line-height: 1.55; color: var(--tk-muted); white-space: pre-line; overflow-wrap: anywhere; }
.tk-terms { background: var(--tk-surface); border-radius: 16px; box-shadow: 0 0 0 1px var(--tk-line); }
.tk-terms summary {
    list-style: none; cursor: pointer; padding: 14px 16px; font-size: 14px; font-weight: 700;
    display: flex; justify-content: space-between; align-items: center;
}
.tk-terms summary::-webkit-details-marker { display: none; }
.tk-terms summary::after { content: "+"; font-size: 20px; font-weight: 500; color: var(--tk-muted); }
.tk-terms[open] summary::after { content: "\2212"; }
.tk-terms p { margin: 0; padding: 0 16px 16px; font-size: 13px; line-height: 1.55; color: var(--tk-muted); white-space: pre-line; }
.tk-actions { display: flex; flex-direction: column; gap: 10px; }
.tk-btn[disabled], .tk-btn.is-disabled { background: #D5DAD4; color: #5B635C; cursor: not-allowed; }
.tk-note {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
    background: var(--brand-soft); color: var(--tk-ink); font-size: 13px; line-height: 1.45;
}
.tk-usage { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; }
.tk-usage span { font-size: 14px; font-weight: 600; }
.tk-usage b { font-size: 15px; font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.tk-usage small { display: block; font-size: 12px; font-weight: 600; color: var(--tk-muted); text-align: right; }

/* Listas (mensajes, movimientos) */
.tk-list { list-style: none; margin: 0; padding: 0; background: var(--tk-surface); border-radius: var(--tk-radius); box-shadow: 0 0 0 1px var(--tk-line); overflow: hidden; }
.tk-list > li + li { border-top: 1px solid var(--tk-line); }
.tk-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--tk-ink); }
a.tk-row:hover { background: #FAFBF9; color: var(--tk-ink); }
.tk-row-icon {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-text);
}
.tk-row-icon.is-plus { background: #DCFAE6; color: #067647; }
.tk-row-icon.is-minus { background: #FEE4E2; color: #B42318; }
.tk-row-icon.is-even { background: var(--tk-ground); color: var(--tk-muted); }
.tk-row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-row-text strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-row-text small { font-size: 13px; color: var(--tk-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tk-row-side { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12px; color: var(--tk-muted); white-space: nowrap; }
.tk-row.is-unread strong { font-weight: 800; }
.tk-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.tk-amount { font-size: 15px; font-weight: 800; color: var(--tk-ink); font-variant-numeric: tabular-nums; }
.tk-amount.is-plus { color: #067647; }
.tk-amount.is-minus { color: #B42318; }
.tk-day { margin: 8px 4px 0; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--tk-muted); }

/* Saldo compacto (movimientos) */
.tk-balance { background: var(--brand); color: var(--brand-ink); border-radius: 24px; padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.tk-balance span { font-size: 13px; font-weight: 600; }
.tk-balance strong { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }

/* Vacío y error */
.tk-empty { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--tk-muted); font-size: 14px; line-height: 1.5; }
.tk-empty-icon { width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand-text); margin-bottom: 4px; }
.tk-empty strong { color: var(--tk-ink); font-size: 16px; }

/* Formularios en tarjeta (código promocional, capturar ticket o monto) */
.tk-form { background: var(--tk-surface); border-radius: var(--tk-radius); box-shadow: 0 0 0 1px var(--tk-line); padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.tk-form .tk-hint { margin: -8px 0 0; font-size: 12px; color: var(--tk-muted); }
/* Una sola flecha: se quita la del navegador (y la del plugin de formularios de
   Tailwind) y se pone la nuestra. */
select.tk-input {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding-right: 44px; cursor: pointer;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235B635C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 20px 20px;
}
select.tk-input::-ms-expand { display: none; }
.tk-input.is-code { text-align: center; font-size: 20px; font-weight: 800; letter-spacing: .08em; }
.tk-input.is-code::placeholder { font-size: 16px; font-weight: 500; letter-spacing: 0; }
.tk-amount-input { position: relative; }
.tk-amount-input > span { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 18px; font-weight: 800; color: var(--tk-muted); }
.tk-amount-input .tk-input { padding-left: 34px; font-size: 20px; font-weight: 800; }

/* Escanear: tarjeta con lo que hay que apuntar y el botón de la cámara */
.tk-scan-card { background: var(--tk-surface); border-radius: var(--tk-radius); box-shadow: 0 0 0 1px var(--tk-line); padding: 24px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.tk-scan-art { width: 88px; height: 88px; border-radius: 28px; background: var(--brand-soft); color: var(--brand-text); display: flex; align-items: center; justify-content: center; }
.tk-scan-card h2 { margin: 0; font-size: 18px; font-weight: 800; }
.tk-scan-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--tk-muted); max-width: 300px; }
.tk-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; align-self: stretch; text-align: left; counter-reset: paso; }
.tk-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; counter-increment: paso; }
.tk-steps li::before {
    content: counter(paso); flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%;
    background: var(--brand-soft); color: var(--brand-text); font-size: 12px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
}
.tk-or { display: flex; align-items: center; gap: 12px; color: var(--tk-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tk-or::before, .tk-or::after { content: ""; flex: 1; height: 1px; background: var(--tk-line); }

/* QR que escanea el cajero (reclamar regalo, canjear recompensa) */
.tk-cashier-qr { background: var(--tk-surface); border-radius: var(--tk-radius); box-shadow: 0 0 0 1px var(--tk-line); padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.tk-cashier-qr h2 { margin: 0; font-size: 16px; font-weight: 800; }
.tk-cashier-qr p { margin: 0; font-size: 13px; color: var(--tk-muted); }
.tk-cashier-qr .tk-qr-code svg { width: 216px; height: 216px; display: block; }
.tk-mini-head { display: flex; align-items: center; gap: 12px; }
.tk-mini-head img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex-shrink: 0; background: var(--brand-soft); }
.tk-mini-head strong { font-size: 17px; font-weight: 800; line-height: 1.25; }

/* Hoja de abajo con la cámara (mismo aspecto que las de inicio) */
.tk-sheet { font-family: var(--tk-font); border-radius: 24px 24px 0 0 !important; }
.tk-sheet-head { padding: 16px 20px 8px; cursor: pointer; position: relative; }
.tk-sheet-head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 4px; background: #D5DAD4; }
.tk-sheet-head h5 { margin: 8px 0 0; font-size: 17px; font-weight: 700; color: var(--tk-ink); }
.tk-sheet-body { padding: 0 20px 28px; display: flex; flex-direction: column; gap: 14px; }
.tk-sheet-body video { width: 100%; display: block; border-radius: 18px; background: #000000; }

/* Lo que los scripts esconden con la clase `hidden` de Tailwind sigue escondido
   aunque la pieza tenga su propio display. */
.tk-alert.hidden, .tk-note.hidden, .tk-form.hidden, .tk-scan-card.hidden, .tk-btn.hidden { display: none; }

/* Avisos (Toastify): sin la imagen rota del emoji y con la letra y forma del rediseño. */
.toastify { font-family: var(--tk-font) !important; border-radius: 14px !important; box-shadow: 0 10px 30px rgba(0,0,0,.18) !important; padding: 12px 16px !important; font-weight: 600; }
.toastify-avatar { display: none !important; }

/* Cargador al abrir cada página */
.loader-wrapper { background: var(--tk-ground) !important; }

/* ------------------------------------------------------------------ */
/* Menú lateral (sale por la derecha, del lado del botón) */

.tk-menu {
    position: fixed; top: 0; right: 0; z-index: 40; height: 100vh; height: 100dvh;
    width: min(340px, 88vw); box-sizing: border-box; overflow-y: auto;
    background: var(--tk-surface); color: var(--tk-ink); font-family: var(--tk-font);
    border-radius: 24px 0 0 24px; padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; gap: 18px;
    transition: transform .25s ease;
}
.tk-menu-head { display: flex; align-items: center; gap: 12px; padding: 0 4px; }
.tk-menu-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--tk-line); flex-shrink: 0; }
.tk-menu-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tk-menu-who strong { font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-menu-who small { font-size: 12px; color: var(--tk-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-menu-head button { width: 40px; height: 40px; border: 0; border-radius: 12px; background: var(--tk-ground); color: var(--tk-ink); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.tk-menu-nav { display: flex; flex-direction: column; gap: 2px; }
.tk-menu-nav a {
    display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; border-radius: 14px;
    font-size: 15px; font-weight: 600; color: var(--tk-ink); text-decoration: none;
}
.tk-menu-nav a:hover { background: var(--tk-ground); color: var(--tk-ink); }
.tk-menu-nav a svg { color: var(--tk-muted); flex-shrink: 0; }
.tk-menu-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-text); font-weight: 700; }
.tk-menu-nav a[aria-current="page"] svg { color: var(--brand-text); }
.tk-menu-count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #D92D20; color: #ffffff; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.tk-menu-nav a svg.tk-menu-ext { margin-left: auto; opacity: .7; }
.tk-menu-foot { margin-top: auto; border-top: 1px solid var(--tk-line); padding-top: 12px; }
.tk-menu-foot a.tk-menu-logout, .tk-menu-foot a.tk-menu-logout svg { color: #B42318; }
.tk-menu-version { margin: 8px 12px 0; font-size: 11px; color: var(--tk-muted); }

/* Liga para volver al directorio (login del comercio) */
.tk-back-link {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px 0 8px;
    border-radius: 999px; background: rgba(255,255,255,.18); color: inherit; font-size: 13px; font-weight: 700; text-decoration: none;
}
.tk-back-link:hover { background: rgba(255,255,255,.28); color: inherit; }
.tk-back-link.on-light { background: var(--tk-ground); color: var(--tk-ink); }

/* Páginas sueltas (crear cuenta, recuperar contraseña, verificar correo, errores) */
.tk-auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: #ffffff; }
.tk-auth-hero {
    background: var(--brand); color: var(--brand-ink); border-radius: 0 0 32px 32px;
    padding: 20px 24px 28px; display: flex; flex-direction: column; gap: 14px;
}
.tk-auth-hero-row { display: flex; align-items: center; gap: 14px; }
.tk-auth-hero img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #ffffff; box-shadow: 0 6px 18px rgba(0,0,0,.16); flex-shrink: 0; }
.tk-auth-hero h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; text-wrap: balance; }
.tk-auth-hero p { margin: 0; font-size: 14px; line-height: 1.45; }
.tk-auth-body { width: 100%; max-width: 440px; margin: 0 auto; box-sizing: border-box; padding: 24px 24px 32px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.tk-auth-foot { text-align: center; font-size: 14px; color: var(--tk-muted); }
.tk-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; color: var(--tk-muted); }
.tk-check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--brand); }
.tk-check a { color: var(--brand-text); font-weight: 700; }
.tk-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tk-otp { text-align: center; font-size: 28px; font-weight: 800; letter-spacing: .4em; padding-left: .4em; font-variant-numeric: tabular-nums; }
.tk-error-page { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; background: var(--tk-ground); font-family: var(--tk-font); color: var(--tk-ink); }
.tk-error-card { width: 100%; max-width: 380px; background: #ffffff; border-radius: 24px; box-shadow: 0 0 0 1px var(--tk-line); padding: 28px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.tk-error-card h1 { margin: 4px 0 0; font-size: 20px; font-weight: 800; }
.tk-error-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--tk-muted); }
.tk-error-card .tk-btn { margin-top: 8px; }

/* ------------------------------------------------------------------ */
/* Páginas de cuenta (login, crear cuenta, recuperar, verificar correo):
   blancas y sobrias; el color de la marca solo en el botón y las ligas. */

.tk-account {
    width: 100%; max-width: 440px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; box-sizing: border-box;
    padding: 8px 24px calc(20px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; background: #ffffff; color: #101828;
}
.tk-account-back {
    align-self: flex-start; height: 44px; display: inline-flex; align-items: center; gap: 4px;
    margin-left: -6px; padding: 0 6px; font-size: 14px; font-weight: 500; color: #475467; text-decoration: none;
}
.tk-account-back:hover { color: #101828; }
.tk-account-head { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding: 20px 0 28px; }
.tk-account-logo {
    width: 72px; height: 72px; border-radius: 18px; object-fit: cover; background: #ffffff;
    box-shadow: 0 0 0 1px #EAECF0, 0 4px 12px rgba(16,24,40,.08);
}
/* Toda la página en blanco: en la computadora no debe verse como una columna
   en forma de celular sobre fondo gris. */
body.tk-account-page { background: #ffffff; }
.tk-account-head h1 { margin: 0; font-size: 24px; line-height: 32px; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.tk-account-head p { margin: 6px 0 0; font-size: 15px; line-height: 22px; color: #667085; }
.tk-account-body { display: flex; flex-direction: column; gap: 16px; }
.tk-account-form { display: flex; flex-direction: column; gap: 16px; margin: 0; }
.tk-account .tk-field { gap: 6px; }
.tk-account .tk-field label { font-size: 14px; font-weight: 500; color: #344054; }
.tk-account .tk-input {
    height: 48px; border-radius: 12px; border: 1px solid #D0D5DD; box-shadow: 0 1px 2px rgba(16,24,40,.05);
    padding: 0 14px; color: #101828;
}
.tk-account .tk-input::placeholder { color: #98A2B3; }
.tk-account .tk-input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.tk-account .tk-password .tk-input { padding-right: 48px; }
.tk-account .tk-password button { top: 2px; right: 2px; color: #667085; }
.tk-account .tk-btn { height: 48px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.tk-account .tk-input.tk-otp { height: 56px; font-size: 26px; }
.tk-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tk-account .tk-link { font-size: 14px; font-weight: 600; }
.tk-account .tk-divider { font-size: 13px; font-weight: 400; color: #667085; margin: 22px 0; }
.tk-account .tk-divider::before, .tk-account .tk-divider::after { background: #EAECF0; }
.tk-social-outline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tk-social-outline a {
    height: 48px; box-sizing: border-box; border: 1px solid #D0D5DD; border-radius: 12px; background: #ffffff;
    box-shadow: 0 1px 2px rgba(16,24,40,.05); display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 15px; font-weight: 600; color: #344054; text-decoration: none;
}
.tk-social-outline a:hover { background: #F9FAFB; color: #101828; }
/* Redes del login: una fila cada una, a todo lo ancho, con su color. */
.tk-social-stack { display: flex; flex-direction: column; gap: 12px; }
.tk-social-stack a {
    height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 15px; font-weight: 600; color: #ffffff; text-decoration: none;
}
.tk-social-stack a.is-facebook { background: #1877F2; }
.tk-social-stack a.is-facebook:hover { background: #166FE5; color: #ffffff; }
.tk-social-stack a.is-apple { background: #000000; }
.tk-social-stack a.is-apple:hover { background: #1D1D1F; color: #ffffff; }
.tk-account-foot { margin: 24px 0 0; text-align: center; font-size: 14px; color: #667085; }
.tk-account .tk-stores { margin-top: 20px; }
/* Mientras entra o manda el formulario: nada se puede tocar (ver js/busy.js). */
.tk-account.is-busy { cursor: progress; }
.tk-account.is-busy a, .tk-account.is-busy button, .tk-account.is-busy input, .tk-account.is-busy select { pointer-events: none; }
.tk-account.is-busy .tk-social-stack, .tk-account.is-busy .tk-divider, .tk-account.is-busy .tk-account-foot,
.tk-account.is-busy .tk-stores, .tk-account.is-busy .tk-account-back, .tk-account.is-busy .tk-link,
.tk-account.is-busy .tk-field, .tk-account.is-busy .tk-btn-outline { opacity: .45; transition: opacity .15s ease; }
.tk-account-legal { margin: auto 0 0; padding-top: 28px; text-align: center; font-size: 12px; line-height: 18px; color: #98A2B3; }
.tk-account-legal a { color: #667085; }

/* ------------------------------------------------------------------ */
/* Directorio de comercios en lista (antes de entrar) */

body.tk-dir-page { margin: 0; background: #ffffff; }
.tk-dir2 {
    width: 100%; max-width: 640px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; box-sizing: border-box;
    padding: 12px 20px calc(24px + env(safe-area-inset-bottom));
    display: flex; flex-direction: column; color: #101828;
}
.tk-dir2-top { display: flex; align-items: center; justify-content: space-between; height: 48px; }
.tk-dir2-top img { height: 26px; width: auto; display: block; }
.tk-dir2-scan {
    width: 44px; height: 44px; box-sizing: border-box; border: 1px solid #D0D5DD; border-radius: 12px; background: #ffffff;
    box-shadow: 0 1px 2px rgba(16,24,40,.05); color: #344054; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.tk-dir2-scan:hover { background: #F9FAFB; }
.tk-dir2-head { padding: 24px 0 20px; display: flex; flex-direction: column; gap: 6px; }
.tk-dir2-head h1 { margin: 0; font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.tk-dir2-head p { margin: 0; font-size: 15px; line-height: 22px; color: #667085; }
.tk-dir2 .tk-alert { margin-bottom: 16px; }
.tk-search.is-outline input {
    height: 48px; border: 1px solid #D0D5DD; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.05);
    padding: 0 48px 0 44px; color: #101828;
}
.tk-search.is-outline input::placeholder { color: #98A2B3; }
.tk-search.is-outline input:focus { outline: none; border-color: #4A0096; box-shadow: 0 0 0 4px #F4EBFF; }
.tk-search.is-outline svg.tk-search-icon { left: 14px; color: #667085; }
.tk-search.is-outline button { top: 2px; right: 2px; }
.tk-dir2 .tk-dir-count { margin: 20px 0 4px; font-size: 14px; font-weight: 500; color: #667085; }
.tk-dir2-list { list-style: none; margin: 0; padding: 0; }
.tk-dir2-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #F2F4F7; text-decoration: none; color: #101828; }
.tk-dir2-row:hover { color: #101828; }
.tk-dir2-row:hover > svg { color: #344054; }
.tk-dir2-row img, .tk-dir2-skel-logo {
    width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex-shrink: 0;
    background: #F2F4F7; box-shadow: 0 0 0 1px #EAECF0;
}
.tk-dir2-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-dir2-text strong { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-dir2-text small { font-size: 13px; color: #667085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-dir2-row > svg { color: #98A2B3; flex-shrink: 0; }
.tk-dir2-skel { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid #F2F4F7; }
.tk-dir2-skel-logo, .tk-dir2-skel-line { background: linear-gradient(90deg, #F2F4F7 0%, #F9FAFB 50%, #F2F4F7 100%); background-size: 200% 100%; animation: tk-shimmer 1.4s infinite linear; box-shadow: none; }
.tk-dir2-skel-line { display: block; height: 12px; border-radius: 6px; }
.tk-dir2-foot { margin-top: auto; padding-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 16px; font-size: 13px; }
.tk-dir2-foot a { color: #667085; text-decoration: none; }
.tk-dir2-foot a:hover { color: #101828; }

@media (prefers-reduced-motion: reduce) {
    .tk-dir-skeleton, .tk-dir2-skel-logo, .tk-dir2-skel-line { animation: none; }
    .tk-btn, .tk-dir-item a, .tk-offer, .tk-menu { transition: none; }
}
