/* Subastap · Portal web. Misma identidad que la app: noche, oro, DM Serif Display + Poppins. */

/* Fuentes en WOFF2 y solo con los caracteres latinos (de ~160 KB a ~9 KB cada Poppins). Los TTF completos están en la app
   (Subastap/Resources/Fonts). Para regenerarlas: pyftsubset <ttf> --unicodes="U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,
   U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2190-2193,U+2212,U+2215" --layout-features='*' --flavor=woff2 */
@font-face { font-family: "Serif"; src: url("fonts/DMSerifDisplay-Regular.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/Poppins-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
    --bg: #0E0D0B;
    --surface: #171512;
    --surface-2: #1E1B17;
    --surface-3: #26221C;
    --stroke: #2A2621;
    --stroke-strong: #3B362F;
    --text: #F4EFE6;
    --text-2: #B4AB9B;
    --muted: #928A7D; /* Contraste 4.6:1 o más sobre todos los fondos (AA para texto chico). */
    --accent: #D4B06A;
    --accent-text: #E3C384;
    --accent-soft: rgba(212, 176, 106, .12);
    --gold: linear-gradient(135deg, #F4DCA0 0%, #CFA557 55%, #A27532 100%);
    --on-accent: #1C1508;
    --success: #3FC08C;
    --success-soft: rgba(63, 192, 140, .13);
    --danger: #EF6F61;
    --danger-soft: rgba(239, 111, 97, .13);
    --info: #7FA7F0;
    --info-soft: rgba(127, 167, 240, .13);
    --warning: #F0B45A;
    --warning-soft: rgba(240, 180, 90, .13);
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --ease: cubic-bezier(.2, .8, .2, 1);
    --spring: cubic-bezier(.34, 1.56, .64, 1);
}

* { box-sizing: border-box; }
/* Al navegar, Blazor enfoca el título de la página (para lectores de pantalla): sin el recuadro de foco visible. */
h1:focus, [tabindex="-1"]:focus { outline: none; }
html, body { margin: 0; height: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: "Poppins", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-text); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; }
h1 { font-family: "Serif", Georgia, serif; font-size: 34px; letter-spacing: -.01em; }
h2 { font-family: "Serif", Georgia, serif; font-size: 22px; }
h3 { font-size: 15px; font-weight: 600; }
.serif { font-family: "Serif", Georgia, serif; }
.muted { color: var(--muted); }
.secondary { color: var(--text-2); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.overline { font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.money { font-family: "Serif", Georgia, serif; color: var(--accent-text); }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 6px; }
.between { justify-content: space-between; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Superficies ---------- */

.card {
    background: var(--surface); border: 1px solid var(--stroke); border-radius: var(--radius); padding: 20px;
    transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.card.hover:hover { border-color: var(--stroke-strong); transform: translateY(-2px); box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow-x: auto; overflow-y: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid.two { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
@media (max-width: 1100px) { .grid.two { grid-template-columns: 1fr; } }

.stagger > * { animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }

/* ---------- Indicadores ---------- */

.stat { position: relative; overflow: hidden; }
.stat::after {
    content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 176, 106, .14), transparent 70%);
}
.stat .value { font-family: "Serif", Georgia, serif; font-size: 36px; line-height: 1.1; margin-top: 8px; }
.stat .hint { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat .icon-chip { position: absolute; right: 18px; top: 18px; }
.stat.alert .value { color: var(--danger); }
.stat.bump { animation: bump .6s var(--spring); }

.icon-chip { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.icon-chip.success { background: var(--success-soft); color: var(--success); }
.icon-chip.danger { background: var(--danger-soft); color: var(--danger); }
.icon-chip.info { background: var(--info-soft); color: var(--info); }
.icon-chip.warning { background: var(--warning-soft); color: var(--warning); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--surface-3); color: var(--text-2); }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.accent { background: var(--accent-soft); color: var(--accent-text); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.warning { background: var(--warning-soft); color: var(--warning); }

.live { white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface); border: 1px solid var(--stroke); }
.dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.live.on .dot { background: var(--success); }
.live.on .dot::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--success); animation: ring 1.8s ease-out infinite; }
.live.warn .dot { background: var(--warning); animation: blink 1s ease-in-out infinite; }
.live.off .dot { background: var(--danger); }

/* ---------- Actividad en vivo ---------- */

.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--stroke); align-items: flex-start; }
.feed-item:first-child { border-top: 0; }
.feed-item.new { animation: feed-in .6s var(--spring) both, glow 2.4s ease-out both; }
.feed-item .icon-chip { width: 32px; height: 32px; border-radius: 10px; }
.feed-time { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------- Tablas ---------- */

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--stroke); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--stroke); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .2s var(--ease); animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr.clickable { cursor: pointer; }
.table tr.flash td { animation: flash 1.6s ease-out; }
.thumb { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--surface-3); flex: none; }
.thumb.lg { width: 100%; height: 220px; border-radius: 14px; }

/* ---------- Formularios ---------- */

.input, .select, .textarea {
    width: 100%; background: var(--surface-2); border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 14px; outline: none;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(212, 176, 106, .14); background-color: var(--surface-3); }
.textarea { resize: vertical; min-height: 96px; }
.select {
    appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px; color-scheme: dark;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B4AB9B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.select option { background: var(--surface-2); color: var(--text); }
.input.money-input { font-family: "Serif", Georgia, serif; font-size: 18px; }
.search { position: relative; }
.search .input { padding-left: 40px; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
label.field, div.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field-row .small { color: var(--text); }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; color: var(--text-2); }
/* Con texto largo (varias líneas en el celular) el interruptor no se achica ni se corta: queda arriba, alineado a la primera línea. */
.check:has(span.small) { align-items: flex-start; }
.check input { flex: none; appearance: none; width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--stroke-strong); position: relative; cursor: pointer; transition: background .25s var(--ease); }
.check input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text-2); transition: transform .3s var(--spring), background .25s; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { transform: translateX(16px); background: var(--on-accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 12px;
    border: 1px solid transparent; font-weight: 600; cursor: pointer; white-space: nowrap; background: var(--surface-3); color: var(--text);
    transition: transform .15s var(--ease), filter .2s var(--ease), background .2s var(--ease), opacity .2s;
}
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; cursor: default; transform: none; filter: none; }
.btn.primary { background: var(--gold); background-origin: border-box; /* después de "background": si no, el degradado se repite bajo el borde y deja una línea clara abajo */ color: var(--on-accent); box-shadow: 0 8px 22px rgba(207, 165, 87, .22); }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(239, 111, 97, .25); }
.btn.success { background: var(--success-soft); color: var(--success); border-color: rgba(63, 192, 140, .25); }
.btn.ghost { background: transparent; border-color: var(--stroke); color: var(--text-2); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 10px; }
.btn .spinner { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--stroke); border-radius: 14px;
        max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs > * { flex-shrink: 0; white-space: nowrap; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 600; cursor: pointer; transition: background .25s var(--ease), color .25s; }
.tabs button.on { background: var(--gold); color: var(--on-accent); }
.tabs .count { margin-left: 6px; font-size: 11px; opacity: .8; }

/* ---------- Diálogos y avisos ---------- */

.backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(5, 4, 3, .62); backdrop-filter: blur(6px); animation: fade .25s ease both; }
.dialog { width: min(560px, 100%); max-height: 88vh; overflow: auto; background: var(--surface); border: 1px solid var(--stroke-strong); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); animation: dialog-in .4s var(--spring) both; }
.dialog.wide { width: min(980px, 100%); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; gap: 10px; width: 360px; }
.toast { position: relative; overflow: hidden; display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow); animation: toast-in .5s var(--spring) both; }
.toast.out { animation: toast-out .35s var(--ease) both; }
.toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; background: var(--accent); animation: shrink 5s linear both; }
.toast.error::after { background: var(--danger); }
.toast.success::after { background: var(--success); }

.empty { text-align: center; padding: 56px 20px; color: var(--text-2); }
.empty .icon-chip { width: 64px; height: 64px; border-radius: 22px; margin: 0 auto 14px; }

.skeleton { border-radius: 14px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-3) 40%, var(--surface) 80%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; cursor: zoom-in; transition: transform .25s var(--ease); }
.gallery img:hover { transform: scale(1.04); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--gold); color: var(--on-accent); flex: none; }

/* ---------- Inicio de sesión ---------- */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(900px 500px at 20% 10%, rgba(212, 176, 106, .12), transparent 60%), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--stroke); border-radius: 26px; padding: 34px; box-shadow: var(--shadow); animation: dialog-in .6s var(--spring) both; }
.auth-card .brand-tile { width: 62px; height: 62px; border-radius: 19px; animation: logo-in .8s var(--spring) both; }
.error-banner { display: flex; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--danger-soft); color: var(--danger); font-size: 13px; animation: shake .4s ease; }

/* ---------- Animaciones ---------- */

@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.04); border-color: var(--accent); } 100% { transform: scale(1); } }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes ring { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.8); opacity: 0; } }
@keyframes blink { 50% { opacity: .35; } }
@keyframes feed-in { from { opacity: 0; transform: translateX(-18px) scale(.98); } }
@keyframes glow { 0% { background: rgba(212, 176, 106, .16); } 100% { background: transparent; } }
@keyframes flash { 0% { background: rgba(212, 176, 106, .22); } 100% { background: transparent; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.96); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }
@keyframes shrink { from { width: 100%; } to { width: 0; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
@keyframes logo-in { 0% { transform: scale(.6) rotate(-12deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

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

.text-success { color: var(--success); }
.stat .overline { padding-right: 46px; }

/* Títulos de publicaciones: llevan a su ficha. */
.title-link { display: block; color: var(--text); font-weight: 600; transition: color .15s ease; }
h2 .title-link, .small .title-link { display: inline; }
.title-link:hover { color: var(--accent-text); }

/* Interruptor con texto (avisos). */
.switch-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--stroke-strong); border-radius: 14px; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.switch-row:hover { border-color: var(--accent-text); }
.switch-row input { appearance: none; flex: none; width: 38px; height: 22px; border-radius: 11px; background: var(--stroke-strong); position: relative; cursor: pointer; transition: background .2s ease; margin-top: 2px; }
.switch-row input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .25s var(--ease); }
.switch-row input:checked { background: var(--accent); }
.switch-row input:checked::after { transform: translateX(16px); background: var(--on-accent); }
.stat-mini { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ======================================================================
   Portal: estructura
   ====================================================================== */

.center { text-align: center; }
.text-right { text-align: right; }
.gold-text { background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.accent-text { color: var(--accent-text); }
.danger-text { color: var(--danger) !important; }
.btn.lg { padding: 13px 22px; font-size: 15px; border-radius: 14px; }
.btn.round { width: 46px; height: 46px; padding: 0; border-radius: 50%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.link-btn.muted { color: var(--muted); font-weight: 500; }
.link-btn:hover { color: var(--accent-text); }
.fade-in { animation: fade .45s var(--ease) both; }
.spin { animation: spin 1s linear infinite; }
.reveal { animation: rise .35s var(--ease) both; }
.info-banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; }
.badge.floating { position: absolute; left: 12px; top: 12px; backdrop-filter: blur(8px); background-color: rgba(14, 13, 11, .72); }
.badge.floating.success { color: var(--success); }
.badge.floating.danger { color: var(--danger); }
.badge.floating.info { color: var(--info); }
.badge.floating.warning { color: var(--warning); }
.badge.floating.accent { color: var(--accent-text); }
.cat-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cat, var(--accent)); flex: none; display: inline-block; }

.topbar { position: sticky; top: 0; z-index: 40; background: rgba(14, 13, 11, .82); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--stroke); }
.topbar-inner { max-width: 1320px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand-tile { width: 38px; height: 38px; border-radius: 12px; background: var(--gold); display: grid; place-items: center; color: var(--on-accent); box-shadow: 0 8px 24px rgba(207, 165, 87, .25); transition: transform .4s var(--spring); }
.brand:hover .brand-tile { transform: rotate(-12deg) scale(1.06); }
.brand-tile.sm { width: 26px; height: 26px; border-radius: 8px; box-shadow: none; }
.brand-name { font-family: "Serif", Georgia, serif; font-size: 24px; line-height: 1; }
.top-nav { display: flex; gap: 4px; }
.top-nav a { padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 500; transition: background .2s var(--ease), color .2s; white-space: nowrap; }
.top-nav a:hover { color: var(--text); background: var(--surface-2); }
.top-nav a.active { color: var(--accent-text); background: var(--accent-soft); }
.top-search { flex: 1; max-width: 420px; margin-left: auto; }
.top-search .input { border-radius: 999px; background: var(--surface); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); background: transparent; border: 1px solid var(--stroke); cursor: pointer; transition: color .2s, background .2s, transform .15s var(--ease); }
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.on { color: var(--danger); border-color: rgba(239, 111, 97, .35); background: var(--danger-soft); }
.icon-btn.on svg { animation: heart .5s var(--spring); }
.dot-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: white; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; animation: pop .45s var(--spring); }
.avatar-btn { background: none; border: 0; padding: 0; cursor: pointer; border-radius: 50%; transition: transform .15s var(--ease); }
.avatar-btn:active { transform: scale(.94); }
.menu-wrap { position: relative; }
.menu-backdrop { position: fixed; inset: 0; z-index: 41; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 42; width: 260px; padding: 8px; background: var(--surface); border: 1px solid var(--stroke-strong); border-radius: 18px; box-shadow: var(--shadow); animation: dialog-in .3s var(--spring) both; transform-origin: top right; }
.menu-head { display: flex; flex-direction: column; padding: 10px 12px 12px; border-bottom: 1px solid var(--stroke); margin-bottom: 6px; }
.menu a, .menu button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--text-2); background: none; border: 0; cursor: pointer; font-weight: 500; text-align: left; }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--text); }
.menu form { margin: 6px 0 0; border-top: 1px solid var(--stroke); padding-top: 6px; }

.main { min-height: calc(100vh - 140px); padding: 30px 28px 70px; }
.page { animation: page-in .45s var(--ease) both; max-width: 1264px; margin: 0 auto; }
.narrow-page { max-width: 900px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin: 6px 0 0; color: var(--text-2); }
.footer { max-width: 1264px; margin: 0 auto; padding: 24px 28px 40px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--stroke); color: var(--text-2); }

.tabbar { display: none; }

#blazor-error-ui { display: none; position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70; padding: 12px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow); font-size: 13px; }
#blazor-error-ui .reload { margin-left: 10px; font-weight: 600; }

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

.hero { position: relative; overflow: hidden; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 56px 48px; border-radius: 30px; margin-bottom: 40px;
        background: radial-gradient(800px 380px at 85% 0%, rgba(212, 176, 106, .20), transparent 60%), linear-gradient(135deg, #1A1713 0%, #100F0C 100%); border: 1px solid var(--stroke); }
.hero-glow { position: absolute; width: 420px; height: 420px; right: -120px; bottom: -220px; border-radius: 50%; background: radial-gradient(circle, rgba(212, 176, 106, .18), transparent 65%); animation: float 9s ease-in-out infinite; pointer-events: none; }
.hero-copy { position: relative; max-width: 640px; }
.display { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.04; margin-top: 12px; }
.lead { font-size: 16px; max-width: 520px; margin: 14px 0 0; }
.live-pill { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 18px; background: rgba(23, 21, 18, .7); border: 1px solid var(--stroke-strong); backdrop-filter: blur(8px); animation: rise .6s .2s var(--ease) both; }
.live-pill b { font-size: 30px; font-weight: 400; color: var(--accent-text); line-height: 1; }
.live-pill .live { border: 0; background: none; padding: 0; }
.section { margin-bottom: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.section-head h2 { font-size: 28px; }

.featured { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.featured-card { position: relative; display: block; aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden; color: var(--text); animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); border: 1px solid var(--stroke); }
.featured-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.featured-card:hover img { transform: scale(1.06); }
.featured-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(8, 7, 6, .92) 100%); }
.featured-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.featured-info .overline { color: var(--accent-text); }
.featured-info .title { font-size: 24px; line-height: 1.15; }
.featured-info .price { font-family: "Serif", Georgia, serif; font-size: 24px; color: var(--accent-text); animation: price-in .6s var(--spring); }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.category { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--stroke); color: var(--text); animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms);
            transition: transform .25s var(--ease), border-color .25s, background .25s; position: relative; overflow: hidden; }
.category::before { content: ""; position: absolute; right: -30px; bottom: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--cat); opacity: .14; transition: transform .4s var(--ease); }
.category:hover { transform: translateY(-3px); border-color: var(--stroke-strong); }
.category:hover::before { transform: scale(1.5); }
.category .cat-dot { width: 10px; height: 10px; margin-bottom: 6px; }

/* ---------- Tarjetas de subasta ---------- */

.auction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 18px; }
.auction-card { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--stroke); color: var(--text);
                animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.auction-card:hover { transform: translateY(-4px); border-color: var(--stroke-strong); box-shadow: var(--shadow); }
.auction-card .cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-3); }
.auction-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.auction-card:hover .cover img { transform: scale(1.05); }
.auction-card .watched { position: absolute; right: 12px; top: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(14, 13, 11, .72); color: var(--danger); }
.auction-card .body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; min-height: 150px; }
.auction-card .title { font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.auction-card .price { font-family: "Serif", Georgia, serif; font-size: 22px; color: var(--accent-text); line-height: 1.1; animation: price-in .6s var(--spring); }
.auction-card .time { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.urgent { color: var(--danger); font-weight: 600; }
.auction-card.static { pointer-events: none; animation: none; }
.cover-empty { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted); }

/* ---------- Explorar ---------- */

.filters { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 14px; flex-wrap: wrap; }
.filters .search .input { border-radius: 14px; padding-top: 12px; padding-bottom: 12px; }
.sort { display: flex; flex-direction: column; gap: 4px; min-width: 190px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.field .chips { margin: 4px 0 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--stroke); background: var(--surface); color: var(--text-2); font-weight: 500; cursor: pointer; transition: all .2s var(--ease); }
.chip:hover { border-color: var(--stroke-strong); color: var(--text); }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--accent-soft); border-color: rgba(212, 176, 106, .45); color: var(--accent-text); }
.center-chips { justify-content: center; margin: 0; }

/* ---------- Detalle de subasta ---------- */

.detail { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 28px; align-items: start; }
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 26px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--stroke); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.nav-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: var(--text); background: rgba(14, 13, 11, .66); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s, transform .2s var(--ease); }
.gallery-main:hover .nav-arrow { opacity: 1; }
.nav-arrow:active { transform: translateY(-50%) scale(.9); }
.nav-arrow.left { left: 14px; }
.nav-arrow.right { right: 14px; }
.counter { position: absolute; right: 14px; bottom: 14px; padding: 4px 10px; border-radius: 999px; font-size: 12px; background: rgba(14, 13, 11, .7); }
.thumbs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.thumbs button { flex: none; width: 76px; height: 76px; padding: 0; border-radius: 14px; overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: .6; transition: opacity .2s, border-color .2s, transform .2s var(--ease); background: none; }
.thumbs button.on { border-color: var(--accent); opacity: 1; }
.thumbs button:hover { opacity: 1; transform: translateY(-2px); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.description { white-space: pre-line; margin: 10px 0 6px; }
.description.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.grid.two-even { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card-title { margin-bottom: 12px; }
.bids { display: flex; flex-direction: column; padding: 8px 0; }
.bid-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; transition: background .3s; }
.bid-row.top .money { font-size: 19px; }
.bid-row.new { animation: feed-in .6s var(--spring) both, glow 2.4s ease-out both; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.plain { background: var(--surface-3); color: var(--text-2); }
.avatar.xl { width: 84px; height: 84px; font-size: 28px; }

.detail-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 12px; }
.side-card { display: flex; flex-direction: column; gap: 16px; padding: 22px; border-radius: 26px; background: var(--surface); border: 1px solid var(--stroke); transition: border-color .4s, box-shadow .4s; }
.side-card.bump { animation: bump .6s var(--spring); }
.side-card.win { border-color: rgba(63, 192, 140, .5); box-shadow: 0 0 0 4px rgba(63, 192, 140, .12), var(--shadow); animation: bump .7s var(--spring); }
.side-card.outbid { border-color: rgba(239, 111, 97, .5); box-shadow: 0 0 0 4px rgba(239, 111, 97, .12); animation: shake .45s ease; }
.detail-title { font-size: 32px; line-height: 1.12; }
.seller { display: flex; align-items: center; gap: 10px; }
.small-live { padding: 4px 10px; font-size: 11.5px; }
.state-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--surface-2); color: var(--text-2); }
.state-banner p { margin: 2px 0 0; font-size: 13px; }
.state-banner b { color: var(--text); }
.state-banner.accent { background: var(--accent-soft); color: var(--accent-text); }
.state-banner.success { background: var(--success-soft); color: var(--success); }
.state-banner.danger { background: var(--danger-soft); color: var(--danger); }
.countdown-block { display: flex; flex-direction: column; gap: 8px; }
.countdown { display: flex; gap: 8px; }
.countdown div { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 10px 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--stroke); }
.countdown b { font-family: "Serif", Georgia, serif; font-weight: 400; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown b.tick { animation: tick .45s var(--ease); }
.countdown span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-top: 4px; }
.countdown.urgent div { border-color: rgba(239, 111, 97, .4); }
.countdown.urgent b { color: var(--danger); }
.price-block { display: flex; flex-direction: column; }
.big-price { font-family: "Serif", Georgia, serif; font-size: 46px; line-height: 1.05; color: var(--accent-text); animation: price-in .6s var(--spring); }
.leading { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 13px; }
.leading.yes { background: var(--success-soft); color: var(--success); }
.leading.no { background: var(--danger-soft); color: var(--danger); animation: shake .45s ease; }
.bid-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--stroke); flex-wrap: wrap; }
.bid-cta > div { display: flex; flex-direction: column; }
.bid-cta b { font-size: 22px; font-weight: 400; }
.report-link { align-self: center; font-size: 12.5px; }

.bid-sheet { display: flex; flex-direction: column; gap: 16px; }
.stepper { display: flex; align-items: center; gap: 12px; }
.amount-input { flex: 1; min-width: 0; text-align: center; font-size: 40px; color: var(--accent-text); background: transparent; border: 0; border-bottom: 1px solid var(--stroke-strong); padding: 6px 0; outline: none; }
.amount-input:focus { border-color: var(--accent); }

/* ---------- Publicar ---------- */

.progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: -8px 0 24px; }
.progress div { height: 100%; border-radius: 999px; background: var(--gold); transition: width .6s var(--spring); }
.publish { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; align-items: start; }
.step-body { animation: rise .45s var(--ease) both; }
.publish-preview { position: sticky; top: 92px; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 42px 20px; border: 2px dashed var(--stroke-strong); border-radius: 22px; text-align: center; cursor: pointer; transition: border-color .25s, background .25s; }
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.disabled { opacity: .5; cursor: default; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .icon-chip { width: 58px; height: 58px; border-radius: 18px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.photo { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; animation: pop .4s var(--spring) both; animation-delay: calc(var(--i, 0) * 40ms); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-actions { position: absolute; right: 8px; top: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity .2s; }
.photo:hover .photo-actions { opacity: 1; }
.photo-actions button { width: 30px; height: 30px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; color: var(--text); background: rgba(14, 13, 11, .75); }
.config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 4px; }
.config { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--stroke); background: var(--surface); cursor: pointer; transition: all .2s var(--ease); }
.config:hover { border-color: var(--stroke-strong); }
.config.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(212, 176, 106, .12); }
.config b { color: var(--text); }
.wizard-actions { margin-top: 10px; padding-top: 18px; border-top: 1px solid var(--stroke); }

/* ---------- Avisos ---------- */

.notifications { display: flex; flex-direction: column; }
.notification { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 16px 20px; text-align: left; background: none; border: 0; border-top: 1px solid var(--stroke); cursor: pointer; color: var(--text); transition: background .2s;
                animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); position: relative; }
.notification:first-child { border-top: 0; }
.notification:hover { background: var(--surface-2); }
.notification.unread { background: linear-gradient(90deg, rgba(212, 176, 106, .08), transparent 60%); }
.notification.unread::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); }
.notification.new { animation: feed-in .6s var(--spring) both, glow 2.4s ease-out both; }

/* ---------- Perfil, compras y verificación ---------- */

.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-row a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--stroke); color: var(--text-2);
              animation: rise .5s var(--ease) both; animation-delay: calc(var(--i, 0) * 50ms); transition: transform .2s var(--ease), border-color .2s; }
.stat-row a:hover { transform: translateY(-3px); border-color: var(--stroke-strong); }
.stat-row b { font-family: "Serif", Georgia, serif; font-weight: 400; font-size: 30px; color: var(--text); }
.menu-list a { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border-top: 1px solid var(--stroke); color: var(--text); transition: background .2s; }
.menu-list a:first-child { border-top: 0; }
.menu-list a:hover { background: var(--surface-2); }
.order .title-link, .offer .title-link { margin-top: 4px; }
.order-contact { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.lg-thumb { width: 72px; height: 72px; border-radius: 16px; }
.money.big { font-size: 22px; }
.offer { border-color: rgba(212, 176, 106, .35); background: linear-gradient(135deg, rgba(212, 176, 106, .08), var(--surface) 60%); display: flex; flex-direction: column; gap: 10px; }
.offer p { margin: 0; }
.verify-status.ready { border-color: rgba(63, 192, 140, .35); }
.steps-done { display: flex; align-items: baseline; gap: 2px; }
.steps-done b { font-size: 34px; font-weight: 400; }
.verify-step { transition: border-color .3s; }
.verify-step.done { border-color: rgba(63, 192, 140, .3); }
.step-form { margin-top: 14px; flex-wrap: wrap; }
.step-form .input { flex: 1; min-width: 180px; }
.code-input { letter-spacing: .4em; font-size: 18px; }
.test-card { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; transition: border-color .2s, transform .15s var(--ease); }
.test-card:hover { border-color: var(--accent); }
.test-card:active { transform: scale(.98); }
.card.subtle { background: transparent; }

/* ---------- Ingreso ---------- */

.auth { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; }
.auth-brand .brand-tile { width: 44px; height: 44px; border-radius: 14px; }

/* ---------- Animaciones del portal ---------- */

@keyframes price-in { 0% { transform: scale(.85); opacity: .3; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes tick { from { transform: translateY(-6px); opacity: .2; } }
@keyframes heart { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes float { 50% { transform: translate(-30px, -24px); } }

/* ---------- Tableta y teléfono ---------- */

@media (max-width: 1100px) {
    .top-nav { display: none; }
}
@media (max-width: 960px) {
    .detail { grid-template-columns: 1fr; }
    .detail-side { position: static; }
    /* En el teléfono la caja de puja (título, cuenta regresiva, precio y botón) va justo debajo de las fotos. */
    .detail { gap: 18px; }
    .detail-main { display: contents; }
    .detail-main > * { order: 2; min-width: 0; }
    .detail-main > .gallery-main, .detail-main > .thumbs { order: 0; }
    /* Remate en cámara: el video va primero y las fotos debajo de la caja de puja. */
    .detail-main > .live-player { order: -1; }
    .detail-main:has(> .live-player) > .gallery-main, .detail-main:has(> .live-player) > .thumbs { order: 2; }
    .detail-side { order: 1; }
    .publish { grid-template-columns: 1fr; }
    .publish-preview { display: none; }
}
@media (max-width: 860px) {
    .topbar-inner { padding: 10px 16px; gap: 12px; }
    .top-search, .publish-btn, .menu-wrap { display: none; }
    .top-actions { margin-left: auto; }
    .main { padding: 18px 16px 110px; }
    .footer { padding: 20px 16px 110px; flex-direction: column; }
    .hero { padding: 34px 22px; border-radius: 24px; }
    .section-head h2 { font-size: 23px; }
    .auction-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .auction-card .body { padding: 12px; min-height: 130px; }
    .auction-card .price { font-size: 18px; }
    .auction-card .body > .row.between { flex-wrap: wrap; gap: 4px 8px; }
    .auction-card .time { white-space: nowrap; }
    .featured { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
    .featured-card { scroll-snap-align: start; }
    .stat-row { grid-template-columns: repeat(2, 1fr); }
    .detail-title { font-size: 26px; }
    .big-price { font-size: 38px; }
    .countdown b { font-size: 24px; }
    .nav-arrow, .photo-actions { opacity: 1; }
    .toasts { left: 16px; right: 16px; bottom: 92px; width: auto; }
    .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
              padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(14, 13, 11, .9); backdrop-filter: blur(14px); border-top: 1px solid var(--stroke); }
    .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 500; color: var(--muted); transition: color .2s; }
    .tabbar a.active { color: var(--accent-text); }
    .tabbar a.active svg { animation: pop .4s var(--spring); }
    .tab-icon { position: relative; }
    .tab-dot { position: absolute; top: -2px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); border: 2px solid var(--bg); }
    .tabbar .tab-publish { justify-self: center; width: 52px; height: 52px; border-radius: 18px; display: grid; place-items: center; background: var(--gold); color: var(--on-accent); box-shadow: 0 8px 22px rgba(207, 165, 87, .35); margin-top: -18px; }
    .tabbar .tab-publish:active { transform: scale(.92); }
}
@media (max-width: 420px) {
    .display { font-size: 36px; }
}

/* ---------- Rematadores y consignaciones ---------- */

.verified-mark { color: var(--info); vertical-align: -3px; filter: drop-shadow(0 0 6px rgba(127, 167, 240, .35)); }
.card-auctioneer { display: flex; align-items: center; gap: 4px; }
.auctioneer-photo { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--surface-3); border: 2px solid var(--accent); flex: none; }
.auctioneer-photo.sm { width: 40px; height: 40px; border-width: 1.5px; }
.auctioneer-line { padding: 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--stroke); }
.auctioneer-line.clickable { cursor: pointer; transition: border-color .15s ease, background .15s ease; }
.auctioneer-line.clickable:hover, .auctioneer-line.clickable:focus-visible { border-color: var(--accent); outline: none; }
.house-line { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--text-2); font-weight: 600; }
.house-line:hover { color: var(--accent); }
.house-logo { width: 84px; height: 84px; border-radius: 20px; object-fit: cover; background: var(--surface-2); border: 1px solid var(--stroke); display: grid; place-items: center; }
.auctioneer-card { display: flex; align-items: center; gap: 14px; }
.auctioneer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 6px; }
.auctioneer-option { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--stroke); background: var(--surface);
                     text-align: left; cursor: pointer; color: var(--text); transition: all .2s var(--ease); }
.auctioneer-option:hover { border-color: var(--stroke-strong); }
.auctioneer-option.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px rgba(212, 176, 106, .12); }
.auctioneer-option .grow { display: flex; flex-direction: column; min-width: 0; }

.threads { display: flex; flex-direction: column; }
.thread { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--stroke); color: var(--text); transition: background .2s;
          animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms); }
.thread:first-child { border-top: 0; }
.thread:hover { background: var(--surface-2); }
.thread.unread { background: linear-gradient(90deg, rgba(127, 167, 240, .08), transparent 60%); }
.dot-count.static { position: static; }

.consignment { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 22px; align-items: start; margin-top: 16px; }
.consign-title { font-size: 26px; line-height: 1.15; margin: 4px 0 8px; }
.proposal { border-color: rgba(212, 176, 106, .45); background: linear-gradient(135deg, rgba(212, 176, 106, .07), var(--surface) 55%); }
.proposal h2 { font-size: 22px; }
.net { padding: 10px 14px; border-radius: 12px; background: var(--success-soft); color: var(--success); font-weight: 600; font-size: 13.5px; }

.chat-card { display: flex; flex-direction: column; position: sticky; top: 92px; max-height: calc(100vh - 120px); }
.chat { flex: 1; min-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 10px; }
.msg { max-width: 82%; align-self: flex-start; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface-3); animation: rise .35s var(--ease) both; }
.msg.mine { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: var(--accent-soft); border: 1px solid rgba(212, 176, 106, .25); }
.msg.proposal { border: 1px solid rgba(127, 167, 240, .35); background: var(--info-soft); }
.msg.system { align-self: center; max-width: 92%; background: transparent; border: 1px dashed var(--stroke-strong); border-radius: 12px; font-size: 12.5px; color: var(--text-2); text-align: center; }
.msg-tag { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--info); margin-bottom: 4px; display: flex; gap: 5px; align-items: center; }
.msg-body { white-space: pre-line; font-size: 14px; }
.msg-meta { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.msg-hidden { display: flex; gap: 6px; align-items: center; font-style: italic; color: var(--muted); font-size: 13px; }
.msg-report { background: none; border: 0; padding: 0 0 0 6px; color: var(--muted); cursor: pointer; vertical-align: middle; opacity: .7; }
.msg-report:hover, .msg-report:focus-visible { color: var(--danger); opacity: 1; }
.report-quote { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--stroke-strong); background: var(--surface-2); border-radius: 0 10px 10px 0; white-space: pre-line; font-size: 13.5px; color: var(--text-2); max-height: 160px; overflow-y: auto; }
.chat-input { display: flex; gap: 10px; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--stroke); }
.chat-input .textarea { min-height: 52px; }

@media (max-width: 960px) {
    .consignment { grid-template-columns: 1fr; }
    .chat-card { position: static; max-height: none; }
}

/* Aceptación de términos en el registro */
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: var(--text-2); cursor: pointer; }
.check-row input[type=checkbox] { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); flex: none; }
.check-row a { color: var(--accent-text, var(--accent)); text-decoration: underline; }
.footer a { color: inherit; text-decoration: underline; }

/* ---------- Reconexión con el servidor (App.razor + reconnect.js) ---------- */
#components-reconnect-modal { border: 0; padding: 0; background: transparent; color: var(--text); max-width: calc(100vw - 32px); margin: 16vh auto 0; overflow: visible; }
#components-reconnect-modal::backdrop { background: rgba(5, 4, 3, .55); backdrop-filter: blur(5px); }
#components-reconnect-modal[open] { animation: dialog-in .45s var(--spring) both; }
.reconnect-card { width: 340px; max-width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
                  padding: 26px 24px 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--stroke-strong); box-shadow: var(--shadow); }
.reconnect-card b { font-size: 16px; }
.reconnect-card p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.reconnect-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.reconnect-alert { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--danger-soft); color: var(--danger); }
.reconnect-card .btn { margin-top: 6px; min-width: 150px; }
/* Cada parte se ve solo en su estado (Blazor pone la clase en el diálogo). */
#components-reconnect-modal [data-state] { display: none; }
#components-reconnect-modal.components-reconnect-show [data-state~=show],
#components-reconnect-modal.components-reconnect-retrying [data-state~=retrying],
#components-reconnect-modal.components-reconnect-failed [data-state~=failed],
#components-reconnect-modal.components-reconnect-paused [data-state~=paused],
#components-reconnect-modal.components-reconnect-resume-failed [data-state~=expired] { display: block; }
#components-reconnect-modal.components-reconnect-failed .btn[data-state~=failed],
#components-reconnect-modal.components-reconnect-paused .btn[data-state~=paused],
#components-reconnect-modal.components-reconnect-resume-failed .btn[data-state~=expired] { display: inline-flex; }
#components-reconnect-modal.components-reconnect-failed .reconnect-alert[data-state~=failed],
#components-reconnect-modal.components-reconnect-resume-failed .reconnect-alert[data-state~=expired] { display: grid; }
/* Mientras reintenta, Blazor deja también la clase "show": se oculta el texto del primer intento. */
#components-reconnect-modal.components-reconnect-retrying [data-state=show] { display: none; }

/* ---------- Desplegable propio (Dropdown.razor) ---------- */
.dropdown { position: relative; min-width: 0; }
.dropdown-toggle {
    width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 14px; color: var(--text); font: inherit;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease);
}
.dropdown-toggle:hover { border-color: var(--stroke-strong); }
.dropdown-toggle:focus-visible, .dropdown.open .dropdown-toggle { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); background-color: var(--surface-3); }
.dropdown-toggle:disabled { opacity: .5; cursor: default; }
.dropdown-chevron { flex: none; color: var(--text-2); transition: transform .2s var(--ease); }
.dropdown.open .dropdown-chevron { transform: rotate(180deg); }
.dropdown-backdrop { position: fixed; inset: 0; z-index: 40; }
.dropdown-list {
    position: absolute; z-index: 41; top: calc(100% + 6px); left: 0; right: 0; margin: 0; padding: 6px; list-style: none;
    max-height: 280px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--surface-2); border: 1px solid var(--stroke-strong); border-radius: 14px; box-shadow: var(--shadow);
    animation: dropdown-in .16s var(--ease) both; transform-origin: top;
    scrollbar-width: thin; scrollbar-color: var(--stroke-strong) transparent;
}
.dropdown-list::-webkit-scrollbar { width: 8px; }
.dropdown-list::-webkit-scrollbar-thumb { background: var(--stroke-strong); border-radius: 8px; border: 2px solid var(--surface-2); }
.dropdown-list li {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 9px;
    cursor: pointer; color: var(--text-2); font-size: 13.5px;
}
.dropdown-list li.active { background: var(--surface-3); color: var(--text); }
.dropdown-list li.selected { color: var(--accent-text); font-weight: 600; }
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-4px) scaleY(.97); } to { opacity: 1; transform: none; } }

/* ---------- Compartir ---------- */
.share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.share-btn {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 8px; border-radius: 14px; cursor: pointer;
    background: var(--surface-2); border: 1px solid var(--stroke); color: var(--text); font: inherit; font-size: 12.5px; font-weight: 600;
    transition: transform .15s var(--ease), border-color .2s var(--ease);
}
.share-btn:hover { border-color: var(--accent); transform: translateY(-2px); color: var(--text); }
.share-btn .icon-chip b { font-size: 15px; }
.icon-chip.whatsapp { background: rgba(37, 211, 102, .14); color: #3DDC84; }
.icon-chip.facebook { background: rgba(24, 119, 242, .16); color: #5B9BF5; }
.icon-chip.x { background: rgba(255, 255, 255, .08); color: var(--text); }
.share-link { margin-top: 14px; font-size: 12.5px; color: var(--text-2); }
/* Foto de perfil en lugar de las iniciales */
img.avatar { object-fit: cover; padding: 0; background: var(--surface-3); }
.photo-edit { display: flex; align-items: center; gap: 16px; }
.photo-edit .avatar { width: 72px; height: 72px; font-size: 22px; }
.photo-pick { position: relative; overflow: hidden; }
.photo-pick input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--stroke); }

/* Calificar al vendedor */
.stars-pick { display: flex; gap: 6px; justify-content: center; }
.stars-pick button { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--stroke-strong); transition: transform .15s var(--ease), color .15s; }
.stars-pick button.on { color: var(--accent); }
.stars-pick button:hover { transform: scale(1.12); }
.accent-text { color: var(--accent-text); }

/* Mientras Blazor arranca no hay animaciones de entrada (las saca reconnect.js): evita el parpadeo al recargar. */
html.booting *, html.booting *::before, html.booting *::after { animation: none !important; }

/* Remate en cámara (prueba de concepto) */
.badge.oncam { background: #e5484d; color: #fff; }
.badge.oncam .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: oncam-blink 1.4s ease-in-out infinite; }
.badge.oncam.pending { background: #6b6b75; }
.badge.oncam.pending .dot { animation: none; opacity: .7; }
@keyframes oncam-blink { 50% { opacity: .35; } }
.live-player { position: relative; aspect-ratio: 16 / 9; border-radius: 26px; overflow: hidden; background: #0b0b0f; }
.live-player video { width: 100%; height: 100%; object-fit: cover; display: block; }
.live-player .live-wait { position: absolute; inset: 0; display: grid; place-items: center; color: #d6d6de; font-size: 14px; text-align: center; padding: 20px; }
.live-player.playing .live-wait { display: none; }
.live-player .live-wait .live-soon { font-size: 22px; font-weight: 700; color: #fff; }
.live-player .live-wait .countdown { color: #fff; }
.live-soon-text { font-size: 20px; font-weight: 700; }
.live-player .live-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.live-player .live-clock { background: rgba(0,0,0,.55); color: #fff; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.live-player .live-unmute { position: absolute; right: 14px; bottom: 14px; background: rgba(0,0,0,.55); color: #fff; border: 0; padding: 7px 12px; border-radius: 999px; font: inherit; font-size: 13px; cursor: pointer; display: none; gap: 6px; align-items: center; }
.live-player.playing .live-unmute { display: inline-flex; }
.live-player .live-bid { position: absolute; left: 14px; bottom: 14px; background: rgba(0,0,0,.6); color: #fff; padding: 8px 14px; border-radius: 14px; display: flex; flex-direction: column; }
.live-player .live-bid b { font-size: 24px; line-height: 1.1; }
.live-player .live-bid.new { animation: oncam-bump .6s ease-out; }
@keyframes oncam-bump { 0% { transform: scale(1); background: #e5484d; } 40% { transform: scale(1.08); } 100% { transform: scale(1); } }
