/* ====== SkullBoard · Design System ====== */

:root {
    --bg: #0a0a0c;
    --bg-soft: #15131f;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-2: rgba(255, 255, 255, 0.06);
    --border: rgba(255, 255, 255, 0.09);
    --border-strong: rgba(255,255,255, 0.4);
    --violet: #d6d6de;
    --violet-2: #ececf1;
    --violet-deep: #8a8a95;
    --gold: #c9c9d2;
    --glow: rgba(255,255,255, 0.35);
    --ink: #ededf2;
    --ink-soft: #adadb8;
    --ink-dim: #8e8e99; /* Optimizado para contraste WCAG AA */
    --good: #34d399;
    --bad: #fb7185;
    --admin: #b7b7c2;
    --radius: 18px;
    --maxw: 1220px;
    --display: 'Manrope', 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
}

button, input, select { font: inherit; }
.stat-metric-val, .lb-skull-record, .lb-msg-count-pill { font-variant-numeric: tabular-nums; }
.segmented-tab, .lb-sub-tab, .status-modal-close { min-height: 40px; }
.lb-sub-tab:focus-visible, .segmented-tab:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 2px; }
.auth-state-card { max-width: 620px; margin: 8vh auto 0; padding: clamp(24px, 5vw, 64px) clamp(16px, 4vw, 24px); text-align: center; border: 1px solid var(--border); border-radius: 24px; background: linear-gradient(145deg, var(--surface), rgba(255,255,255,.02)); }
.auth-state-icon { width: 76px; height: 76px; margin: 0 auto 22px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 22px; background: var(--surface-2); font-size: 42px; box-shadow: 0 0 32px var(--glow); }
.auth-state-card h1 { margin: 8px 0 12px; font-family: var(--display); font-size: clamp(1.35rem, 5vw, 2.5rem); letter-spacing: -.04em; word-break: break-word; overflow-wrap: break-word; }
.auth-state-card p { max-width: 480px; margin: 0 auto 28px; color: var(--ink-soft); line-height: 1.6; }
.auth-state-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(60vw 50vh at 50% -8%, rgba(255,255,255, 0.28), transparent 60%),
        radial-gradient(40vw 40vh at 90% 10%, rgba(255,255,255, 0.18), transparent 60%),
        radial-gradient(45vw 45vh at 0% 30%, rgba(255,255,255, 0.12), transparent 60%);
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: radial-gradient(70% 60% at 50% 0%, #000 30%, transparent 80%);
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 86px 22px 72px; }

a { color: var(--violet-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Iconos de contorno por defecto (el símbolo de Discord sobreescribe con fill) */
svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon { width: 24px; height: 24px; }

/* El icono de Discord es un glifo oficial de relleno puro (fill), sin contorno */
svg:has(use[href="#i-discord"]),
svg use[href="#i-discord"] {
    fill: currentColor !important;
    stroke: none !important;
    stroke-width: 0 !important;
}

:focus-visible { outline: 2px solid var(--violet-2); outline-offset: 3px; border-radius: 6px; }

/* ====== Nav ====== */
.nav {
    position: fixed; top: 14px; left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: var(--maxw);
    z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px; margin: 0 auto; padding: 8px 12px 8px 16px;
    background: rgba(14, 14, 17, 0.82);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.32);
    transition: top 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), background .2s, border-color .2s, box-shadow .2s;
    will-change: top, transform;
}
.nav.nav-hidden {
    top: -90px;
    transform: translateX(-50%);
}
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--display); font-weight: 700; font-size: 1.05rem;
    color: var(--ink); text-decoration: none; letter-spacing: -0.2px;
}
.brand:hover { text-decoration: none; }
.brand .mark {
    width: 32px; height: 32px; border-radius: 10px;
    display: inline-grid; place-items: center; font-size: 17px; line-height: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .25s ease, border-color .25s ease;
}
.brand:hover .mark {
    transform: scale(1.1) rotate(-6deg);
    border-color: var(--border-strong);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.2);
}
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links .nav-link {
    color: var(--ink-soft); font-size: 0.88rem; font-weight: 500;
    padding: 7px 12px; border-radius: 999px; text-decoration: none;
    transition: color .2s, background .2s, border-color .2s;
    border: 1px solid transparent;
}
.nav-links .nav-link:hover {
    color: var(--ink); background: var(--surface); text-decoration: none;
}
.nav-links .nav-link.active {
    color: var(--ink); background: var(--surface-2); font-weight: 600;
    border-color: var(--border);
}
.nav-cta { display: inline-flex; align-items: center; gap: 7px; margin-left: 6px; }

/* Page Top Bar / Breadcrumb */
.page-top-bar {
    margin: 24px auto 0;
    max-width: var(--maxw);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.back-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--ink-soft); font-size: 0.86rem; font-weight: 600;
    padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); text-decoration: none;
    transition: color .2s, background .2s, border-color .2s, transform .2s;
}
.back-link svg { width: 15px; height: 15px; transition: transform .2s ease; }
.back-link:hover {
    color: var(--ink); background: var(--surface-2); border-color: var(--border-strong);
    text-decoration: none; transform: translateX(-3px);
}
.back-link:hover svg { transform: translateX(-2px); }

/* ====== Buttons ====== */
.btn {
    padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer;
    transition: transform .22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow .22s ease, background .22s ease, border-color .22s ease, filter .22s ease;
    border: 1px solid transparent;
    text-decoration: none;
    user-select: none;
}
.btn svg {
    width: 20px; height: 20px;
    flex-shrink: 0;
    transition: transform .25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

/* Botón Principal (Clean Luxury Platinum / Monocromático) */
.btn-primary {
    position: relative;
    overflow: hidden;
    color: #0a0a0c !important;
    background: linear-gradient(135deg, #ffffff 0%, #dcdce6 100%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35), inset 0 1px 0 #ffffff;
    font-weight: 700;
    letter-spacing: 0.2px;
}
.btn-primary svg {
    color: #0a0a0c;
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
    pointer-events: none;
}
.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -80%;
    width: 45%;
    height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: rotate(25deg);
    transition: left 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}
.btn-primary:hover {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 8px 28px rgba(255, 255, 255, 0.18), 0 4px 14px rgba(0, 0, 0, 0.45);
    color: #0a0a0c !important;
    transform: translateY(-2px);
}
.btn-primary:hover::after {
    left: 140%;
}
.btn-primary:hover svg {
    transform: scale(1.12);
}

.btn-ghost { color: var(--ink); background: var(--surface); border-color: var(--border); box-shadow: 0 2px 8px rgba(0,0,0, 0.08); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); color: var(--ink); }
.btn-ghost svg { width: 18px; height: 18px; }

.btn-sm { padding: 8px 16px; font-size: 0.86rem; }
.nav-cta { padding: 8px 17px; font-size: 0.85rem; }

/* ====== Hero ====== */
.hero { text-align: center; padding: 70px 0 26px; }
.hero .emblem {
    width: 112px; height: 112px; margin: 0 auto 28px;
    display: grid; place-items: center; border-radius: 50%;
    font-size: 56px; line-height: 1;
    background: radial-gradient(circle at 32% 28%, rgba(255,255,255,0.35), rgba(255,255,255,0.12));
    border: 2px solid var(--gold);
    box-shadow: 0 0 0 6px rgba(255,255,255,0.14), 0 20px 55px var(--glow), inset 0 1px 0 rgba(255,255,255,0.12);
    animation: float 5s ease-in-out infinite;
}
@keyframes float { 0%,100%{ transform: translateY(0) } 50%{ transform: translateY(-9px) } }

.pill {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px;
    padding: 6px 14px; border-radius: 999px; font-size: 0.82rem; color: var(--ink-soft);
    background: var(--surface); border: 1px solid var(--border);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }

.hero h1 {
    font-family: var(--display);
    font-size: clamp(2.9rem, 9vw, 5.6rem); font-weight: 700; letter-spacing: -3px; line-height: 0.98;
    background: linear-gradient(120deg, #fff 0%, #e8e8ee 55%, #d6d6de 110%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero .subtitle { margin: 18px auto 0; max-width: 600px; font-size: 1.18rem; color: var(--ink-soft); }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }

/* ====== Stats band ====== */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 56px; }
.stat { text-align: center; padding: 24px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.stat .num { font-family: var(--display); font-size: 2rem; font-weight: 700; color: var(--ink); }
.stat .lbl { color: var(--ink-soft); font-size: 0.9rem; margin-top: 2px; }

/* ====== Section headers ====== */
.section { margin-top: 76px; }
.section-head { text-align: center; margin-bottom: 34px; }
.section-head .kicker { color: var(--violet-2); font-weight: 600; font-size: 0.82rem; letter-spacing: 2px; text-transform: uppercase; }
.section-head h2 { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.1rem); font-weight: 700; letter-spacing: -.5px; margin-top: 8px; }
.section-head p { color: var(--ink-soft); max-width: 560px; margin: 10px auto 0; }

/* ====== Bento Grid (Modern Layout) ====== */
.bento-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.bento-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 28px 24px;
    transition: transform .25s ease, border-color .25s ease, background .25s ease, box-shadow .25s ease;
    display: flex; flex-direction: column; justify-content: space-between;
}
.bento-card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); box-shadow: 0 20px 40px rgba(0,0,0, 0.25); }
.bento-8 { grid-column: span 8; }
.bento-4 { grid-column: span 4; }
.bento-6 { grid-column: span 6; }
.bento-card .ico {
    width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: var(--violet-2);
    background: linear-gradient(160deg, rgba(255,255,255,0.18), rgba(255,255,255,0.04)); border: 1px solid var(--border); margin-bottom: 14px;
}
.bento-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 6px; color: var(--ink); }
.bento-card p { color: var(--ink-soft); font-size: 0.92rem; line-height: 1.5; }

/* Mini podium in rankings card */
.podium { display: flex; gap: 8px; align-items: flex-end; justify-content: center; padding: 16px 0 4px; }
.podium-item { text-align: center; flex: 1; border-radius: 10px; padding: 10px 4px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.78rem; font-weight: 600; }
.podium-item.gold { border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); transform: translateY(-6px); }
.podium-item.gold .p-med { color: #fbbf24; font-size: 1.1rem; }
.podium-item.silver .p-med { color: #94a3b8; }
.podium-item.bronze .p-med { color: #d97706; }
.podium-item .p-skulls { color: var(--ink); font-weight: 700; margin-top: 2px; }

/* Live ping pulse in speed card */
.ping-meter { display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; margin-top: 16px; }
.ping-pulse { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: var(--good); }
.ping-pulse .p-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 8px var(--good); animation: pulseGlow 2s infinite; }
@keyframes pulseGlow { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.85); } }
.ping-val { font-family: 'SFMono-Regular', ui-monospace, monospace; font-weight: 700; color: var(--ink); font-size: 0.86rem; }

/* ====== How it works ====== */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 26px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.step::before {
    counter-increment: step; content: counter(step);
    font-family: var(--display); font-weight: 700; font-size: 0.95rem;
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px;
    color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet-deep));
}
.step h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: 0.94rem; }

/* ====== Commands Section ====== */
.cmd-search-box { position: relative; max-width: 500px; margin: 0 auto 24px; }
.cmd-search-box svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--ink-dim); pointer-events: none; }
.cmd-search-box input {
    width: 100%; padding: 13px 44px 13px 44px; border-radius: 999px; font: inherit; font-size: 0.92rem;
    color: var(--ink); background: var(--surface); border: 1px solid var(--border);
    transition: border-color .2s, background .2s, box-shadow .2s;
}
.cmd-search-box input:focus { outline: none; border-color: var(--border-strong); background: var(--surface-2); box-shadow: 0 0 0 3px rgba(255,255,255,0.08); }
.cmd-search-clear {
    position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    background: transparent; border: none; cursor: pointer; color: var(--ink-dim);
    font-size: 14px; width: 22px; height: 22px; display: none; place-items: center; border-radius: 50%;
}
.cmd-search-clear:hover { color: var(--ink); background: var(--surface-2); }

/* Filtro de comandos por categoría */
.filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.filter-chip {
    cursor: pointer; font-family: inherit; font-size: 0.88rem; font-weight: 600; color: var(--ink-soft);
    padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
    display: inline-flex; align-items: center; gap: 8px; transition: color .2s, background .2s, border-color .2s, transform .15s;
}
.filter-chip .count { font-size: 0.72rem; color: var(--ink-dim); background: var(--surface-2); padding: 1px 7px; border-radius: 999px; }
.filter-chip:hover { color: var(--ink); border-color: var(--border-strong); transform: translateY(-1px); }
.filter-chip.active {
    color: #fff; background: linear-gradient(135deg, var(--violet), var(--violet-deep));
    border-color: transparent; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.filter-chip.active .count { color: #fff; background: rgba(255,255,255,0.25); }

/* Grid de comandos */
.cmd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.cmd {
    display: flex; flex-direction: column; padding: 18px 20px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
    transition: border-color .2s ease, background .2s ease, transform .2s ease, box-shadow .2s ease;
    position: relative;
}
.cmd:hover { border-color: var(--border-strong); background: var(--surface-2); transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); }
.cmd-top { display: flex; align-items: center; gap: 12px; width: 100%; }
.cmd .c-ico {
    flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
    color: var(--violet-2); background: linear-gradient(145deg, rgba(255,255,255,0.12), rgba(255,255,255,0.03)); border: 1px solid var(--border);
}
.cmd .c-ico svg { width: 18px; height: 18px; }
.cmd-names { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cmd code {
    font-family: 'SFMono-Regular', ui-monospace, 'Cascadia Code', Consolas, monospace;
    font-size: 0.95rem; color: var(--violet-2); font-weight: 700; letter-spacing: -0.2px;
}
.cmd .c-desc { font-size: 0.88rem; color: var(--ink-soft); margin-top: 10px; line-height: 1.5; }

/* Badges de rol */
.cmd .tag {
    font-size: 0.62rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
    color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.1);
    padding: 2px 7px; border-radius: 6px;
}
.cmd .tag.owner { color: #ec4899; border-color: rgba(236, 72, 153, 0.35); background: rgba(236, 72, 153, 0.1); }

/* Botón de copiar */
.copy-btn {
    margin-left: auto; background: transparent; border: 1px solid transparent; cursor: pointer;
    color: var(--ink-dim); padding: 6px 8px; border-radius: 8px; display: inline-flex; align-items: center;
    gap: 5px; font-size: 0.75rem; font-weight: 600; font-family: inherit;
    transition: color .15s, background .15s, border-color .15s;
}
.copy-btn:hover { color: var(--ink); background: var(--surface-2); border-color: var(--border); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.copied { color: var(--good); border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); }

/* Parámetros desplegables */
.cmd.has-params { cursor: pointer; }
.cmd .c-toggle-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 0.78rem; color: var(--ink-dim); margin-top: 10px; font-weight: 500; }
.cmd .c-caret { font-size: 0.75rem; transition: transform .2s ease; }
.cmd.open .c-caret { transform: rotate(180deg); }
.cmd .c-params { display: none; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.cmd.open .c-params { display: block; }
.param { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.param code { font-family: 'SFMono-Regular', ui-monospace, Consolas, monospace; font-size: 0.82rem; color: var(--violet-2); font-weight: 700; }
.param .req, .param .opt { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; padding: 1px 7px; border-radius: 4px; }
.param .req { color: var(--bad); border: 1px solid rgba(251,113,133,0.35); background: rgba(251,113,133,0.08); }
.param .opt { color: var(--ink-dim); border: 1px solid var(--border); background: var(--surface-2); }
.param .ptype { font-size: 0.75rem; color: var(--ink-dim); }
.c-params .pdesc { font-size: 0.82rem; color: var(--ink-soft); margin-top: 4px; line-height: 1.4; }

/* Estado vacío de búsqueda */
.cmd-empty { text-align: center; padding: 40px 20px; grid-column: 1 / -1; color: var(--ink-dim); }
.cmd-empty .e-icon { font-size: 2rem; margin-bottom: 8px; }
.cmd-empty p { font-size: 0.95rem; color: var(--ink-soft); }

/* Visibilidad de comandos y elementos ocultos */
[hidden],
.cmd[hidden],
.cmd.is-hidden,
.cmd-empty[hidden] {
    display: none !important;
}

/* ====== Scroll Reveal Animations ====== */
[data-reveal] {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ====== CTA band ====== */
.cta-band {
    margin-top: 84px; text-align: center; padding: 54px 26px; border-radius: 26px;
    background: linear-gradient(150deg, rgba(255,255,255,0.18), rgba(255,255,255,0.05));
    border: 1px solid var(--border-strong);
}
.cta-band h2 { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 700; letter-spacing: -.5px; }
.cta-band p { color: var(--ink-soft); margin: 12px auto 26px; max-width: 480px; }

/* ====== Doc pages (privacy / terms) — sin cambios ====== */
.doc-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 14px; padding: 18px 0 26px; border-bottom: 1px solid var(--border); margin-bottom: 30px;
}
.doc-head .title { display: flex; align-items: center; gap: 14px; }
.doc-head .title .emoji {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    font-size: 1.7rem; background: linear-gradient(160deg, rgba(255,255,255,0.22), rgba(255,255,255,0.05)); border: 1px solid var(--border);
}
.doc-head h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -.5px; }
.doc-head .meta { color: var(--ink-dim); font-size: 0.85rem; }

.back {
    display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 0.9rem; font-weight: 500;
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); margin-top: 22px;
}
.back:hover { text-decoration: none; color: var(--ink); border-color: var(--border-strong); }

.doc { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 38px clamp(22px, 5vw, 46px); }
.doc .lead { color: var(--ink-soft); margin-bottom: 4px; }
.doc h2 { font-size: 1.2rem; font-weight: 700; color: var(--ink); margin: 34px 0 14px; padding-left: 14px; border-left: 3px solid var(--violet); }
.doc p { color: var(--ink-soft); margin-bottom: 12px; }
.doc strong { color: var(--ink); }
.doc ul, .doc ol { margin: 8px 0 14px 4px; list-style: none; }
.doc li { color: var(--ink-soft); margin-bottom: 10px; padding-left: 24px; position: relative; }
.doc li::before { content: "›"; position: absolute; left: 6px; color: var(--violet); font-weight: 700; }

.boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 18px 0; }
.box { border-radius: 16px; padding: 22px; border: 1px solid var(--border); background: var(--surface-2); }
.box h3 { font-size: 1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.box.nostore { border-color: rgba(52, 211, 153, 0.3); }
.box.nostore h3 { color: var(--good); }
.box.store { border-color: rgba(251, 113, 133, 0.3); }
.box.store h3 { color: var(--bad); }
.box ul { margin: 0; }
.box li::before { content: "•"; }

.note { background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(255,255,255,0.04)); border: 1px solid var(--border-strong); border-radius: 14px; padding: 16px 20px; margin: 18px 0; color: var(--ink-soft); }

table.data { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.92rem; }
table.data th, table.data td { text-align: left; padding: 12px 14px; vertical-align: top; border-bottom: 1px solid var(--border); }
table.data th { color: var(--violet-2); font-weight: 600; background: var(--surface-2); }
table.data td { color: var(--ink-soft); }

.doc-footer { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--ink-dim); font-size: 0.85rem; }

/* ====== Doc pages en tarjetas (estilo werewolf) ====== */
.doc.cards { background: transparent; border: 0; padding: 0; }
.doc-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 24px clamp(20px, 4vw, 30px); margin-bottom: 16px; }
.doc-card > h2:first-child, .doc-card > *:first-child { margin-top: 0; }
.doc-card h2 { border-left: 0; padding-left: 0; margin-top: 0; }

/* ====== Timeline Changelog (Linear & Raycast Style) ====== */
.changelog-hero { text-align: center; padding: 34px 0 16px; }
.changelog-hero h1 {
    font-family: var(--display); font-size: clamp(2.2rem, 6vw, 3.4rem); font-weight: 800;
    letter-spacing: -1.5px; margin-top: 8px; line-height: 1.15;
    color: var(--ink);
}
:root[data-theme="dark"] .changelog-hero h1 {
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 70%, #94a3b8 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
:root[data-theme="light"] .changelog-hero h1 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 70%, #334155 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.changelog-hero p { color: var(--ink-soft); font-size: 1.05rem; max-width: 580px; margin: 12px auto 0; }
.changelog-meta-pills { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.changelog-meta-pills .pill { margin-bottom: 0; }

/* Timeline Layout */
.timeline-container { position: relative; max-width: 820px; margin: 44px auto 0; padding-left: 36px; }
.timeline-container::before {
    content: ""; position: absolute; left: 11px; top: 14px; bottom: 24px; width: 2px;
    background: linear-gradient(180deg, var(--violet-2) 0%, var(--border-strong) 40%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 999px;
}
.timeline-entry { position: relative; margin-bottom: 44px; }
.timeline-entry:last-child { margin-bottom: 20px; }
.timeline-dot {
    position: absolute; left: -36px; top: 6px; width: 24px; height: 24px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--violet-2); display: grid; place-items: center;
    box-shadow: 0 0 16px var(--glow); z-index: 2;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.timeline-dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--violet-2); }
.timeline-entry:hover .timeline-dot {
    transform: scale(1.2); border-color: #fff; box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}
.timeline-entry:hover .timeline-dot::after { background: #fff; }

.timeline-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
    padding: 28px 28px 24px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.timeline-card:hover {
    transform: translateY(-3px); border-color: var(--border-strong); background: var(--surface-2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.t-header {
    display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap;
    gap: 12px; padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 20px;
}
.t-version-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.t-version-tag {
    font-family: 'SFMono-Regular', ui-monospace, monospace; font-size: 0.85rem; font-weight: 700;
    color: var(--violet-2); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border);
    padding: 3px 10px; border-radius: 8px;
}
.t-badge-latest {
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
    color: var(--good); background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.35);
    padding: 3px 8px; border-radius: 999px;
}
.t-date { color: var(--ink-dim); font-size: 0.86rem; font-weight: 500; }
.t-title { font-size: 1.25rem; font-weight: 700; color: var(--ink); margin-top: 4px; letter-spacing: -0.3px; }

/* Sections inside timeline card */
.change-section { margin-bottom: 20px; }
.change-section:last-child { margin-bottom: 0; }
.change-section-head {
    display: flex; align-items: center; gap: 8px; font-size: 0.78rem; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase; margin-bottom: 10px;
}
.tag-pill {
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase;
    padding: 2px 8px; border-radius: 6px; display: inline-flex; align-items: center; gap: 4px;
}
.tag-pill.new { color: var(--good); background: rgba(52, 211, 153, 0.1); border: 1px solid rgba(52, 211, 153, 0.3); }
.tag-pill.ui { color: #38bdf8; background: rgba(56, 189, 248, 0.1); border: 1px solid rgba(56, 189, 248, 0.3); }
.tag-pill.sec { color: #f59e0b; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); }
.tag-pill.fix { color: #ec4899; background: rgba(236, 72, 153, 0.1); border: 1px solid rgba(236, 72, 153, 0.3); }

.change-list { list-style: none; margin: 0; padding: 0; }
.change-list li {
    position: relative; padding-left: 20px; margin-bottom: 10px; font-size: 0.92rem;
    color: var(--ink-soft); line-height: 1.55;
}
.change-list li:last-child { margin-bottom: 0; }
.change-list li::before {
    content: "•"; position: absolute; left: 4px; top: 0; color: var(--violet-2); font-size: 1.1rem;
}
.change-list li strong { color: var(--ink); }
.change-list li code {
    font-family: 'SFMono-Regular', ui-monospace, Consolas, monospace; font-size: 0.85rem;
    color: var(--violet-2); background: var(--surface-2); border: 1px solid var(--border);
    padding: 1px 6px; border-radius: 4px;
}

/* ====== Contacto ====== */
.contact-form { max-width: 560px; margin: 0 auto; display: grid; gap: 14px; }
.contact-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form label { display: block; font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 6px; }
.contact-form input, .contact-form textarea {
    width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 12px 14px; transition: border-color .2s, background .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--border-strong); background: var(--surface-2); }
.contact-form textarea { resize: vertical; min-height: 130px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-form button { justify-self: start; }
.contact-form button[disabled] { opacity: .6; cursor: default; transform: none; }
.form-msg { font-size: 0.9rem; min-height: 1.2em; }
.form-msg.ok { color: var(--good); }
.form-msg.err { color: var(--bad); }

/* ====== Theme toggle ====== */
.theme-toggle {
    width: 38px; height: 38px; flex: none; cursor: pointer; border-radius: 50%;
    display: grid; place-items: center; color: var(--ink-soft);
    background: var(--surface); border: 1px solid var(--border); transition: color .2s, background .2s, border-color .2s;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--border-strong); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }

/* ====== Minimal & Elegant Footer ====== */
footer.site-footer {
    margin-top: 70px;
    padding-top: 24px;
    padding-bottom: 32px;
    border-top: 1px solid var(--border);
}

.f-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.f-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.f-brand .mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-grid;
    place-items: center;
    font-size: 16px;
    line-height: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform .2s ease;
}

.f-brand:hover .mark {
    transform: scale(1.06);
}

.f-brand-text {
    display: flex;
    flex-direction: column;
}

.f-name {
    font-family: var(--display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--ink);
    line-height: 1.2;
}

.f-by {
    font-size: 0.76rem;
    color: var(--ink-dim);
}

.f-by b {
    color: var(--ink-soft);
    font-weight: 600;
}

.f-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.f-nav a {
    color: var(--ink-soft);
    font-size: 0.86rem;
    text-decoration: none;
    transition: color .2s ease;
}

.f-nav a:hover {
    color: var(--ink);
    text-decoration: none;
}

.f-bottom {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--ink-dim);
}

.f-top-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ink-dim);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    transition: color .2s, transform .2s;
}

.f-top-btn svg {
    width: 12px;
    height: 12px;
}

.f-top-btn:hover {
    color: var(--ink);
    transform: translateY(-1px);
    text-decoration: none;
}

/* ====== Tema claro (Gris Cerámico / Muted Slate Confort sin deslumbramiento) ====== */
:root[data-theme="light"] {
    --bg: #f0f2f5;
    --bg-soft: #e8ecf0;
    --surface: #f8f9fb;
    --surface-2: #eaedf1;
    --border: rgba(15, 23, 42, 0.10);
    --border-strong: rgba(15, 23, 42, 0.22);
    --violet: #6366f1;
    --violet-2: #4f46e5;
    --violet-deep: #4338ca;
    --gold: #d97706;
    --glow: rgba(99, 102, 241, 0.12);
    --ink: #0f172a;
    --ink-soft: #475569;
    --ink-dim: #64748b;
    --good: #059669;
    --bad: #e11d48;
    --admin: #475569;
}

:root[data-theme="light"] body::before {
    background:
        radial-gradient(70vw 55vh at 50% -5%, rgba(99, 102, 241, 0.04), transparent 60%),
        radial-gradient(50vw 45vh at 90% 15%, rgba(59, 130, 246, 0.03), transparent 60%),
        radial-gradient(50vw 45vh at 10% 35%, rgba(244, 63, 94, 0.02), transparent 60%);
}

:root[data-theme="light"] body::after {
    background-image: radial-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}

:root[data-theme="light"] a {
    color: var(--violet-2);
}

:root[data-theme="light"] .nav {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .brand {
    color: #0f172a;
}

:root[data-theme="light"] .brand .mark {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 0 #ffffff;
}

:root[data-theme="light"] .brand:hover .mark {
    border-color: rgba(15, 23, 42, 0.3);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .nav-links .nav-link {
    color: #475569;
}

:root[data-theme="light"] .nav-links .nav-link:hover {
    color: #0f172a;
    background: #f1f5f9;
}

:root[data-theme="light"] .nav-links .nav-link.active {
    color: #0f172a;
    background: #f1f5f9;
    border-color: rgba(15, 23, 42, 0.1);
}

:root[data-theme="light"] .hero .emblem {
    background: #ffffff;
    border: 2px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 0 0 6px rgba(15, 23, 42, 0.02), 0 20px 40px rgba(0, 0, 0, 0.06);
}

:root[data-theme="light"] .hero h1 {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 70%, #334155 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

:root[data-theme="light"] .hero .subtitle {
    color: #475569;
}

:root[data-theme="light"] .pill {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #475569;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .btn-primary {
    color: #ffffff !important;
    background: #0f172a;
    border: 1px solid #0f172a;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.15);
}

:root[data-theme="light"] .btn-primary svg {
    color: #ffffff;
}

:root[data-theme="light"] .btn-primary:hover {
    background: #1e293b;
    border-color: #1e293b;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25);
    color: #ffffff !important;
}

:root[data-theme="light"] .btn-ghost {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

:root[data-theme="light"] .btn-ghost:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.2);
}

:root[data-theme="light"] .stat {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .stat .num {
    color: #0f172a;
}

:root[data-theme="light"] .stat .lbl {
    color: #64748b;
}

:root[data-theme="light"] .section-head h2 {
    color: #0f172a;
}

:root[data-theme="light"] .section-head p {
    color: #475569;
}

:root[data-theme="light"] .kicker {
    color: #6366f1;
}

:root[data-theme="light"] .bento-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .bento-card:hover {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.18);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .bento-card h3 {
    color: #0f172a;
}

:root[data-theme="light"] .bento-card p {
    color: #475569;
}

:root[data-theme="light"] .bento-card .ico {
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #0f172a;
}

:root[data-theme="light"] .podium-item {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .podium-item.gold {
    background: linear-gradient(145deg, #fef3c7, #fde68a);
    border-color: #f59e0b;
}

:root[data-theme="light"] .podium-item.silver {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-color: rgba(15, 23, 42, 0.12);
}

:root[data-theme="light"] .podium-item.bronze {
    background: linear-gradient(145deg, #ffedd5, #fed7aa);
    border-color: #f97316;
}

:root[data-theme="light"] .ping-meter {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .step {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .step::before {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.15);
}

:root[data-theme="light"] .step h3 {
    color: #0f172a;
}

:root[data-theme="light"] .step p {
    color: #475569;
}

/* Buscador y Tarjetas de Comandos en Modo Claro */
:root[data-theme="light"] .cmd-search-wrap input {
    background: #edf1f6;
    border-color: #b8c0cc;
    color: #0b111e;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .cmd-search-wrap input:focus {
    background: #f8fafc;
    border-color: #0b111e;
    box-shadow: 0 0 0 3px rgba(11, 17, 30, 0.12), 0 4px 12px rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .cmd-search-wrap input::placeholder {
    color: #64748b;
}

:root[data-theme="light"] .cmd-search-clear {
    background: #ced5df;
    color: #505d6e;
}

:root[data-theme="light"] .cmd-search-clear:hover {
    background: #b8c0cc;
    color: #0b111e;
}

:root[data-theme="light"] .filter-chip {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.09);
    color: #475569;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

:root[data-theme="light"] .filter-chip:hover {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.25);
    background: #f8fafc;
}

:root[data-theme="light"] .filter-chip.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

:root[data-theme="light"] .filter-chip.active .count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

:root[data-theme="light"] .filter-chip .count {
    background: #f1f5f9;
    color: #64748b;
}

:root[data-theme="light"] .cmd {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .cmd:hover {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.2);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

:root[data-theme="light"] .cmd-name {
    color: #0f172a;
    font-weight: 700;
}

:root[data-theme="light"] .cmd-desc {
    color: #475569;
}

:root[data-theme="light"] .cmd-type {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .cmd-type.admin {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

:root[data-theme="light"] .cmd-type.slash {
    background: #f1f5f9;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .copy-btn {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #475569;
}

:root[data-theme="light"] .copy-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.2);
}

:root[data-theme="light"] .copy-btn.copied {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #047857;
}

:root[data-theme="light"] .cmd-params {
    background: #f8fafc;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .param-name {
    color: #0f172a;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

:root[data-theme="light"] .param-desc {
    color: #475569;
}

:root[data-theme="light"] .cta-band {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .cta-band h2 {
    color: #0f172a;
}

:root[data-theme="light"] .cta-band p {
    color: #475569;
}

:root[data-theme="light"] .contact-form input,
:root[data-theme="light"] .contact-form textarea {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.15);
    color: #0f172a;
}

:root[data-theme="light"] .contact-form input:focus,
:root[data-theme="light"] .contact-form textarea:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

:root[data-theme="light"] .contact-form label {
    color: #0f172a;
}

:root[data-theme="light"] .theme-toggle {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    color: #475569;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .theme-toggle:hover {
    color: #0f172a;
    border-color: rgba(15, 23, 42, 0.25);
    background: #f8fafc;
}

:root[data-theme="light"] .back-link {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.1);
    color: #475569;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .back-link:hover {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.25);
    color: #0f172a;
}

/* Páginas Legales & Documentación */
:root[data-theme="light"] .doc,
:root[data-theme="light"] .doc-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .doc-card h2 {
    color: #0f172a;
}

:root[data-theme="light"] .doc-card p,
:root[data-theme="light"] .doc-card li {
    color: #475569;
}

:root[data-theme="light"] .doc-head .title .emoji {
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.1);
}

:root[data-theme="light"] .doc-head h1 {
    color: #0f172a;
}

:root[data-theme="light"] .note {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    color: #475569;
}

:root[data-theme="light"] .box {
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .box.nostore {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

:root[data-theme="light"] .box.store {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}

:root[data-theme="light"] table.data th {
    background: #dce1e8;
    color: #0b111e;
    border-bottom: 1px solid #b8c0cc;
}

:root[data-theme="light"] table.data td {
    border-bottom: 1px solid #ced5df;
    color: #273444;
}

/* Timeline Changelog en Modo Claro */
:root[data-theme="light"] .timeline-container::before {
    background: linear-gradient(180deg, #8a94a6 0%, #b8c0cc 60%, rgba(184, 192, 204, 0.2) 100%);
}

:root[data-theme="light"] .timeline-dot {
    background: #edf1f6;
    border-color: #0b111e;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.12);
}

:root[data-theme="light"] .timeline-dot::after {
    background: #0b111e;
}

:root[data-theme="light"] .timeline-card {
    background: #edf1f6;
    border-color: #b8c0cc;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .timeline-card:hover {
    background: #f8fafc;
    border-color: #7b8798;
    box-shadow: 0 12px 28px rgba(11, 17, 30, 0.08);
}

:root[data-theme="light"] .t-title {
    color: #0b111e;
}

:root[data-theme="light"] .t-version-tag {
    background: #dce1e8;
    border-color: #b8c0cc;
    color: #0b111e;
}

:root[data-theme="light"] .tag-pill.ui {
    background: #dce1e8;
    color: #0b111e;
    border-color: #b8c0cc;
}

:root[data-theme="light"] .tag-pill.new {
    background: #dcfce7;
    color: #15803d;
    border-color: #86efac;
}

:root[data-theme="light"] .tag-pill.sec {
    background: #fef3c7;
    color: #b45309;
    border-color: #fde68a;
}

:root[data-theme="light"] .tag-pill.fix {
    background: #fce7f3;
    color: #be185d;
    border-color: #fbcfe8;
}

:root[data-theme="light"] .change-list li {
    color: #273444;
}

:root[data-theme="light"] .change-list li strong {
    color: #0b111e;
}

:root[data-theme="light"] .change-list li code {
    background: #dce1e8;
    border-color: #b8c0cc;
    color: #0b111e;
}

/* Footer en Modo Claro */
:root[data-theme="light"] footer.site-footer {
    border-top-color: #b8c0cc;
}

:root[data-theme="light"] .f-brand .mark {
    background: linear-gradient(135deg, #edf1f6 0%, #d8dee8 100%);
    border: 1px solid #b8c0cc;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .f-name {
    color: #0b111e;
}

:root[data-theme="light"] .f-by {
    color: #505d6e;
}

:root[data-theme="light"] .f-by b {
    color: #273444;
}

:root[data-theme="light"] .f-nav a {
    color: #334155;
}

:root[data-theme="light"] .f-nav a:hover {
    color: #0b111e;
}

:root[data-theme="light"] .f-bottom {
    border-top-color: #b8c0cc;
    color: #505d6e;
}

:root[data-theme="light"] .f-top-btn {
    color: #505d6e;
}

:root[data-theme="light"] .f-top-btn:hover {
    color: #0b111e;
}

/* ====== Responsive System (Mobile-First Polish) ====== */

/* ── Tablet & Laptop (< 900px) ── */
@media (max-width: 900px) {
    .container {
        padding: 0 20px 60px;
    }
    .bento-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 14px;
    }
    .bento-8 { grid-column: span 6; }
    .bento-4 { grid-column: span 6; }
    .bento-6 { grid-column: span 6; }
    .stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .steps {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    .boxes {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* ── Mobile Standard (< 680px) ── */
@media (max-width: 680px) {
    .container {
        padding: 0 16px 48px;
    }

    /* Top Nav */
    .nav {
        padding: 6px 8px 6px 12px;
        margin: 8px auto 0;
        gap: 8px;
        width: 100%;
    }
    .brand {
        font-size: 0.96rem;
        gap: 8px;
    }
    .brand .mark {
        width: 28px;
        height: 28px;
        font-size: 15px;
        border-radius: 8px;
    }
    .nav-links {
        gap: 4px;
    }
    .nav-links .nav-link {
        padding: 5px 9px;
        font-size: 0.78rem;
    }
    .nav-cta {
        padding: 6px 11px;
        font-size: 0.8rem;
        gap: 5px;
        margin-left: 2px;
    }
    .nav-cta svg {
        width: 16px;
        height: 16px;
    }

    /* Page top bar / back link */
    .page-top-bar {
        margin-top: 14px;
    }
    .back-link {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    /* Hero */
    .hero {
        padding: 38px 0 20px;
    }
    .hero .emblem {
        width: 88px;
        height: 88px;
        font-size: 44px;
        margin-bottom: 20px;
        box-shadow: 0 0 0 4px rgba(255,255,255,0.12), 0 14px 40px var(--glow);
    }
    .pill {
        padding: 5px 12px;
        font-size: 0.76rem;
        margin-bottom: 16px;
    }
    .hero h1 {
        font-size: clamp(2.1rem, 9.5vw, 3.4rem);
        letter-spacing: -1.2px;
        line-height: 1.04;
    }
    .hero .subtitle {
        font-size: 0.98rem;
        margin-top: 14px;
        line-height: 1.5;
        padding: 0 4px;
    }
    .cta-row {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 26px auto 0;
        gap: 10px;
    }
    .cta-row .btn {
        width: 100%;
        justify-content: center;
        padding: 13px 20px;
    }

    /* Stats Grid */
    .stats {
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 36px;
    }
    .stat {
        padding: 18px 14px;
        border-radius: 14px;
    }
    .stat .num {
        font-size: 1.75rem;
    }
    .stat .lbl {
        font-size: 0.82rem;
    }

    /* Section Headings */
    .section {
        margin-top: 52px;
    }
    .section-head {
        margin-bottom: 24px;
    }
    .section-head h2 {
        font-size: clamp(1.45rem, 5.5vw, 1.85rem);
        letter-spacing: -0.4px;
    }
    .section-head p {
        font-size: 0.92rem;
        margin-top: 8px;
    }

    /* Bento Cards */
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .bento-card {
        padding: 20px 16px;
        border-radius: 16px;
    }
    .bento-card .ico {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        margin-bottom: 12px;
    }
    .bento-card h3 {
        font-size: 1.08rem;
    }
    .bento-card p {
        font-size: 0.88rem;
        line-height: 1.48;
    }
    .podium {
        gap: 6px;
        padding: 12px 0 0;
    }
    .podium-item {
        padding: 8px 4px;
        font-size: 0.72rem;
        border-radius: 8px;
    }
    .podium-item.gold {
        transform: translateY(-4px);
    }
    .podium-item.gold .p-med {
        font-size: 1rem;
    }
    .ping-meter {
        padding: 8px 12px;
        border-radius: 10px;
        margin-top: 12px;
    }
    .ping-pulse {
        font-size: 0.78rem;
        gap: 6px;
    }
    .ping-val {
        font-size: 0.82rem;
    }

    /* Steps */
    .step {
        padding: 20px 16px;
        border-radius: 14px;
    }
    .step::before {
        width: 30px;
        height: 30px;
        font-size: 0.88rem;
        border-radius: 8px;
        margin-bottom: 10px;
    }
    .step h3 {
        font-size: 1rem;
    }
    .step p {
        font-size: 0.88rem;
    }

    /* Commands Section */
    .cmd-search-box {
        margin-bottom: 16px;
    }
    .cmd-search-box input {
        padding: 12px 40px 12px 42px;
        font-size: 16px; /* Evita zoom automático en Safari iOS */
    }
    .filters {
        display: flex;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 8px;
        padding: 4px 2px 10px;
        margin-bottom: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .filters::-webkit-scrollbar {
        display: none;
    }
    .filter-chip {
        flex-shrink: 0;
        padding: 7px 14px;
        font-size: 0.82rem;
        white-space: nowrap;
    }
    .cmd-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .cmd {
        padding: 15px 16px;
        border-radius: 14px;
    }
    .cmd-top {
        gap: 10px;
    }
    .cmd .c-ico {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
    .cmd .c-ico svg {
        width: 16px;
        height: 16px;
    }
    .cmd code {
        font-size: 0.88rem;
    }
    .cmd .c-desc {
        font-size: 0.84rem;
        margin-top: 8px;
    }
    .copy-btn {
        padding: 6px 8px;
        min-height: 34px;
        min-width: 34px;
    }
    .param {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 8px 0;
        border-bottom: 1px dashed var(--border);
    }
    .param:last-child {
        border-bottom: none;
    }
    .c-params .pdesc {
        font-size: 0.78rem;
        margin-top: 2px;
    }

    /* CTA Band */
    .cta-band {
        margin-top: 54px;
        padding: 34px 18px;
        border-radius: 20px;
    }
    .cta-band h2 {
        font-size: clamp(1.4rem, 6vw, 1.85rem);
    }
    .cta-band p {
        font-size: 0.92rem;
        margin: 10px auto 20px;
    }
    .cta-band .btn-primary {
        width: 100%;
        max-width: 290px;
        justify-content: center;
        margin: 0 auto;
    }

    /* Contact Form */
    .contact-form {
        gap: 12px;
    }
    .contact-form .row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .contact-form input,
    .contact-form textarea {
        font-size: 16px; /* Evita zoom automático en Safari iOS */
        padding: 11px 13px;
        border-radius: 10px;
    }
    .contact-form button {
        width: 100%;
        justify-content: center;
        padding: 13px;
    }

    /* Timeline Changelog */
    .changelog-hero {
        padding: 24px 0 12px;
    }
    .changelog-hero h1 {
        font-size: clamp(1.9rem, 7.5vw, 2.6rem);
    }
    .changelog-hero p {
        font-size: 0.95rem;
    }
    .timeline-container {
        padding-left: 22px;
        margin-top: 30px;
    }
    .timeline-container::before {
        left: 7px;
        top: 10px;
        bottom: 16px;
    }
    .timeline-entry {
        margin-bottom: 28px;
    }
    .timeline-dot {
        left: -22px;
        top: 4px;
        width: 18px;
        height: 18px;
    }
    .timeline-dot::after {
        width: 6px;
        height: 6px;
    }
    .timeline-card {
        padding: 18px 15px;
        border-radius: 16px;
    }
    .t-header {
        padding-bottom: 12px;
        margin-bottom: 14px;
        gap: 8px;
    }
    .t-version-row {
        gap: 6px;
        width: 100%;
        justify-content: space-between;
    }
    .t-title {
        font-size: 1.12rem;
        margin-top: 6px;
        width: 100%;
    }
    .change-section {
        margin-bottom: 14px;
    }
    .change-list li {
        font-size: 0.88rem;
        padding-left: 16px;
        line-height: 1.5;
        margin-bottom: 8px;
    }

    /* Legal & Documentation Pages */
    .doc-head {
        padding: 12px 0 18px;
        margin-bottom: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .doc-head .title {
        gap: 10px;
    }
    .doc-head .title .emoji {
        width: 42px;
        height: 42px;
        font-size: 1.3rem;
        border-radius: 10px;
    }
    .doc-head h1 {
        font-size: 1.38rem;
    }
    .doc-card {
        padding: 18px 14px;
        border-radius: 14px;
        margin-bottom: 12px;
    }
    .doc-card h2 {
        font-size: 1.08rem;
    }
    .doc-card p,
    .doc-card li {
        font-size: 0.9rem;
        line-height: 1.52;
    }
    table.data {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.82rem;
    }
    table.data th,
    table.data td {
        padding: 8px 10px;
        white-space: nowrap;
    }
    .boxes {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .box {
        padding: 16px 14px;
        border-radius: 12px;
    }

    /* Footer */
    footer.site-footer {
        margin-top: 50px;
        padding-top: 20px;
        padding-bottom: 28px;
    }
    .f-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        width: 100%;
    }
    .f-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px 18px;
        width: 100%;
    }
    .f-nav a {
        font-size: 0.88rem;
        padding: 3px 0;
    }
    .f-bottom {
        margin-top: 16px;
        padding-top: 12px;
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 10px;
        width: 100%;
    }
}

/* ── Small Mobile / Narrow Displays (< 420px) ── */
@media (max-width: 420px) {
    .container {
        padding: 0 12px 40px;
    }
    .nav {
        padding: 5px 6px 5px 10px;
        margin: 6px auto 0;
    }
    .brand {
        font-size: 0.88rem;
        gap: 6px;
    }
    .brand .mark {
        width: 26px;
        height: 26px;
        font-size: 13px;
    }
    .nav-links .nav-link {
        padding: 4px 6px;
        font-size: 0.72rem;
    }
    #auth-nav-slot .btn {
        padding: 4px 8px;
        font-size: 0.74rem;
        min-height: 28px;
    }
    .nav-cta {
        padding: 5px 9px;
        font-size: 0.75rem;
    }
    .nav-cta span {
        display: none;
    }
    .theme-toggle {
        width: 30px;
        height: 30px;
    }
    .theme-toggle svg {
        width: 15px;
        height: 15px;
    }
    .hero h1 {
        font-size: 2.1rem;
    }
    .hero .subtitle {
        font-size: 0.92rem;
    }
    .bento-card {
        padding: 16px 12px;
    }
    .cmd {
        padding: 12px 12px;
    }
    .timeline-container {
        padding-left: 18px;
    }
    .timeline-container::before {
        left: 5px;
    }
    .timeline-dot {
        left: -18px;
        width: 14px;
        height: 14px;
    }
    .timeline-dot::after {
        width: 4px;
        height: 4px;
    }
    .timeline-card {
        padding: 14px 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🌟 SPOTLIGHT GLOW EFFECT (Magic UI / Aceternity inspired)
   ═══════════════════════════════════════════════════════════════════════════════ */
.bento-card, .stat {
    position: relative;
    overflow: hidden;
}

.bento-card::before, .stat::before {
    content: "";
    position: absolute;
    top: var(--mouse-y, -250px);
    left: var(--mouse-x, -250px);
    width: 340px;
    height: 340px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 45%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 1;
    border-radius: 50%;
}

[data-theme="light"] .bento-card::before, [data-theme="light"] .stat::before {
    background: radial-gradient(circle, rgba(11, 17, 30, 0.07) 0%, rgba(11, 17, 30, 0.02) 45%, transparent 70%);
}

.bento-card:hover::before, .stat:hover::before {
    opacity: 1;
}

.bento-card > *, .stat > * {
    position: relative;
    z-index: 2;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🍞 TOAST NOTIFICATIONS (Sonner Style Stackable Toasts)
   ═══════════════════════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
}

@media (max-width: 480px) {
    .toast-container {
        bottom: 16px;
        right: 14px;
        left: 14px;
    }
}

.toast {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(14, 14, 18, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04);
    color: #ededf2;
    font-size: 0.88rem;
    font-weight: 500;
    transform: translateY(20px) scale(0.94);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
}

[data-theme="light"] .toast {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
    color: #0b111e;
}

.toast.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.toast.hide {
    transform: translateY(10px) scale(0.95);
    opacity: 0;
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(52, 211, 153, 0.18);
    color: #34d399;
    font-size: 0.85rem;
    font-weight: bold;
    flex-shrink: 0;
}

[data-theme="light"] .toast-icon {
    background: rgba(4, 120, 87, 0.12);
    color: #047857;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 540px) {
    .guild-switcher-bar { padding: 12px; }
    .guild-switcher-bar > div { width: 100%; }
    .segmented-tabs { width: 100%; }
    .segmented-tab { flex: 1; justify-content: center; padding-inline: 6px; }
    .lb-sub-tabs { width: 100%; }
    .lb-sub-tab { flex: 1; justify-content: center; padding-inline: 6px; font-size: .78rem; }
    .bento-card { padding: 20px !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎛️ DASHBOARD UI DESIGN SYSTEM COMPONENTS (ESTILO WEREWOLF)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Cabecera de Selección de Servidores */
.servers-head {
    margin-bottom: 28px;
    text-align: left;
}

.servers-eyebrow {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--violet-2);
    margin-bottom: 6px;
}

.servers-head h1 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--ink);
    margin-bottom: 6px;
}

.servers-summary {
    color: var(--ink-soft);
    font-size: 0.95rem;
}

/* Buscador de Servidores */
.guild-search-wrap {
    margin-bottom: 24px;
    position: relative;
    max-width: 440px;
}

.guild-search-wrap input {
    width: 100%;
    padding: 12px 16px 12px 42px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
    font-size: 0.92rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.guild-search-wrap input:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--glow);
}

.guild-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--ink-dim);
    pointer-events: none;
}

/* Cuadrícula de Servidores */
.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.guild-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), border-color .2s ease, box-shadow .2s ease;
}

.guild-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09);
}

.guild-card.inactive {
    opacity: 0.88;
}

.guild-card.inactive:hover {
    opacity: 1;
}

.guild-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.guild-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.guild-card-icon-fallback {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--ink);
    flex-shrink: 0;
}

.guild-card-name {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guild-card-sub {
    font-size: 0.85rem;
    color: var(--ink-soft);
    margin-bottom: 18px;
    line-height: 1.45;
    min-height: 38px;
}

.guild-card-cta {
    margin-top: auto;
    display: flex;
}

.guild-card-cta .btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-size: 0.88rem;
}

/* Badges minimalistas */
.pill.ok {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.28);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pill.degraded {
    background: rgba(251, 191, 36, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.28);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pill.unknown {
    background: var(--surface-2);
    color: var(--ink-dim);
    border: 1px solid var(--border);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pill.pill-info {
    background: var(--surface-2);
    color: var(--ink-dim);
    border: 1px solid var(--border);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Botón de Cambiar Servidor en Cabecera */
.btn-switch-guild {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--ink);
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.btn-switch-guild:hover {
    background: var(--surface);
    border-color: var(--border-strong);
    transform: translateX(-2px);
    text-decoration: none;
}

/* Inputs y Selects */
.form-control-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--ink);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.form-control-input:focus {
    border-color: var(--violet);
    box-shadow: 0 0 0 3px var(--glow);
}

/* Corrección de visualización para selects en Modo Oscuro y Claro */
select.form-control-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e8e99' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

select.form-control-input,
select.form-control-input option {
    background-color: var(--surface-2);
    color: var(--ink);
}

/* Skeleton Loaders */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 10px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.segmented-tabs {
    display: inline-flex;
    background: var(--surface-2);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border);
    gap: 4px;
}

.segmented-tab {
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--ink-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all .2s ease;
}

.segmented-tab:hover {
    color: var(--ink);
}

.segmented-tab.active {
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Custom Sleek Sliders */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ink);
    border: 2px solid var(--bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    cursor: grab;
    transition: transform .15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--ink);
    border: 2px solid var(--bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    cursor: grab;
}

.lb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: transform .2s ease, border-color .2s ease;
}

.lb-item:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
}

/* ====== Guild Switcher & Metric Cards (Werewolf / Modern UI & Shimmer Beam) ====== */
.guild-switcher-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    overflow: hidden;
}

/* Shimmer Border Beam sutil y elegante */
.guild-switcher-bar::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(90deg, transparent 0%, var(--violet-2) 50%, transparent 100%);
    background-size: 200% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: border-beam-sweep 5s linear infinite;
    pointer-events: none;
    opacity: 0.7;
}

@keyframes border-beam-sweep {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.guild-picker-control {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 6px 14px 6px 8px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.guild-picker-control:hover {
    border-color: var(--violet-2);
    box-shadow: 0 0 14px var(--glow);
}

.guild-picker-select {
    background: transparent;
    border: none;
    color: var(--ink);
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    max-width: 240px;
}

.guild-picker-select option {
    background: var(--bg);
    color: var(--ink);
}

.stat-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-metric-card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
    transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1), border-color .2s ease, box-shadow .2s ease;
}

.stat-metric-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-strong);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.15), 0 0 20px var(--glow);
}

.stat-metric-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
}

.stat-metric-card:hover::after {
    left: 200%;
    transition: left 0.75s ease-in-out;
}

.stat-metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.stat-metric-val {
    font-family: var(--display);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--ink);
    line-height: 1.1;
}

.stat-metric-label {
    font-size: 0.85rem;
    color: var(--ink-soft);
    font-weight: 500;
    margin-top: 2px;
}

/* Staggered Cascade Entrance para elementos de Leaderboard */
.lb-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    animation: item-cascade 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
    transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), border-color .2s ease, background .2s ease;
}

.lb-item:hover {
    border-color: var(--border-strong);
    background: var(--surface-2);
    transform: translateX(4px);
}

@keyframes item-cascade {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.server-tab-panel {
    animation: tab-fade-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes tab-fade-in {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 420px) {
    .segmented-tabs {
        width: 100%;
        display: flex;
        justify-content: space-between;
    }
    .segmented-tab {
        flex: 1;
        justify-content: center;
        padding: 6px 8px;
        font-size: 0.78rem;
        gap: 4px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🏛️ FOOTER MULTI-COLUMNA PROFESIONAL (ESTILO SAPPHIRE / MEE6)
   ═══════════════════════════════════════════════════════════════════════════════ */
.dashboard-layout {
    min-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
    padding-bottom: 0 !important;
}

.dashboard-layout > #view-loading {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 55vh;
}

.dashboard-layout > main {
    flex: 1 0 auto;
}

.dashboard-layout .site-footer-v2 {
    margin-top: 60px;
    padding-top: 40px;
    padding-bottom: 32px;
}

.site-footer-v2 {
    margin-top: 60px;
    padding-top: 40px;
    padding-bottom: 32px;
    border-top: 1px solid var(--border);
    background: transparent;
}

.f-brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-grid;
    place-items: center;
    font-size: 16px;
    line-height: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.footer-cols {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
    gap: 36px;
    margin-bottom: 40px;
}

.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-brand-header {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-size: 1.25rem;
    font-weight: 800;
    font-family: var(--display);
}

.footer-brand-header:hover {
    color: var(--violet);
    text-decoration: none;
}

.footer-slogan {
    font-size: 0.88rem;
    color: var(--ink-soft);
    line-height: 1.5;
    max-width: 320px;
    margin: 0;
}

.footer-col h4 {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-dim);
    margin: 0 0 16px 0;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col a {
    color: var(--ink-soft);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color .15s ease, transform .15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-col a:hover {
    color: var(--violet);
    text-decoration: none;
    transform: translateX(2px);
}

.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.social-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    transition: all .2s ease;
    text-decoration: none;
}

.social-btn svg {
    width: 18px;
    height: 18px;
}

.social-btn:hover {
    color: var(--violet);
    border-color: var(--border-strong);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.footer-bottom-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    font-size: 0.84rem;
    color: var(--ink-dim);
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom-bar a {
    color: var(--ink-soft);
    text-decoration: none;
}

.footer-bottom-bar a:hover {
    color: var(--violet);
}

@media (max-width: 900px) {
    .footer-cols {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 580px) {
    .footer-cols {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    .footer-bottom-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   👑 LEADERBOARD HUMANIZADA CON DISCORD JUMP URLS
   ═══════════════════════════════════════════════════════════════════════════════ */
.lb-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1), border-color .2s ease, box-shadow .2s ease;
}

.lb-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-strong);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.lb-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.lb-medal {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.lb-medal.rank-1 {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.lb-medal.rank-2 {
    background: rgba(148, 163, 184, 0.15);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.lb-medal.rank-3 {
    background: rgba(180, 83, 9, 0.15);
    color: #d97706;
    border: 1px solid rgba(180, 83, 9, 0.35);
}

.lb-medal.rank-other {
    background: var(--surface-2);
    color: var(--ink-dim);
    font-size: 0.85rem;
    font-weight: 700;
    border: 1px solid var(--border);
}

.lb-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border);
    flex-shrink: 0;
}

.lb-avatar-fallback {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--violet), var(--violet-2));
    color: #ffffff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.15rem;
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.lb-user-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lb-user-name {
    font-weight: 700;
    font-size: 0.96rem;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-user-handle {
    font-size: 0.8rem;
    color: var(--ink-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lb-card-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.lb-skull-record {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.95rem;
    background: rgba(245, 158, 11, 0.12);
    color: var(--gold);
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.btn-jump-discord {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: 10px;
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--ink);
    text-decoration: none;
    transition: all .15s ease;
}

.btn-jump-discord:hover {
    background: var(--violet);
    color: #ffffff;
    border-color: var(--violet);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--glow);
}

@media (max-width: 540px) {
    .lb-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .lb-card-right {
        width: 100%;
        justify-content: space-between;
    }
}

.lb-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.lb-sub-tabs {
    display: inline-flex;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 12px;
    gap: 4px;
}

:root[data-theme="light"] .lb-sub-tabs {
    background: rgba(0, 0, 0, 0.04);
}

.lb-sub-tab {
    background: transparent;
    border: none;
    outline: none;
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.lb-sub-tab:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
}

:root[data-theme="light"] .lb-sub-tab:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lb-sub-tab.active {
    background: var(--surface-hover);
    color: var(--ink);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .lb-sub-tab.active {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.lb-msg-count-pill {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}

:root[data-theme="light"] .lb-msg-count-pill {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
}

.lb-msg-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--ink-dim);
    margin-top: 3px;
}

.lb-msg-channel {
    color: var(--violet);
    font-weight: 600;
}

.btn-orig-jump {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--ink-dim);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all .15s ease;
}

.btn-orig-jump:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border);
    text-decoration: none;
}

:root[data-theme="light"] .btn-orig-jump:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🟢 SISTEMA DE STATUS (BOT + WEB + DATABASE) & MODAL
   ═══════════════════════════════════════════════════════════════════════════════ */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.28);
    text-decoration: none;
    cursor: pointer;
    transition: all .2s ease;
}

.status-pill:hover {
    background: rgba(16, 185, 129, 0.20);
    border-color: rgba(16, 185, 129, 0.45);
    text-decoration: none;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: status-pulse-green 2s infinite;
}

@keyframes status-pulse-green {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(0.85);
    }
}

.status-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    z-index: 1000;
    display: none;
    place-items: center;
    padding: 20px;
}

.status-modal-overlay.active {
    display: grid;
}

.status-modal-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    padding: 28px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
    animation: tab-fade-in 0.2s ease-out;
}

.status-modal-card:focus-visible {
    outline: 2px solid var(--violet-2);
    outline-offset: 4px;
}

.status-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.status-modal-head h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-modal-close {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all .15s ease;
}

.status-modal-close:hover {
    background: var(--surface);
    color: var(--ink);
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
}

.status-card-item {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}

.status-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.status-card-top .pill {
    white-space: nowrap;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    font-size: 0.72rem;
    line-height: 1.2;
}

.status-card-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ink-dim);
}

.status-card-val {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--ink);
}

.status-card-sub {
    font-size: 0.78rem;
    color: var(--ink-soft);
    margin-top: 4px;
}

/* Calavera con Huesos ☠️ en Mis Mensajes */
.my-msg-icon-skull {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(167, 139, 250, 0.14);
    border: 1px solid rgba(167, 139, 250, 0.35);
    box-shadow: 0 0 12px rgba(167, 139, 250, 0.2);
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 INPUTS LIMPIOS PARA UMBRALES (SOLO ESCRIBIR, SIN SLIDERS NI FLECHAS)
   ═══════════════════════════════════════════════════════════════════════════════ */
.cfg-number-input {
    width: 120px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--ink);
    font-family: inherit;
    font-weight: 700;
    font-size: 1.05rem;
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.cfg-number-input:focus {
    border-color: var(--violet-2);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.25);
    background: rgba(255, 255, 255, 0.08);
    outline: none;
}

/* Erradicar completamente las flechas de subir/bajar de 1 en 1 (spinners) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

input[type="number"] {
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

/* Gradiente oficial en autor del footer (Blanco luminoso) */
.gradient-author {
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 70%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    text-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
}

/* ====== Sapphire-style User Profile Trigger & Dropdown ====== */
.user-menu-wrapper {
    position: relative;
    display: inline-block;
}

.user-profile-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px 4px 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.user-profile-trigger:hover,
.user-profile-trigger.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--border-strong);
}

.user-profile-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.user-profile-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-profile-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.user-profile-trigger.active .user-profile-chevron {
    transform: rotate(180deg);
}

.user-profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: #14151b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
    padding: 6px;
    z-index: 1050;
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: fadeInScale 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="light"] .user-profile-dropdown {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--ink);
    font-size: 0.88rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

:root[data-theme="light"] .user-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-dropdown-item.item-logout:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
}

.dropdown-item-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.85;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   🎯 SELECTOR DE CANALES BUSCABLE (ESTILO DISCORD / SAPPHIRE)
   ═══════════════════════════════════════════════════════════════════════════════ */
.custom-channel-combobox {
    position: relative;
    width: 100%;
    max-width: 520px;
}

.channel-combobox-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.channel-combobox-trigger:hover,
.channel-combobox-trigger.active {
    border-color: var(--violet-2);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.channel-trigger-icon {
    color: var(--ink-soft);
    font-size: 1.15rem;
    font-weight: 700;
}

.channel-trigger-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-trigger-chevron {
    width: 18px;
    height: 18px;
    color: var(--ink-soft);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.channel-combobox-trigger.active .channel-trigger-chevron {
    transform: rotate(180deg);
}

.channel-combobox-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 999;
    background: #121217;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: dropdownFadeIn 0.18s ease-out;
}

@keyframes dropdownFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.channel-search-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.channel-search-icon {
    width: 16px;
    height: 16px;
    color: var(--ink-soft);
    flex-shrink: 0;
}

.channel-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--ink);
    font-size: 0.9rem;
    font-family: inherit;
}

.channel-search-input::placeholder {
    color: var(--ink-dim);
}

.channel-options-container {
    max-height: 240px;
    overflow-y: auto;
    padding: 6px;
}

.channel-options-container::-webkit-scrollbar {
    width: 6px;
}
.channel-options-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}

.channel-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.channel-option:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.channel-option.selected {
    background: rgba(168, 85, 247, 0.18);
    color: #fff;
    font-weight: 600;
}

.channel-opt-hash {
    color: var(--ink-soft);
    font-size: 1.05rem;
    font-weight: 700;
}

.channel-opt-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-opt-check {
    color: var(--good);
    font-weight: 800;
}

.channel-option-loading,
.channel-option-empty {
    padding: 16px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.88rem;
}

.load-retry-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 28px 20px;
    color: var(--bad);
    text-align: center;
}

/* Avatar de marca en logo y footer */
.brand-avatar {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    display: block;
}

/* Modo Claro: Desplegable de Canales y Opciones */
[data-theme="light"] .channel-combobox-dropdown {
    background: #ffffff;
    border-color: var(--border-strong);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);
}
[data-theme="light"] .channel-search-header {
    background: rgba(0, 0, 0, 0.02);
    border-bottom: 1px solid var(--border);
}
[data-theme="light"] .channel-options-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .channel-option {
    color: var(--ink);
}
[data-theme="light"] .channel-option:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--ink);
}
[data-theme="light"] .channel-option.selected {
    background: rgba(168, 85, 247, 0.12);
    color: var(--primary-dark, #7e22ce);
}

/* Estabilidad en Dashboard: eliminar salto de hover en tarjetas de configuración y listados */
.dashboard-layout .bento-card:hover {
    transform: none !important;
}

/* Números tabulares para evitar saltos métricos */
.stat-metric-val,
.lb-skull-record,
.cfg-number-input,
.stat-card-val {
    font-variant-numeric: tabular-nums;
}

/* Contraste en Modo Claro para el gradiente del autor */
[data-theme="light"] .gradient-author {
    background: linear-gradient(180deg, #0f172a 0%, #334155 70%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

/* Ajuste responsive de padding en móvil para Dashboard */
@media (max-width: 680px) {
    .dashboard-layout {
        padding-left: 14px;
        padding-right: 14px;
    }
}
