/* SantralPro VPN panel theme. Sits on top of Bootstrap 5.3; light + dark via [data-bs-theme]. */

:root,
[data-bs-theme="light"] {
    --brand-1: #6366f1;
    --brand-2: #06b6d4;
    --brand-3: #a855f7;
    --brand-grad: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-3) 55%, var(--brand-2) 100%);

    --app-bg: #f4f6fb;
    --app-glow-1: rgba(99, 102, 241, .10);
    --app-glow-2: rgba(6, 182, 212, .08);
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --line: rgba(15, 23, 42, .07);
    --ink: #0f172a;
    --muted: #64748b;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .10);
    --shadow-hover: 0 2px 4px rgba(15, 23, 42, .05), 0 16px 32px -12px rgba(79, 70, 229, .22);

    --ok: #059669;     --ok-soft: rgba(16, 185, 129, .13);
    --warn: #b45309;   --warn-soft: rgba(245, 158, 11, .16);
    --bad: #dc2626;    --bad-soft: rgba(239, 68, 68, .12);
    --info: #0369a1;   --info-soft: rgba(14, 165, 233, .13);
    --idle: #475569;   --idle-soft: rgba(100, 116, 139, .13);

    --bs-body-bg: var(--app-bg);
    --bs-body-color: var(--ink);
    --bs-secondary-color: var(--muted);
    --bs-border-color: var(--line);
    --bs-primary: var(--brand-1);
    --bs-primary-rgb: 99, 102, 241;
    --bs-link-color: #4f46e5;
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: #4338ca;
    --bs-link-hover-color-rgb: 67, 56, 202;
    --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[data-bs-theme="dark"] {
    --app-bg: #0a0f1e;
    --app-glow-1: rgba(99, 102, 241, .18);
    --app-glow-2: rgba(6, 182, 212, .10);
    --surface: #111831;
    --surface-2: #0d1328;
    --line: rgba(148, 163, 184, .12);
    --ink: #e2e8f0;
    --muted: #94a3b8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-hover: 0 2px 4px rgba(0, 0, 0, .3), 0 16px 32px -12px rgba(99, 102, 241, .35);

    --ok: #34d399;     --ok-soft: rgba(52, 211, 153, .14);
    --warn: #fbbf24;   --warn-soft: rgba(251, 191, 36, .14);
    --bad: #f87171;    --bad-soft: rgba(248, 113, 113, .14);
    --info: #38bdf8;   --info-soft: rgba(56, 189, 248, .14);
    --idle: #94a3b8;   --idle-soft: rgba(148, 163, 184, .14);

    --bs-body-bg: var(--app-bg);
    --bs-body-color: var(--ink);
    --bs-link-color: #a5b4fc;
    --bs-link-color-rgb: 165, 180, 252;
    --bs-link-hover-color: #c7d2fe;
    --bs-link-hover-color-rgb: 199, 210, 254;
}

/* ---------- Base ---------- */
body {
    background-color: var(--app-bg);
    background-image:
        radial-gradient(900px 500px at 8% -10%, var(--app-glow-1), transparent 60%),
        radial-gradient(800px 500px at 100% 0%, var(--app-glow-2), transparent 60%);
    background-attachment: fixed;
    min-height: 100vh;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
}
main h1.h4 { font-weight: 700; letter-spacing: -.02em; font-size: 1.45rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.text-muted { color: var(--muted) !important; }
a { text-underline-offset: 3px; }
::selection { background: rgba(99, 102, 241, .25); }

/* Content enters with a short rise. */
main > * { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; }
main > *:nth-child(2) { animation-delay: .04s; }
main > *:nth-child(3) { animation-delay: .08s; }
main > *:nth-child(4) { animation-delay: .12s; }
main > *:nth-child(n+5) { animation-delay: .16s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- App shell: sidebar + topbar ---------- */
:root { --sb-w: 264px; --sb-w-collapsed: 78px; --topbar-h: 64px; }
.shell { min-height: 100vh; }
.sb {
    position: fixed; inset: 0 auto 0 0; width: var(--sb-w); z-index: 1040;
    display: flex; flex-direction: column; color: #cbd5e1;
    background:
        radial-gradient(420px 260px at 0% 0%, rgba(99, 102, 241, .28), transparent 70%),
        radial-gradient(360px 300px at 100% 100%, rgba(6, 182, 212, .14), transparent 70%),
        linear-gradient(180deg, #0d1330 0%, #0a0f24 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
    transition: width .22s cubic-bezier(.2, .7, .2, 1), transform .25s cubic-bezier(.2, .7, .2, 1);
}
.sb::after { content: ""; position: absolute; top: 0; right: -1px; bottom: 0; width: 1px; background: linear-gradient(180deg, rgba(139, 92, 246, .6), rgba(6, 182, 212, .35) 60%, transparent); }
.sb-head { display: flex; align-items: center; justify-content: space-between; height: var(--topbar-h); padding: 0 1rem 0 1.1rem; flex-shrink: 0; }
.sb-brand { display: flex; align-items: center; gap: .7rem; color: #fff; font-weight: 750; font-size: 1.05rem; letter-spacing: -.015em; white-space: nowrap; }
.sb-brand:hover { color: #fff; text-decoration: none !important; }
.sb-brand-sub { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-close { background: none; border: 0; color: #94a3b8; font-size: 1.1rem; padding: .4rem; border-radius: .5rem; }
.sb-close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.sb-nav { flex: 1; overflow-y: auto; padding: .5rem .75rem; scrollbar-width: thin; }
.sb-section { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: #64748b; padding: 1rem .75rem .45rem; white-space: nowrap; }
.sb-link {
    position: relative; display: flex; align-items: center; gap: .8rem; padding: .62rem .8rem; margin-bottom: .15rem;
    border-radius: .7rem; color: #cbd5e1; font-weight: 500; white-space: nowrap;
    transition: background .15s, color .15s;
}
.sb-link i { font-size: 1.08rem; width: 1.3rem; text-align: center; flex-shrink: 0; transition: transform .18s; }
.sb-link:hover { color: #fff; background: rgba(255, 255, 255, .06); text-decoration: none !important; }
.sb-link:hover i { transform: translateX(2px); }
.sb-link.active { color: #fff; background: linear-gradient(90deg, rgba(99, 102, 241, .32), rgba(139, 92, 246, .12)); box-shadow: inset 0 0 0 1px rgba(165, 180, 252, .18); }
.sb-link.active::before { content: ""; position: absolute; left: -.75rem; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-grad); }
.sb-link.active i { color: #c7d2fe; }
.sb-count {
    margin-left: auto; min-width: 1.6rem; padding: .1rem .45rem; border-radius: 999px; text-align: center;
    font-size: .72rem; font-weight: 700; color: #052e1c; background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .18);
}
.sb-foot { padding: .75rem; border-top: 1px solid rgba(255, 255, 255, .06); display: flex; flex-direction: column; gap: .4rem; flex-shrink: 0; }
.sb-health { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; border-radius: .7rem; color: #94a3b8; background: rgba(255, 255, 255, .03); white-space: nowrap; }
.sb-health:hover { color: #e2e8f0; background: rgba(255, 255, 255, .06); text-decoration: none !important; }
.sb-health-dots { display: inline-flex; gap: .3rem; width: 1.3rem; justify-content: center; flex-wrap: wrap; flex-shrink: 0; }
.sb-health-dots .dot { width: .5rem; height: .5rem; }
.sb-user { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: .7rem; background: transparent; color: #e2e8f0; white-space: nowrap; }
.sb-user:hover, .sb-user[aria-expanded="true"] { background: rgba(255, 255, 255, .06); }
.sb-user .avatar { flex-shrink: 0; }
.sb-muted { color: #94a3b8; }
.sb-collapse { align-items: center; gap: .8rem; padding: .5rem .8rem; border: 0; border-radius: .7rem; background: transparent; color: #64748b; font-size: .85rem; white-space: nowrap; }
.sb-collapse:hover { color: #e2e8f0; background: rgba(255, 255, 255, .06); }
.sb-collapse i { width: 1.3rem; transition: transform .22s; }

.shell-main { margin-left: var(--sb-w); min-width: 0; transition: margin-left .22s cubic-bezier(.2, .7, .2, 1); }
.content { max-width: 1480px; padding: 1.75rem 2rem 3rem; }

/* Collapsed (desktop): icons only. */
@media (min-width: 992px) {
    .sb-collapsed .sb { width: var(--sb-w-collapsed); }
    .sb-collapsed .shell-main { margin-left: var(--sb-w-collapsed); }
    .sb-collapsed .sb .sb-label, .sb-collapsed .sb .sb-section { display: none !important; }
    .sb-collapsed .sb-head { justify-content: center; padding: 0; }
    .sb-collapsed .sb-link, .sb-collapsed .sb-health, .sb-collapsed .sb-user, .sb-collapsed .sb-collapse { justify-content: center; padding-left: 0; padding-right: 0; }
    .sb-collapsed .sb-nav { padding-top: 1.1rem; }
    .sb-collapsed .sb-count { position: absolute; top: .2rem; right: .35rem; min-width: 0; padding: 0 .3rem; font-size: .6rem; }
    .sb-collapsed .sb-collapse i { transform: rotate(180deg); }
}

/* Mobile: slide-in drawer. */
.sb-backdrop { display: none; }
@media (max-width: 991.98px) {
    .sb { transform: translateX(-100%); box-shadow: none; width: min(290px, 86vw); }
    .sb-open .sb { transform: none; box-shadow: 0 0 60px rgba(0, 0, 0, .5); }
    .sb-backdrop { display: block; position: fixed; inset: 0; z-index: 1035; background: rgba(2, 6, 23, .55); backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .25s; }
    .sb-open .sb-backdrop { opacity: 1; pointer-events: auto; }
    .shell-main { margin-left: 0; }
    .content { padding: 1.25rem 1rem 2.5rem; }
}

.topbar {
    position: sticky; top: 0; z-index: 1020; height: var(--topbar-h);
    display: flex; align-items: center; gap: .75rem; padding: 0 2rem;
    background: color-mix(in srgb, var(--app-bg) 78%, transparent);
    backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid var(--line);
}
@media (max-width: 991.98px) { .topbar { padding: 0 1rem; } }
.topbar-btn {
    width: 2.4rem; height: 2.4rem; border-radius: .7rem; display: inline-grid; place-items: center; flex-shrink: 0;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.05rem;
    transition: background .15s, transform .15s;
}
.topbar-btn:hover { background: var(--surface-2); }
#theme-toggle:hover { transform: rotate(-14deg); }
.brand-mark.sm { width: 2.1rem; height: 2.1rem; }
.topbar-search { position: relative; flex: 1; max-width: 460px; }
.topbar-search > i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.topbar-search .form-control { padding-left: 2.4rem; padding-right: 2.4rem; height: 2.4rem; border-radius: .75rem; background: var(--surface); }
.topbar-search kbd {
    position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
    font-size: .7rem; padding: .1rem .4rem; border-radius: .35rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
}
.online-chip {
    display: inline-flex; align-items: center; gap: .45rem; height: 2.4rem; padding: 0 .85rem; border-radius: .75rem;
    background: var(--ok-soft); color: var(--ok); font-weight: 650; font-size: .88rem; white-space: nowrap;
}
.online-chip:hover { text-decoration: none !important; filter: brightness(1.05); }
.online-chip .dot { width: .5rem; height: .5rem; }

/* Page-load progress. */
#nav-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 2000; background: var(--brand-grad); box-shadow: 0 0 10px rgba(139, 92, 246, .7); opacity: 0; }
#nav-progress.run { opacity: 1; animation: progress 8s cubic-bezier(.1, .7, .2, 1) forwards; }
@keyframes progress { 0% { width: 0; } 10% { width: 45%; } 100% { width: 92%; } }

/* Toasts. */
.toast-stack { position: fixed; top: calc(var(--topbar-h) + .75rem); right: 1rem; z-index: 1090; display: flex; flex-direction: column; gap: .5rem; max-width: min(400px, calc(100vw - 2rem)); }
.app-toast {
    position: relative; overflow: hidden; display: flex; align-items: flex-start; gap: .7rem; padding: .85rem 1rem;
    border-radius: .9rem; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-hover);
    animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2) both;
}
.app-toast > i { color: var(--ok); font-size: 1.1rem; }
.app-toast > span { flex: 1; font-size: .92rem; }
.app-toast::after { content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--ok); transform-origin: left; animation: toast-life 5s linear forwards; }
.app-toast.out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes toast-life { from { transform: scaleX(1); } to { transform: scaleX(0); } }
[data-bs-theme="dark"] .app-toast .btn-close { filter: invert(1) grayscale(1) brightness(2); }

.avatar {
    width: 2rem; height: 2rem; border-radius: 50%; display: inline-grid; place-items: center;
    background: var(--brand-grad); color: #fff; font-weight: 700; font-size: .8rem;
}
.dropdown-menu { border: 1px solid var(--line); border-radius: .8rem; box-shadow: var(--shadow-hover); padding: .4rem; }
.dropdown-item { border-radius: .5rem; }

/* ---------- Cards ---------- */
.card {
    --bs-card-bg: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}
.card > .card-header, .card > .card-footer { background: transparent !important; border-color: var(--line); padding: .85rem 1.1rem; }
.card > .card-header:first-child { border-radius: 1rem 1rem 0 0; }
.card > .card-header.fw-semibold, .card > .card-header .fw-semibold { font-weight: 650 !important; letter-spacing: -.005em; }
.list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--line); }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; --bs-table-hover-bg: rgba(99, 102, 241, .05); --bs-table-border-color: var(--line); margin-bottom: 0; }
.table > :not(caption) > * > * { vertical-align: middle; padding: .7rem .9rem; }
.table > thead th {
    font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
    color: var(--muted); background: var(--surface-2) !important; border-bottom-width: 1px;
}
.table-sm > :not(caption) > * > * { padding: .5rem .8rem; }
.card > .table-responsive:last-child .table tbody tr:last-child > * { border-bottom: 0; }
.card > .table-responsive:last-child, .card > .table-responsive:last-child .table { border-radius: 0 0 1rem 1rem; }
.table-hover > tbody > tr { transition: background-color .12s; }

/* ---------- Buttons ---------- */
.btn { border-radius: .65rem; font-weight: 500; transition: transform .12s, box-shadow .15s, background .15s; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary {
    --bs-btn-bg: var(--brand-1); --bs-btn-border-color: transparent;
    --bs-btn-hover-border-color: transparent; --bs-btn-active-border-color: transparent;
    --bs-btn-disabled-bg: var(--brand-1); --bs-btn-disabled-border-color: transparent;
    background-image: linear-gradient(135deg, #6366f1, #8b5cf6);
    box-shadow: 0 6px 16px -8px rgba(99, 102, 241, .9);
}
.btn-primary:hover { background-image: linear-gradient(135deg, #5458ee, #7c4dff); box-shadow: 0 10px 22px -10px rgba(99, 102, 241, 1); }
.btn-outline-primary { --bs-btn-color: var(--bs-link-color); --bs-btn-border-color: rgba(99, 102, 241, .45); --bs-btn-hover-bg: var(--brand-1); --bs-btn-hover-border-color: var(--brand-1); }
.btn-outline-secondary { --bs-btn-color: var(--ink); --bs-btn-border-color: var(--line); --bs-btn-hover-bg: var(--surface-2); --bs-btn-hover-color: var(--ink); --bs-btn-hover-border-color: rgba(100, 116, 139, .35); --bs-btn-active-bg: var(--surface-2); --bs-btn-active-color: var(--ink); background: var(--surface); }

/* ---------- Forms ---------- */
.form-control, .form-select, .input-group-text { border-radius: .65rem; border-color: var(--line); background-color: var(--surface); }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select, [data-bs-theme="dark"] .input-group-text { background-color: var(--surface-2); }
.form-control:focus, .form-select:focus { border-color: rgba(99, 102, 241, .6); box-shadow: 0 0 0 .22rem rgba(99, 102, 241, .18); }
.form-check-input:checked { background-color: var(--brand-1); border-color: var(--brand-1); }
.form-label { font-weight: 500; font-size: .9rem; }

/* ---------- Badges: soft tones ---------- */
.badge { font-weight: 600; border-radius: 999px; padding: .38em .7em; letter-spacing: .01em; }
.badge.text-bg-success   { background: var(--ok-soft) !important;   color: var(--ok) !important; }
.badge.text-bg-warning   { background: var(--warn-soft) !important; color: var(--warn) !important; }
.badge.text-bg-danger    { background: var(--bad-soft) !important;  color: var(--bad) !important; }
.badge.text-bg-info      { background: var(--info-soft) !important; color: var(--info) !important; }
.badge.text-bg-secondary { background: var(--idle-soft) !important; color: var(--idle) !important; }
.badge.text-bg-light     { background: var(--idle-soft) !important; color: var(--ink) !important; font-weight: 500; }
.badge.text-bg-success::before, .badge.text-bg-warning::before, .badge.text-bg-danger::before,
.badge.text-bg-info::before, .badge.text-bg-secondary::before {
    content: ""; display: inline-block; width: .45em; height: .45em; border-radius: 50%;
    background: currentColor; margin-right: .45em; vertical-align: .12em;
}
/* Live things breathe: online accounts and healthy servers. */
[data-status-badge].text-bg-success::before, .badge.live::before, .dot.live { animation: pulse 1.8s ease-out infinite; }
@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 55%, transparent); }
    70%  { box-shadow: 0 0 0 .5em transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}
.dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; flex-shrink: 0; }
.dot.bg-success { background: var(--ok) !important; color: var(--ok); }
.dot.bg-danger  { background: var(--bad) !important; color: var(--bad); }
.dot.bg-secondary { background: var(--idle) !important; color: var(--idle); }

/* ---------- Alerts ---------- */
.alert { border: 1px solid var(--line); border-left-width: 4px; border-radius: .8rem; box-shadow: var(--shadow); }
.alert-success { background: var(--ok-soft); color: var(--ink); border-left-color: var(--ok); }
.alert-danger  { background: var(--bad-soft); color: var(--ink); border-left-color: var(--bad); }
.alert-light   { background: var(--surface); color: var(--ink); border-left-color: var(--brand-1); }

/* ---------- Pagination ---------- */
.pagination { --bs-pagination-border-color: var(--line); --bs-pagination-bg: var(--surface); --bs-pagination-active-bg: var(--brand-1); --bs-pagination-active-border-color: var(--brand-1); --bs-pagination-border-radius: .6rem; gap: .25rem; }
.page-link { border-radius: .6rem !important; }

/* ---------- Dashboard ---------- */
.hero {
    position: relative; overflow: hidden; border-radius: 1.25rem; padding: 1.6rem 1.75rem; color: #fff;
    background: linear-gradient(120deg, #312e81 0%, #6d28d9 45%, #0e7490 100%);
    background-size: 200% 200%; animation: rise .45s both, drift 18s ease-in-out infinite alternate;
    box-shadow: 0 20px 40px -24px rgba(79, 70, 229, .9);
}
.hero::before, .hero::after {
    content: ""; position: absolute; border-radius: 50%; filter: blur(2px); pointer-events: none;
}
.hero::before { width: 320px; height: 320px; right: -80px; top: -140px; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 65%); }
.hero::after  { width: 260px; height: 260px; right: 22%; bottom: -170px; background: radial-gradient(circle, rgba(34,211,238,.35), transparent 65%); }
@keyframes drift { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
.hero h1 { font-weight: 750; letter-spacing: -.025em; }
.hero .sub { color: rgba(255, 255, 255, .78); }
.live-pill {
    display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .75rem; border-radius: 999px;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-size: .8rem; font-weight: 600;
    backdrop-filter: blur(6px);
}
.live-pill .dot { background: #4ade80; color: #4ade80; }
.live-pill.stale .dot { background: #fbbf24; color: #fbbf24; animation: none; }

.stat { position: relative; overflow: hidden; transition: transform .18s, box-shadow .18s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.stat::after {
    content: ""; position: absolute; inset: auto -30% -60% auto; width: 160px; height: 160px; border-radius: 50%;
    background: radial-gradient(circle, var(--tone-soft), transparent 70%); pointer-events: none;
}
.stat .chip {
    width: 2.6rem; height: 2.6rem; border-radius: .8rem; display: grid; place-items: center; font-size: 1.15rem;
    color: var(--tone); background: var(--tone-soft);
}
.stat .num { font-size: 2.1rem; font-weight: 750; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--muted); font-size: .85rem; font-weight: 500; }
.stat .meter { height: .35rem; border-radius: 999px; background: var(--idle-soft); overflow: hidden; }
.stat .meter > span { display: block; height: 100%; border-radius: inherit; background: var(--tone); transition: width .8s cubic-bezier(.2, .7, .2, 1); }
.tone-brand { --tone: var(--brand-1); --tone-soft: rgba(99, 102, 241, .14); }
.tone-ok    { --tone: var(--ok);   --tone-soft: var(--ok-soft); }
.tone-info  { --tone: var(--info); --tone-soft: var(--info-soft); }
.tone-warn  { --tone: var(--warn); --tone-soft: var(--warn-soft); }
.num.bump { animation: bump .6s ease; }
@keyframes bump { 0% { transform: scale(1); } 30% { transform: scale(1.12); color: var(--tone); } 100% { transform: scale(1); } }

.feed-item { display: flex; align-items: center; gap: .8rem; padding: .7rem 1.1rem; border-bottom: 1px solid var(--line); animation: rise .35s both; }
.feed-item:last-child { border-bottom: 0; }
.feed-avatar {
    width: 2.2rem; height: 2.2rem; border-radius: .7rem; display: grid; place-items: center; flex-shrink: 0;
    background: var(--ok-soft); color: var(--ok); font-weight: 700; font-size: .85rem; position: relative;
}
.feed-avatar::after {
    content: ""; position: absolute; right: -2px; bottom: -2px; width: .6rem; height: .6rem; border-radius: 50%;
    background: var(--ok); color: var(--ok); border: 2px solid var(--surface); animation: pulse 1.8s ease-out infinite;
}
.empty-state { padding: 2rem 1rem; text-align: center; color: var(--muted); }
.empty-state i { font-size: 1.8rem; display: block; margin-bottom: .4rem; opacity: .6; }

/* ---------- Guest pages (login, share) ---------- */
body.guest {
    background:
        radial-gradient(600px 400px at 15% 20%, rgba(99, 102, 241, .35), transparent 60%),
        radial-gradient(500px 400px at 85% 30%, rgba(6, 182, 212, .25), transparent 60%),
        radial-gradient(600px 500px at 50% 100%, rgba(168, 85, 247, .28), transparent 60%),
        #0a0f1e;
    background-attachment: fixed;
    color-scheme: dark;
}
body.guest main { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.guest-logo {
    width: 3.5rem; height: 3.5rem; border-radius: 1.1rem; display: inline-grid; place-items: center; font-size: 1.6rem;
    color: #fff; background: var(--brand-grad); box-shadow: 0 14px 34px -10px rgba(139, 92, 246, .9);
    animation: float 5s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-6px); } }
body.guest .guest-title { color: #fff; font-weight: 750; letter-spacing: -.02em; }
body.guest .guest-sub { color: rgba(226, 232, 240, .7); }
body.guest .card {
    --bs-card-bg: rgba(17, 24, 49, .72);
    border: 1px solid rgba(255, 255, 255, .09);
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8);
    color: #e2e8f0;
}
body.guest .form-control { background: rgba(10, 15, 30, .6); border-color: rgba(255, 255, 255, .12); color: #fff; }
body.guest .form-label, body.guest .form-check-label { color: #cbd5e1; }
body.guest .text-muted { color: #94a3b8 !important; }
body.guest .btn-outline-secondary { --bs-btn-color: #e2e8f0; --bs-btn-hover-color: #fff; --bs-btn-border-color: rgba(255,255,255,.14); --bs-btn-hover-bg: rgba(255,255,255,.08); --bs-btn-hover-border-color: rgba(255,255,255,.25); background: transparent; }
body.guest .btn-outline-primary { --bs-btn-color: #c7d2fe; --bs-btn-border-color: rgba(165, 180, 252, .45); --bs-btn-hover-color: #fff; }

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

.min-w-0 { min-width: 0; }
a:not(.btn) { text-decoration: none; }
a:not(.btn):hover { text-decoration: underline; }
.card > .table-responsive:first-child { border-top-left-radius: 1rem; border-top-right-radius: 1rem; }
body.guest .form-check-input:not(:checked) { background-color: transparent; border-color: rgba(255, 255, 255, .35); }
