/* PANDORA PAY - Design System & Modern UI Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

:root {
    /* Color Palette */
    --bg-dark: #110d26;
    --bg-page: #1a162e;
    --bg-gradient: radial-gradient(circle at top right, #2d1b4d, #1a162e);

    --primary: #9d2ec0;
    --primary-gradient: linear-gradient(135deg, #a329bc 0%, #7a1fad 100%);

    /* Distinct purple→pink diagonal used by the mockup-matched redesign
       (rail active state, "mine" DM bubbles, Start Conversation button) —
       kept separate from --primary-gradient (used app-wide on avatars,
       buttons, badges) so this redesign doesn't recolor the whole app. */
    --accent-gradient: linear-gradient(135deg, #8b2fc9 0%, #e0399b 100%);

    --text-white: #ffffff;
    --text-dim: #a0a0c0;
    --text-gold: #ffd700;

    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(12px);

    --accent-gold: #ffcc00;

    /* Spacing System */
    --space-2xs: 4px;
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Typography Scale */
    --font-xs: 0.75rem;
    --font-sm: 0.875rem;
    --font-md: 1rem;
    --font-lg: 1.125rem;
    --font-xl: 1.25rem;
    --font-2xl: 1.5rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Keyboard-focus ring, themed to match the app instead of the browser's
   default blue — only shows for keyboard navigation (:focus-visible), never
   on a mouse click, so it doesn't add a ring where one wasn't there before. */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

body {
    font-family: "Inter", sans-serif;
    font-optical-sizing: auto;
    background: var(--bg-dark);
    background-image: url('../img/bg.jpg');
    background-size: 140% 100%;
    /* Wider for horizontal pan */
    background-position: center;
    background-attachment: fixed;
    color: var(--text-white);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    animation: movingBg 15s ease-in-out infinite alternate;
}

@keyframes movingBg {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#main-content {
    padding-bottom: 20px;
}

/* Reusable Utility Classes */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 35px;
    background: rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

.play-responsibly-banner {
    background: var(--bg-gradient);
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-dim);
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    padding: 10px 16px;
}

.play-responsibly-banner strong {
    color: var(--text-white);
}

.play-responsibly-banner a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
}

.play-responsibly-banner a:hover {
    color: var(--text-white);
}

/* Persistent icon-rail nav — every customer page, not just Community/
   Messages. --header-height is written at runtime by main.blade.php since
   the header's real height varies (impersonation banner, wrapped chips). */
.app-shell {
    align-items: flex-start;
}

.icon-rail {
    width: 88px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xs);
    position: sticky;
    top: var(--header-height, 0px);
    height: calc(100vh - var(--header-height, 0px));
    align-self: flex-start;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}

.icon-rail__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-dim);
    font-size: var(--font-xs);
    font-weight: 600;
    width: 100%;
    padding: var(--space-xs) 0;
    border-radius: var(--radius-md);
}

.icon-rail__icon-box {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-dim);
    background: transparent;
    transition: background 0.15s, color 0.15s;
}

/* Unread-messages indicator on the rail's Messages icon — driven by
   $hasUnreadMessages (see AppServiceProvider's global view composer). */
.icon-rail__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4d5e;
    border: 2px solid var(--bg-dark);
}

.icon-rail__item.active .icon-rail__icon-box {
    background: var(--accent-gradient);
    color: #fff;
}

.icon-rail__item.active {
    color: var(--text-white);
}

.icon-rail__item:hover .icon-rail__icon-box {
    background: rgba(255, 255, 255, 0.08);
}

.icon-rail__item:hover {
    color: var(--text-white);
}

.icon-rail__item.active:hover .icon-rail__icon-box {
    background: var(--accent-gradient);
}

.icon-rail__item--back {
    margin-top: var(--space-sm);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.icon-rail__item--back:hover .icon-rail__icon-box {
    background: rgba(157, 46, 192, 0.14);
    color: var(--primary);
}

#main-content.container {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 768px) {
    .icon-rail {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        height: auto;
        width: 100%;
        flex-direction: row;
        justify-content: space-around;
        padding: 8px 0;
        background: rgba(24, 23, 35, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--glass-border);
        z-index: 90;
    }

    .icon-rail__item {
        width: auto;
        gap: 3px;
        padding: 0;
    }

    .icon-rail__item--back {
        margin-top: 0;
        padding-top: 0;
        padding-left: var(--space-sm);
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
    }

    .icon-rail__icon-box {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .icon-rail__label {
        font-size: 11px;
    }

    body.has-icon-rail #main-content.container {
        padding-bottom: 60px;
    }
}

.header__logo img {
    height: 48px;
    object-fit: contain;
}

.header__stats {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    color: white;
}

.mr-auto {
    margin-right: auto;
}

.chip {
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-weight: 500;
    font-size: var(--font-sm);
    color: white !important;
    min-height: 35px;
}

.chip:hover {
    border-color: var(--primary);
}

.chip__icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    background: var(--accent-gold);
    color: #000;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

.btn {
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn--white {
    background: #fff;
    color: #111;
}

.btn--white:hover {
    background: #eee;
    transform: translateY(-2px);
}

.header__user {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    border-radius: 50px;
    padding: 4px 4px 4px 15px;
    transition: background 0.2s ease;
    position: relative;
}

.user-info {
    text-align: right;
}

.user-info__name {
    display: block;
    font-weight: 600;
    font-size: var(--font-md);
}

.user-info__role {
    display: block;
    font-size: var(--font-xs);
    color: var(--text-dim);
    text-transform: capitalize;
}

.avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-weight: 700;
    color: #ffffff;
    font-size: 16px;
    text-transform: uppercase;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar--group,
.avatar--group img {
    border-radius: var(--radius-md);
}

/* ── User Dropdown ─────────────────────────────────────── */
.header__user:hover {
    background: rgba(255, 255, 255, 0.07);
}

.user-dropdown__chevron {
    color: var(--text-dim);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.header__user[aria-expanded="true"] .user-dropdown__chevron {
    transform: rotate(180deg);
}

.user-dropdown__menu {
    min-width: 240px;
    background: rgba(24, 23, 35, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(157, 46, 192, 0.3);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
    margin-top: 10px !important;
    overflow: hidden;
}

.user-dropdown__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(157, 46, 192, 0.12);
    margin-bottom: 2px;
}

.user-dropdown__avatar-lg {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    text-transform: uppercase;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(157, 46, 192, 0.4);
}

.user-dropdown__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.user-dropdown__fullname {
    font-weight: 700;
    font-size: var(--font-sm);
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown__badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    background: rgba(157, 46, 192, 0.9);
    border: 1px solid rgba(157, 46, 192, 1);
    border-radius: 20px;
    padding: 1px 8px;
    text-transform: capitalize;
    width: fit-content;
}

.user-dropdown__divider {
    border-color: rgba(255, 255, 255, 0.08);
    margin: 4px 8px;
}

.user-dropdown__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: var(--font-sm);
    font-weight: 500;
    color: var(--text-white) !important;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-dropdown__item:hover {
    background: rgba(255, 255, 255, 0.07);
    text-decoration: none;
}

.user-dropdown__item--danger {
    color: var(--text-white);
}

.user-dropdown__item--danger:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-white);
}

/* Hide name/badge in dropdown header on desktop — already visible in the navbar trigger */
@media (min-width: 901px) {
    .user-dropdown__header {
        display: none;
    }
}

@media (max-width: 900px) {
    .user-dropdown__header {
        display: flex;
    }
}

.user-dropdown__item-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-dropdown__item--danger .user-dropdown__item-icon {
    background: rgba(248, 113, 113, 0.1);
}

/* ── Notification Dropdown ─────────────────────────────── */
.notification-dropdown__menu {
    min-width: 320px;
    max-width: 360px;
    max-height: 400px;
    overflow-y: auto;
    background: rgba(24, 23, 35, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(157, 46, 192, 0.3);
    border-radius: 16px;
    padding: 6px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
    margin-top: 10px !important;
}

.notification-dropdown__menu::-webkit-scrollbar {
    width: 6px;
}

.notification-dropdown__menu::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.notification-dropdown__item {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--text-white) !important;
    text-decoration: none;
    transition: background 0.15s ease;
}

.notification-dropdown__item:hover {
    background: rgba(255, 255, 255, 0.07);
    text-decoration: none;
    color: var(--text-white) !important;
}

.notification-dropdown__item--unread {
    background: rgba(157, 46, 192, 0.12);
}

.notification-dropdown__item--unread:hover {
    background: rgba(157, 46, 192, 0.18);
}

.notification-dropdown__message {
    font-size: 13.5px;
    line-height: 1.4;
    font-weight: 500;
}

.notification-dropdown__item--unread .notification-dropdown__message {
    font-weight: 700;
}

.notification-dropdown__time {
    font-size: 11px;
    color: var(--text-dim);
}

.notification-dropdown__empty {
    display: block;
    padding: 26px 14px;
    text-align: center;
    color: var(--text-dim);
    font-size: 13px;
}

/* Hero Section */
.hero {
    margin-top: var(--space-lg);
    border-radius: 10px;
    overflow: hidden;
}

.hero__img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.hero__content {
    position: relative;
}

.hero__coins {
    position: absolute;
    top: -40px;
    bottom: 0;
    width: 15%;
    pointer-events: none;
    z-index: 10;
}

.hero__coins--left {
    left: 0;
}

.hero__coins--right {
    right: 0;
}

.hero__coin {
    position: absolute;
    width: 40px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.5));
}

.hero__coins--left .hero__coin {
    animation: fallFromLeft 6s linear infinite;
}

.hero__coins--right .hero__coin {
    animation: fallFromRight 6s linear infinite;
}

@keyframes fallFromLeft {
    0% {
        transform: translate(-40px, -80px) rotate(-15deg) rotateY(0deg);
        opacity: 0;
    }

    20% {
        opacity: 1;
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: translate(80px, 480px) rotate(30deg) rotateY(720deg);
        opacity: 0;
    }
}

@keyframes fallFromRight {
    0% {
        transform: translate(30px, -100px) rotate(10deg) rotateY(0deg);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: translate(-60px, 450px) rotate(-45deg) rotateY(-720deg);
        opacity: 0;
    }
}

.hero__coins--left .coin-1 {
    left: 8%;
    animation-duration: 7.2s;
    animation-delay: 0s;
    width: 44px;
}

.hero__coins--left .coin-2 {
    left: 32%;
    animation-duration: 5.5s;
    animation-delay: 1.5s;
    width: 30px;
}

.hero__coins--left .coin-3 {
    left: 5%;
    animation-duration: 8.7s;
    animation-delay: 0.8s;
    width: 38px;
}

.hero__coins--left .coin-4 {
    left: 42%;
    animation-duration: 6.3s;
    animation-delay: 3s;
    width: 26px;
}

.hero__coins--left .coin-5 {
    left: 20%;
    animation-duration: 9.4s;
    animation-delay: 0.5s;
    width: 32px;
}

.hero__coins--left .coin-6 {
    left: 36%;
    animation-duration: 7.9s;
    animation-delay: 4.2s;
    width: 34px;
}

.hero__coins--left .coin-7 {
    left: 15%;
    animation-duration: 6.8s;
    animation-delay: 2.5s;
    width: 28px;
}

.hero__coins--left .coin-8 {
    left: 48%;
    animation-duration: 8.5s;
    animation-delay: 1.2s;
    width: 24px;
}

.hero__coins--left .coin-9 {
    left: 25%;
    animation-duration: 7.4s;
    animation-delay: 3.8s;
    width: 30px;
}

.hero__coins--left .coin-10 {
    left: 12%;
    animation-duration: 9.3s;
    animation-delay: 0.3s;
    width: 36px;
}

.hero__coins--right .coin-1 {
    right: 10%;
    animation-duration: 7.8s;
    animation-delay: 0.4s;
    width: 44px;
}

.hero__coins--right .coin-2 {
    right: 35%;
    animation-duration: 6.2s;
    animation-delay: 1.8s;
    width: 32px;
}

.hero__coins--right .coin-3 {
    right: 8%;
    animation-duration: 10.1s;
    animation-delay: 2.1s;
    width: 26px;
}

.hero__coins--right .coin-4 {
    right: 44%;
    animation-duration: 7.6s;
    animation-delay: 0.9s;
    width: 24px;
}

.hero__coins--right .coin-5 {
    right: 24%;
    animation-duration: 11.2s;
    animation-delay: 3.4s;
    width: 28px;
}

.hero__coins--right .coin-6 {
    right: 40%;
    animation-duration: 9.3s;
    animation-delay: 1.5s;
    width: 32px;
}

.hero__coins--right .coin-7 {
    right: 15%;
    animation-duration: 6.5s;
    animation-delay: 2.7s;
    width: 30px;
}

.hero__coins--right .coin-8 {
    right: 48%;
    animation-duration: 8.8s;
    animation-delay: 0.2s;
    width: 22px;
}

.hero__coins--right .coin-9 {
    right: 22%;
    animation-duration: 7.2s;
    animation-delay: 4.1s;
    width: 34px;
}

.hero__coins--right .coin-10 {
    right: 38%;
    animation-duration: 8.5s;
    animation-delay: 1.9s;
    width: 26px;
}

/* Hero Text Images Overlay */
.hero__text-overlay {
    position: absolute;
    top: 0;
    left: -10%;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero__text-img {
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

.hero__text-img--top {
    width: 300px;
    margin-bottom: 20px;
    /* Space for central graphics */
}

.hero__text-img--bottom {
    width: 300px;
    margin-top: 88px;
    /* Space for central graphics */
}

/* Layered Banner Elements */
.hero__logos {
    position: absolute;
    left: 49%;
    top: 49%;
    transform: translate(-100%, -50%);
    /* Anchor to center */
    z-index: 5;
}

.hero__logo-strip {
    width: 260px;
    height: auto;
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.8));
}

.hero__mascot {
    position: absolute;
    left: 57%;
    top: 54%;
    transform: translate(-15%, -50%);
    /* Overlap logos */
    z-index: 6;
    animation: floatGenie 6s ease-in-out infinite;
}

.hero__genie {
    max-width: 200px;
    height: auto;
    filter: drop-shadow(0 0 80px rgba(157, 46, 192, 0.7));
}

@keyframes floatLogos {

    0%,
    100% {
        transform: translate(-100%, -50%) translateY(0);
    }

    50% {
        transform: translate(-100%, -50%) translateY(-10px);
    }
}

@keyframes floatGenie {

    0%,
    100% {
        transform: translate(-15%, -50%) scale(1);
    }

    50% {
        transform: translate(-15%, -50%) scale(1.03) translateY(-5px);
    }
}

@media (max-width: 1300px) {
    .hero__content {
        min-height: 200px;
        width: 100%;
    }

    .hero__img {
        width: auto;
        height: 100%;
    }
}

@media (max-width: 1200px) {
    .hero__logo-strip {
        width: 240px;
    }

    .hero__genie {
        max-width: 300px;
    }

    .hero__text-img--top {
        width: 50%;
        max-width: 400px;
        margin-bottom: 50px;
    }

    .hero__text-img--bottom {
        max-width: 360px;
        width: 46%;
        margin-top: 30px;
    }
}

@media (max-width: 900px) {
    .hero__logo-strip {
        width: 170px;
    }

    .hero__text-overlay {
        left: -16%;
    }

    .hero__logos {
        left: 55%;
    }
}

.filter-nav {
    display: flex;
    gap: var(--space-sm);
    margin: var(--space-xl) 0 1.5rem 0;
    overflow-x: auto;
    padding-bottom: var(--space-xs);
    scrollbar-width: none;
}

/* Title on the left, section tabs on the right, on one row. */
.page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.page-header-row .systemlogheading {
    margin: 0;
}

.page-header-row .systemlogheading h4 {
    margin: 0;
    font-size: 20px;
}

.page-header-row .filter-nav {
    margin: 0;
}

.page-header-row .filter-btn {
    padding: 8px 20px;
    font-size: 13px;
}

.filter-nav::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    position: relative;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: #fff;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    z-index: 1;
    font-size: 14px;
}

.filter-btn::after {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(from var(--angle), transparent 20%, #ffcc00, transparent 40%);
    -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;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: -1;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.filter-btn:hover::after {
    opacity: 1;
    animation: rotateAngle 2s linear infinite;
}

.filter-btn.active {
    background: var(--primary-gradient);
    border-color: transparent;
    box-shadow: 0 4px 8px rgba(163, 41, 188, 0.4);
}

/* Tab Content Visibility */
.tab-content-filter {
    display: none;
}

.tab-content-filter.active {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes rotateAngle {
    to {
        --angle: 360deg;
    }
}

.backto-platforms-btn-wrapper button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    color: #fff;
    font-weight: 400;
    cursor: pointer;
}

.flow-nav__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.flow-nav__title {
    margin: 16px 0 0;
}

.flow-nav__back {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
}

.flow-nav__back:hover {
    background: rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
    color: #fff;
}

.flow-nav__back svg {
    flex: 0 0 auto;
}

.global-back-bar {
    margin: 16px 0;
}

/* Game Grid */
.game-platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

@media (max-width: 576px) {
    .game-platform-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

/* Game Cards Styling */
.game-platform-card {
    border-radius: 52px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.4s ease;
    aspect-ratio: 1/1;
    position: relative;
    z-index: 1;
    background: #000;
}

/* Modern Inner Glow / Reflection */
.game-platform-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 3;
    pointer-events: none;
    border-radius: inherit;
}

/* Rotating Border Logic (Same as Filter Buttons) */
.game-platform-card::after {
    content: "";
    position: absolute;
    inset: -5px;
    padding: 9px;
    background: conic-gradient(from var(--angle), transparent 15%, #ffcc00, transparent 45%);
    -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;
    transition: opacity 0.3s ease;
    z-index: 4;
    animation: rotateAngle 2s linear infinite;
    border-radius: 61px;

}

@media (max-width: 576px) {
    .game-platform-card {
        border-radius: 24px;
    }

    .game-platform-card::after {
        border-radius: 33px;
    }
}

.game-platform-card:nth-child(1)::after {
    animation-duration: 2s;
}

.game-platform-card:nth-child(2)::after {
    animation-duration: 3s;
}

.game-platform-card:nth-child(3)::after {
    animation-duration: 1.5s;
}

.game-platform-card:nth-child(4)::after {
    animation-duration: 4s;
}

.game-platform-card:nth-child(5)::after {
    animation-duration: 2.5s;
}

.game-platform-card:nth-child(6)::after {
    animation-duration: 3.5s;
}

.game-platform-card:nth-child(7)::after {
    animation-duration: 1.8s;
}

.game-platform-card:nth-child(8)::after {
    animation-duration: 2.8s;
}

.game-platform-card:nth-child(9)::after {
    animation-duration: 1.2s;
}

.game-platform-card:nth-child(10)::after {
    animation-duration: 3.2s;
}

.game-platform-card:nth-child(11)::after {
    animation-duration: 2.2s;
}

.game-platform-card:nth-child(12)::after {
    animation-duration: 4.5s;
}

.game-platform-card:nth-child(13)::after {
    animation-duration: 1.6s;
}

.game-platform-card:nth-child(14)::after {
    animation-duration: 3.8s;
}

.game-platform-card:nth-child(15)::after {
    animation-duration: 2.1s;
}

.game-platform-card:nth-child(16)::after {
    animation-duration: 1.4s;
}

.game-platform-card:nth-child(17)::after {
    animation-duration: 3.3s;
}

.game-platform-card:nth-child(18)::after {
    animation-duration: 2.7s;
}

.game-platform-card:nth-child(19)::after {
    animation-duration: 4.2s;
}

.game-platform-card:nth-child(20)::after {
    animation-duration: 1.9s;
}

.game-platform-card:nth-child(21)::after {
    animation-duration: 3.6s;
}

.game-platform-card:nth-child(22)::after {
    animation-duration: 2.3s;
}

.game-platform-card:nth-child(23)::after {
    animation-duration: 1.7s;
}

.game-platform-card:nth-child(24)::after {
    animation-duration: 4.8s;
}

.game-platform-card:nth-child(25)::after {
    animation-duration: 2.9s;
}

.game-platform-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 204, 0, 0.2),
        0 0 30px rgba(255, 204, 0, 0.4);
}

.game-platform-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 2;
    transition: all ease-in 0.2s;
}

.game-platform-card:hover img {
    filter: brightness(0.7) blur(0.3px);
    transform: scale(1.05);
}

@keyframes moveSnake {
    from {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: -900;
    }
}

.game-platform-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px 10px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    color: #fff;
    text-align: center;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5), 0 0 15px #ffcc00;
    z-index: 5;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    pointer-events: none;
}

.game-platform-card:hover .game-platform-card__overlay {
    opacity: 1;
    transform: translateY(0);
}

.play-icon {
    display: none;
}

.platform-details-card {
    background: #221F2D;
    border-radius: 12px;
    padding: 20px;
    color: #fff;
    max-width: 600px;
    width: 100%;
}

.platform-details-card .platform-img {
    width: 50px;
    height: 50px;
}

.platform-details-card h4 {
    font-weight: 500;
    font-size: 1.6rem;
}

.platform-details-card .refresh-balance-btn {
    color: white;
    cursor: pointer;
    font-size: 18px;
}

/* Footer */
.footer {
    text-align: center;
    color: var(--text-dim);
    font-size: var(--font-sm);
    margin-top: var(--space-2xl);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .header__stats {
        display: none;
        /* Hide on small screens or use a menu */
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px var(--space-sm) 8px;
        flex-wrap: wrap;
        gap: 0;
        row-gap: 8px;
        align-items: center;
    }

    .header__logo {
        flex: 1;
    }

    .header__logo img {
        height: 32px;
    }

    /* Avatar stays on row 1 right side */
    .user-dropdown {
        order: 2;
    }

    /* Stats drop to row 2, full width */
    .header__stats {
        display: flex;
        order: 3;
        width: 100%;
        gap: 8px;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .header__stats::-webkit-scrollbar {
        display: none;
    }

    .header__stats .chip {
        padding: 5px 10px;
        font-size: 12px;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .user-info {
        display: none;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: var(--font-sm);
    }

    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }

    .header__user {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .game-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .dataTables_length {
        margin-bottom: 12px;
    }

    div.dataTables_wrapper div.dataTables_length,
    div.dataTables_wrapper div.dataTables_filter,
    div.dataTables_wrapper div.dataTables_info,
    div.dataTables_wrapper div.dataTables_paginate {
        text-align: center;
    }

    div.dataTables_wrapper div.dataTables_paginate {
        margin-top: 12px;
    }
}

/* DataTables' Bootstrap5 pagination controls had no brand styling on the
   customer side at all (unlike admin/brand, which both already theme
   these) — left every paginated customer table (My Transactions, etc.)
   showing Bootstrap's stock blue "active page" pill. Matches the exact
   values admin/brandstyle.css already use for the same component. */
.pagination .page-item.active .page-link {
    background-color: #C814E1;
    border-color: #C814E1;
    color: #fff;
}

.pagination .page-item .page-link {
    color: #000;
}

.page-item.disabled .page-link,
.paginate_button.previous.disabled .page-link,
.paginate_button.next.disabled .page-link {
    cursor: not-allowed !important;
    pointer-events: none;
    color: #cccccc !important;
    background-color: transparent !important;
    border-color: #dee2e6 !important;
}

/* ── Support Chat ── */
.support-chat-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
    border-radius: 14px;
    padding: 28px 32px;
    margin-bottom: 24px;
}

.support-chat-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
}

.support-chat-card h4 i {
    color: var(--primary);
}

.support-chat-window {
    height: 420px;
    overflow-y: auto;
    background: #fafafa;
    border: 1.5px solid rgba(106, 27, 154, 0.14);
    border-radius: 10px;
    padding: 18px;
    margin: 18px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.support-chat-msg-group {
    max-width: 70%;
}

.support-chat-msg-group.mine {
    align-self: flex-end;
}

.support-chat-msg-group.theirs {
    align-self: flex-start;
}

.support-chat-msg {
    padding: 10px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.support-chat-msg .msg-meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 3px;
}

.support-chat-msg .sender-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    opacity: 0.65;
}

.support-chat-msg .msg-timestamp {
    font-size: 11px;
    opacity: 0.55;
}

.support-chat-msg.mine {
    background: linear-gradient(180deg, #6a1b9a 0%, #a834d1 51.44%, #6e0b7b 100%);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.support-chat-msg.theirs {
    background: #fff;
    color: #333;
    border: 1px solid #e6e6e6;
    border-bottom-left-radius: 4px;
}

.support-chat-empty {
    margin: auto;
    color: #999;
    font-size: 14px;
}

.support-chat-msg.support-chat-typing {
    font-style: italic;
    opacity: 0.7;
}

.support-chat-system-notice {
    align-self: center;
    max-width: 85%;
    padding: 8px 14px;
    border-radius: 10px;
    background: #fdf3ff;
    color: #6a1b9a;
    font-size: 12.5px;
    text-align: center;
}

.support-chat-start-new-btn {
    align-self: center;
    margin-top: 4px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(180deg, #6a1b9a 0%, #a834d1 51.44%, #6e0b7b 100%);
    color: #fff;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.support-chat-talk-human-btn {
    align-self: center;
    margin: 6px 0;
    border: 1.5px solid #a834d1;
    border-radius: 20px;
    background: #fff;
    color: #6a1b9a;
    padding: 7px 18px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
}

.support-chat-talk-human-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

.support-chat-form {
    display: flex;
    gap: 10px;
}

.support-chat-form .form-control {
    border: 1.5px solid #a834d1;
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 14px;
    height: 46px;
    background: #fafafa;
    color: #2d2d2d;
    flex: 1;
    min-width: 0;
}

.support-chat-form .form-control:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.14);
    background: #fff;
    color: #2d2d2d;
}

.support-chat-form button {
    background: linear-gradient(180deg, #6a1b9a 0%, #a834d1 51.44%, #6e0b7b 100%);
    color: #fff;
    border: none;
    border-radius: 40px;
    padding: 11px 28px;
    font-size: 14px;
    font-weight: 700;
    height: 46px;
    white-space: nowrap;
}

.support-chat-form button:hover {
    opacity: 0.88;
}

/* ── Floating Support Chat Widget ── */
#support-chat-widget {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 10000;
}

@media (max-width: 768px) {

    /* Nudged a little further right/down than the desktop default so it
       sits closer to the corner on phone widths. */
    #support-chat-widget {
        right: 16px;
        bottom: 16px;
    }

    /* Clears the icon-rail's mobile bottom tab bar (fixed, ~64px including
       its own padding) so the two floating elements don't overlap — only
       needed on the pages that actually render the rail. */
    body.has-icon-rail #support-chat-widget {
        bottom: 50px;
    }
}

#support-chat-toggle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(180deg, #6a1b9a 0%, #a834d1 51.44%, #6e0b7b 100%);
    color: #fff;
    font-size: 22px;
    box-shadow: 0 6px 20px rgba(106, 27, 154, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

#support-chat-toggle:hover {
    opacity: 0.92;
}

#support-chat-panel {
    position: absolute;
    right: 0;
    bottom: 74px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 460px;
    max-height: 70vh;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
    border: 1.5px solid rgba(106, 27, 154, 0.18);
    flex-direction: column;
    overflow: hidden;
}

.support-chat-panel-header {
    background: linear-gradient(180deg, #6a1b9a 0%, #a834d1 51.44%, #6e0b7b 100%);
    color: #fff;
    padding: 14px 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.support-chat-panel-header i {
    margin-right: 6px;
}

#support-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

#support-chat-panel .support-chat-window {
    flex: 1;
    height: auto;
    border: none;
    border-radius: 0;
    margin: 0;
}

#support-chat-panel .support-chat-form {
    padding: 12px;
    border-top: 1px solid #eee;
}

#support-chat-panel .support-chat-form .form-control {
    height: 42px;
}

#support-chat-panel .support-chat-form button {
    height: 42px;
    width: 42px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Chat feedback (message-level + session-level) ── */
.support-chat-msg-feedback-wrap {
    margin-top: 6px;
}

.support-chat-msg-feedback {
    display: flex;
    align-items: center;
    gap: 6px;
}

.support-chat-msg-feedback button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    color: #999;
    font-size: 13px;
}

.support-chat-msg-feedback button.active {
    color: #fff;
    background: #6a1b9a;
    border-radius: 50%;
}

.support-chat-msg-feedback button:disabled {
    cursor: default;
}

.support-chat-msg-feedback button:disabled:not(.active) {
    opacity: 0.35;
}

.support-chat-feedback-reason {
    margin-top: 8px;
}

.support-chat-feedback-reason textarea {
    width: 100%;
    border: 1.5px solid #a834d1;
    border-radius: 8px;
    padding: 8px;
    font-size: 13px;
    resize: none;
    min-height: 60px;
}

.support-chat-feedback-reason button {
    margin-top: 6px;
    border-radius: 20px;
    background: linear-gradient(180deg, #6a1b9a 0%, #a834d1 51.44%, #6e0b7b 100%);
    color: #fff;
    border: none;
    padding: 6px 18px;
    font-size: 13px;
    cursor: pointer;
}

#support-chat-session-feedback {
    padding: 14px 16px;
    border-top: 1px solid #eee;
    background: #fafafa;
    text-align: center;
}

#support-chat-session-feedback p {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 600;
    color: #2d2d2d;
}

#support-chat-session-feedback .feedback-btn {
    background: #fff;
    border: 1.5px solid #e6e6e6;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    margin: 0 4px;
    cursor: pointer;
    font-size: 15px;
    color: #757575;
}

#support-chat-session-feedback .feedback-btn.up:hover,
#support-chat-session-feedback .feedback-btn.up:focus {
    color: #2e7d32;
    border-color: #2e7d32;
}

#support-chat-session-feedback .feedback-btn.down:hover,
#support-chat-session-feedback .feedback-btn.down:focus {
    color: #c62828;
    border-color: #c62828;
}

#support-chat-session-feedback .skip-feedback {
    display: block;
    margin: 8px auto 0;
    background: none;
    border: none;
    color: #999;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

.btn-action {
    min-width: 100px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

#recipient_id+.select2-container {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

#recipient_id+.select2-container .select2-selection--single {
    height: 46px;
    display: flex;
    align-items: center;
    border-radius: var(--radius-full);
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#recipient_id+.select2-container .select2-selection__rendered {
    line-height: normal;
    color: #fff !important;
    order: 1;
    padding-left: 16px;
}

#recipient_id+.select2-container .select2-selection__clear {
    order: 2;
    margin-left: auto;
    margin-right: 22px;
    font-size: 18px;
    line-height: normal;
    color: #c9c3d4;
}

#recipient_id+.select2-container .select2-selection__arrow {
    top: 50%;
    right: 14px;
    height: 20px;
    width: 20px;
    margin-top: -10px;
}

#recipient_id+.select2-container .select2-selection__arrow b {
    top: 50%;
}

#recipient_id+.select2-container .select2-selection__placeholder {
    color: #9c93a8 !important;
}

.select2-dropdown {
    background-color: rgba(24, 23, 35, 0.97) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 10px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.select2-search--dropdown {
    background-color: rgba(24, 23, 35, 0.97);
    padding: 10px !important;
}

.select2-search--dropdown .select2-search__field {
    background-color: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 20px !important;
    color: #fff !important;
    padding: 8px 14px !important;
    outline: none;
}

.select2-search--dropdown .select2-search__field::placeholder {
    color: #9c93a8;
}

.select2-results__options {
    background-color: rgba(24, 23, 35, 0.97) !important;
}

.select2-results__option {
    color: #e8e2ef !important;
    padding: 10px 16px;
}

.select2-results__option--highlighted[aria-selected] {
    background-color: rgb(200, 20, 225) !important;
    color: #fff !important;
}

.select2-results__option[aria-selected="true"]:not(.select2-results__option--highlighted),
.select2-results__option--selected:not(.select2-results__option--highlighted) {
    background-color: rgba(200, 20, 225, 0.18) !important;
    color: #fff !important;
}

.select2-results__message {
    color: #9c93a8 !important;
}

.select2-results__options::-webkit-scrollbar {
    width: 8px;
}

.select2-results__options::-webkit-scrollbar-track {
    background: transparent;
}

.select2-results__options::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 6px 14px 6px 10px;
    border-radius: var(--radius-full);
    color: var(--text-dim);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.back-link i {
    font-size: 12px;
    transition: transform 0.2s ease;
}

.back-link:hover,
.back-link:focus-visible {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.06);
}

.back-link:hover i,
.back-link:focus-visible i {
    transform: translateX(-3px);
}

.systemlogmain.community-panel {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

#content.content:has(> .community-panel) {
    padding-top: 20px;
    padding-bottom: 0;
}

@media (max-width: 991px) {
    #content.content:has(> .community-panel) {
        padding-top: 8px;
    }
}

.community-panel .text-muted {
    color: var(--text-dim) !important;
}

.community-panel .alert {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.community-panel .alert i {
    font-size: var(--font-lg);
    flex-shrink: 0;
}

.community-panel .alert span {
    flex: 1;
}

.community-panel .alert .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.6;
    flex-shrink: 0;
}

.community-panel .alert .btn-close:hover {
    opacity: 1;
}

.community-panel .alert-danger {
    background-color: #301c33;
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #ff8f9a;
}

.community-panel .alert-success {
    background-color: #1e2733;
    border: 1px solid rgba(40, 167, 69, 0.35);
    color: #7be495;
}

.community-panel a:not(.btn):hover {
    color: var(--text-white);
}

.dm-conversation-item .btn-action,
.right-card__group-row .btn-action {
    min-width: 0;
    padding: 6px 14px;
    font-size: var(--font-xs);
    gap: 4px;
    box-shadow: 0 2px 8px rgba(163, 41, 188, 0.35);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.dm-conversation-item .btn-action:hover,
.right-card__group-row .btn-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(163, 41, 188, 0.45);
    opacity: 1;
}

#toast-container.toast-top-right {
    top: 160px;
    right: 20px;
}

#toast-container>div {
    background-image: none !important;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 14px 16px 14px 56px;
    opacity: 1;
    font-family: inherit;
    min-width: 280px;
}

#toast-container>div:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
    opacity: 1;
}

#toast-container>div.toast-success {
    background-color: rgba(22, 34, 28, 0.97);
    border: 1px solid rgba(40, 167, 69, 0.3);
    border-left: 3px solid #3dd671;
    background-image: none !important;
}

#toast-container>div.toast-error {
    background-color: rgba(42, 20, 34, 0.97);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-left: 3px solid #ff5468;
    background-image: none !important;
}

#toast-container>div::before {
    font-family: 'Font Awesome 5 Free', sans-serif;
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

#toast-container>.toast-success::before {
    content: '\f00c';
    color: #16221c;
    background: #3dd671;
}

#toast-container>.toast-error::before {
    content: '\f00d';
    color: #2a1422;
    background: #ff5468;
}

#toast-container .toast-message {
    color: var(--text-white);
    font-size: var(--font-sm);
    font-weight: 500;
    line-height: 1.4;
}

#toast-container .toast-close-button {
    color: var(--text-dim);
    text-shadow: none;
    opacity: 0.7;
    transition: opacity 0.15s, color 0.15s;
}

#toast-container .toast-close-button:hover {
    opacity: 1;
    color: var(--text-white);
}

.community-panel .filter-nav {
    margin: var(--space-xs) 0 0 0;
    padding-bottom: 0;
    padding-top: 0.2rem;
}

.text-primary {
    color: var(--primary) !important;
}

.community-panel .support-chat-window {
    background: rgba(0, 0, 0, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.community-panel .support-chat-msg.theirs {
    background: #22202f;
    color: #e8e2ef;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.community-panel .support-chat-empty {
    color: var(--text-dim);
}

.community-panel .support-chat-form .form-control {
    background: #141222;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.community-panel .support-chat-form .form-control::placeholder {
    color: #9c93a8;
}

.community-panel .support-chat-form .form-control:focus {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(157, 46, 192, 0.18);
}

/* ── Community Activity Feed ───────────────────────────── */
.feed-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.feed-card {
    background: #222132;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.feed-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.feed-card__meta {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.feed-card__author {
    font-weight: 600;
    color: var(--text-white);
}

.feed-card__timestamp {
    font-size: var(--font-xs);
    color: var(--text-dim);
}

.feed-card__locked-badge {
    margin-left: auto;
    color: var(--accent-gold);
}

.feed-card__report {
    margin-left: auto;
}

.feed-card__title-link {
    text-decoration: none;
    color: inherit;
}

.feed-card__title-link:hover .feed-card__title {
    color: var(--text-white);
}

.feed-card__title {
    margin: 0 0 var(--space-2xs) 0;
    font-size: var(--font-lg);
    color: var(--text-white);
}

.feed-card__excerpt,
.feed-card__body {
    color: var(--text-dim);
    margin: 0;
}

.feed-card--detail .feed-card__body {
    color: #e8e2ef;
    font-size: var(--font-md);
    margin-top: var(--space-xs);
}

.feed-card__image {
    display: block;
    max-width: 100%;
    max-height: 420px;
    width: auto;
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
    cursor: zoom-in;
}

.feed-card__footer {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    border-top: 1px solid var(--glass-border);
    margin-top: var(--space-md);
    padding-top: var(--space-sm);
}

.feed-card__comments-toggle,
.feed-card__like-btn,
.feed-card__report-btn {
    background: none;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-dim);
    font-size: var(--font-sm);
    cursor: pointer;
}

.feed-card__comments-toggle:hover,
.feed-card__like-btn:hover,
.feed-card__report-btn:hover:not(:disabled) {
    color: var(--text-white);
}

.feed-card__like-btn.is-liked {
    color: #ff4d8d;
}

.feed-card__report-btn {
    margin-left: auto;
}

.feed-card__report-btn:disabled {
    cursor: default;
    opacity: 0.6;
}

.feed-card__group-attr {
    color: var(--text-dim);
    font-weight: 400;
}

.feed-card__comments-panel {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--glass-border);
}

.feed-empty {
    text-align: center;
    color: var(--text-dim);
    padding: var(--space-2xl) 0;
}

.community-empty-state {
    max-width: 420px;
    margin: var(--space-2xl) auto 0;
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    background: #222132;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.community-empty-state__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-md);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--accent-gradient);
    color: #fff;
    font-size: 26px;
}

.community-empty-state__title {
    color: var(--text-white);
    font-size: var(--font-xl);
    margin: 0 0 var(--space-xs);
}

.community-empty-state__text {
    color: var(--text-dim);
    font-size: var(--font-sm);
    margin: 0 0 var(--space-lg);
}

.community-empty-state__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--accent-gradient);
    color: #fff;
    font-weight: 600;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: var(--transition);
}

.community-empty-state__btn:hover {
    transform: translateY(-2px);
}

.feed-comments {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.feed-comment {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.avatar--sm {
    width: 32px;
    height: 32px;
    font-size: 12px;
    flex-shrink: 0;
}

.feed-comment__bubble {
    flex: 1;
    min-width: 0;
}

.feed-comment__author {
    font-weight: 600;
    font-size: var(--font-sm);
    color: var(--text-white);
    margin-right: 6px;
}

.feed-comment__body {
    display: inline;
    margin: 0;
    color: var(--text-white);
    font-size: var(--font-sm);
}

.feed-comment__actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: 2px;
}

.feed-comment__timestamp {
    font-size: var(--font-xs);
    color: var(--text-dim);
}

.feed-comment__action-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--text-dim);
    font-size: var(--font-xs);
    font-weight: 600;
    cursor: pointer;
}

.feed-comment__action-btn:hover {
    color: var(--text-white);
    text-decoration: underline;
}

.feed-comments__empty {
    color: var(--text-dim);
    padding: 0 0 var(--space-xs);
}

.feed-composer__preview {
    display: block;
    max-width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-top: var(--space-sm);
}

.modal-content.modal-dark {
    background: #222132;
    border: 1px solid var(--glass-border);
    color: #f0f0f5;
}

.modal-dark h4,
.modal-dark h5 {
    color: var(--text-white);
}

.modal-dark .text-muted {
    color: var(--text-dim) !important;
}

.modal-dark .form-group label {
    margin-left: 0;
    color: var(--text-white);
}

.modal-dark .alert-danger {
    background-color: #3a1d34;
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #ff8f9a;
}

.modal-dark input[type="file"].form-control {
    display: flex;
    align-items: center;
    color: var(--text-dim);
    padding-left: 20px;
}

.modal-dark .modal-header,
.modal-dark .modal-footer {
    border-color: rgba(255, 255, 255, 0.1);
}

.modal-dark .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
}

.modal-dark .modal-header .btn-close:hover {
    opacity: 1;
}

.modal-dark input[type="file"].form-control::file-selector-button,
.modal-dark input[type="file"].form-control::-webkit-file-upload-button {
    margin-right: var(--space-sm);
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--primary-gradient);
    color: #fff;
    font-weight: 600;
    font-size: var(--font-sm);
    cursor: pointer;
    transition: var(--transition);
}

.modal-dark input[type="file"].form-control:hover::file-selector-button,
.modal-dark input[type="file"].form-control:hover::-webkit-file-upload-button {
    opacity: 0.85;
}

.support-chat-card .text-muted {
    color: var(--text-dim) !important;
}

.support-chat-card .support-chat-window {
    background: rgba(0, 0, 0, 0.3);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.support-chat-card .support-chat-msg.theirs {
    background: #22202f;
    color: #e8e2ef;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.support-chat-card .support-chat-msg {
    max-width: 72%;
    align-self: flex-start;
}

.support-chat-card .support-chat-msg.mine {
    align-self: flex-end;
}

.support-chat-card .support-chat-msg .sender-label {
    display: block;
    margin-bottom: 3px;
}

.support-chat-card .support-chat-empty {
    color: var(--text-dim);
}

.support-chat-card .support-chat-form .form-control {
    background: #141222;
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.support-chat-card .support-chat-form .form-control::placeholder {
    color: #9c93a8;
}

/* ── Messenger-style Direct Messages inbox ─────────────────────────── */
.dm-layout {
    display: flex;
    min-height: 420px;
    gap: 1.2rem;
}

.dm-sidebar {
    display: flex;
    flex-direction: column;
    width: 320px;
    flex-shrink: 0;
    background: #222132;
    border-radius: 10px;
    align-self: flex-start;
    position: sticky;
    top: calc(var(--header-height, 0px) + 12px);
    height: calc(100vh - var(--header-height, 0px) - 64px);
}

.dm-sidebar__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-bottom: 1px solid var(--glass-border);
}

.dm-search {
    flex: 1;
    min-width: 0;
    border-radius: var(--radius-full);
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: var(--font-xs);
}

.dm-search::placeholder {
    color: #dedede;
    font-size: var(--font-sm);
}

.dm-search:focus {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border-color: var(--primary);
    outline: 0;
    box-shadow: none;
}

.dm-search::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    cursor: pointer;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23a0a0c0'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center / 10px no-repeat;
}

.dm-search::-webkit-search-cancel-button:hover {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e");
}

.dm-new-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.dm-conversation-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dm-conversation-list::-webkit-scrollbar {
    display: none;
}

.dm-conversation-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.dm-conversation-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.dm-conversation-item.active {
    background: rgba(157, 46, 192, 0.16);
}

.dm-sidebar__section-label {
    padding: var(--space-md) var(--space-md) var(--space-2xs);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-dim);
}

.dm-conversation-item--all-posts {
    padding: var(--space-md);
}

.dm-conversation-item--all-posts:hover {
    background: rgba(255, 255, 255, 0.06);
}

.dm-conversation-item--all-posts.active {
    background: rgba(157, 46, 192, 0.16);
}

.dm-conversation-item--all-posts .dm-conversation-item__name {
    font-weight: 700;
}

.dm-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: none;
}

.dm-conversation-item__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.dm-conversation-item__name {
    font-weight: 700;
    color: var(--text-white);
}

.dm-conversation-item__preview {
    color: var(--text-dim);
    font-size: var(--font-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dm-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #222132;
    border-radius: 10px;
}

.community-feed-pane {
    display: contents;
}

.feed-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.group-cover {
    flex-shrink: 0;
    margin-bottom: var(--space-md);
}

.group-cover__banner {
    height: 110px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: var(--accent-gradient);
}

.group-cover__row {
    display: flex;
    align-items: flex-end;
    gap: var(--space-md);
    padding: 0 var(--space-md) var(--space-sm);
    /* Matches .feed-card's solid fill (see its comment) instead of
       --glass-bg. */
    background: #222132;
    border: 1px solid var(--glass-border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.avatar--cover {
    width: 72px;
    height: 72px;
    font-size: 24px;
    margin-top: -36px;
    border: 4px solid var(--bg-page);
}

.group-cover__meta {
    flex: 1;
    min-width: 0;
    padding-bottom: 2px;
    padding-top: 10px;
}

.group-cover__name {
    color: var(--text-white);
    font-size: var(--font-xl);
    margin: 0;
}

.group-cover__sub {
    color: var(--text-dim);
    font-size: var(--font-sm);
    margin: 2px 0 0;
}

.group-cover__actions {
    display: flex;
    gap: var(--space-xs);
    flex-shrink: 0;
    padding-bottom: 4px;
}

.group-cover__members-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-dim);
    padding: 4px 12px;
    font-size: var(--font-xs);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.group-cover__members-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
}

.group-cover__leave-btn {
    /* Opaque equivalent of rgba(220, 53, 69, 0.08) over the dark page
       backdrop — same reasoning as .community-panel .alert-danger: a
       translucent background is unresolvable to contrast tooling, so it
       checked this text against the raw (opaque) red instead and failed. */
    background: #2a1830;
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: #ff8a93;
    padding: 4px 12px;
    font-size: var(--font-xs);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.group-cover__leave-btn:hover {
    /* Opaque equivalent of rgba(220, 53, 69, 0.15) over the dark page. */
    background: #37192f;
    border-color: rgba(220, 53, 69, 0.5);
    color: #ffb0b8;
}

.all-posts-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    flex-shrink: 0;
    background: #222132;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.all-posts-icon {
    background: var(--accent-gradient);
    font-size: 18px;
}

.all-posts-header__meta {
    min-width: 0;
}

.all-posts-header__name {
    color: var(--text-white);
    font-size: var(--font-lg);
    margin: 0;
}

.all-posts-header__sub {
    color: var(--text-dim);
    font-size: var(--font-sm);
    margin: 2px 0 0;
}

.member-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-height: 360px;
    overflow-y: auto;
    padding: 4px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
    background-color: #2a2740;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.member-list::-webkit-scrollbar {
    width: 6px;
}

.member-list::-webkit-scrollbar-track {
    background: transparent;
}

.member-list::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.member-list__item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.member-list__item:last-child {
    border-bottom: none;
}

.member-list__meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.member-list__name {
    font-weight: 600;
    color: var(--text-white);
}

.member-list__joined {
    font-size: var(--font-xs);
    color: var(--text-dim);
}

.member-list__role {
    font-size: var(--font-xs);
    text-transform: capitalize;
    color: var(--text-dim);
    background: #3d2856;
    border-radius: var(--radius-full, 999px);
    padding: 2px 10px;
    flex-shrink: 0;
}

.member-list__role--admin {
    color: var(--primary);
    background: rgba(157, 46, 192, 0.18);
}

.feed-pane-header__leave .btn {
    /* Opaque equivalent of rgba(220, 53, 69, 0.08) — see
       .group-cover__leave-btn's identical fix just above for why. */
    background: #2a1830;
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: #ff8a93;
    padding: 4px 12px;
    font-size: var(--font-xs);
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s;
}

.feed-pane-header__leave .btn:hover {
    /* Opaque equivalent of rgba(220, 53, 69, 0.15). */
    background: #37192f;
    border-color: rgba(220, 53, 69, 0.5);
    transform: translateY(-1px);
    color: #ff8a93;
}

.feed-composer-trigger {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    background: #222132;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    text-align: left;
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.feed-composer-trigger:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
}

.feed-composer-trigger__text {
    flex: 1;
    color: var(--text-dim);
    font-size: var(--font-sm);
}

.feed-composer-trigger__icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(157, 46, 192, 0.18);
    color: var(--primary);
    font-size: var(--font-sm);
    flex-shrink: 0;
}

.feed-scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.feed-scroll-area::-webkit-scrollbar {
    display: none;
}

.feed-pane-header h4 {
    color: var(--text-white);
    font-size: var(--font-lg);
}

.feed-pane-header p {
    font-size: var(--font-sm);
}

.dm-chat__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-bottom: 1px solid var(--glass-border);
}

.dm-chat__header-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dm-chat__name {
    font-weight: 700;
    color: var(--text-white);
    font-size: var(--font-lg);
}

.dm-chat__status {
    color: #2ecc71;
    font-size: var(--font-xs);
    font-weight: 600;
}

.dm-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.dm-presence-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2ecc71;
    border: 2px solid #222132;
}

.dm-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-md);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    justify-content: flex-end;
}

.dm-chat__empty {
    margin: auto;
    color: var(--text-dim);
}

.dm-chat__placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    text-align: center;
    padding: var(--space-lg);
}

.dm-bubble {
    position: relative;
    max-width: 68%;
    padding: 12px 18px;
    border-radius: 18px;
    line-height: 1.4;
    overflow-wrap: break-word;
}

.dm-bubble.theirs {
    align-self: flex-start;
    background: #3a3a44;
    color: #f2f2f5;
    border-bottom-left-radius: 4px;
}

.dm-bubble.mine {
    align-self: flex-end;
    background: var(--accent-gradient);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.dm-bubble__flag {
    display: inline-flex;
    margin-left: var(--space-xs);
    background: none;
    border: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    vertical-align: middle;
}

.dm-bubble__flag:hover {
    color: #fff;
}

#newMessageModal .btn-primary {
    background: var(--accent-gradient);
    border: none;
}

.dm-chat__form {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md);
    border-top: 1px solid var(--glass-border);
}

.dm-chat__form .form-control {
    flex: 1;
    min-width: 0;
    border-radius: var(--radius-full);
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.dm-chat__form .form-control::placeholder {
    color: #dedede;
}

.dm-chat__form .form-control:focus {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    border-color: var(--primary);
    outline: 0;
    box-shadow: none;
}

.dm-chat__form button {
    flex-shrink: 0;
    background: var(--primary-gradient);
    color: #fff;
    border: none;
    border-radius: var(--radius-full);
    padding: 0 var(--space-lg);
    font-weight: 700;
}

.dm-back-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-white);
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.15s;
}

.dm-back-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 768px) {
    .dm-layout {
        height: calc(100vh - 220px);
        overflow: hidden;
    }

    .dm-sidebar,
    .community-right-pane {
        align-self: auto;
        position: static;
    }

    .dm-conversation-list {
        overflow-y: auto;
    }

    .community-right-pane {
        overflow-y: auto;
    }

    .dm-sidebar {
        width: 100%;
        border-right: none;
    }

    .dm-chat,
    .community-feed-pane {
        display: none;
    }

    .dm-layout.is-active .dm-sidebar {
        display: none;
    }

    .dm-layout.is-active .dm-chat {
        display: flex;
    }

    .dm-layout.is-active .community-feed-pane {
        display: contents;
    }

    .dm-back-btn {
        display: flex;
    }

    .feed-main {
        padding: 0;
    }

    .dm-chat__form {
        padding-right: 15px;
    }

    .page-header-row .systemlogheading {
        display: none;
    }

    .group-cover__banner {
        height: 80px;
    }

    .avatar--cover {
        width: 56px;
        height: 56px;
        font-size: 18px;
        margin-top: -28px;
    }

    .group-cover__row {
        flex-wrap: wrap;
        align-items: center;
    }

    .group-cover__meta {
        padding-top: 0;
        padding-bottom: 0;
    }

    .group-cover__actions {
        width: 100%;
        padding-bottom: var(--space-sm);
    }

    .group-cover__actions .btn,
    .group-cover__actions form {
        flex: 1;
    }

    .group-cover__actions form .btn {
        width: 100%;
    }
}

.community-right-pane {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    max-height: calc(100vh - var(--header-height, 0px) - 76px);
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    align-self: flex-start;
    position: sticky;
    top: calc(var(--header-height, 0px) + 12px);
}

.community-right-pane::-webkit-scrollbar {
    display: none;
}

.right-card {
    background: #222132;
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.right-card__title {
    color: var(--text-white);
    font-size: var(--font-sm);
    margin-bottom: var(--space-xs);
}

.right-card__text {
    color: var(--text-dim);
    font-size: var(--font-sm);
    margin-bottom: var(--space-sm);
}

.right-card__stack {
    display: flex;
    margin-bottom: var(--space-xs);
}

.right-card__stack-avatar {
    margin-left: -10px;
    border: 2px solid #222132;
}

.right-card__stack-avatar:first-child {
    margin-left: 0;
}

.right-card__count {
    color: var(--text-dim);
    font-size: var(--font-xs);
}

.right-card__group-row {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) 0;
}

.right-card__group-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.right-card__group-name {
    color: var(--text-white);
    font-size: var(--font-sm);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.right-card__group-count {
    color: var(--text-dim);
    font-size: var(--font-xs);
}

@media (max-width: 1300px) {
    .community-right-pane {
        display: none;
    }
}

.support-chat-card .support-chat-form .form-control:focus {
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(157, 46, 192, 0.18);
}

.js-emoji-trigger.js-emoji-trigger {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0 var(--space-xs);
    flex-shrink: 0;
    opacity: 0.75;
    transition: opacity 0.15s, transform 0.15s;
}

.js-emoji-trigger.js-emoji-trigger:hover {
    opacity: 1;
    transform: scale(1.12);
}

.chat-input-wrap {
    position: relative;
    display: flex;
    flex: 1;
    min-width: 0;
}

.chat-input-wrap .form-control {
    padding-right: 40px;
}

.emoji-trigger-overlay.emoji-trigger-overlay {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.emoji-trigger-overlay.emoji-trigger-overlay:hover {
    transform: translateY(-50%) scale(1.12);
}

.emoji-picker {
    position: fixed;
    z-index: 2000;
    width: 264px;
    max-height: 224px;
    overflow-y: auto;
    background: linear-gradient(160deg, #1c1130 0%, #2c1547 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    padding: var(--space-xs);
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
}

.emoji-picker__item {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    padding: 6px 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.1s;
}

.emoji-picker__item:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ---------- Site footer (mirrors the public landing page footer) ---------- */
.pp-footer {
    background: var(--bg-gradient), var(--bg-dark);
    color: var(--text-dim);
    border-top: 1px solid var(--glass-border);
    font-size: 15px;
    line-height: 1.55;
    text-align: left;
}

.pp-footer *,
.pp-footer *::before,
.pp-footer *::after {
    box-sizing: border-box;
}

.pp-footer-wrap {
    max-width: 1160px;
    margin: 0 auto;
    padding: 44px 20px 28px;
}

.pp-footer-top {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--glass-border);
}

.pp-footer-logo img {
    display: block;
    width: 102px;
    height: auto;
}

.pp-footer-rsg {
    margin: 0;
    flex: 1 1 320px;
    color: var(--text-white);
    font-size: 16px;
}

.pp-footer-rsg strong {
    font-weight: 800;
}

.pp-footer a {
    text-decoration: none;
    color: inherit;
}

.pp-footer a:hover,
.pp-footer a:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pp-footer .pp-footer-rsg a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pp-footer-cols {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px 36px;
    padding: 28px 0;
}

.pp-footer-col h2 {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--primary);
}

.pp-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pp-footer-col li {
    margin: 0 0 9px;
}

.pp-footer-mail {
    color: var(--text-dim) !important;
    word-break: break-word;
    margin-left: 6px;
}

.pp-footer-cards {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    padding: 18px 0;
    border-top: 1px solid var(--glass-border);
    color: var(--text-dim);
    font-size: 14px;
}

.pp-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.pp-cards li {
    display: inline-flex;
}

.pp-cards img {
    display: block;
    height: 32px;
    width: auto;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
}

.pp-footer-legal {
    padding-top: 18px;
    border-top: 1px solid var(--glass-border);
    color: var(--text-dim);
    font-size: 13.5px;
}

.pp-footer-legal p {
    margin: 0 0 4px;
}

@media (max-width: 860px) {
    .pp-footer-cols {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .pp-footer-wrap {
        padding: 36px 16px 24px;
    }
}
