/* =========================================================
   AM CREATOR — PREMIUM UI POLISH
   Visual-only layer: keeps existing selectors and behavior intact.
   ========================================================= */

:root {
    --premium-surface: rgba(255, 255, 255, 0.82);
    --premium-surface-strong: rgba(255, 255, 255, 0.96);
    --premium-line: rgba(148, 163, 184, 0.22);
    --premium-glow: rgba(99, 102, 241, 0.22);
    --premium-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

::selection {
    color: #fff;
    background: var(--accent-primary);
}

:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.38);
    outline-offset: 3px;
}

/* A calm SaaS canvas behind the existing content. */
body {
    background:
        radial-gradient(circle at 4% 0%, rgba(99, 102, 241, 0.08), transparent 28rem),
        radial-gradient(circle at 96% 18%, rgba(14, 165, 233, 0.07), transparent 26rem),
        var(--bg-primary);
}

/* Sidebar: deeper contrast, softer edge, and a clearer brand anchor. */
.app-sidebar {
    background:
        linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98)),
        var(--bg-sidebar);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 18px 0 45px rgba(15, 23, 42, 0.12);
}

.sidebar-logo {
    min-height: 40px;
    margin-bottom: 10px;
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(59, 130, 246, 0.05));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.logo-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #fff;
    background: var(--accent-gradient);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

.sidebar-link {
    position: relative;
    min-height: 36px;
    border-color: transparent;
    transition: color 220ms ease, background 220ms ease, border-color 220ms ease, transform 220ms ease;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 5px;
    width: 3px;
    height: 0;
    border-radius: 99px;
    background: var(--accent-secondary);
    transition: height 220ms ease;
}

.sidebar-link:hover {
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-link.active {
    background: linear-gradient(135deg, #fff, #eef2ff) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
}

.sidebar-link.active::before {
    height: 20px;
}

/* Header: a floating glass rail instead of a flat strip. */
.mobile-top-bar {
    background: var(--premium-surface) !important;
    border: 1px solid var(--premium-line);
    border-radius: 16px;
    margin-bottom: 26px;
    min-height: 58px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.topbar-btn {
    transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.topbar-btn:hover {
    color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.topbar-avatar {
    transition: color 180ms ease, transform 180ms ease;
}

.topbar-avatar:hover {
    color: var(--accent-primary);
    transform: scale(1.06);
}

/* Page headings get stronger hierarchy while preserving the existing copy. */
.dashboard-header {
    position: relative;
    isolation: isolate;
    padding: 4px 0 22px;
}

.dashboard-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: min(180px, 42%);
    height: 3px;
    border-radius: 99px;
    background: var(--accent-gradient);
    box-shadow: 0 0 18px var(--premium-glow);
}

.dashboard-header .section-title {
    letter-spacing: -0.045em;
}

.dashboard-header .section-subtitle {
    max-width: 720px;
    line-height: 1.75;
}

/* Premium surfaces: restrained lift, gradient edge, no layout changes. */
.glass-card {
    border-color: var(--premium-line);
    box-shadow: var(--premium-shadow);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.11);
}

.stat-card {
    overflow: hidden;
    background: linear-gradient(145deg, var(--premium-surface-strong), rgba(248, 250, 252, .88));
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, .13), transparent 68%);
    pointer-events: none;
}

.stat-card-right {
    border: 1px solid rgba(99, 102, 241, .12);
    box-shadow: 0 8px 18px rgba(99, 102, 241, .09);
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.stat-card:hover .stat-card-right {
    transform: rotate(-4deg) scale(1.05);
    box-shadow: 0 12px 24px rgba(99, 102, 241, .16);
}

/* Buttons: accessible shine and consistent interaction feedback. */
.btn {
    position: relative;
    overflow: hidden;
    min-height: 40px;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn::after {
    content: '';
    position: absolute;
    top: -80%;
    left: -35%;
    width: 24%;
    height: 260%;
    background: rgba(255, 255, 255, .3);
    transform: rotate(24deg) translateX(-180%);
    transition: transform 480ms ease;
    pointer-events: none;
}

.btn:hover::after {
    transform: rotate(24deg) translateX(650%);
}

.btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.btn:disabled {
    cursor: wait;
    filter: saturate(.7);
}

/* Inputs and selects share the same quiet glass language. */
input, select, textarea {
    border-color: var(--premium-line);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, .025);
}

input:hover, select:hover, textarea:hover {
    border-color: rgba(99, 102, 241, .34);
}

input:focus, select:focus, textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .11), 0 8px 20px rgba(99, 102, 241, .06);
}

/* Tables become easier to scan without changing their markup. */
.table-responsive {
    border-color: var(--premium-line);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}

.table-responsive thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(248, 250, 252, .96);
    backdrop-filter: blur(10px);
}

tbody tr {
    transition: background 160ms ease, transform 160ms ease;
}

tbody tr:hover {
    background: rgba(99, 102, 241, .035);
}

tbody tr:hover td {
    background: transparent;
}

/* Pagination buttons from the admin panels get a clear click target. */
.pagination-container .pag-btn {
    border: 1px solid var(--premium-line);
    border-radius: 10px;
    background: var(--premium-surface-strong);
    transition: transform 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.pagination-container .pag-btn:hover {
    transform: translateY(-2px);
    color: var(--accent-primary);
    border-color: rgba(99, 102, 241, .4);
    box-shadow: 0 8px 16px rgba(99, 102, 241, .12);
}

/* Dashboard layout guard: keep the main surface aligned and prevent card overflow. */
#screen-dashboard {
    width: 100%;
    max-width: 1180px;
    margin-inline: auto;
}

#screen-dashboard .dashboard-header {
    margin-bottom: 20px;
}

#screen-dashboard .apk-banner {
    margin-bottom: 22px;
}

#screen-dashboard .stats-grid {
    align-items: stretch;
    gap: 16px;
}

#screen-dashboard .stat-card {
    min-width: 0;
    min-height: 116px;
    overflow: hidden;
}

#screen-dashboard .stat-card-left {
    min-width: 0;
}

#screen-dashboard .stat-card-value,
#screen-dashboard .stat-card-desc,
#screen-dashboard .stat-card-reset {
    overflow-wrap: anywhere;
}

/* Mobile polish: preserve the existing drawer behavior and prevent cramped controls. */
@media (max-width: 767px) {
    .mobile-top-bar {
        margin-bottom: 18px;
        border-radius: 13px;
    }

    .dashboard-header {
        padding-bottom: 17px;
    }

    #screen-dashboard .dashboard-header {
        margin-bottom: 16px;
    }

    #screen-dashboard .apk-banner {
        margin-bottom: 16px;
    }

    #screen-dashboard .stats-grid {
        gap: 10px;
    }

    #screen-dashboard .stat-card {
        min-height: 104px;
        padding: 14px 12px;
    }

    #screen-dashboard .stat-card-right {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .dashboard-header .section-subtitle {
        line-height: 1.6;
    }

    .glass-card:hover {
        transform: none;
    }

    .btn:hover:not(:disabled) {
        transform: none;
    }

    .pagination-container {
        row-gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn::after,
    .sidebar-link::before {
        display: none;
    }

    .btn:hover:not(:disabled),
    .sidebar-link:hover,
    .stat-card:hover .stat-card-right,
    .topbar-btn:hover,
    .topbar-avatar:hover {
        transform: none;
    }
}

/* Chat Global: solid, readable colors instead of washed-out translucent bubbles. */
.chat-container {
    background: #ffffff !important;
    border: 1px solid #dbe4f0 !important;
    box-shadow: 0 18px 42px rgba(15, 23, 42, .09) !important;
}

.chat-header {
    color: #172554 !important;
    border-bottom-color: #dbe4f0 !important;
}

.chat-header > i {
    color: #2563eb !important;
}

.chat-header > span:not(.badge) {
    color: #172554 !important;
}

.chat-header .badge {
    color: #047857 !important;
    background: #d1fae5 !important;
    border: 1px solid #86efac !important;
}

#chat-messages-area {
    scrollbar-color: #94a3b8 #f1f5f9;
}

.chat-empty-state {
    color: #64748b !important;
}

.chat-message-bubble {
    opacity: 1 !important;
    border-color: #d6e0ec !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .08) !important;
}

.chat-msg-other {
    background: #e8eef7 !important;
    color: #172033 !important;
}

.chat-msg-other .chat-message-meta,
.chat-msg-other .chat-message-meta strong {
    color: #334155 !important;
}

.chat-msg-other .chat-message-text {
    color: #172033 !important;
}

.chat-msg-self {
    background: linear-gradient(135deg, #2563eb, #0891b2) !important;
    border-color: #2563eb !important;
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .24) !important;
}

.chat-msg-self .chat-message-meta,
.chat-msg-self .chat-message-meta strong,
.chat-msg-self .chat-message-text {
    color: #ffffff !important;
}

.chat-msg-self .chat-message-meta > span:not(.chat-role-badge) {
    color: rgba(255, 255, 255, .86) !important;
}

.chat-role-badge {
    opacity: 1 !important;
}

#form-chat-send {
    border-top-color: #dbe4f0 !important;
}

#chat-input-text {
    color: #172033 !important;
    background: #ffffff !important;
    border-color: #cbd5e1 !important;
}

#chat-input-text::placeholder {
    color: #64748b !important;
}

#chat-input-text:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .14) !important;
}

/* Dark mode keeps the same hierarchy with appropriately translucent surfaces. */
body.dark-theme {
    --premium-surface: rgba(30, 41, 59, .78);
    --premium-surface-strong: rgba(30, 41, 59, .94);
    --premium-line: rgba(148, 163, 184, .18);
    --premium-shadow: 0 18px 45px rgba(2, 6, 23, .24);
}

body.dark-theme .mobile-top-bar,
body.dark-theme .glass-card,
body.dark-theme .stat-card {
    background: var(--premium-surface) !important;
}

body.dark-theme .chat-container {
    background: #111827 !important;
    border-color: #334155 !important;
}

body.dark-theme .chat-header,
body.dark-theme #form-chat-send {
    border-color: #334155 !important;
}

body.dark-theme .chat-header > span:not(.badge) {
    color: #f8fafc !important;
}

body.dark-theme .chat-empty-state {
    color: #94a3b8 !important;
}

body.dark-theme .chat-msg-other {
    background: #263449 !important;
    border-color: #3b4b63 !important;
    color: #f8fafc !important;
}

body.dark-theme .chat-msg-other .chat-message-meta,
body.dark-theme .chat-msg-other .chat-message-meta strong,
body.dark-theme .chat-msg-other .chat-message-text {
    color: #f1f5f9 !important;
}

body.dark-theme #chat-input-text {
    color: #f8fafc !important;
    background: #0f172a !important;
    border-color: #475569 !important;
}

body.dark-theme #chat-input-text::placeholder {
    color: #94a3b8 !important;
}

body.dark-theme .table-responsive thead th {
    background: rgba(15, 23, 42, .94) !important;
}

body.dark-theme tbody tr:hover,
body.dark-theme tbody tr:hover td {
    background: rgba(99, 102, 241, .08) !important;
}

/* ============================== PEMBAYARAN QRIS (MODAL) ============================== */

.payment-qris-wrap {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    text-align: center;
    padding: 4px 0 6px;
    overflow: hidden;
}

.payment-qris-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;
    display: inline-block;
    line-height: 0;
    box-shadow: 0 10px 34px rgba(2, 6, 23, .18), 0 0 0 1px var(--border);
}

.payment-qris-image {
    min-width: 360px;
    min-height: 360px;
    width: min(360px, 82vw);
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: 10px;
    background: #fff;
    display: block;
}

.payment-qris-total {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 14px 0 6px;
}

.payment-qris-timer {
    color: var(--text-secondary);
    font-size: .92rem;
    margin: 0 0 8px;
}

.payment-qris-timer strong {
    color: var(--accent-primary);
    font-variant-numeric: tabular-nums;
}

.payment-qris-hint {
    color: var(--text-muted);
    font-size: .78rem;
    margin: 0 0 14px;
}

.payment-qris-breakdown {
    width: 100%;
    max-width: 360px;
    margin: 14px auto 4px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.3);
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.payment-qris-breakdown .row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: .85rem;
    color: var(--text-secondary);
}

.payment-qris-breakdown .row.fee span:last-child {
    color: var(--ds-warning);
    font-weight: 600;
}

.payment-qris-breakdown .row.total {
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
    margin-top: 2px;
    font-weight: 700;
    color: var(--text-primary);
    font-size: .95rem;
}

.payment-qris-breakdown .row.total span:last-child {
    color: var(--accent-primary);
}

.payment-qris-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px auto 12px;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    background: #25d366;
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    transition: filter .2s ease, transform .2s ease;
}

.payment-qris-wa:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    color: #fff;
}

.payment-qris-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.payment-qris-actions .btn {
    min-width: 190px;
}

#qris-check-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 520px) {
    .payment-qris-image {
        min-width: 0;
        min-height: 0;
    }
    .payment-qris-actions .btn {
        min-width: 100%;
    }
}

/* ============================== MOBILE MENU (⋮ DRAWER) ============================== */

/* Tombol ⋮ di KIRI: beri jarak dari brand */
.mobile-top-bar > .mobile-menu-trigger {
    margin-right: 2px;
}

/* Brand di mobile header */
.topbar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.02rem;
    letter-spacing: .6px;
    color: var(--text-primary);
    min-width: 0;
    overflow: hidden;
}
.topbar-brand-icon {
    font-size: 1.35rem;
    color: var(--accent-primary);
    flex-shrink: 0;
}
.topbar-brand-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.topbar-brand-text .accent-text {
    color: var(--accent-primary);
}

/* Tombol ⋮ — three dots VERTIKAL */
.mobile-menu-trigger {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s ease, color .2s ease;
}
.mobile-menu-trigger:hover {
    background: var(--ds-slate-100);
    color: var(--text-primary);
}
.mobile-menu-trigger:active {
    background: var(--ds-slate-200);
}

/* Overlay blur di belakang drawer */
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9998;
}
.mobile-drawer-overlay.active {
    display: block;
}

/* Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(340px, 82vw);
    height: 100dvh;
    z-index: 9999;
    background: var(--bg-sidebar);
    transform: translateX(-100%);
    transition: transform .22s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: calc(env(safe-area-inset-top, 0px) + 14px) 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
    box-sizing: border-box;
}
.mobile-drawer.active {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 4px 16px;
    flex-shrink: 0;
}
.mobile-drawer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ds-white);
    font-family: var(--font-heading);
    letter-spacing: 1px;
}
.mobile-drawer-logo .logo-icon {
    font-size: 1.45rem;
    color: var(--accent-primary);
}
.mobile-drawer-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--ds-slate-400);
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 10000;
    transition: background .2s ease, color .2s ease;
}
.mobile-drawer-close:hover {
    background: rgba(255, 255, 255, .06);
    color: var(--ds-white);
}

.mobile-drawer-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 10px;
}
.mobile-drawer-section-label {
    font-size: .68rem;
    font-weight: 700;
    color: var(--ds-slate-600);
    letter-spacing: .8px;
    text-transform: uppercase;
    margin: 8px 6px 10px;
}
.mobile-drawer-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Kategori (accordion) */
.mobile-nav-group {
    border-radius: 12px;
}
.mobile-nav-cat {
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: none;
    background: transparent;
    border-radius: 12px;
    color: var(--ds-slate-300);
    font-family: var(--font-primary);
    font-size: .92rem;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    transition: background .2s ease, color .2s ease;
}
.mobile-nav-cat:hover {
    background: rgba(255, 255, 255, .05);
    color: var(--ds-white);
}
.mobile-nav-cat > i:first-child {
    font-size: 1rem;
    width: 18px;
    text-align: center;
    color: var(--ds-slate-500);
    transition: color .2s ease;
}
.mobile-nav-cat:hover > i:first-child {
    color: var(--ds-white);
}
.mobile-nav-cat-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mobile-nav-chevron {
    font-size: .8rem;
    color: var(--ds-slate-500);
    transition: transform .2s ease;
}
.mobile-nav-group.open .mobile-nav-chevron {
    transform: rotate(180deg);
}
.mobile-nav-sub {
    max-height: 0;
    overflow: hidden;
    transition: max-height .2s ease;
}
.mobile-nav-group.open .mobile-nav-sub {
    max-height: 480px;
}

/* Submenu & item (text list) */
.mobile-drawer-login-btn {
    color: var(--accent-primary);
    font-weight: 600;
}
.mobile-drawer-item {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px 0 56px;
    border: none;
    background: transparent;
    border-radius: 10px;
    color: var(--ds-slate-400);
    font-family: var(--font-primary);
    font-size: .88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    margin-bottom: 2px;
    box-sizing: border-box;
    transition: background .2s ease, color .2s ease;
}
.mobile-drawer-item > i {
    font-size: .95rem;
    width: 16px;
    text-align: center;
    color: var(--ds-slate-500);
    transition: color .2s ease;
}
.mobile-drawer-item:hover {
    color: var(--ds-white);
    background: rgba(255, 255, 255, .05);
}
.mobile-drawer-item:hover > i {
    color: var(--ds-white);
}
.mobile-drawer-item.active {
    background: var(--accent-primary) !important;
    color: #ffffff !important;
}
.mobile-drawer-item.active > i {
    color: #ffffff !important;
}

.mobile-drawer-footer {
    padding-top: 16px;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .06);
    flex-shrink: 0;
}
.mobile-drawer-footer .btn {
    width: 100%;
}

/* Desktop: sembunyikan seluruh elemen mobile; Mobile: matikan drawer lama */
@media (min-width: 768px) {
    .mobile-drawer,
    .mobile-drawer-overlay,
    .mobile-menu-trigger {
        display: none !important;
    }
}
@media (max-width: 767px) {
    #app-sidebar {
        display: none !important;
    }
}
@media (max-width: 480px) {
    .mobile-top-bar {
        padding: 0 10px;
    }
    .theme-trigger-label {
        display: none;
    }
    .topbar-brand {
        font-size: .9rem;
    }
}


/* ===== BrannMotion Motion Layer ===== */
:root {
  --bm-motion-fast: 180ms;
  --bm-motion: 420ms;
  --bm-motion-slow: 760ms;
}

@keyframes bm-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes bm-glow { 0%,100% { box-shadow: 0 0 0 rgba(99,102,241,0); } 50% { box-shadow: 0 0 28px rgba(99,102,241,.16); } }
@keyframes bm-shimmer { from { background-position: -220% 0; } to { background-position: 220% 0; } }
@keyframes bm-pulse-ring { 0% { transform: scale(.92); opacity:.65; } 80%,100% { transform: scale(1.08); opacity:0; } }

.glass-card, .stat-card, .docs-info-block, .ref-card, .auth-card {
  transition: transform var(--bm-motion) cubic-bezier(.2,.8,.2,1), box-shadow var(--bm-motion), border-color var(--bm-motion), background-color var(--bm-motion);
  will-change: transform;
}
.glass-card:hover, .stat-card:hover, .docs-info-block:hover, .ref-card:hover {
  transform: translateY(-4px);
  animation: bm-glow 1.8s ease-in-out infinite;
}
.btn {
  transition: transform var(--bm-motion-fast) ease, box-shadow var(--bm-motion-fast) ease, filter var(--bm-motion-fast) ease;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.04); }
.btn:active { transform: translateY(0) scale(.98); }
.sidebar-logo, .topbar-brand, .mobile-drawer-logo { animation: bm-float 5s ease-in-out infinite; }
.stat-card-right i, .lifetime-info-box > i { animation: bm-float 3.5s ease-in-out infinite; }

/* Soft animated background, intentionally subtle so content remains readable. */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle at 15% 20%, rgba(99,102,241,.10), transparent 28%),
              radial-gradient(circle at 85% 75%, rgba(168,85,247,.08), transparent 30%);
  animation: bm-float 12s ease-in-out infinite;
}

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