/* @import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;700;900&display=swap'); */


@font-face {
    font-family: 'Yekan Bakh';
    src: url('../fonts/YekanBakhFaNum-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Yekan Bakh';
    src: url('../fonts/YekanBakhFaNum-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Yekan Bakh';
    src: url('../fonts/YekanBakhFaNum-ExtraBold.woff') format('woff');
    font-weight: 800;
    font-style: normal;
}


:root {
    --gold: #d4af37;
    --gold-light: #f5d76e;
    --gold-dark: #b8960c;
    --black: #0b0b0c;
    --black-light: #141416;
    --black-card: #1a1a1f;
    --black-hover: #222228;
    --white: #f0f0f0;
    --white-dim: #b0b0b0;
    --danger: #e74c3c;
    --success: #2ecc71;
    --info: #3498db;
    --sidebar-w: 260px;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --transition: 0.3s cubic-bezier(.4,0,.2,1);

    --gold-primary: #d4af37;
    --gold-light: #f4e5b8;
    --gold-dark: #b8941e;
    --sidebar-w: 280px;

}

* {
    font-feature-settings: "lnum";
    unicode-bidi: plaintext;
}

body, input, button, div, span, p {
    direction: rtl;
    unicode-bidi: plaintext;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Yekan Bakh', sans-serif;
    background: var(--black);
    color: var(--white);
    direction: rtl;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--black-light); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ─── DASHBOARD WRAPPER ─── */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
    position: relative;
}
.sidebar {
    position: fixed;
    top: 60px;
    right: -100%;
    width: var(--sidebar-w);
    height: calc(100vh - 60px);
    background: linear-gradient(135deg, 
        rgba(212, 175, 55, 0.08) 0%,
        rgba(184, 148, 30, 0.12) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: -10px 0 40px rgba(212, 175, 55, 0.15);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, 
        rgba(212, 175, 55, 0.1) 0%, 
        transparent 70%);
    pointer-events: none;
}

.sidebar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(0deg, rgba(212, 175, 55, 0.04) 0%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.sidebar-hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}



.sidebar-logo {
    display: none !important;
}



/* .sidebar {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
} */

.sidebar.sidebar-hidden {
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
}


.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    z-index: 1;
    min-height: 75px;
}


.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--white);
    letter-spacing: 1px;
}

.sidebar-logo .gold { color: var(--gold); }

.sidebar-header .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 10px;
    color: var(--gold);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-header .sidebar-toggle:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(184, 148, 30, 0.3));
    border-color: var(--gold-primary);
}

.sidebar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--gold-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.sidebar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.sidebar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}


.sidebar-user {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}



.sidebar-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--gold-primary);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    margin: 0 auto 1rem;
}


.sidebar-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 24px rgba(255, 215, 0, 0.5),
                inset 0 0 30px rgba(255, 215, 0, 0.2);
}

.sidebar-avatar i {
    font-size: 2rem;
    color: var(--black);
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold-light);
    text-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.sidebar-role {
    font-size: 0.78rem;
    color: var(--gold);
    opacity: 0.8;
    font-weight: 500;
    letter-spacing: 0.5px;
}


.admin-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(218, 165, 32, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    font-size: 0.75rem;
    color: #ffd700;
    backdrop-filter: blur(10px);
}

.sidebar-nav {
    padding: 1.5rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
    position: relative;
}



.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, 
        rgba(212, 175, 55, 0.2), 
        transparent);
    transition: width 0.3s ease;
}


.sidebar-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.sidebar-link:hover {
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.05);
}

.sidebar-link:hover::before {
    width: 100%;
}

.sidebar-link:hover::after {
    opacity: 1;
}


.sidebar-link.active {
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.1);
    border-right-color: var(--gold-primary);
    font-weight: 600;
}
.sidebar-link.active::before {
    width: 100%;
}

.sidebar-link.active::after {
    opacity: 1;
}



.sidebar-link i {
    font-size: 1.2rem;
    color: var(--gold-primary);
    transition: transform 0.3s ease;
}
.sidebar-link:hover i {
    transform: scale(1.1);
}

.sidebar-link span {
    position: relative;
    z-index: 1;
}

.dashboard-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}
.sidebar.active {
    right: 0;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}
.sidebar-toggle {
    display: flex;
    position: fixed;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(184, 148, 30, 0.2));
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    cursor: pointer;
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .sidebar {
        top: 60px;
        right: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-height: calc(100vh - 60px);
        transform: translateY(-100%);
        border-left: none;
        border-bottom: 1px solid rgba(255, 215, 0, 0.3);
    }

    .sidebar.active {
        transform: translateY(0);
    }

    .dashboard-content {
        margin-right: 0;
        padding-right: 2rem;
    }

    .sidebar-user {
        padding: 1.5rem 1rem;
    }

    .sidebar-avatar {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
    }

    .sidebar-nav {
        padding: 1rem 0;
    }

    .sidebar-link {
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }

    .dashboard-content {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .sidebar-avatar {
        width: 50px;
        height: 50px;
    }

    .sidebar-name {
        font-size: 1rem;
    }

    .sidebar-link {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
}

/* CUSTOM SCROLLBAR */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gold-primary), var(--gold-dark));
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--gold-primary);
}

/* Scrollbar Styling for Sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 215, 0, 0.05);
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}


.sidebar-badge {
    margin-right: auto;
    margin-left: 0;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--black);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}
.sidebar-footer {
    padding: 16px 14px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    position: relative;
    z-index: 1;
    background: rgba(212, 175, 55, 0.02);
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.2);
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.4);
}

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(212,175,55,0.1);
}

.logout-link:hover { color: var(--danger) !important; }

/* ─── MOBILE TOPBAR ─── */
.mobile-topbar {
    display: flex;
    position: relative;
    top: 0;
    right: 0;
    left: 0;
    height: 56px;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    z-index: 1050;
}

@media (min-width: 769px) {
    .sidebar-toggle {
        top: 80px; /* Adjust this value to place it exactly below your header */
    }
}

/* Enable sidebar sliding on desktop */
@media (min-width: 769px) {
    .sidebar {
        transform: translateX(-100%) !important; /* Hides the sidebar off-screen by default */
        transition: transform 0.3s ease !important;
    }
    
    .sidebar.open {
        transform: translateX(0) !important; /* Slides the sidebar into view when opened */
    }
}


.mobile-topbar .sidebar-toggle {
    background: flex;
    border: none;
    color: var(--gold);
    font-size: 1.3rem;
    cursor: pointer;
}

/* ─── MAIN CONTENT ─── */
.dashboard-main {
    flex: 1;
    margin-right: var(--sidebar-w);
    padding: 32px;
    min-height: 100vh;
}

/* ─── SECTIONS ─── */
.dash-section {
    display: none;
    animation: fadeSlideUp 0.5s ease forwards;
}

.dash-section.active { display: block; }

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.sec-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sub-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gold-light);
    margin: 24px 0 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ─── INFO GRID ─── */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.info-card {
    background: var(--black-card);
    border: 1px solid rgba(212,175,55,0.1);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;  /* Center everything horizontally */
    justify-content: center;  /* Center vertically */
    text-align: center;  /* Center text */
    gap: 12px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    min-height: 160px;  /* Give it some height */
}

.info-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    opacity: 0;
    background: radial-gradient(circle at 50% 0%, rgba(212,175,55,0.12), transparent 70%);
    transition: opacity var(--transition);
}

.info-card:hover {
    border-color: rgba(212,175,55,0.35);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(212,175,55,0.1);
}

.info-card:hover::after { opacity: 1; }

.info-icon {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}


/* .info-card:hover .info-icon {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--gold);
    transform: scale(1.15) rotate(8deg);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.4);
} */


/* Responsive icon sizing */
@media (max-width: 768px) {
    .info-icon {
        width: 48px;
        height: 48px;
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .info-icon {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
    }
}

.info-label {
    font-size: 0.85rem;
    color: var(--white-dim);
    font-weight: 400;
    margin: 0;
}

.info-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    word-break: break-all;
    margin: 0;
}


.copy-btn {
    background: rgba(212,175,55,0.15);
    border: none;
    color: var(--gold);
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition);
}

.copy-btn:hover { background: var(--gold); color: var(--black); }

/* ─── ANIMATE CARDS ─── */
.animate-card {
    opacity: 0;
    transform: translateY(20px);
    animation: cardIn 0.5s ease forwards;
    animation-delay: calc(var(--delay, 0) * 0.08s);
}

@keyframes cardIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ─── FORMS ─── */
.admin-form-box {
    background: var(--black-card);
    border: 1px solid rgba(212,175,55,0.12);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}

.form-box-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dash-input, .dash-textarea {
    background: var(--black);
    border: 1px solid rgba(212,175,55,0.15);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.9rem;
    transition: border-color var(--transition);
    outline: none;
    resize: vertical;
}

.dash-input:focus, .dash-textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.1);
}

.dash-input::placeholder, .dash-textarea::placeholder {
    color: rgba(176,176,176,0.5);
}

/* ─── BUTTONS ─── */
.dash-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
}

.gold-btn {
    background: linear-gradient(135deg, var(--gold-dark), var(--gold));
    color: var(--black);
}

.gold-btn:hover {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    box-shadow: 0 4px 20px rgba(212,175,55,0.3);
    transform: translateY(-2px);
}

.danger-btn {
    background: rgba(231,76,60,0.15);
    color: var(--danger);
    border: 1px solid rgba(231,76,60,0.3);
}

.danger-btn:hover {
    background: var(--danger);
    color: #fff;
}

.btn-sm { padding: 6px 14px; font-size: 0.82rem; }

.wallet-buy-btn {
    background: rgba(212,175,55,0.1);
    color: var(--gold);
    border: 1px solid rgba(212,175,55,0.25);
}

.wallet-buy-btn:hover {
    background: rgba(212,175,55,0.2);
    border-color: var(--gold);
}

/* ─── ANNOUNCEMENTS ─── */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.announcement-card {
    background: var(--black-card);
    border: 1px solid rgba(212,175,55,0.1);
    border-radius: var(--radius);
    padding: 20px;
    transition: all var(--transition);
}

.announcement-card:hover {
    border-color: rgba(212,175,55,0.3);
}

.ann-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 8px;
}

.ann-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 8px;
}

.ann-date {
    font-size: 0.78rem;
    color: var(--white-dim);
}

.ann-body {
    font-size: 0.9rem;
    color: var(--white);
    line-height: 1.8;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

/* ─── TICKETS ─── */
.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}




.ticket-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.ticket-id {
    font-weight: 700;
    color: var(--gold);
    font-size: 0.9rem;
}

.ticket-subject {
    font-weight: 600;
    color: var(--white);
    flex: 1;
}

.ticket-status {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
}

.status-open { background: rgba(52,152,219,0.15); color: var(--info); }
.status-answered { background: rgba(46,204,113,0.15); color: var(--success); }
.status-closed { background: rgba(176,176,176,0.1); color: var(--white-dim); }

.ticket-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--white-dim);
    margin-bottom: 10px;
}

.ticket-meta i { margin-left: 4px; }

.ticket-actions {
    display: flex;
    gap: 8px;
}

/* ─── TICKET MODAL ─── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal-box {
    background: var(--black-light);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--radius);
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(212,175,55,0.1);
}

.modal-header h3 {
    color: var(--gold);
    font-size: 1rem;
}

.modal-close {
    background: none;
    border: none;
    color: var(--white-dim);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color var(--transition);
}

.modal-close:hover { color: var(--danger); }

.modal-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msg-bubble {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.6;
    position: relative;
}

.msg-player {
    align-self: flex-start;
    background: var(--black-card);
    border: 1px solid rgba(212,175,55,0.08);
    color: var(--white);
}

.msg-admin {
    align-self: flex-end;
    background: rgba(212,175,55,0.12);
    border: 1px solid rgba(212,175,55,0.2);
    color: var(--gold-light);
}

.msg-sender {
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--gold);
}

.msg-time {
    font-size: 0.68rem;
    color: var(--white-dim);
    margin-top: 4px;
    text-align: left;
}

.modal-reply {
    padding: 12px 20px;
    border-top: 1px solid rgba(212,175,55,0.1);
}

.reply-form {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.reply-form .dash-textarea {
    flex: 1;
    min-height: 40px;
}

/* ─── SHOP GRID ─── */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.shop-card {
    background: var(--black-card);
    border: 1px solid rgba(212,175,55,0.1);
    border-radius: var(--radius);
    padding: 24px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all var(--transition);
}

.shop-card:hover {
    border-color: rgba(212,175,55,0.35);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(212,175,55,0.1);
}

.shop-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--black);
    box-shadow: 0 0 20px rgba(212,175,55,0.2);
}

.shop-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
}

.shop-price {
    font-size: 0.9rem;
    color: var(--gold);
    font-weight: 600;
}

.shop-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 8px;
}

.shop-actions .dash-btn { width: 100%; }

/* ─── WALLET ─── */
.wallet-balance-box {
    background: linear-gradient(135deg, var(--black-card), rgba(212,175,55,0.06));
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--radius);
    padding: 28px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.wallet-balance-box .wallet-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold-dark), var(--gold-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--black);
    box-shadow: 0 0 24px rgba(212,175,55,0.25);
    flex-shrink: 0;
}

.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wallet-label {
    font-size: 0.85rem;
    color: var(--white-dim);
}

.wallet-amount {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--gold);
}

/* ─── HISTORY TABLE ─── */
.history-table-wrap {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid rgba(212,175,55,0.1);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.history-table thead {
    background: rgba(212,175,55,0.08);
}

.history-table th {
    padding: 12px 16px;
    text-align: right;
    color: var(--gold);
    font-weight: 600;
    font-size: 0.82rem;
    white-space: nowrap;
}

.history-table td {
    padding: 12px 16px;
    border-top: 1px solid rgba(212,175,55,0.06);
    color: var(--white);
    white-space: nowrap;
}

.history-table tbody tr {
    transition: background var(--transition);
}

.history-table tbody tr:hover {
    background: rgba(212,175,55,0.04);
}

.tx-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.82rem;
    padding: 3px 10px;
    border-radius: 20px;
}

.tx-type.charge {
    background: rgba(46,204,113,0.12);
    color: var(--success);
}

.tx-type.purchase {
    background: rgba(231,76,60,0.12);
    color: var(--danger);
}

/* ─── EMPTY STATE ─── */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--white-dim);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ─── TOAST NOTIFICATION ─── */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--black-card);
    border: 1px solid rgba(212,175,55,0.2);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    color: var(--white);
    font-size: 0.88rem;
    font-family: inherit;
    box-shadow: var(--shadow);
    animation: toastIn 0.4s ease, toastOut 0.4s ease 3s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success { border-color: var(--success); }
.toast.success i { color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.error i { color: var(--danger); }


.header {
    z-index: 1100 !important;
}

.footer {
    position: relative;
    z-index: 1100;
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateX(-30px); }
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        background: rgba(15, 15, 15, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-left: 1px solid rgba(212, 175, 55, 0.2);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
        transform: translateX(100%);
        top: 0;
        height: 100vh;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        display: block !important;
        background: rgba(212, 175, 55, 0.1);
        border: 1px solid rgba(212, 175, 55, 0.3);
        color: var(--gold);
        padding: 8px 12px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .sidebar-header {
        background: rgba(212, 175, 55, 0.2);
        border-color: var(--gold);
    }

    .mobile-topbar {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        position: sticky;
        top: 0;
        z-index: 1100;
    }

    #sidebarOpen {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: rgba(212, 175, 55, 0.1);
        border: 1px solid rgba(212, 175, 55, 0.3);
        border-radius: 8px;
        color: var(--gold);
        cursor: pointer;
        transition: all 0.3s ease;
    }

    #sidebarOpen:hover {
        background: rgba(212, 175, 55, 0.2);
        transform: scale(1.05);
    }

    .dashboard-main {
        margin-right: 0;
        padding: 72px 16px 24px;
    }

    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .shop-grid {
        grid-template-columns: 1fr;
    }

    .modal-box {
        max-height: 90vh;
    }

    .wallet-balance-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr;
    }

    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* استایل برای تایتل‌های داخلی بخش‌ها */
.sub-section-title {
    font-size: 1.2rem;
    color: #fff; /* یا رنگ تم سایت شما */
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

/* تغییر ظاهر موس هنگام رفتن روی استیم هکس */
.hex-copy {
    cursor: pointer;
    transition: all 0.3s ease;
}

.hex-copy:hover {
    color: #4CAF50; /* تغییر رنگ هنگام هاور */
    transform: scale(1.02);
}


/* ===== Flash Messages ===== */
.flash-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 90%;
    max-width: 500px;
}

.flash-msg {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: flashSlideIn 0.4s ease-out, flashFadeOut 0.5s ease 4.5s forwards;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    direction: rtl;
}

.flash-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}

.flash-error,
.flash-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.flash-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

.flash-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.flash-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.flash-text {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.5;
}

.flash-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

.flash-close:hover {
    opacity: 1;
}

@keyframes flashSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes flashFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
    }
}

/* ============================================
   🎫 TICKET SECTION - PREMIUM DESIGN
   ============================================ */

/* ─── TICKET TOPBAR ─── */
.ticket-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.06));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.ticket-topbar-right,
.ticket-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ─── TABS ─── */
.ticket-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #9ca3af;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.ticket-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 202, 40, 0.15), rgba(255, 152, 0, 0.08));
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.ticket-tab:hover {
    color: #e5e7eb;
    border-color: rgba(255, 202, 40, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(255, 202, 40, 0.08);
}

.ticket-tab:hover::before {
    opacity: 1;
}

.ticket-tab.active {
    background: linear-gradient(135deg, rgba(255, 202, 40, 0.12), rgba(255, 152, 0, 0.06));
    border-color: rgba(255, 202, 40, 0.35);
    color: #ffca28;
    box-shadow:
        0 0 20px rgba(255, 202, 40, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ticket-tab.active::before {
    opacity: 1;
}

.ticket-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffca28, transparent);
    border-radius: 2px;
    animation: tabGlow 2s ease-in-out infinite;
}

@keyframes tabGlow {
    0%, 100% { opacity: 0.5; width: 30%; }
    50% { opacity: 1; width: 50%; }
}

.ticket-tab i {
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

/* ─── TAB BADGE ─── */
.ticket-badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #9ca3af;
    transition: all 0.4s ease;
    line-height: 1;
}

.ticket-tab.active .ticket-badge {
    background: linear-gradient(135deg, #ffca28, #ff9800);
    color: #1a1a2e;
    box-shadow: 0 2px 10px rgba(255, 202, 40, 0.3);
    animation: badgePulse 2.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 2px 10px rgba(255, 202, 40, 0.3); }
    50% { box-shadow: 0 2px 20px rgba(255, 202, 40, 0.5); }
}

/* ─── SEARCH BOX ─── */
.ticket-search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ticket-search-wrap i {
    position: absolute;
    right: 14px;
    color: #6b7280;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    pointer-events: none;
}

.ticket-search-wrap input {
    width: 220px;
    padding: 10px 40px 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e5e7eb;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.85rem;
    outline: none;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ticket-search-wrap input::placeholder {
    color: #6b7280;
    font-size: 0.82rem;
}

.ticket-search-wrap input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 202, 40, 0.3);
    box-shadow:
        0 0 0 3px rgba(255, 202, 40, 0.08),
        0 4px 16px rgba(0, 0, 0, 0.2);
    width: 260px;
}

.ticket-search-wrap input:focus + i,
.ticket-search-wrap:focus-within i {
    color: #ffca28;
}

/* ─── SEARCH RESULT ─── */
.ticket-search-result {
    margin-bottom: 16px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(255, 202, 40, 0.04), rgba(255, 152, 0, 0.02));
    border: 1px solid rgba(255, 202, 40, 0.15);
    border-radius: 16px;
    animation: searchSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ticket-search-result.hidden {
    display: none;
}

@keyframes searchSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── NEW TICKET BUTTON ─── */
.ticket-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #ffca28, #ff9800);
    border: none;
    border-radius: 12px;
    color: #1a1a2e;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 16px rgba(255, 202, 40, 0.25);
    position: relative;
    overflow: hidden;
}

.ticket-new-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.ticket-new-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 30px rgba(255, 202, 40, 0.35),
        0 0 40px rgba(255, 202, 40, 0.1);
}

.ticket-new-btn:hover::before {
    transform: rotate(45deg) translateX(100%);
}

.ticket-new-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.ticket-new-btn i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.ticket-new-btn:hover i {
    transform: rotate(90deg);
}

/* ─── TICKET LIST ─── */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ─── TICKET CARD ─── */
.ticket-card {
    position: relative;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 18px 22px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    animation: ticketCardEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: calc(var(--delay, 0) * 0.08s);
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 16px 16px 0;
    transition: all 0.4s ease;
}

.ticket-card.ticket-open::before {
    background: linear-gradient(180deg, #4ade80, #22c55e);
    box-shadow: 0 0 12px rgba(74, 222, 128, 0.3);
}

.ticket-card.ticket-closed::before {
    background: linear-gradient(180deg, #6b7280, #4b5563);
}

.ticket-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 202, 40, 0.04),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border-radius: inherit;
}

.ticket-card:hover::after {
    opacity: 1;
}

.ticket-card:hover {
    border-color: rgba(255, 202, 40, 0.15);
    transform: translateX(-4px);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 202, 40, 0.05);
}

.ticket-card.expanded {
    border-color: rgba(255, 202, 40, 0.25);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 202, 40, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ticket-card.hidden {
    display: none;
}

@keyframes ticketCardEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ─── CARD TOP ROW ─── */
.ticket-card-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ticket-id {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(255, 202, 40, 0.1);
    border: 1px solid rgba(255, 202, 40, 0.2);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffca28;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    letter-spacing: 0.5px;
}

.ticket-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(139, 92, 246, 0.08));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #a5b4fc;
}

.ticket-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-right: auto;
}

.ticket-status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.status-open {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.25);
    color: #4ade80;
}

.status-open::before {
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(74, 222, 128, 0.4); }
    50% { box-shadow: 0 0 12px rgba(74, 222, 128, 0.8); }
}

.status-closed {
    background: rgba(107, 114, 128, 0.1);
    border: 1px solid rgba(107, 114, 128, 0.25);
    color: #9ca3af;
}

.status-closed::before {
    background: #6b7280;
}

/* ─── CARD BOTTOM ROW ─── */
.ticket-card-bottom {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.ticket-player {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: #d1d5db;
    font-weight: 500;
}

.ticket-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #6b7280;
}

.ticket-actions {
    margin-right: auto;
}

.ticket-close-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(220, 38, 38, 0.08));
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    color: #f87171;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticket-close-btn:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.15);
}

/* ─── EXPAND AREA ─── */
.ticket-expand {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    margin-top: 0;
    border-top: 0px solid transparent;
}

.ticket-card.expanded .ticket-expand {
    max-height: 600px;
    opacity: 1;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ─── MESSAGES CONTAINER ─── */
.ticket-messages-container {
    max-height: 350px;
    overflow-y: auto;
    padding: 12px 6px;
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.ticket-messages-container::-webkit-scrollbar {
    width: 5px;
}

.ticket-messages-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.ticket-messages-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(255, 202, 40, 0.3), rgba(255, 152, 0, 0.2));
    border-radius: 10px;
}

.ticket-messages-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(255, 202, 40, 0.5), rgba(255, 152, 0, 0.4));
}

/* ─── MESSAGE BUBBLES ─── */
.ticket-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    position: relative;
    animation: msgBubbleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes msgBubbleIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ticket-msg.user-msg {
    align-self: flex-end;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-bottom-left: 4px;
    border-radius: 16px 16px 4px 16px;
}

.ticket-msg.admin-msg {
    align-self: flex-start;
    background: linear-gradient(135deg, rgba(255, 202, 40, 0.1), rgba(255, 152, 0, 0.06));
    border: 1px solid rgba(255, 202, 40, 0.18);
    border-radius: 16px 16px 16px 4px;
}

.msg-sender {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-msg .msg-sender {
    color: #60a5fa;
}

.admin-msg .msg-sender {
    color: #ffca28;
}

.admin-msg .msg-sender::after {
    content: 'STAFF';
    font-size: 0.6rem;
    padding: 1px 6px;
    background: linear-gradient(135deg, #ffca28, #ff9800);
    color: #1a1a2e;
    border-radius: 4px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.msg-text {
    font-size: 0.88rem;
    color: #e5e7eb;
    line-height: 1.7;
    word-break: break-word;
}

.msg-time {
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 6px;
    text-align: left;
}

.user-msg .msg-time {
    text-align: right;
}

/* ─── LOADING STATE ─── */
.ticket-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: #6b7280;
    font-size: 0.9rem;
    gap: 10px;
}

.ticket-loading::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 202, 40, 0.2);
    border-top-color: #ffca28;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── REPLY BOX ─── */
.ticket-reply-box {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    transition: all 0.3s ease;
}

.ticket-reply-box:focus-within {
    border-color: rgba(255, 202, 40, 0.2);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.ticket-reply-box textarea {
    flex: 1;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #e5e7eb;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.88rem;
    resize: none;
    outline: none;
    min-height: 48px;
    max-height: 120px;
    direction: rtl;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.ticket-reply-box textarea::placeholder {
    color: #6b7280;
}

.ticket-reply-box textarea:focus {
    border-color: rgba(255, 202, 40, 0.25);
    background: rgba(255, 255, 255, 0.06);
}

.ticket-send-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, #ffca28, #ff9800);
    border: none;
    border-radius: 12px;
    color: #1a1a2e;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255, 202, 40, 0.2);
}

.ticket-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 202, 40, 0.35);
}

.ticket-send-btn:active {
    transform: translateY(0);
}

/* ─── EMPTY STATE ─── */
.ticket-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #4b5563;
    text-align: center;
    animation: emptyFadeIn 0.5s ease;
}

.ticket-empty i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.4;
    animation: emptyFloat 3s ease-in-out infinite;
}

@keyframes emptyFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes emptyFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ticket-empty p {
    font-size: 1rem;
    font-weight: 500;
}

/* ============================================
   🎫 CREATE TICKET MODAL
   ============================================ */

.ticket-modal-overlay {
    position: fixed;
    inset: 0;
    /* background: rgba(0, 0, 0, 0.0); */
    /* backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px); */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 20px;
}

.ticket-modal-overlay.show,
.ticket-modal-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.ticket-modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.ticket-modal {
    width: 100%;
    max-width: 580px;
    max-height: 85vh;
    background: linear-gradient(170deg, #1e1e38 0%, #161628 50%, #121220 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 202, 40, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow-y: auto;
}

.ticket-modal-overlay.show .ticket-modal,
.ticket-modal-overlay:not(.hidden) .ticket-modal {
    transform: translateY(0) scale(1);
}

/* Modal scrollbar */
.ticket-modal::-webkit-scrollbar {
    width: 4px;
}

.ticket-modal::-webkit-scrollbar-track {
    background: transparent;
}

.ticket-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 202, 40, 0.2);
    border-radius: 10px;
}

/* ─── MODAL HEADER ─── */
.ticket-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
}

.ticket-modal-header span {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f3f4f6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ticket-modal-header span::before {
    content: '🎫';
    font-size: 1.2rem;
}

.ticket-modal-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #9ca3af;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticket-modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
    transform: rotate(90deg);
}

/* ─── MODAL STEPS ─── */
.ticket-modal-step {
    padding: 24px;
    animation: stepFadeIn 0.4s ease;
}

.ticket-modal-step.hidden {
    display: none;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ticket-modal-label {
    font-size: 0.95rem;
    color: #d1d5db;
    margin-bottom: 18px;
    font-weight: 600;
}

/* ─── CATEGORY GRID ─── */
.ticket-category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ticket-cat-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    color: #d1d5db;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.ticket-cat-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 202, 40, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.ticket-cat-btn i {
    font-size: 1.4rem;
    transition: all 0.4s ease;
    position: relative;
    z-index: 1;
}

.ticket-cat-btn:hover {
    border-color: rgba(255, 202, 40, 0.3);
    transform: translateY(-4px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 202, 40, 0.08);
    color: #ffca28;
}

.ticket-cat-btn:hover::before {
    opacity: 1;
}

.ticket-cat-btn:hover i {
    transform: scale(1.15);
    color: #ffca28;
}

.ticket-cat-btn:active {
    transform: translateY(-2px) scale(0.97);
}

/* Category-specific colors */
.ticket-cat-btn[data-cat="staffapply"]:hover { border-color: rgba(99, 102, 241, 0.4); }
.ticket-cat-btn[data-cat="staffapply"]:hover i { color: #818cf8; }
.ticket-cat-btn[data-cat="reportstaff"]:hover { border-color: rgba(239, 68, 68, 0.4); }
.ticket-cat-btn[data-cat="reportstaff"]:hover i { color: #f87171; }
.ticket-cat-btn[data-cat="owner"]:hover { border-color: rgba(255, 202, 40, 0.4); }
.ticket-cat-btn[data-cat="owner"]:hover i { color: #ffca28; }
.ticket-cat-btn[data-cat="bug"]:hover { border-color: rgba(234, 179, 8, 0.4); }
.ticket-cat-btn[data-cat="bug"]:hover i { color: #facc15; }
.ticket-cat-btn[data-cat="banunban"]:hover { border-color: rgba(168, 85, 247, 0.4); }
.ticket-cat-btn[data-cat="banunban"]:hover i { color: #c084fc; }
.ticket-cat-btn[data-cat="stream"]:hover { border-color: rgba(236, 72, 153, 0.4); }
.ticket-cat-btn[data-cat="stream"]:hover i { color: #f472b6; }
.ticket-cat-btn[data-cat="management"]:hover { border-color: rgba(34, 197, 94, 0.4); }
.ticket-cat-btn[data-cat="management"]:hover i { color: #4ade80; }
.ticket-cat-btn[data-cat="shop"]:hover { border-color: rgba(14, 165, 233, 0.4); }
.ticket-cat-btn[data-cat="shop"]:hover i { color: #38bdf8; }
.ticket-cat-btn[data-cat="other"]:hover { border-color: rgba(156, 163, 175, 0.4); }

/* ─── SELECTED CATEGORY DISPLAY ─── */
.ticket-selected-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, rgba(255, 202, 40, 0.1), rgba(255, 152, 0, 0.05));
    border: 1px solid rgba(255, 202, 40, 0.2);
    border-radius: 10px;
    color: #ffca28;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ─── MODAL TEXTAREA ─── */
#ticketMsgInput {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #e5e7eb;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.9rem;
    resize: vertical;
    outline: none;
    direction: rtl;
    line-height: 1.8;
    min-height: 120px;
    transition: all 0.3s ease;
}

#ticketMsgInput::placeholder {
    color: #6b7280;
}

#ticketMsgInput:focus {
    border-color: rgba(255, 202, 40, 0.3);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(255, 202, 40, 0.06);
}

/* ─── MODAL FOOTER ─── */
.ticket-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    gap: 12px;
}

.ticket-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #9ca3af;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticket-back-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e5e7eb;
}

.ticket-back-btn i {
    transition: transform 0.3s ease;
}

.ticket-back-btn:hover i {
    transform: translateX(4px);
}

.ticket-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #ffca28, #ff9800);
    border: none;
    border-radius: 12px;
    color: #1a1a2e;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 16px rgba(255, 202, 40, 0.25);
    position: relative;
    overflow: hidden;
}

.ticket-submit-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.15) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s ease;
}

.ticket-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(255, 202, 40, 0.35);
}

.ticket-submit-btn:hover::before {
    transform: rotate(45deg) translateX(100%);
}

.ticket-submit-btn i {
    transition: transform 0.3s ease;
}

.ticket-submit-btn:hover i {
    transform: translateX(-4px);
}

/* ============================================
   🎫 VIEW TICKET MODAL
   ============================================ */

.ticket-view-modal {
    max-width: 650px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.ticket-view-modal .ticket-messages-container {
    flex: 1;
    max-height: none;
    padding: 20px;
    overflow-y: auto;
}

.ticket-view-modal .ticket-reply-box {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    margin: 0;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
}

/* ─── TICKET VIEW BUTTON (in search) ─── */
.ticket-view-btn {
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 10px;
    color: #60a5fa;
    font-family: 'Yekan Bakh', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ticket-view-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.15));
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.ticket-card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ============================================
   📱 RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .ticket-topbar {
        flex-direction: column;
        gap: 14px;
        padding: 14px 16px;
    }

    .ticket-topbar-right,
    .ticket-topbar-left {
        width: 100%;
        justify-content: center;
    }

    .ticket-search-wrap input {
        width: 100%;
    }

    .ticket-search-wrap input:focus {
        width: 100%;
    }

    .ticket-new-btn {
        width: 100%;
        justify-content: center;
    }

    .ticket-category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ticket-card {
        padding: 14px 16px;
    }

    .ticket-card-top {
        gap: 6px;
    }

    .ticket-card-bottom {
        gap: 10px;
    }

    .ticket-msg {
        max-width: 90%;
    }

    .ticket-reply-box {
        flex-direction: column;
    }

    .ticket-send-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .ticket-modal {
        max-width: 95vw;
        border-radius: 18px;
    }

    .ticket-modal-footer {
        flex-direction: column;
    }

    .ticket-back-btn,
    .ticket-submit-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ticket-category-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .ticket-cat-btn {
        padding: 14px 8px;
        font-size: 0.78rem;
    }

    .ticket-cat-btn i {
        font-size: 1.2rem;
    }

    .ticket-tab {
        padding: 8px 14px;
        font-size: 0.82rem;
    }
}

/* ============================================
   ✨ EXTRA EFFECTS
   ============================================ */

/* Shimmer effect for loading skeleton */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.ticket-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
    height: 80px;
    margin-bottom: 10px;
}

/* Ripple effect on buttons */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}


#ticketModal {
    position: fixed !important;
    top: 80% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    z-index: 1000 !important;
}
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
}

#ticketCategoryModal .modal-content {
    background: #1a1d2e;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 90vw;
}

.sidebar-new {
    width: 270px;
    height: calc(100vh - 60px);
    top: 60px;

    font-family: 'Yekan Bakh', sans-serif;
    
    backdrop-filter: blur(14px);
    background: rgba(20, 20, 20, 0.55);
    border-left: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: fixed;
    
    /* سایدبار پیش‌فرض در همه حالت‌ها بسته است (می‌توانید صفر کنید تا پیش‌فرض باز باشد) */
    right: -270px;
    
    transition: right 0.35s ease, background 0.35s ease;
    box-shadow: -4px 0 18px rgba(0, 0, 0, 0.45);
    z-index: 1000; /* برای دسکتاپ و موبایل بالا قرار گیرد */
}

.sidebar-new.open {
    right: 0;
}

/* .sidebar-new.open {
    right: 0 !important;
} */



/* تنظیمات موبایل و منوی همبرگری */
@media (max-width: 768px) {
    .sidebar-new {
        right: -300px; /* در موبایل به صورت پیش‌فرض بسته و خارج از صفحه است */
        z-index: 1000; /* در موبایل باید روی همه چیز قرار بگیرد */
    }
    
    /* کلاسی که جاوااسکریپت (dashboard.js) اضافه می‌کند */
    .sidebar-new.open {
        right: 0 !important; /* وقتی منوی همبرگری زده شد، باز می‌شود */
    }
}
/* USER BOX */
.sb-user-box {
    text-align: center;
    margin-bottom: 2rem;
}

.sb-avatar {
    font-size: 3rem;
    color: #ffcc4d;
    margin-bottom: 0.7rem;
}

.sb-username {
    font-size: 1.1rem;
    display: block;
    color: #fff;
    font-weight: bold;
}

.sb-admin-badge {
    background: #ff4444;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    margin-top: 4px;
    display: inline-block;
}

/* LEVEL BAR */
.sb-level {
    margin-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
    color: #bbb;
}

.sb-progress {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.12);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 6px;
}

.sb-progress-fill {
    height: 100%;
    background: #ffcc4d;
    width: 10%;
    transition: width 0.4s ease;
}

/* NAV */
.sb-nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.sb-item {
    font-family: 'Yekan Bakh', sans-serif !important;
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid transparent;
    padding: 0.9rem 1rem;
    border-radius: 10px;
    color: #fff;
    text-align: left;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.sb-item i {
    font-size: 1.1rem;
    color: #ffcc4d;
}

.sb-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
}

.sb-item.active {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.15);
}

/* FOOTER */
.sb-footer {
    margin-top: auto;
}

.sb-logout {
    color: #ff6666;
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: rgba(255, 0, 0, 0.05);
    text-align: center;
    transition: 0.25s;
}

.sb-logout:hover {
    background: rgba(255, 0, 0, 0.12);
}




/* --- GLOBAL MOBILE FIXES (RTL) --- */
html, body {
    overflow-x: hidden; /* Prevents horizontal scrolling entirely */
    width: 100%;
}

* {
    box-sizing: border-box; /* Ensures padding does not expand 100% width elements */
}

@media (max-width: 768px) {
    /* 1. Fix the main dashboard container spacing */
    .dashboard-content {
        width: 100%;
        margin: 0 !important;
        padding: 1rem !important; /* Reduce padding on mobile */
        overflow-x: hidden;
    }

    /* 2. Shop & Info Grids - Force them to be 1 column on mobile */
    .shop-grid,
    .info-grid {
        display: grid;
        grid-template-columns: 1fr !important; /* Forces a single column */
        gap: 1rem;
        width: 100%;
    }

    /* 3. Announcements Forms and Cards */
    .announcements-list,
    .announcement-card {
        width: 100%;
        margin: 0;
        padding: 1rem;
    }
    
    /* Ensure inputs inside announcements don't overflow */
    .announcement-card input, 
    .announcement-card textarea {
        width: 100%;
        max-width: 100%;
    }

    /* 4. Wallet Section */
    .wallet-balance-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
        padding: 1.5rem 1rem;
    }
    
    .wallet-info {
        width: 100%;
        margin-top: 10px;
    }

    /* 5. Any cards or boxes must not exceed 100% width */
    .dash-card, 
    .shop-card {
        width: 100%;
        max-width: 100%;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .dashboard-content {
        padding: 0.8rem !important; /* Even tighter padding for very small phones */
    }
}


/* Shop Tabs */
.shop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.shop-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 2rem;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2); /* Gold transparent */
    padding-bottom: 10px;
    overflow-x: auto;
}
.shop-tab {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.shop-tab:hover {
    border-color: #d4af37;
    color: #d4af37;
}
.shop-tab.active {
    background: #d4af37; /* Gold */
    color: #000;
    font-weight: bold;
    border-color: #d4af37;
}

/* Shop Contents */
.shop-content {
    display: none;
    animation: fadeIn 0.4s ease;
}
.shop-content.active {
    display: block;
}

/* Vehicle Cards */
.vehicle-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}
.vehicle-img {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid #d4af37;
}
.vehicle-card .shop-label {
    margin-top: 15px;
    font-size: 1.2rem;
}
.col-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
}
.outline-btn {
    background: transparent;
    border: 1px solid #d4af37;
    color: #d4af37;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}
.outline-btn:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Limited Badge */
.limited-card {
    border: 1px solid #ff4757;
    box-shadow: 0 0 15px rgba(255, 71, 87, 0.2);
}
.limited-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
}

/* Dashboard polish: stable centered layout, new always-visible sidebar, centered modals */
.dashboard-wrapper {
    background:
        radial-gradient(circle at 78% 12%, rgba(212, 175, 55, 0.16), transparent 32rem),
        radial-gradient(circle at 8% 72%, rgba(245, 215, 110, 0.08), transparent 30rem),
        linear-gradient(145deg, #070707 0%, #11100b 48%, #050505 100%);
    justify-content: center;
}

.mobile-topbar { display: none !important; }

.sidebar-new {
    right: 24px !important;
    top: 84px;
    height: calc(100vh - 108px);
    width: 292px;
    padding: 22px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 28px;
    background:
        linear-gradient(165deg, rgba(28, 24, 14, 0.92), rgba(8, 8, 9, 0.9)),
        radial-gradient(circle at 50% 0%, rgba(245, 215, 110, 0.22), transparent 18rem);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    z-index: 900;
}

.sidebar-new::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.sb-user-box {
    padding: 18px 14px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(212, 175, 55, 0.13);
}

.sb-username { color: #fff4c4; font-weight: 800; }

.sb-nav { display: grid; gap: 10px; }

.sb-item {
    width: 100%;
    justify-content: flex-start;
    gap: 12px;
    border-radius: 18px;
    border: 1px solid transparent;
    background: transparent;
    color: #e9e2cf;
}

.sb-item.active,
.sb-item:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(255, 255, 255, 0.06));
    border-color: rgba(212, 175, 55, 0.28);
    color: #fff;
    transform: translateX(-4px);
}

.dashboard-main {
    width: min(1180px, calc(100vw - 380px));
    max-width: 1180px;
    margin-right: 340px;
    margin-left: auto;
    padding: 44px 28px 64px;
}

.dash-section.active { width: 100%; }
.info-grid, .shop-grid { justify-content: center; }
.info-card, .shop-card { min-width: 0; }

.ticket-modal-overlay {

    position: fixed;

    inset: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    visibility: hidden;

    transition: all 0.4s ease;

    padding: 20px;

}

.ticket-modal {
    margin: auto;
    background: linear-gradient(165deg, #1b160c 0%, #111111 55%, #070707 100%);
    border-color: rgba(212, 175, 55, 0.25);
}

@media (max-width: 900px) {
    .dashboard-wrapper { display: block; padding-top: 0; }
    .sidebar-new {
        position: sticky;
        top: 72px;
        right: auto !important;
        width: calc(100% - 24px);
        height: auto;
        margin: 12px auto 0;
        padding: 12px;
        border-radius: 22px;
    }
    .sb-user-box { margin-bottom: 10px; padding: 10px; }
    .sb-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
    .sb-item { padding: 10px 6px; justify-content: center; font-size: 0.78rem; }
    .sb-item span { display: none; }
    .sb-footer { display: none; }
    .dashboard-main {
        width: 100%;
        margin: 0;
        padding: 18px 12px 40px;
    }
    .ticket-modal { max-width: calc(100vw - 24px); }
}

/* Ticket modal hard fix + responsive attachments */
body.modal-open { overflow: hidden; }
body > .ticket-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    display: grid !important;
    place-items: center !important;
    width: 100dvw !important;
    height: 100dvh !important;
    padding: clamp(10px, 3vw, 28px) !important;
    transform: none !important;
    direction: rtl;
}

body > .ticket-modal-overlay.hidden { display: none !important; }
body > .ticket-modal-overlay.show { display: grid !important; }

body > .ticket-modal-overlay .ticket-modal {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    width: min(620px, 100%) !important;
    max-width: 100% !important;
    max-height: min(86dvh, 760px) !important;
    margin: 0 auto !important;
}

.ticket-upload-box,
.ticket-file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    border: 1px dashed rgba(212, 175, 55, 0.34);
    background: rgba(212, 175, 55, 0.07);
    color: #f5d76e;
    border-radius: 14px;
    transition: all .25s ease;
}

.ticket-upload-box {
    width: 100%;
    margin-top: 12px;
    padding: 13px 14px;
    font-weight: 700;
}

.ticket-file-btn {
    width: 48px;
    min-width: 48px;
    height: 48px;
    font-size: 1rem;
}

.ticket-upload-box:hover,
.ticket-file-btn:hover {
    border-color: rgba(245, 215, 110, 0.7);
    background: rgba(212, 175, 55, 0.13);
}

.ticket-upload-box input,
.ticket-file-btn input { display: none; }

.ticket-file-name {
    min-height: 20px;
    margin-top: 7px;
    color: #bdb28a;
    font-size: .82rem;
    direction: ltr;
    text-align: left;
    word-break: break-all;
}

.ticket-attachment {
    margin-top: 10px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(0,0,0,.24);
}

.ticket-attachment img,
.ticket-attachment video {
    display: block;
    width: 100%;
    max-width: min(420px, 100%);
    max-height: 360px;
    object-fit: contain;
    background: #050505;
}

.ticket-attachment a {
    display: block;
    padding: 8px 10px;
    color: #f5d76e;
    font-size: .78rem;
    text-decoration: none;
    direction: ltr;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    body > .ticket-modal-overlay { padding: 8px !important; align-items: start !important; padding-top: 10dvh !important; }
    body > .ticket-modal-overlay .ticket-modal {
        width: 100% !important;
        max-height: 84dvh !important;
        border-radius: 18px !important;
    }
    .ticket-category-grid { grid-template-columns: 1fr !important; }
    .ticket-modal-footer, .ticket-reply-box { flex-wrap: wrap; }
    .ticket-reply-box textarea { flex-basis: 100%; }
    .ticket-send-btn, .ticket-submit-btn, .ticket-back-btn { flex: 1; justify-content: center; }
    .ticket-msg { max-width: 96%; }
}

/* Requested ticket modal position: narrower overlay and higher placement */
body > .ticket-modal-overlay {
    top: 0 !important;
    bottom: auto !important;
    left: 50% !important;
    right: auto !important;
    width: 60dvw !important;
    min-width: min(620px, calc(100dvw - 20px));
    height: 100dvh !important;
    transform: translateX(-50%) !important;
    align-items: start !important;
    justify-items: center !important;
    place-items: start center !important;
    padding-top: 5dvh !important;
}

.ticket-file-name,
.ticket-inline-file-name {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.08);
    color: #f5d76e;
    direction: ltr;
}

.ticket-file-name:empty,
.ticket-inline-file-name:empty { display: none; }
.ticket-file-name small,
.ticket-inline-file-name small { color: #bdb28a; margin-left: auto; }
.ticket-file-name span,
.ticket-inline-file-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-inline-file-name { flex-basis: 100%; margin-top: 4px; font-size: .78rem; }

@media (max-width: 900px) {
    body > .ticket-modal-overlay {
        width: 100dvw !important;
        min-width: 0;
        padding-top: 7dvh !important;
    }
}

/* Final ticket modal/file-name tuning */
body > .ticket-modal-overlay {
    padding-top: 1.5dvh !important;
    align-items: start !important;
    place-items: start center !important;
}

body > .ticket-modal-overlay .ticket-modal {
    max-height: 94dvh !important;
}

.ticket-inline-file-name,
.ticket-file-name {
    width: fit-content;
    max-width: min(280px, 100%);
    min-height: 0;
    padding: 4px 8px;
    margin: 6px 0 6px auto;
    font-size: .72rem;
    line-height: 1.2;
    border-radius: 8px;
}

.ticket-inline-file-name {
    flex-basis: auto !important;
    margin-top: 0 !important;
    align-self: flex-end;
}

.ticket-inline-file-name i,
.ticket-file-name i { font-size: .72rem; }
.ticket-inline-file-name small,
.ticket-file-name small { font-size: .66rem; padding-right: 8px; }

.ticket-reply-box {
    flex-wrap: nowrap !important;
}

.ticket-reply-box textarea {
    flex-basis: auto !important;
    min-width: 0;
}

@media (max-width: 640px) {
    body > .ticket-modal-overlay { padding-top: 2dvh !important; }
    body > .ticket-modal-overlay .ticket-modal { max-height: 96dvh !important; }
    .ticket-reply-box { flex-wrap: wrap !important; }
    .ticket-inline-file-name,
    .ticket-file-name { max-width: 220px; }
}

/* Scroll behavior fixes: modal locked to viewport, sidebar stops before footer, no modal backdrop */
body > .ticket-modal-overlay {
    position: fixed !important;
    top: 0 !important;
    bottom: auto !important;
    overflow: hidden !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none;
}

body > .ticket-modal-overlay .ticket-modal {
    pointer-events: auto;
}

.sidebar-new {
    position: sticky !important;
    top: 84px !important;
    align-self: flex-start;
    flex: 0 0 292px;
    margin: 24px 0 24px 24px;
    right: auto !important;
    height: calc(100dvh - 108px) !important;
    max-height: calc(100dvh - 108px) !important;
}

.dashboard-wrapper {
    align-items: flex-start;
    min-height: auto;
}

.dashboard-main {
    margin-right: 24px !important;
}

@media (max-width: 900px) {
    .sidebar-new {
        position: sticky !important;
        top: 72px !important;
        height: auto !important;
        max-height: none !important;
        margin: 12px auto 0 !important;
        flex: none;
    }
    .dashboard-main { margin-right: 0 !important; }
}

/* Final modal center lock */
body > .ticket-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 60vw !important;
    min-width: 0 !important;
    height: 100dvh !important;
    padding: 16px !important;
    display: grid !important;
    place-items: center !important;
    align-items: center !important;
    justify-items: center !important;
    transform: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none;
}

/* body > .ticket-modal-overlay .ticket-modal {
    width: min(620px, calc(100dvw - 32px)) !important;
    max-height: min(88dvh, 760px) !important;
    margin: 0 !important;
    pointer-events: auto;
} */

@media (max-width: 640px) {
    body > .ticket-modal-overlay {
        padding: 10px !important;
        place-items: center !important;
        align-items: center !important;
    }
    body > .ticket-modal-overlay .ticket-modal {
        width: calc(100dvw - 20px) !important;
        max-height: 90dvh !important;
    }
}
/* Fix ticket modal centering */
.ticket-modal-overlay.show {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.ticket-modal-overlay.hidden {
    opacity: 0 !important;
    visibility: hidden !important;
}
/* Ticket modal: locked position, higher placement, no scroll movement */
body > .ticket-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    left: 50% !important;
    right: auto !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 60vw !important;
    min-width: min(620px, calc(100dvw - 32px)) !important;
    height: 100dvh !important;
    padding: 0 !important;
    display: grid !important;
    place-items: start center !important;
    align-items: start !important;
    justify-items: center !important;
    padding-top: 0vh !important;
    transform: translateX(-50%) !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    pointer-events: none;
    overflow: hidden !important;
}

body > .ticket-modal-overlay .ticket-modal {
    position: relative !important;
    width: min(620px, calc(100% - 32px)) !important;
    max-height: min(84vh, 760px) !important;
    margin: 0 !important;
    pointer-events: auto;
    transform: none !important;
}

/* Lock body scroll when modal is open */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

/* Mobile adjustments */
@media (max-width: 900px) {
    body > .ticket-modal-overlay {
        width: 100vw !important;
        min-width: 0 !important;
        left: 0 !important;
        transform: none !important;
        padding-top: 6vh !important;
    }
}

@media (max-width: 640px) {
    body > .ticket-modal-overlay {
        padding-top: 4vh !important;
    }
    
    body > .ticket-modal-overlay .ticket-modal {
        width: calc(100vw - 20px) !important;
        max-height: 92vh !important;
    }
}
