/* ---------- Iniciar sesión ---------- */

.login { display: grid; place-items: center; padding: 36px 0 20px; }
.login-card { position: relative; width: 100%; max-width: 470px; padding: 34px 30px 26px; text-align: center; overflow: hidden; }
.login-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 220px at 50% -40px, rgba(0, 215, 194, 0.16), transparent 70%);
  pointer-events: none;
}
.login-card > * { position: relative; }
.login-logo { margin: 0 auto 16px; filter: drop-shadow(0 0 18px rgba(0, 215, 194, 0.55)); }
.login-card h1 { margin: 0 0 8px; font-size: 30px; }
.login-sub { margin: 0 auto 26px; max-width: 360px; }
.btn-lg { width: 100%; padding: 14px 18px; font-size: 15px; }
.hint { margin: 10px 0 0; font-size: 13px; color: var(--dim-fg); }
.hint a { color: var(--brand-light); text-decoration: underline; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--dim-fg); font-size: 12.5px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border-strong); }
.login-form { display: flex; gap: 8px; }
.login-form input { flex: 1; min-width: 0; }
.login-form select { width: 86px; }
.login-step { margin-bottom: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--border); text-align: left; }
.login-step .hint { text-align: left; }
.step-title { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; font-weight: 700; text-align: left; }
.step-num { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); font-size: 12px; font-weight: 800; }
/* Inicio de sesión en la PC: buscando el cliente de LoL */
.login-detect { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: rgba(255, 255, 255, 0.03); text-align: left; }
.login-detect b { display: block; font-size: 15.5px; }
.login-detect p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.45; }
.detect-icon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 215, 194, 0.1); color: var(--brand); }
.login-detect.waiting .detect-icon { animation: detect-pulse 1.8s ease-out infinite; }
@keyframes detect-pulse { 0% { box-shadow: 0 0 0 0 rgba(0, 215, 194, 0.45); } 100% { box-shadow: 0 0 0 14px rgba(0, 215, 194, 0); } }
@media (prefers-reduced-motion: reduce) { .login-detect.waiting .detect-icon { animation: none; } }
#detect { width: 100%; margin-top: 14px; }
.login-options.is-disabled { opacity: 0.4; }
.login-hint { margin: 0 0 12px; }
.login-card .status { margin-top: 16px; }
.login-card .status:empty { display: none; }
.login-foot { margin: 22px 0 0; font-size: 12px; color: var(--dim-fg); }

.session { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.session-icon { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--brand-line); box-shadow: 0 0 18px rgba(0, 215, 194, 0.2); }
.session-name { font-weight: 800; font-size: 17px; }
.session-name span { color: var(--dim-fg); font-weight: 500; }

/* ---------- Ajustes ---------- */

.settings-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
.settings-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.settings-col:empty { display: none; }
/* ---------- Amigos ---------- */
.friends-search { width: min(280px, 100%); padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--fg); font: 14px var(--font); }
.friends-search::placeholder { color: var(--dim-fg); }
.friends-search:focus { outline: none; border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.friends-groups { display: flex; flex-wrap: wrap; gap: 8px; margin: -6px 0 18px; }
.friends-groups:empty { display: none; }
.friends-group { padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: var(--muted-fg); font: 600 13px var(--font); cursor: pointer; transition: border-color 0.15s, color 0.15s; }
.friends-group span { margin-left: 6px; color: var(--dim-fg); font-weight: 500; font-variant-numeric: tabular-nums; }
.friends-group:hover { color: var(--fg); }
.friends-group.on { border-color: var(--brand-line); background: var(--brand-soft); color: var(--fg); }
.friends-group:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.friends-block + .friends-block { border-top: 1px solid var(--border); }
.friends-count { margin-left: 4px; color: var(--dim-fg); font-variant-numeric: tabular-nums; }
.friends-rows { display: flex; flex-direction: column; gap: 1px; padding: 8px 6px 8px; }
.friends-off > summary { list-style: none; cursor: pointer; padding-bottom: 14px; }
.friends-off > summary::-webkit-details-marker { display: none; }
.friends-off[open] > summary { padding-bottom: 0; }
.friends-off > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: var(--radius); }
.friends-more { color: var(--muted-fg); font-size: 12px; letter-spacing: normal; text-transform: none; font-weight: 600; }
.friends-off > summary:hover .friends-more { color: var(--brand-light); }
.friends-none { margin: 8px 0 18px; }

.friend { --tone: var(--dim-fg); display: flex; align-items: center; gap: 11px; min-width: 0; padding: 8px 10px; border-radius: 8px; color: inherit; transition: background 0.12s; }
.friend:hover { background: rgba(255, 255, 255, 0.045); }
.friend:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.friend-avatar { position: relative; flex: none; width: 40px; height: 40px; }
.friend-icon { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--muted); }
.friend-icon-empty { display: grid; place-items: center; color: var(--dim-fg); }
.friend-icon-empty svg { width: 24px; height: 24px; }
.friend-dot { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border: 2.5px solid var(--card); border-radius: 50%; background: var(--tone); }
.friend-main { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.3; }
.friend-name, .friend-msg { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.friend-name { font-size: 14px; font-weight: 700; }
.friend-tag { margin-left: 1px; color: var(--dim-fg); font-weight: 500; }
.friend-status { color: var(--tone); font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.friend-msg { color: var(--dim-fg); font-size: 12px; font-style: italic; }
.friend-rank { display: flex; flex: none; align-items: center; gap: 5px; color: var(--muted-fg); font-size: 12px; font-weight: 600; }
.friend-crest { width: 20px; height: 20px; }
.friend.t-game { --tone: var(--brand); }
.friend.t-game .friend-icon { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--brand-line); }
.friend.t-select { --tone: #f2c53d; }
.friend.t-online { --tone: #3ccf87; }
.friend.t-away { --tone: #ff8a5c; }
.friend.t-mobile { --tone: #8b93a1; }
.friend.t-off .friend-status { font-weight: 500; }
.friend.t-off .friend-icon { filter: grayscale(0.85); opacity: 0.6; }
.friend.t-off .friend-name { color: var(--muted-fg); }
/* Contador de instalaciones (solo el dueño) */
.installs-total { display: flex; align-items: baseline; gap: 10px; margin: 2px 0 14px; }
.installs-total b { font-size: 44px; font-weight: 800; line-height: 1; color: var(--brand); font-variant-numeric: tabular-nums; }
.installs-total span { color: var(--muted-fg); font-size: 14.5px; }
.installs-more { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.installs-more div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: rgba(255, 255, 255, 0.02); }
.installs-more b { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.installs-more span { display: block; margin-top: 2px; font-size: 13px; color: var(--muted-fg); line-height: 1.35; }
.installs-card[aria-busy] b { color: var(--dim-fg); }
.note.note-err { color: var(--loss); }
.stack-form { display: flex; flex-direction: column; gap: 12px; }
.stack-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted-fg); }
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.status { margin: 0; min-height: 1.4em; font-size: 14px; }
.status.ok { color: var(--brand-light); }
.status.err { color: #ff8a92; }
.steps { margin: 18px 0 0; padding-left: 20px; line-height: 1.85; color: var(--muted-fg); }
.steps a { color: var(--brand-light); text-decoration: underline; }
.steps b { color: var(--fg); }
.note { margin: 16px 0 0; padding: 10px 12px; font-size: 13.5px; color: var(--muted-fg); background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border); border-radius: 8px; }
.note b { color: var(--fg); }

/* ---------- Reportar un problema ---------- */
.report-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.report-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(3px); animation: report-fade 0.18s ease; }
.report-card { position: relative; width: min(520px, 100%); padding: 20px 22px 18px; border: 1px solid var(--border-strong); border-radius: 16px; background: #141414; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); animation: report-in 0.22s cubic-bezier(0.2, 0.85, 0.25, 1); }
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.report-head h2 { margin: 0; font-size: 20px; }
.report-lead { margin: 6px 0 14px; font-size: 14px; }
.report-card textarea { width: 100%; min-height: 120px; padding: 11px 12px; border: 1px solid var(--border-strong); border-radius: 10px; background: rgba(255, 255, 255, 0.03); color: var(--fg); font: 14px/1.5 var(--font); resize: vertical; }
.report-card textarea:focus { outline: none; border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-soft); }
.report-toggle { margin-top: 12px; }
.report-note { margin-top: 12px; }
.report-card .status:empty { display: none; }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.report-done { padding: 14px 4px 6px; text-align: center; }
.report-done-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 26px; font-weight: 800; }
.report-done h2 { margin: 0 0 6px; font-size: 22px; }
.report-done p { margin: 0 auto 16px; max-width: 340px; }
@keyframes report-fade { from { opacity: 0; } }
@keyframes report-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .report-backdrop, .report-card { animation: none; } }

/* Reportes recibidos (solo el dueño) */
.reports-count { margin: 0 0 10px; font-size: 13px; }
.reports-empty { margin: 0; font-size: 14px; }
.report-item { padding: 12px 0; border-top: 1px solid var(--border); }
.report-item:first-of-type { border-top: 0; padding-top: 2px; }
.report-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--dim-fg); font-size: 12.5px; }
.report-meta b { color: var(--brand-light); font-weight: 600; }
.report-message { margin: 6px 0 8px; font-size: 14px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.report-errors { margin: 0 0 8px; font-size: 12.5px; color: var(--muted-fg); }
.report-errors summary { cursor: pointer; }
.report-errors ul { margin: 6px 0 0; padding-left: 18px; font-family: var(--mono); font-size: 11.5px; line-height: 1.5; overflow-wrap: anywhere; }

/* Conectar el celular: el QR (blanco, como lo leen mejor las cámaras), tu cuenta y cuánto falta para que venza. */
.link-card { width: min(420px, 100%); }
.link-body { display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 120px; justify-content: center; }
.link-qr { width: 260px; max-width: 100%; aspect-ratio: 1; border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--border-strong), 0 12px 40px rgba(0, 215, 194, 0.12); transition: opacity 0.2s, filter 0.2s; }
.link-qr.expired { opacity: 0.25; filter: blur(3px); }
.link-qr-svg { display: block; width: 100%; height: 100%; }
.link-who { display: flex; align-items: center; gap: 10px; }
.link-who span { margin-left: 4px; }
.link-icon { width: 34px; height: 34px; border-radius: 50%; }
.link-time { margin: 0; font-size: 13px; display: flex; align-items: center; gap: 10px; }
.voice-row { margin: 12px 0 4px; }
.voice-row select { flex: 1; min-width: 180px; }
