* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: 'Cairo', sans-serif; background: #080808; min-height: 100vh; color: #777; direction: rtl; }

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #080808;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-screen.hidden { opacity: 0; visibility: hidden; }

.loading-content { text-align: center; }

.loading-logo { width: 80px; height: 80px; margin-bottom: 24px; animation: loadingPulse 1.5s ease-in-out infinite; }

@keyframes loadingPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.loader { display: flex; justify-content: center; align-items: center; --color: #d4a855; --animation: 2s ease-in-out infinite; margin-bottom: 16px; }
.loader .circle { display: flex; align-items: center; justify-content: center; position: relative; width: 20px; height: 20px; border: solid 2px var(--color); border-radius: 50%; margin: 0 10px; background-color: transparent; animation: circle-keys var(--animation); }
.loader .circle .dot { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 16px; height: 16px; border-radius: 50%; background-color: var(--color); animation: dot-keys var(--animation); }
.loader .circle .outline { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 20px; height: 20px; border-radius: 50%; animation: outline-keys var(--animation); }
.loader .circle:nth-child(2) { animation-delay: 0.3s; }
.loader .circle:nth-child(3) { animation-delay: 0.6s; }
.loader .circle:nth-child(4) { animation-delay: 0.9s; }
.loader .circle:nth-child(2) .dot { animation-delay: 0.3s; }
.loader .circle:nth-child(3) .dot { animation-delay: 0.6s; }
.loader .circle:nth-child(4) .dot { animation-delay: 0.9s; }
.loader .circle:nth-child(1) .outline { animation-delay: 0.9s; }
.loader .circle:nth-child(2) .outline { animation-delay: 1.2s; }
.loader .circle:nth-child(3) .outline { animation-delay: 1.5s; }
.loader .circle:nth-child(4) .outline { animation-delay: 1.8s; }
@keyframes circle-keys { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }
@keyframes dot-keys { 0% { transform: scale(1); } 50% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes outline-keys { 0% { transform: scale(0); outline: solid 20px var(--color); outline-offset: 0; opacity: 1; } 100% { transform: scale(1); outline: solid 0 transparent; outline-offset: 20px; opacity: 0; } }

.loading-content p { color: #777; font-size: 14px; }

.header {
    background: #080808;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-brand { display: flex; align-items: center; gap: 12px; }

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    border: 1px solid rgba(212,168,85,0.12);
    border-radius: 10px;
    color: #777;
    text-decoration: none;
    transition: all 0.2s;
}

.back-btn:hover { background: #1a1a1a; color: #fff; border-color: #d4a855; }

.header-brand img { width: 32px; height: 32px; }

.header-brand h1 { font-size: 16px; font-weight: 600; color: #fff; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.user-info { display: flex; align-items: center; gap: 8px; color: #777; font-size: 14px; }

.user-avatar { width: 28px; height: 28px; border-radius: 50%; }

.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    border: none;
    color: #f87171;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    transition: all 0.2s;
}

.logout-btn:hover { background: rgba(239, 68, 68, 0.2); }

.main-save-btn.saving { background: linear-gradient(135deg, #b8944a, #9a7d3a); pointer-events: none; }

.main-save-btn.saved { background: linear-gradient(135deg, #d4a855, #b8944a); animation: pulse-success 0.5s ease; }

.main-layout { display: flex; min-height: calc(100vh - 52px); background: #080808; }

.sidebar {
    width: 280px;
    background: #111111;
    padding: 16px 8px;
    position: sticky;
    top: 52px;
    height: calc(100vh - 52px);
    overflow-y: auto;
    border-radius: 16px 0 0 0;
    margin-top: 8px;
    flex-shrink: 0;
}

.sidebar::-webkit-scrollbar { width: 0; }

.server-info { padding: 8px; margin-bottom: 16px; }

.server-select {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #1a1a1a;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.server-select:hover { background: #1a1a1a; }

.server-select img { width: 44px; height: 44px; border-radius: 12px; }

.server-select h3 { font-size: 14px; color: #fff; font-weight: 500; }

.server-select p { font-size: 12px; color: #555; margin-top: 2px; }

.server-select .chevron { margin-right: auto; color: #555; font-size: 14px; }

.server-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: #1a1a1a;
    border-radius: 12px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.server-dropdown.show { display: block; }

.server-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 13px;
    color: #c0b49a;
}

.server-dropdown-item:hover { background: #1a1a1a; }

.server-dropdown-item img { width: 32px; height: 32px; border-radius: 8px; }

.nav-section { padding: 0 8px; margin-bottom: 8px; }

.nav-section-title { font-size: 11px; color: #555; padding: 16px 12px 8px; font-weight: 500; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 2px 0;
    border-radius: 10px;
    color: #777;
    cursor: pointer;
    transition: all 0.15s;
    font-size: 14px;
    position: relative;
}

.nav-item:hover { background: rgba(212,168,85,0.08); color: #c0b49a; }

.nav-item.active { background: rgba(212, 168, 85, 0.1); color: #d4a855; }

.nav-item.active::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 24px;
    background: #d4a855;
    border-radius: 0 4px 4px 0;
}

.nav-item i { width: 20px; font-size: 14px; text-align: center; opacity: 0.8; }

.nav-item .badge { margin-right: auto; background: #ef4444; color: #fff; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 500; }

.nav-item .badge.new { background: #ef4444; }

.nav-item.premium-item { color: #e0b96a; }

.content { flex: 1; padding: 24px 40px; max-width: 1100px; min-width: 0; margin: 0 auto; }

.content-header { margin-bottom: 24px; }

.content-header h2 { font-size: 14px; color: #555; font-weight: 400; }

.content-header p { display: none; }

.card { background: #131313; border-radius: 16px; margin-bottom: 16px; overflow: hidden; border: 1px solid rgba(212,168,85,0.06); }

.card-header { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; }

.card-header h3 { font-size: 15px; color: #e8e0d0; font-weight: 500; }

.card-header h3 i { display: none; }

.card-body { padding: 0 24px 24px; }

.setting-row { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }

.setting-row:not(:last-child) { border-bottom: 1px solid rgba(212,168,85,0.08); }

.setting-row:first-child { padding-top: 0; }

.setting-row:last-child { padding-bottom: 0; }

.setting-info { flex: 1; }

.setting-info h4 { font-size: 14px; color: #d9cdb8; margin-bottom: 4px; font-weight: 400; }

.setting-info p { font-size: 12px; color: #555; }

.toggle { position: relative; width: 48px; height: 26px; }

.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #1a1a1a; border-radius: 26px; transition: 0.3s; }

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    right: 3px;
    bottom: 3px;
    background: #9ca3af;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked + .toggle-slider { background: #d4a855; }

.toggle input:checked + .toggle-slider:before { transform: translateX(-22px); background: #fff; }

.select-wrapper { position: relative; min-width: 200px; }

select {
    appearance: none;
    background: #1a1a1a;
    border: none;
    border-radius: 10px;
    padding: 12px 40px 12px 16px;
    color: #777;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    transition: all 0.2s;
}

select:hover { background: #1a1a1a; }

select:focus { outline: none; box-shadow: 0 0 0 2px rgba(212, 168, 85, 0.3); }

.select-wrapper:after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    pointer-events: none;
}

input[type="text"],
input[type="number"],
textarea {
    background: #1a1a1a;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    color: #d9cdb8;
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    transition: all 0.2s;
}

input:hover, textarea:hover { background: #1a1a1a; }

input:focus, textarea:focus { outline: none; box-shadow: 0 0 0 2px rgba(212, 168, 85, 0.3); }

input::placeholder, textarea::placeholder { color: #555; }

textarea { min-height: 100px; resize: vertical; line-height: 1.6; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary { background: #d4a855; color: #fff; }

.btn-primary:hover { background: #b8944a; }

.btn-secondary { background: #1a1a1a; color: #c0b49a; }

.btn-secondary:hover { background: #4b5563; }

.btn-danger { background: rgba(239, 68, 68, 0.1); color: #f87171; }

.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }

.commands-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }

.command-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #1a1a1a; border-radius: 12px; }

.command-item .edit-btn {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.command-item .edit-btn:hover { background: rgba(212,168,85,0.08); color: #777; }

.command-info { flex: 1; }

.command-info h4 { font-size: 14px; color: #60a5fa; font-weight: 500; }

.command-info p { font-size: 12px; color: #555; margin-top: 2px; }

.command-tag { background: rgba(96, 165, 250, 0.1); color: #60a5fa; padding: 4px 10px; border-radius: 6px; font-size: 12px; }

.log-info { flex: 1; }

.log-info h4 { font-size: 14px; color: #d9cdb8; font-weight: 400; }

.log-info p { font-size: 12px; color: #555; }

.log-item .select-wrapper { min-width: 180px; }

.automod-item { background: #1a1a1a; border-radius: 12px; padding: 16px 20px; margin-bottom: 12px; }

.automod-item:last-child { margin-bottom: 0; }

.automod-item .header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.automod-item h4 { color: #d9cdb8; font-size: 14px; font-weight: 500; }

.automod-item h4 i { margin-left: 8px; opacity: 0.6; }

.automod-item > p { color: #555; font-size: 12px; margin-bottom: 12px; }

.action-tag:hover, .action-tag.active { background: rgba(212, 168, 85, 0.2); color: #d4a855; }

.welcome-preview { background: #1a1a1a; border-radius: 12px; padding: 20px; text-align: center; }

.empty-state { text-align: center; padding: 40px 20px; color: #555; }

.empty-state i { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }

.empty-state p { font-size: 14px; }

.section { display: none; }

.section.active { display: block; }

.save-bar {
    position: fixed;
    bottom: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    border-radius: 12px;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    transition: bottom 0.3s;
    z-index: 1000;
}

.save-bar.show { bottom: 24px; }

.save-bar p { color: #777; font-size: 14px; }

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: #d4a855;
    color: #fff;
    border-radius: 10px;
    font-size: 14px;
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 10px;
}

.toast.show { display: flex; }

.toast.error { background: #ef4444; }

.premium-card { background: linear-gradient(135deg, #1a1510 0%, #161b22 100%); }

.premium-card .card-body { text-align: center; padding: 60px 24px; }

.premium-card .icon { font-size: 64px; color: #e0b96a; margin-bottom: 24px; }

.premium-card h2 { color: #e8e0d0; margin-bottom: 12px; font-size: 24px; }

.premium-card .desc { color: #777; margin-bottom: 32px; font-size: 14px; }

.premium-features { text-align: right; max-width: 280px; margin: 0 auto 32px; list-style: none; }

.premium-features li { margin-bottom: 12px; color: #c0b49a; font-size: 14px; }

.premium-features li i { color: #e0b96a; margin-left: 10px; }

.btn-premium { background: linear-gradient(135deg, #e0b96a, #d4a855); color: #000; font-weight: 600; padding: 14px 32px; }

.btn-premium:hover { opacity: 0.9; }

.server-stats-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }

.stat-card { background: #1a1a1a; border-radius: 12px; padding: 16px; text-align: center; transition: all 0.3s; border: 1px solid transparent; }

.stat-card:hover { transform: translateY(-2px); border-color: rgba(212, 168, 85, 0.3); }

.stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 18px;
}

.stat-card .stat-value { font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 4px; }

.stat-card .stat-label { font-size: 12px; color: #555; }

.stat-card.members .stat-icon { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }

.stat-card.channels .stat-icon { background: rgba(212, 168, 85, 0.15); color: #d4a855; }

.stat-card.roles .stat-icon { background: rgba(168, 85, 247, 0.15); color: #a855f7; }

.stat-card.boosts .stat-icon { background: rgba(244, 114, 182, 0.15); color: #f472b6; }

.stat-card.banned .stat-icon { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

@media (max-width: 1200px) {
.content { padding: 20px; max-width: 100%; }
    .server-stats-bar { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
    .content { padding: 20px; max-width: 100%; }
    .commands-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar { display: none; }
.content { padding: 16px; }
    .setting-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .select-wrapper, select { width: 100%; }
    .server-stats-bar { grid-template-columns: repeat(2, 1fr); }
}

::-webkit-scrollbar { width: 6px; }

::-webkit-scrollbar-track { background: transparent; }

::-webkit-scrollbar-thumb { background: #1a1a1a; border-radius: 3px; }

::-webkit-scrollbar-thumb:hover { background: #4b5563; }

.premium-badge {
            display: none;
            align-items: center;
            gap: 6px;
            padding: 6px 14px;
            background: linear-gradient(135deg, #d4a855 0%, #d97706 100%);
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            color: #000;
            animation: premiumGlow 2s ease-in-out infinite;
        }

.premium-badge.active { display: flex; }

.server-stats-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 20px; }

.stat-card { background: #1a1a1a; border-radius: 12px; padding: 16px; text-align: center; transition: all 0.3s; border: 1px solid transparent; }

.stat-card:hover { transform: translateY(-2px); border-color: rgba(212, 168, 85, 0.3); }

.stat-card .stat-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 10px;
            font-size: 18px;
        }

.quick-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }

.quick-action-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            background: #1a1a1a;
            border: none;
            border-radius: 10px;
            color: #c0b49a;
            font-family: inherit;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s;
        }

.quick-action-btn:hover { background: #1a1a1a; transform: translateY(-1px); }

.quick-action-btn i { font-size: 14px; opacity: 0.8; }

.quick-action-btn.primary { background: rgba(212, 168, 85, 0.15); color: #d4a855; }

.quick-action-btn.primary:hover { background: rgba(212, 168, 85, 0.25); }

.quick-action-btn.warning { background: rgba(245, 158, 11, 0.15); color: #e0b96a; }

.quick-action-btn.warning:hover { background: rgba(245, 158, 11, 0.25); }

.quick-action-btn.danger { background: rgba(239, 68, 68, 0.15); color: #f87171; }

.quick-action-btn.danger:hover { background: rgba(239, 68, 68, 0.25); }

.nav-item.locked { opacity: 0.5; cursor: not-allowed; }

.nav-item.locked::after { content: '👑'; margin-right: auto; font-size: 12px; }

.premium-unlocked .nav-item.locked { opacity: 1; cursor: pointer; }

.premium-unlocked .nav-item.locked::after { display: none; }

.premium-status-enhanced {
            background: linear-gradient(135deg, #1a2e1a 0%, #0f1f0f 50%, #161b22 100%) !important;
            border: 1px solid rgba(212, 168, 85, 0.4) !important;
            position: relative;
            overflow: hidden;
        }

.premium-status-enhanced::before {
            content: '';
            position: absolute;
            top: -50%;
            right: -50%;
            width: 100%;
            height: 100%;
            background: radial-gradient(circle, rgba(212, 168, 85, 0.1) 0%, transparent 70%);
            animation: premiumShine 3s ease-in-out infinite;
        }

.premium-crown { font-size: 24px; animation: crownBounce 2s ease-in-out infinite; }

.premium-info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.premium-info-item { background: rgba(31, 41, 55, 0.8); padding: 16px; border-radius: 12px; text-align: center; border: 1px solid rgba(212, 168, 85, 0.04); }

.premium-info-item .info-icon { font-size: 20px; margin-bottom: 8px; }

.premium-info-item .info-label { color: #555; font-size: 11px; margin-bottom: 4px; }

.premium-info-item .info-value { color: #d9cdb8; font-weight: 600; font-size: 14px; }

.premium-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: center; }

.premium-action-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            border-radius: 10px;
            font-family: inherit;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
            border: none;
        }

.premium-action-btn.renew { background: linear-gradient(135deg, #d4a855, #b8944a); color: #fff; }

.premium-action-btn.renew:hover { transform: scale(1.02); }

.premium-action-btn.support { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }

.premium-action-btn.support:hover { background: rgba(96, 165, 250, 0.25); }

.feature-table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }

.feature-table thead tr { background: linear-gradient(135deg, #1a1f2e 0%, #232939 100%); }

.feature-table th { padding: 18px 24px; text-align: center; color: #777; font-weight: 600; font-size: 14px; letter-spacing: 0.3px; }

.feature-table th:first-child { text-align: right; border-radius: 0 12px 12px 0; }

.feature-table th:last-child { border-radius: 12px 0 0 12px; }

.feature-table tbody tr { background: #1a1a1a; transition: all 0.3s ease; }

.feature-table tbody tr:hover { background: #1a1a1a; transform: scale(1.01); }

.feature-table td { padding: 18px 24px; text-align: center; font-size: 14px; color: #c0b49a; }

.feature-table td:first-child { text-align: right; font-weight: 500; border-radius: 0 12px 12px 0; }

.feature-table td:last-child { border-radius: 12px 0 0 12px; }

.feature-table .check { color: #d4a855; font-size: 18px; filter: drop-shadow(0 0 6px rgba(212, 168, 85, 0.4)); }

.feature-table .cross { color: #4b5563; font-size: 16px; }

.feature-table .premium-col { background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%); position: relative; }

.feature-table th.premium-col { color: #d4a855; font-weight: 700; }

.pricing-grid-premium { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px auto; max-width: 550px; }

@media (max-width: 600px) {
.pricing-grid-premium { grid-template-columns: repeat(2, 1fr); }
        }

.price-card {
            background: #1a1a1a;
            padding: 18px 12px;
            border-radius: 14px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
            position: relative;
        }

.price-card:hover { background: #1a1a1a; transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4); }

.price-card.selected { background: linear-gradient(145deg, #252d3a 0%, #2d2a1f 100%); border-color: #d4a855; box-shadow: 0 0 25px rgba(240, 177, 50, 0.15); }

.price-card.lifetime { background: linear-gradient(145deg, #1f2937 0%, #1f1a2e 100%); }

.price-card.lifetime.selected { border-color: #a855f7; box-shadow: 0 0 25px rgba(168, 85, 247, 0.15); }

.best-badge {
            position: absolute;
            top: -10px;
            left: 50%;
            transform: translateX(-50%);
            background: linear-gradient(135deg, #d4a855, #d97706);
            color: #000;
            padding: 4px 12px;
            border-radius: 12px;
            font-size: 10px;
            font-weight: 700;
            white-space: nowrap;
        }

.plan-label { color: #777; font-size: 12px; margin-bottom: 6px; }

.plan-price { color: #d4a855; font-size: 28px; font-weight: 700; line-height: 1; }

.plan-period { color: #555; font-size: 11px; margin-top: 4px; }

.plan-save { color: #d4a855; font-size: 10px; margin-top: 6px; font-weight: 500; }

.lifetime-label { color: #a855f7; }

.plan-lifetime-note { color: #a855f7; font-size: 10px; margin-top: 6px; font-weight: 500; }

@media (max-width: 768px) {
            .premium-info-grid { grid-template-columns: repeat(2, 1fr); }
            .quick-actions { flex-direction: column; }
        }

@media (max-width: 1024px) {
            .server-stats-bar { grid-template-columns: repeat(3, 1fr); }
        }

/* ==================== Embed Builder Advanced ==================== */

.premium-lock-overlay {
            display: none;
            position: absolute;
            inset: 0;
            background: rgba(15, 20, 25, 0.95);
            z-index: 100;
            border-radius: 16px;
            align-items: center;
            justify-content: center;
        }

.premium-lock-overlay.show { display: flex; }

.embed-section.expanded .embed-section-header i:last-child { transform: rotate(180deg); }

.embed-section.expanded .embed-section-body { display: block; }

.formatting-toolbar {
            display: flex;
            align-items: center;
            gap: 2px;
            padding: 6px 8px;
            background: #1a1a1a;
            border-radius: 8px 8px 0 0;
            border: 1px solid #1a1a1a;
            border-bottom: none;
            flex-wrap: wrap;
        }

.formatting-toolbar + input,
.formatting-toolbar + textarea { border-radius: 0 0 8px 8px; }

.formatting-toolbar button {
            width: 32px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: transparent;
            border: none;
            border-radius: 4px;
            color: #777;
            cursor: pointer;
            transition: all 0.15s;
            font-size: 13px;
        }

.formatting-toolbar button:hover { background: #1a1a1a; color: #fff; }

.formatting-toolbar button b { font-weight: 700; }

.formatting-toolbar button i { font-style: italic; }

.formatting-toolbar button u { text-decoration: underline; }

.formatting-toolbar button s { text-decoration: line-through; }

.toolbar-divider { width: 1px; height: 20px; background: #1a1a1a; margin: 0 6px; }

.field-item { background: #1a1a1a; border-radius: 8px; padding: 14px; margin-bottom: 10px; position: relative; }

.field-item-actions button.delete:hover { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.btn-add-field {
            width: 100%;
            padding: 12px;
            background: transparent;
            border: 2px dashed #1a1a1a;
            border-radius: 8px;
            color: #777;
            font-family: inherit;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

.btn-add-field:hover { border-color: #d4a855; color: #d4a855; background: rgba(212, 168, 85, 0.05); }

.preset-color.selected { border-color: #fff; }

.embed-actions { display: flex; gap: 10px; margin-top: 16px; }

.embed-actions .btn { flex: 1; }

.embed-preview-header {
            padding: 14px 18px;
            border-bottom: 1px solid rgba(212,168,85,0.08);
            color: #d9cdb8;
            font-size: 14px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 10px;
        }

.embed-preview-content { padding: 20px; overflow-y: auto; flex: 1; background: #36393f; }

.discord-message { display: flex; gap: 16px; }

.discord-avatar img { width: 40px; height: 40px; border-radius: 50%; }

.discord-message-content { flex: 1; min-width: 0; }

.discord-message-header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }

.discord-username { color: #fff; font-weight: 500; font-size: 15px; }

.discord-bot-tag { background: #d4a855; color: #fff; font-size: 10px; padding: 2px 5px; border-radius: 3px; font-weight: 500; }

.discord-timestamp { color: #72767d; font-size: 12px; }

.discord-embed {
            display: grid;
            grid-template-columns: auto 1fr auto;
            max-width: 520px;
            background: #2f3136;
            border-radius: 4px;
            overflow: hidden;
            margin-top: 4px;
        }

.discord-embed-color { width: 4px; background: #d4a855; }

.discord-embed-content { padding: 12px 16px 12px 12px; min-width: 0; }

.discord-embed-author { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; color: #fff; }

.discord-embed-author img { width: 24px; height: 24px; border-radius: 50%; }

.discord-embed-author a { color: #fff; text-decoration: none; }

.discord-embed-author a:hover { text-decoration: underline; }

.discord-embed-title { color: #00aff4; font-weight: 600; font-size: 15px; margin-bottom: 8px; }

.discord-embed-title a { color: #00aff4; text-decoration: none; }

.discord-embed-title a:hover { text-decoration: underline; }

.discord-embed-description { color: #dcddde; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }

.discord-embed-fields { display: grid; gap: 8px; margin-top: 8px; }

.discord-embed-field { min-width: 0; }

.discord-embed-field.inline { display: inline-block; width: calc(33.33% - 6px); vertical-align: top; }

.discord-embed-field-name { color: #fff; font-weight: 600; font-size: 13px; margin-bottom: 2px; }

.discord-embed-field-value { color: #dcddde; font-size: 14px; white-space: pre-wrap; }

.discord-embed-image { margin-top: 16px; }

.discord-embed-image img { max-width: 100%; border-radius: 4px; }

.discord-embed-thumbnail { padding: 12px 16px 12px 0; }

.discord-embed-thumbnail img { width: 80px; height: 80px; border-radius: 4px; object-fit: cover; }

.discord-embed-footer { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: #72767d; }

.discord-embed-footer img { width: 20px; height: 20px; border-radius: 50%; }

@media (max-width: 1100px) {
.embed-builder-container { grid-template-columns: 1fr; }

.embed-preview-container { position: static; max-height: 500px; }
        }

.embed-tab.active { background: rgba(212, 168, 85, 0.15); border-color: #d4a855; color: #fff; }

.formatting-toolbar.locked { pointer-events: none; position: relative; }

.formatting-toolbar.locked::after {
            content: '👑 بريميوم';
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(31, 41, 55, 0.95);
            border-radius: 8px 8px 0 0;
            color: #d4a855;
            font-size: 12px;
            cursor: pointer;
        }

.embed-builder-layout { display: grid; grid-template-columns: 1fr 400px; gap: 20px; }

@media (max-width: 1100px) {
.embed-builder-layout { grid-template-columns: 1fr; }
        }

.embeds-list-panel { display: flex; flex-direction: column; gap: 12px; }

.embeds-accordion { display: flex; flex-direction: column; gap: 8px; }

.embed-accordion-item { background: #131313; border-radius: 12px; overflow: hidden; border: 2px solid transparent; transition: all 0.2s; }

.embed-accordion-item.expanded { border-color: rgba(212, 168, 85, 0.3); }

.embed-accordion-header { display: flex; align-items: center; padding: 14px 16px; cursor: pointer; transition: background 0.2s; }

.embed-accordion-header:hover { background: rgba(212,168,85,0.02); }

.embed-accordion-header .embed-color-indicator { width: 4px; height: 36px; border-radius: 2px; margin-left: 12px; flex-shrink: 0; }

.embed-accordion-header .embed-icon {
            width: 36px;
            height: 36px;
            background: rgba(212, 168, 85, 0.15);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #d4a855;
            margin-left: 12px;
            flex-shrink: 0;
        }

.embed-accordion-header .embed-title-info { flex: 1; min-width: 0; }

.embed-accordion-header .embed-title-info h4 { color: #d9cdb8; font-size: 14px; font-weight: 500; margin-bottom: 2px; }

.embed-accordion-header .embed-title-info p { color: #555; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.embed-accordion-header .embed-header-actions { display: flex; align-items: center; gap: 8px; }

.embed-accordion-header .embed-header-actions button {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #1a1a1a;
            border: none;
            border-radius: 6px;
            color: #777;
            cursor: pointer;
            transition: all 0.15s;
        }

.embed-accordion-header .embed-header-actions button:hover { background: #4b5563; color: #fff; }

.embed-accordion-header .embed-header-actions button.delete:hover { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.embed-accordion-header .expand-icon { color: #555; transition: transform 0.3s; margin-right: 8px; }

.embed-accordion-item.expanded .expand-icon { transform: rotate(180deg); }

.embed-accordion-body { display: none; padding: 0 16px 16px; border-top: 1px solid rgba(212,168,85,0.08); }

.embed-accordion-item.expanded .embed-accordion-body { display: block; }

.embed-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 16px; }

.embed-form-grid .full-width { grid-column: 1 / -1; }

.embed-form-group { display: flex; flex-direction: column; gap: 6px; }

.embed-form-group label { color: #777; font-size: 12px; }

.embed-form-group input,
        .embed-form-group textarea {
            background: #1a1a1a;
            border: 1px solid #1a1a1a;
            border-radius: 8px;
            padding: 10px 12px;
            color: #d9cdb8;
            font-size: 14px;
            font-family: inherit;
            transition: all 0.2s;
        }

.embed-form-group input:focus,
.embed-form-group textarea:focus { outline: none; border-color: #d4a855; }

.embed-form-group textarea { resize: vertical; min-height: 80px; }

.color-picker-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.color-picker-row input[type="color"] { width: 40px; height: 40px; border: none; border-radius: 8px; cursor: pointer; background: transparent; }

.color-presets { display: flex; gap: 6px; flex-wrap: wrap; }

.color-preset { width: 24px; height: 24px; border-radius: 4px; cursor: pointer; transition: transform 0.15s; border: 2px solid transparent; }

.color-preset:hover { transform: scale(1.15); }

.color-preset.active { border-color: #fff; }

.embed-image-upload {
            border: 2px dashed #1a1a1a;
            border-radius: 8px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            background: #1a1a1a;
        }

.embed-image-upload:hover { border-color: #d4a855; }

.embed-image-upload i { font-size: 24px; color: #555; margin-bottom: 8px; }

.embed-image-upload span { display: block; color: #777; font-size: 13px; }

.embed-image-upload.has-image { padding: 8px; }

.embed-image-upload.has-image img { max-width: 100%; max-height: 120px; border-radius: 6px; }

.embed-fields-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(212,168,85,0.08); }

.embed-fields-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.embed-fields-header h5 { color: #777; font-size: 12px; font-weight: 500; }

.embed-field-item { background: #1a1a1a; border-radius: 8px; padding: 12px; margin-bottom: 8px; }

.embed-field-item .field-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

.embed-field-item .field-header span { color: #555; font-size: 11px; }

.embed-field-item .field-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.embed-field-item .field-inline { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 8px; }

.embed-field-item .field-inline label { color: #777; font-size: 12px; cursor: pointer; }

.btn-add-field-small {
            width: 100%;
            padding: 10px;
            background: transparent;
            border: 1px dashed #1a1a1a;
            border-radius: 8px;
            color: #555;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s;
        }

.btn-add-field-small:hover { border-color: #d4a855; color: #d4a855; }

.btn-add-new-embed {
            width: 100%;
            padding: 16px;
            background: transparent;
            border: 2px dashed #1a1a1a;
            border-radius: 12px;
            color: #777;
            font-family: inherit;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

.btn-add-new-embed:hover { border-color: #d4a855; color: #d4a855; background: rgba(212, 168, 85, 0.05); }

.embed-send-card { background: #131313; border-radius: 12px; padding: 16px; margin-top: 8px; }

.embed-send-btns { display: flex; gap: 10px; margin-top: 12px; }

.embed-send-btns .btn { flex: 1; }

.embed-preview-panel {
            background: #131313;
            border-radius: 12px;
            overflow: hidden;
            position: sticky;
            top: 80px;
            max-height: calc(100vh - 100px);
            display: flex;
            flex-direction: column;
        }

.embed-preview-header {
            padding: 14px 16px;
            border-bottom: 1px solid rgba(212,168,85,0.08);
            color: #d9cdb8;
            font-size: 14px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

.embed-preview-content { padding: 16px; background: #36393f; flex: 1; overflow-y: auto; }

.image-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #777; }

.image-preview i { font-size: 32px; color: #555; }

.image-preview span { font-size: 14px; }

.image-preview small { font-size: 11px; color: #555; }

.image-preview img { max-width: 100%; max-height: 200px; border-radius: 8px; object-fit: contain; }

.image-preview.has-image { padding: 0; }

.image-preview.has-image i,
        .image-preview.has-image span,
.image-preview.has-image small { display: none; }

.image-upload-box.uploading .image-preview::after {
            content: 'جاري الرفع...';
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(31, 41, 55, 0.9);
            border-radius: 10px;
            color: #d4a855;
            font-size: 14px;
        }

.ticket-image-box {
            width: 200px;
            height: 120px;
            background: #0c0c0c;
            border: 2px dashed #1a1a1a;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
            overflow: hidden;
        }

.ticket-image-box:hover { border-color: #d4a855; background: #1a1a1a; }

.ticket-image-box.small { width: 100px; height: 100px; }

.ticket-image-box img { width: 100%; height: 100%; object-fit: cover; }

.ticket-image-box .placeholder { color: #4b5563; font-size: 32px; }

.permissions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

@media (max-width: 900px) { .permissions-grid { grid-template-columns: 1fr; } }

.permissions-box { background: #0c0c0c; border-radius: 12px; padding: 20px; border: 1px solid rgba(212,168,85,0.12); }

.permission-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #30363d; }

.permission-item:last-child { border-bottom: none; }

.permission-info { display: flex; align-items: center; gap: 12px; flex: 1; }

.permission-info strong { color: #fff; display: block; font-size: 14px; }

.permission-info p { color: #555; font-size: 12px; margin: 4px 0 0; }

.perm-icon { font-size: 20px; width: 32px; text-align: center; }

.info-box { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.3); border-radius: 8px; padding: 12px 16px; display: flex; align-items: flex-start; gap: 12px; color: #60a5fa; font-size: 13px; }

.info-box i { margin-top: 2px; }

.time-input { background: #0c0c0c; border: 1px solid rgba(212,168,85,0.12); border-radius: 8px; padding: 10px 14px; color: #fff; font-family: inherit; font-size: 14px; width: 150px; }

.time-input:focus { outline: none; border-color: #d4a855; }

.ticket-category-card { background: #1a1a1a; border: 1px solid rgba(212,168,85,0.12); border-radius: 12px; padding: 20px; margin-bottom: 16px; position: relative; }

.ticket-category-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; cursor: grab; }

.ticket-category-header h4 { display: flex; align-items: center; gap: 8px; color: #fff; margin: 0; }

.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

@media (max-width: 800px) { .category-grid { grid-template-columns: 1fr; } }

.category-field { display: flex; flex-direction: column; gap: 6px; }

.category-field label { color: #777; font-size: 12px; }

.category-field input, .category-field select, .category-field textarea { background: #0c0c0c; border: 1px solid rgba(212,168,85,0.12); border-radius: 8px; padding: 10px 12px; color: #fff; font-family: inherit; font-size: 13px; width: 100%; }

.category-field input:focus, .category-field select:focus, .category-field textarea:focus { outline: none; border-color: #d4a855; }

.emoji-picker-btn { background: #1a1a1a; border: none; border-radius: 8px; padding: 8px 16px; color: #fff; cursor: pointer; display: flex; align-items: center; gap: 6px; font-size: 16px; }

.emoji-picker-btn:hover { background: #4b5563; }

.btn-premium { background: linear-gradient(135deg, #d4a855, #d97706); color: #000; font-weight: 600; padding: 12px 24px; border-radius: 8px; border: none; cursor: pointer; font-family: inherit; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; transition: all 0.3s; }

.btn-premium:hover { transform: translateY(-2px); box-shadow: 0 4px 20px rgba(245, 158, 11, 0.3); }

.premium-tag { background: linear-gradient(135deg, #d4a855, #d97706); color: #000; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 12px; display: inline-flex; align-items: center; gap: 4px; }

.role-tag { display: inline-flex; align-items: center; gap: 6px; background: rgba(212, 168, 85, 0.15); color: #d4a855; padding: 4px 10px; border-radius: 12px; font-size: 12px; margin-left: 8px; }

.role-tag .remove-role { cursor: pointer; opacity: 0.7; margin-right: 4px; }

.role-tag .remove-role:hover { opacity: 1; }

.btn-sm { padding: 8px 14px; font-size: 12px; }

.btn-text { background: transparent; border: none; color: #555; cursor: pointer; font-family: inherit; padding: 8px 12px; }

.btn-text:hover { color: #ef4444; }

.btn-outline { background: transparent; border: 1px solid #1a1a1a; color: #c0b49a; border-radius: 8px; cursor: pointer; font-family: inherit; }

.btn-outline:hover { background: #1a1a1a; }

#ticketSetupMessageSection { position: relative; min-height: 280px; }

.premium-unlocked #ticketPremiumOverlay { display: none !important; }

.premium-unlocked #ticketPremiumContent { display: block !important; }

.premium-unlocked #ticketSetupMessageSection { min-height: auto; }

.premium-unlocked #ticketPremiumTag { background: linear-gradient(135deg, #d4a855, #b8944a); }

.premium-feature { position: relative; overflow: hidden; }

.premium-feature:not(.unlocked) .card-body { opacity: 0.5; pointer-events: none; }

.premium-feature.unlocked .premium-lock-overlay { display: none; }

.premium-feature.unlocked .card-body { opacity: 1; pointer-events: auto; }

.premium-lock-overlay {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(17, 24, 39, 0.9);
            padding: 20px 40px;
            border-radius: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            z-index: 10;
        }

.premium-lock-overlay i { font-size: 28px; color: #d4a855; }

.premium-lock-overlay span { color: #d4a855; font-weight: 600; }

.premium-mini {
            background: linear-gradient(135deg, #d4a855, #d97706);
            color: #000;
            font-size: 9px;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            margin-right: 6px;
        }

.premium-perm:not(.unlocked) { opacity: 0.6; }

.premium-perm:not(.unlocked) input { pointer-events: none; }

.category-limit { background: #1a1a1a; color: #777; padding: 4px 12px; border-radius: 20px; font-size: 12px; }

.premium-unlocked .category-limit { background: linear-gradient(135deg, #d4a855, #b8944a); color: #fff; }

.premium-features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

@media (max-width: 600px) {
            .premium-features-grid { grid-template-columns: 1fr; }
        }

.premium-feature-item { background: #1a1a1a; border: 1px solid rgba(212,168,85,0.12); border-radius: 12px; padding: 20px; text-align: center; }

.premium-feature-item i { font-size: 32px; color: #d4a855; margin-bottom: 12px; }

.premium-feature-item h4 { color: #fff; margin-bottom: 8px; }

.premium-feature-item p { color: #555; font-size: 13px; }

.premium-hint { display: flex; align-items: center; gap: 8px; }

.premium-unlocked .premium-feature { position: relative; }

.premium-unlocked .premium-feature .card-body { opacity: 1; pointer-events: auto; }

.premium-unlocked .premium-lock-overlay { display: none !important; }

.premium-unlocked .premium-perm { opacity: 1; }

.premium-unlocked .premium-perm input { pointer-events: auto; }

.premium-unlocked #ticketAdvancedCard { display: none; }

.premium-unlocked #categoryHint { display: none !important; }

.modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.8);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            padding: 20px;
        }

.cmd-edit-modal {
            background: #0c0c0c;
            border-radius: 16px;
            padding: 28px;
            width: 100%;
            max-width: 450px;
            max-height: 90vh;
            overflow-y: auto;
        }

.cmd-edit-modal h2 { color: #fff; font-size: 20px; margin-bottom: 24px; text-align: center; }

.cmd-edit-section { margin-bottom: 20px; }

.cmd-edit-section label { display: block; color: #777; font-size: 13px; margin-bottom: 8px; text-align: right; }

.cmd-select-wrapper { position: relative; }

.cmd-select-wrapper select {
            width: 100%;
            padding: 12px 16px;
            padding-left: 40px;
            background: #1a1a1a;
            border: 1px solid #3d4450;
            border-radius: 10px;
            color: #777;
            font-size: 14px;
            font-family: inherit;
            appearance: none;
            cursor: pointer;
        }

.cmd-select-wrapper input {
            width: 100%;
            padding: 12px 16px;
            background: #1a1a1a;
            border: 1px solid #3d4450;
            border-radius: 10px;
            color: #fff;
            font-size: 14px;
            font-family: inherit;
        }

.cmd-select-wrapper select:focus,
.cmd-select-wrapper input:focus { outline: none; border-color: #d4a855; }

.cmd-select-wrapper select + .cmd-arrow,
        .cmd-select-wrapper::after {
            content: '';
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            border: 5px solid transparent;
            border-top-color: #555;
            pointer-events: none;
        }

.cmd-input-wrapper { position: relative; }

.cmd-input-wrapper input {
            width: 100%;
            padding: 12px 16px;
            background: #1a1a1a;
            border: 1px solid #3d4450;
            border-radius: 10px;
            color: #fff;
            font-size: 14px;
            font-family: inherit;
        }

.cmd-input-wrapper input:focus { outline: none; border-color: #d4a855; }

.cmd-input-wrapper input::placeholder { color: #555; }

.cmd-select-wrapper input + .cmd-select-wrapper::after { display: none; }

.cmd-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.cmd-tag {
            background: #3d4450;
            color: #c0b49a;
            padding: 6px 12px;
            border-radius: 6px;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

.cmd-tag i { cursor: pointer; opacity: 0.7; }

.cmd-tag i:hover { opacity: 1; color: #ef4444; }

.cmd-edit-toggle { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid #2d3341; }

.cmd-edit-toggle span { color: #c0b49a; font-size: 14px; }

.toggle-switch { position: relative; width: 44px; height: 24px; }

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider-sm {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: #1a1a1a;
            border-radius: 24px;
            transition: 0.3s;
        }

.toggle-slider-sm:before {
            content: '';
            position: absolute;
            height: 18px;
            width: 18px;
            right: 3px;
            bottom: 3px;
            background: #9ca3af;
            border-radius: 50%;
            transition: 0.3s;
        }

.toggle-switch input:checked + .toggle-slider-sm { background: #d4a855; }

.toggle-switch input:checked + .toggle-slider-sm:before { transform: translateX(-20px); background: #fff; }

.cmd-edit-actions { display: flex; gap: 12px; margin-top: 24px; }

.btn-cancel {
            flex: 1;
            padding: 12px;
            background: transparent;
            border: none;
            color: #777;
            font-size: 14px;
            font-family: inherit;
            cursor: pointer;
            border-radius: 8px;
        }

.btn-cancel:hover { background: #1a1a1a; }

.btn-save {
            flex: 1;
            padding: 12px;
            background: #d4a855;
            border: none;
            color: #fff;
            font-size: 14px;
            font-family: inherit;
            cursor: pointer;
            border-radius: 8px;
            font-weight: 500;
        }

.btn-save:hover { background: #b8944a; }

.automod-card { background: #131313; border-radius: 16px; margin-bottom: 16px; overflow: hidden; border: 1px solid #1f1f1f; }

.automod-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; background: #1c2128; cursor: pointer; }

.automod-header-info { display: flex; align-items: center; gap: 16px; }

.automod-header-info h3 { color: #e8e0d0; font-size: 15px; font-weight: 500; margin-bottom: 4px; }

.automod-header-info p { color: #555; font-size: 12px; }

.automod-body { padding: 24px; display: none; }

.automod-card.expanded .automod-body { display: block; }

.automod-card.expanded .automod-chevron { transform: rotate(180deg); }

.automod-chevron { color: #555; transition: transform 0.3s; }

.automod-field { margin-bottom: 20px; }

.automod-field label { display: block; color: #777; font-size: 13px; margin-bottom: 8px; }

.automod-field input,
        .automod-field select,
        .automod-field textarea {
            width: 100%;
            padding: 12px 16px;
            background: #1a1a1a;
            border: 1px solid #3d4450;
            border-radius: 10px;
            color: #c0b49a;
            font-size: 14px;
            font-family: inherit;
        }

.automod-field textarea { min-height: 100px; resize: vertical; }

.automod-field input:focus,
        .automod-field select:focus,
.automod-field textarea:focus { outline: none; border-color: #d4a855; }

.automod-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #1f1f1f; }

.automod-toggle-row:last-child { border-bottom: none; }

.automod-toggle-info h4 { color: #c0b49a; font-size: 14px; margin-bottom: 4px; }

.automod-toggle-info p { color: #555; font-size: 12px; }

.automod-select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

@media (max-width: 600px) {
.automod-select-row { grid-template-columns: 1fr; }
        }

.automod-tags-input {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 12px;
            background: #1a1a1a;
            border: 1px solid #3d4450;
            border-radius: 10px;
            min-height: 48px;
        }

.automod-tags-input input { border: none; background: transparent; padding: 4px; flex: 1; min-width: 100px; }

.automod-tags-input input:focus { outline: none; }

.automod-tag {
            background: #3d4450;
            color: #c0b49a;
            padding: 4px 10px;
            border-radius: 6px;
            font-size: 12px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

.automod-tag i { cursor: pointer; font-size: 10px; }

.automod-tag i:hover { color: #ef4444; }

.protection-card { overflow: hidden; }

.protection-tabs { display: flex; border-bottom: 1px solid #1f1f1f; background: #1c2128; }

.protection-tab {
            flex: 1;
            padding: 16px;
            background: none;
            border: none;
            color: #555;
            font-family: inherit;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s;
            border-bottom: 2px solid transparent;
        }

.protection-tab:hover { color: #777; background: rgba(212,168,85,0.02); }

.protection-tab.active { color: #fff; border-bottom-color: #d4a855; }

.protection-content { padding: 24px; }

.protection-panel { display: none; }

.protection-panel.active { display: block; }

.protection-section { margin-bottom: 20px; }

.protection-section > label { display: block; color: #777; font-size: 13px; margin-bottom: 12px; }

.roles-selector {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            padding: 16px;
            background: #1a1a1a;
            border-radius: 10px;
            min-height: 60px;
        }

.role-tag {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 6px 12px;
            background: #1a1a1a;
            border-radius: 20px;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s;
            border: 1px solid transparent;
        }

.role-tag:hover { border-color: rgba(212,168,85,0.08); }

.role-tag.selected { border-color: #d4a855; background: rgba(212, 168, 85, 0.1); }

.role-tag .role-color { width: 12px; height: 12px; border-radius: 50%; }

.role-tag .role-remove { margin-right: 4px; opacity: 0.6; }

.role-tag .role-remove:hover { opacity: 1; }

.protection-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px;
            background: #1a1a1a;
            border-radius: 10px;
            margin-bottom: 12px;
        }

.protection-row span { color: #c0b49a; font-size: 14px; }

.protection-row select {
            padding: 10px 16px;
            background: #1a1a1a;
            border: 1px solid #3d4450;
            border-radius: 8px;
            color: #c0b49a;
            font-family: inherit;
            min-width: 200px;
        }

.counter-input { display: flex; align-items: center; gap: 0; background: #1a1a1a; border-radius: 8px; overflow: hidden; }

.counter-input button {
            width: 40px;
            height: 40px;
            background: transparent;
            border: none;
            color: #777;
            font-size: 18px;
            cursor: pointer;
        }

.counter-input button:hover { background: rgba(212,168,85,0.08); color: #fff; }

.counter-input input {
            width: 60px;
            height: 40px;
            background: transparent;
            border: none;
            color: #fff;
            text-align: center;
            font-size: 16px;
            font-family: inherit;
        }

.counter-input input:focus { outline: none; }

.protection-setting { display: flex; gap: 16px; align-items: flex-start; }

.protection-setting h4 { color: #e8e0d0; font-size: 14px; margin-bottom: 6px; }

.protection-setting p { color: #555; font-size: 12px; line-height: 1.5; }

.access-options { display: flex; flex-direction: column; gap: 12px; }

.access-option {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 16px;
            background: #1a1a1a;
            border-radius: 10px;
            cursor: pointer;
        }

.access-option input { width: 20px; height: 20px; accent-color: #d4a855; }

.access-option span { color: #c0b49a; font-size: 14px; }

.trusted-bots-input { margin-bottom: 12px; }

.trusted-bots-input input {
            width: 100%;
            padding: 12px 16px;
            background: #1a1a1a;
            border: 1px solid #3d4450;
            border-radius: 10px;
            color: #fff;
            font-family: inherit;
        }

.trusted-bots-list { display: flex; flex-wrap: wrap; gap: 8px; }

.logs-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

@media (max-width: 900px) {
.logs-grid { grid-template-columns: 1fr; }
        }

.log-card { background: #131313; border-radius: 16px; overflow: hidden; }

.log-card-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: #1c2128; }

.log-card-header .log-info { display: flex; align-items: center; gap: 12px; }

.log-card-header .log-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
        }

.log-card-header h4 { color: #e8e0d0; font-size: 14px; margin-bottom: 2px; }

.log-card-header p { color: #555; font-size: 11px; }

.log-card-body { padding: 16px 20px; }

.log-field { margin-bottom: 16px; }

.log-field:last-child { margin-bottom: 0; }

.log-field label { display: flex; align-items: center; gap: 6px; color: #777; font-size: 12px; margin-bottom: 8px; }

.log-field select {
            width: 100%;
            padding: 10px 14px;
            background: #1a1a1a;
            border: 1px solid #3d4450;
            border-radius: 8px;
            color: #c0b49a;
            font-family: inherit;
            font-size: 13px;
        }

.log-color-picker { display: flex; align-items: center; gap: 12px; }

.log-color-preview { width: 100%; height: 44px; border-radius: 8px; cursor: pointer; position: relative; }

.log-color-preview input[type="color"] { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.log-color-preview i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: rgba(255,255,255,0.5); }

.automod-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

@media (max-width: 900px) {
.automod-grid { grid-template-columns: 1fr; }
        }

.role-dropdown { position: relative; width: 100%; }

.role-dropdown-trigger {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: #1a1a1a;
            border: 1px solid #3d4450;
            border-radius: 10px;
            color: #777;
            cursor: pointer;
            transition: all 0.2s;
        }

.role-dropdown-trigger:hover { border-color: #d4a855; }

.role-dropdown-trigger i { font-size: 12px; transition: transform 0.2s; }

.role-dropdown.open .role-dropdown-trigger i { transform: rotate(180deg); }

.role-dropdown.dropdown-up.open .role-dropdown-trigger i { transform: rotate(0deg); }

.role-dropdown-menu {
            position: fixed;
            background: #0c0c0c;
            border: 1px solid #3d4450;
            border-radius: 10px;
            max-height: 250px;
            overflow-y: auto;
            z-index: 999999;
            display: none;
            box-shadow: 0 8px 32px rgba(0,0,0,0.6);
        }

.role-dropdown.open .role-dropdown-menu { display: block; }

.role-dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; transition: background 0.15s; }

.role-dropdown-item:hover { background: rgba(212, 168, 85, 0.1); }

.role-dropdown-item:first-child { border-radius: 9px 9px 0 0; }

.role-dropdown-item:last-child { border-radius: 0 0 9px 9px; }

.role-color-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

.role-dropdown-item .role-name { color: #c0b49a; font-size: 14px; }

.role-dropdown-text { color: #555; }

.role-multi-trigger .placeholder { color: #555; font-size: 14px; }

.role-multi-menu.show { display: block; }

.cmd-tag .role-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* =============================================
   قسم الترحيب - Welcome Section Styles
   ============================================= */

.welcome-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

@media (max-width: 900px) {
.welcome-grid { grid-template-columns: 1fr; }
}

.welcome-message-box label { display: block; color: #555; font-size: 13px; margin-bottom: 10px; }

.welcome-textarea {
    width: 100%;
    min-height: 100px;
    padding: 16px;
    background: #0c0c0c;
    border: 1px solid #2d333b;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    line-height: 1.6;
}

.welcome-textarea:focus { outline: none; border-color: #d4a855; }

.var-icon {
    background: #d4a855;
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.variables-grid { display: flex; flex-direction: column; gap: 12px; }

.var-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }

.var-item:last-child { border-bottom: none; }

.var-value { color: #e0b96a; font-family: 'Courier New', monospace; font-size: 13px; background: rgba(251, 191, 36, 0.08); padding: 4px 10px; border-radius: 6px; }

.var-label { color: #8b949e; font-size: 13px; }

.send-options { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }

.send-option { display: flex; align-items: center; gap: 12px; cursor: pointer; color: #c0b49a; font-size: 14px; }

.send-option input[type="radio"] { display: none; }

.radio-custom { width: 20px; height: 20px; border: 2px solid #4b5563; border-radius: 50%; position: relative; transition: all 0.2s; }

.send-option input[type="radio"]:checked + .radio-custom { border-color: #d4a855; }

.send-option input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #d4a855;
    border-radius: 50%;
}

.channel-select-wrapper { position: relative; }

.channel-select-wrapper select {
    width: 100%;
    padding: 14px 16px;
    background: #0c0c0c;
    border: 1px solid #2d333b;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
}

.channel-select-wrapper::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
    pointer-events: none;
}

.channel-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: #0c0c0c;
    border: 1px solid #2d333b;
    border-radius: 10px;
    color: #c0b49a;
    font-size: 14px;
    margin-top: 10px;
}

.channel-selected i:first-child { color: #555; }

.welcome-title { color: #fff; font-size: 22px; font-weight: 600; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }

.welcome-username {
    color: #b8d935;
    font-size: 16px;
    background: linear-gradient(90deg, rgba(0,0,0,0.6), rgba(0,0,0,0.4));
    padding: 6px 24px;
    border-radius: 20px;
    border: 1px dashed rgba(184, 217, 53, 0.5);
}

.welcome-avatar-wrapper { position: relative; margin-right: 10px; }

.welcome-avatar { width: 70px; height: 70px; border-radius: 50%; border: 3px dashed #d4a855; padding: 3px; }

/* =============================================
   قسم الرد التلقائي - Auto Reply Section
   ============================================= */

.autoreply-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #131313;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #1f1f1f;
}

.autoreply-title { display: flex; align-items: center; gap: 10px; color: #e8e0d0; font-size: 15px; font-weight: 500; }

.autoreply-title i { color: #d4a855; }

.autoreply-controls { display: flex; align-items: center; gap: 16px; }

.zoom-controls { display: flex; align-items: center; gap: 8px; }

.zoom-value { color: #777; font-size: 13px; min-width: 40px; text-align: center; }

.zoom-btn {
    width: 28px;
    height: 28px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 6px;
    color: #777;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.zoom-btn:hover { background: #333a47; color: #fff; }

.btn-reset-autoreply {
    padding: 8px 16px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 8px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reset-autoreply:hover { background: #333a47; }

.autoreply-list { background: #0d1117; min-height: 400px; max-height: 600px; overflow-y: auto; }

.autoreply-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid #161b22; transition: background 0.15s; }

.autoreply-item:hover { background: rgba(212, 168, 85, 0.05); }

.autoreply-item-info { display: flex; align-items: center; gap: 16px; flex: 1; }

.autoreply-item-actions { display: flex; align-items: center; gap: 8px; }

.ar-item-trigger { color: #ef4444; font-size: 13px; padding: 4px 10px; background: rgba(239, 68, 68, 0.1); border-radius: 6px; }

.ar-item-reply { color: #8b949e; font-size: 13px; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ar-item-meta { display: flex; align-items: center; gap: 12px; color: #555; font-size: 12px; }

.ar-btn-edit, .ar-btn-delete {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.ar-btn-edit { background: rgba(212, 168, 85, 0.1); color: #d4a855; }

.ar-btn-edit:hover { background: rgba(212, 168, 85, 0.2); }

.ar-btn-delete { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.ar-btn-delete:hover { background: rgba(239, 68, 68, 0.2); }

.autoreply-add-bar { padding: 16px 20px; background: #131313; border-radius: 0 0 12px 12px; border-top: 1px solid #1f1f1f; text-align: center; }

.btn-add-autoreply {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: transparent;
    border: 1px dashed #3d4450;
    border-radius: 8px;
    color: #555;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-autoreply:hover { border-color: #d4a855; color: #d4a855; }

.autoreply-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.autoreply-modal-overlay.show { display: flex; }

.autoreply-modal {
    background: #0c0c0c;
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-title { color: #e8e0d0; font-size: 18px; font-weight: 600; text-align: center; margin-bottom: 24px; }

.modal-field { margin-bottom: 18px; }

.modal-field label { display: block; color: #777; font-size: 13px; margin-bottom: 8px; text-align: right; }

.modal-field input[type="text"],
.modal-field textarea {
    width: 100%;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.modal-field input[type="text"]:focus,
.modal-field textarea:focus { outline: none; border-color: #d4a855; }

.modal-field textarea { min-height: 80px; resize: vertical; }

.modal-select-wrapper { position: relative; }

.modal-select-wrapper select {
    width: 100%;
    padding: 12px 16px;
    padding-left: 40px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
}

.modal-select-wrapper i { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: #555; pointer-events: none; }

.modal-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    background: #1a1a1a;
    border: 2px dashed #3d4450;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-upload-area:hover { border-color: #d4a855; background: rgba(212, 168, 85, 0.05); }

.modal-upload-area i { font-size: 24px; color: #555; }

.modal-upload-area span { color: #777; font-size: 14px; }

.upload-hint { color: #555 !important; font-size: 12px !important; }

.ar-image-preview { margin-top: 12px; }

.ar-image-preview img { max-width: 100%; max-height: 120px; border-radius: 8px; }

.modal-field-inline { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }

.modal-field-inline span { color: #c0b49a; font-size: 14px; }

.modal-toggle-label { position: relative; width: 44px; height: 24px; cursor: pointer; }

.modal-toggle-label input { opacity: 0; width: 0; height: 0; }

.modal-toggle-slider { position: absolute; cursor: pointer; inset: 0; background: #1a1a1a; border-radius: 24px; transition: 0.3s; }

.modal-toggle-slider:before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    right: 3px;
    bottom: 3px;
    background: #9ca3af;
    border-radius: 50%;
    transition: 0.3s;
}

.modal-toggle-label input:checked + .modal-toggle-slider { background: #d4a855; }

.modal-toggle-label input:checked + .modal-toggle-slider:before { transform: translateX(-20px); background: #fff; }

.modal-actions { display: flex; align-items: center; justify-content: center; gap: 12px; }

.btn-modal-cancel,
.btn-modal-save {
    padding: 12px 32px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-modal-cancel { background: transparent; border: 1px solid #3d4450; color: #777; }

.btn-modal-cancel:hover { background: #1a1a1a; }

.btn-modal-save { background: #d4a855; border: none; color: #fff; }

.btn-modal-save:hover { background: #b8944a; }

.autoreply-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 20px; color: #555; }

.autoreply-empty i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }

.autoreply-empty p { font-size: 14px; }

/* =============================================
   محرر صورة الترحيب المتقدم - Welcome Image Editor
   ============================================= */

.welcome-editor-container { background: #0d1117; border-radius: 12px; overflow: hidden; }

.welcome-preview-box {
    position: relative;
    width: 100%;
    min-height: 150px;
    background: #000;
    overflow: visible;
}

.wi-bg-image {
    width: 100%;
    height: auto;
    display: none;
}

.wi-bg-image.visible { display: block !important; }

.wi-username { position: absolute; color: #d4a855; font-size: 16px; font-weight: 500; z-index: 5; }

.wi-avatar-wrapper { position: absolute; z-index: 10; }

.wi-avatar { width: 70px; height: 70px; border-radius: 50%; border: 3px solid #d4a855; background: #d4a855; }

.wi-avatar.square { border-radius: 0; }

.wi-avatar.rounded { border-radius: 12px; }

.wi-discord-badge {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 28px;
    height: 28px;
    background: #d4a855;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
}

.wi-text { position: absolute; color: #fff; font-size: 18px; font-weight: 500; z-index: 5; display: none; }

.wi-text.visible { display: block; }

.wi-tabs { display: flex; background: #131313; border-top: 1px solid #1f1f1f; }

.wi-tab {
    flex: 1;
    padding: 14px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #8b949e;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.wi-tab:hover { color: #c0b49a; background: rgba(212,168,85,0.02); }

.wi-tab.active { color: #d4a855; border-bottom-color: #d4a855; background: rgba(212, 168, 85, 0.05); }

.wi-tab i { font-size: 14px; }

.wi-tab-content { display: none; padding: 20px; background: #131313; }

.wi-tab-content.active { display: block; }

.wi-actions-row { display: flex; align-items: center; gap: 12px; }

.wi-btn-upload {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #d4a855, #d97706);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.wi-btn-upload:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }

.wi-btn-delete {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.wi-btn-delete:hover { background: rgba(239, 68, 68, 0.1); }

.wi-hint { color: #555; font-size: 12px; margin-top: 12px; text-align: left; }

.wi-settings-grid { display: flex; flex-direction: column; gap: 16px; }

.wi-setting-row {
    display: grid;
    grid-template-columns: 80px 1fr 100px 1fr 60px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #0c0c0c;
    border-radius: 10px;
}

@media (max-width: 1200px) {
.wi-setting-row { grid-template-columns: 1fr 1fr; gap: 16px; }
}

.wi-setting-label { color: #777; font-size: 12px; text-align: right; }

.wi-number-input { display: flex; align-items: center; background: #1a1a1a; border-radius: 8px; overflow: hidden; }

.wi-number-input button {
    width: 36px;
    height: 36px;
    background: #d4a855;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.wi-number-input button:hover { background: #b8944a; }

.wi-number-input span { flex: 1; text-align: center; color: #c0b49a; font-size: 13px; padding: 0 8px; min-width: 60px; }

.wi-number-input input[type="number"] {
    flex: 1; text-align: center; color: #c0b49a; font-size: 13px; padding: 4px 2px;
    min-width: 50px; max-width: 65px; background: transparent; border: none; outline: none;
    -moz-appearance: textfield; font-family: inherit;
}
.wi-number-input input[type="number"]::-webkit-outer-spin-button,
.wi-number-input input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wi-number-input input[type="number"]:focus { color: #d4a843; background: rgba(184,148,74,0.1); border-radius: 4px; }

.wi-color-input { position: relative; display: flex; align-items: center; }

.wi-color-input input[type="color"] { width: 100%; height: 36px; border: none; border-radius: 8px; cursor: pointer; background: transparent; }

.wi-color-input i { position: absolute; left: 10px; color: rgba(255,255,255,0.5); pointer-events: none; }

.wi-select-wrapper { position: relative; }

.wi-select-wrapper select {
    width: 100%;
    padding: 10px 14px;
    padding-left: 36px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 8px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 13px;
    appearance: none;
    cursor: pointer;
}

.wi-select-wrapper i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #555; pointer-events: none; }

.wi-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #0c0c0c;
    border-radius: 10px;
}

.wi-toggle-row span { color: #c0b49a; font-size: 14px; }

.wi-text-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #0c0c0c;
    border-radius: 10px;
}

.wi-text-input-row input {
    flex: 1;
    padding: 10px 14px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 8px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
}

.wi-text-input-row input:focus { outline: none; border-color: #d4a855; }

/* =============================================
   قسم القناة داخل كل Embed
   ============================================= */

.embed-channel-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #1f1f1f; }

.embed-channel-select { position: relative; width: 100%; }

.embed-channel-select select {
    width: 100%;
    padding: 14px 16px;
    padding-left: 40px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
}

.embed-channel-select select:focus { outline: none; border-color: #d4a855; }

.embed-channel-select i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #555; pointer-events: none; }

.embed-send-card { margin-top: 16px; padding: 16px; background: #131313; border-radius: 12px; border: 1px solid #1f1f1f; }

.embed-send-btns { display: flex; gap: 12px; }

.embed-send-btns .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* =============================================
   نظام التقديم المتعدد - Applications System
   ============================================= */

.app-hint { color: #555; font-size: 12px; margin-bottom: 12px; line-height: 1.6; }

.app-hint-small { color: #555; font-size: 11px; margin-top: 8px; }

.app-textarea {
    width: 100%;
    min-height: 100px;
    padding: 14px 16px;
    background: #0c0c0c;
    border: 1px solid #2d333b;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    line-height: 1.6;
}

.app-textarea:focus { outline: none; border-color: #d4a855; }

.app-toggle-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.app-toggle-row span { color: #c0b49a; font-size: 14px; }

.app-input-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px 16px;
    background: #0c0c0c;
    border-radius: 10px;
}

.app-input-row i { color: #555; width: 20px; text-align: center; }

.app-input-row span { color: #777; font-size: 13px; min-width: 80px; }

.app-input-row input,
.app-input-row select {
    flex: 1;
    padding: 10px 14px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 8px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 13px;
}

.app-input-row input:focus,
.app-input-row select:focus { outline: none; border-color: #d4a855; }

.app-actions-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

@media (max-width: 900px) {
.app-actions-grid { grid-template-columns: 1fr; }
}

.btn-add-new-app {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    margin-bottom: 16px;
    background: transparent;
    border: 2px dashed #3d4450;
    border-radius: 12px;
    color: #555;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-new-app:hover { border-color: #d4a855; color: #d4a855; background: rgba(212, 168, 85, 0.05); }

.applications-accordion { margin-bottom: 16px; }

.app-accordion-item { background: #131313; border-radius: 12px; margin-bottom: 12px; overflow: hidden; border: 1px solid #1f1f1f; }

.app-accordion-item.expanded { border-color: #d4a855; }

.app-accordion-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; transition: background 0.2s; }

.app-accordion-header:hover { background: rgba(212,168,85,0.02); }

.app-number {
    width: 28px;
    height: 28px;
    background: #1a1a1a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 13px;
    font-weight: 500;
}

.app-accordion-item.expanded .app-number { background: #d4a855; color: #fff; }

.app-title-info { flex: 1; }

.app-title-info h4 { color: #e8e0d0; font-size: 14px; font-weight: 500; margin-bottom: 2px; }

.app-title-info p { color: #555; font-size: 12px; }

.app-header-actions { display: flex; gap: 8px; }

.app-header-actions button {
    width: 32px;
    height: 32px;
    background: #1a1a1a;
    border: none;
    border-radius: 8px;
    color: #777;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.app-header-actions button:hover { background: #333a47; color: #fff; }

.app-header-actions button.delete:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.app-expand-icon { color: #555; transition: transform 0.3s; }

.app-accordion-item.expanded .app-expand-icon { transform: rotate(180deg); }

.app-accordion-body { display: none; padding: 0 20px 20px; border-top: 1px solid #1f1f1f; }

.app-accordion-item.expanded .app-accordion-body { display: block; }

.app-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

@media (max-width: 768px) {
.app-form-grid { grid-template-columns: 1fr; }
}

.app-form-group { display: flex; flex-direction: column; gap: 8px; }

.app-form-group.full-width { grid-column: 1 / -1; }

.app-form-group label { color: #777; font-size: 13px; }

.app-form-group input,
.app-form-group select,
.app-form-group textarea {
    padding: 12px 14px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
}

.app-form-group input:focus,
.app-form-group select:focus,
.app-form-group textarea:focus { outline: none; border-color: #d4a855; }

.app-form-group textarea { min-height: 80px; resize: vertical; }

.app-questions-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #1f1f1f; }

.app-questions-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.app-questions-header h5 { color: #e8e0d0; font-size: 14px; font-weight: 500; }

.btn-add-question {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #d4a855;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add-question:hover { background: #b8944a; }

.app-question-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: #0c0c0c;
    border-radius: 10px;
    margin-bottom: 10px;
}

.app-question-item:last-child { margin-bottom: 0; }

.question-number {
    width: 24px;
    height: 24px;
    background: #d4a855;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.question-content { flex: 1; }

.question-content input {
    width: 100%;
    padding: 10px 12px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 8px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 13px;
    margin-bottom: 8px;
}

.question-content input:focus { outline: none; border-color: #d4a855; }

.question-options { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.question-type-select {
    padding: 6px 12px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 6px;
    color: #777;
    font-family: inherit;
    font-size: 12px;
}

.question-toggle { display: flex; align-items: center; gap: 6px; color: #777; font-size: 12px; }

.question-toggle input { accent-color: #d4a855; }

.btn-delete-question {
    width: 28px;
    height: 28px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 6px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.btn-delete-question:hover { background: rgba(239, 68, 68, 0.2); }

.app-action-box { background: #0e0e0e; border: 1px solid #1f1f1f; border-radius: 12px; padding: 20px; }
.app-action-title { font-size: 15px; font-weight: 600; color: #e8e0d0; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.app-action-box .app-textarea { margin-bottom: 0; }
.app-action-box .app-form-group label { color: #777; font-size: 13px; }
.app-action-box .app-form-group select,
.app-action-box .app-form-group input { background: #131313; border: 1px solid #1f1f1f; color: #e8e0d0; padding: 10px 14px; border-radius: 8px; font-size: 13px; width: 100%; }
.app-action-box .app-form-group select:focus,
.app-action-box .app-form-group input:focus { outline: none; border-color: #d4a855; }

/* =============================================
   منشئ القوانين - Rules Builder
   ============================================= */

.rules-builder-layout { display: grid; grid-template-columns: 1fr 380px; gap: 20px; }

@media (max-width: 1200px) {
.rules-builder-layout { grid-template-columns: 1fr; }
}

.rules-list-panel { display: flex; flex-direction: column; gap: 12px; }

.rules-accordion { display: flex; flex-direction: column; gap: 12px; }

.rules-accordion-item { background: #131313; border-radius: 12px; overflow: hidden; border: 1px solid #1f1f1f; transition: border-color 0.2s; }

.rules-accordion-item.expanded { border-color: #d4a855; }

.rules-accordion-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; transition: background 0.15s; }

.rules-accordion-header:hover { background: rgba(212,168,85,0.02); }

.rules-color-indicator { width: 4px; height: 40px; border-radius: 2px; flex-shrink: 0; }

.rules-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #d4a855 0%, #b8944a 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
}

.rules-title-info { flex: 1; min-width: 0; }

.rules-title-info h4 { color: #e8e0d0; font-size: 14px; font-weight: 500; margin-bottom: 2px; }

.rules-title-info p { color: #555; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.rules-header-actions { display: flex; gap: 8px; }

.rules-header-actions button {
    width: 32px;
    height: 32px;
    background: #1a1a1a;
    border: none;
    border-radius: 8px;
    color: #777;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.rules-header-actions button:hover { background: #333a47; color: #fff; }

.rules-header-actions button.delete:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.rules-expand-icon { color: #555; transition: transform 0.3s; }

.rules-accordion-item.expanded .rules-expand-icon { transform: rotate(180deg); }

.rules-accordion-body { display: none; padding: 0 20px 20px; border-top: 1px solid #1f1f1f; }

.rules-accordion-item.expanded .rules-accordion-body { display: block; }

.rules-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }

@media (max-width: 768px) {
.rules-form-grid { grid-template-columns: 1fr; }
}

.rules-form-group { display: flex; flex-direction: column; gap: 8px; }

.rules-form-group.full-width { grid-column: 1 / -1; }

.rules-form-group label { color: #777; font-size: 13px; }

.rules-form-group input,
.rules-form-group select {
    padding: 12px 14px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
}

.rules-form-group input:focus,
.rules-form-group select:focus { outline: none; border-color: #d4a855; }

.rules-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 12px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-bottom: none;
    border-radius: 10px 10px 0 0;
    flex-wrap: wrap;
}

.rules-toolbar button {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: #777;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.15s;
}

.rules-toolbar button:hover { background: rgba(212,168,85,0.08); color: #fff; }

.rules-toolbar .toolbar-divider { width: 1px; height: 20px; background: #3d4450; margin: 0 6px; }

.rules-textarea {
    width: 100%;
    min-height: 150px;
    padding: 14px 16px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 0 0 10px 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.rules-textarea:focus { outline: none; border-color: #d4a855; }

.rules-color-row { display: flex; align-items: center; gap: 12px; }

.rules-color-row input[type="color"] { width: 40px; height: 40px; border: none; border-radius: 8px; cursor: pointer; background: transparent; }

.rules-color-presets { display: flex; gap: 6px; flex-wrap: wrap; }

.rules-color-preset { width: 28px; height: 28px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; transition: all 0.15s; }

.rules-color-preset:hover { transform: scale(1.1); }

.rules-color-preset.active { border-color: #fff; }

.rules-image-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    background: #1a1a1a;
    border: 2px dashed #3d4450;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 100px;
}

.rules-image-upload:hover { border-color: #d4a855; background: rgba(212, 168, 85, 0.05); }

.rules-image-upload.has-image { padding: 8px; }

.rules-image-upload.has-image img { max-width: 100%; max-height: 120px; border-radius: 8px; }

.rules-image-upload i { font-size: 24px; color: #555; }

.rules-image-upload span { color: #777; font-size: 13px; }

.rules-accept-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #1f1f1f; }

.rules-accept-row { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }

.rules-accept-row span { color: #c0b49a; font-size: 14px; }

.rules-channel-section { margin-top: 20px; padding-top: 20px; border-top: 1px solid #1f1f1f; }

.rules-channel-select { position: relative; width: 100%; }

.rules-channel-select select {
    width: 100%;
    padding: 14px 16px;
    padding-left: 40px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
}

.rules-channel-select i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #555; pointer-events: none; }

.btn-add-new-rules {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 2px dashed #3d4450;
    border-radius: 12px;
    color: #555;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-new-rules:hover { border-color: #d4a855; color: #d4a855; background: rgba(212, 168, 85, 0.05); }

.rules-send-card { margin-top: 8px; padding: 16px; background: #131313; border-radius: 12px; border: 1px solid #1f1f1f; }

.rules-send-btns { display: flex; gap: 12px; }

.rules-send-btns .btn {
    flex: 1;
    padding: 12px 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rules-preview-panel {
    background: #131313;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #1f1f1f;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.rules-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: #0c0c0c;
    border-bottom: 1px solid #1f1f1f;
    color: #c0b49a;
    font-size: 14px;
    font-weight: 500;
}

.rules-preview-content { padding: 16px; background: #36393f; }

.rules-embed-preview { background: #2f3136; border-radius: 4px; border-right: 4px solid #d4a855; padding: 12px 16px; max-width: 100%; }

.rules-embed-title { color: #fff; font-size: 16px; font-weight: 600; margin-bottom: 8px; }

.rules-embed-desc { color: #dcddde; font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }

.rules-embed-image { margin-top: 12px; border-radius: 4px; max-width: 100%; }

.rules-embed-footer { margin-top: 12px; padding-top: 10px; border-top: 1px solid #40444b; color: #72767d; font-size: 12px; }

.rules-accept-btn-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 8px 16px;
    background: #d4a855;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
}

/* =============================================
   نظام المستويات - Levels System
   ============================================= */

.content-header-title { flex: 1; }

.content-header .main-toggle { margin-right: 0; }

.levels-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

@media (max-width: 1000px) {
.levels-grid { grid-template-columns: 1fr; }
}

.levels-card .card-body { padding: 20px; }

.levels-form-group { margin-bottom: 20px; }

.levels-form-group:last-child { margin-bottom: 0; }

.levels-form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e8e0d0;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
}

.levels-form-group label i { color: #d4a855; width: 16px; }

.levels-hint { color: #555; font-size: 12px; margin-bottom: 10px; }

.levels-msg-box { background: #0c0c0c; border-radius: 10px; padding: 12px; }

.levels-msg-box textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 8px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
}

.levels-msg-box textarea:focus { outline: none; border-color: #d4a855; }

.levels-variables { display: flex; gap: 8px; margin-top: 10px; }

.var-tag { padding: 4px 10px; background: #1a1a1a; border-radius: 6px; color: #777; font-size: 12px; font-family: monospace; }

.levels-rewards-card { margin-bottom: 16px; }

.level-rewards-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }

.level-reward-item { background: #0c0c0c; border-radius: 12px; padding: 20px; border: 1px solid #1f1f1f; }

.reward-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.reward-header h4 { color: #e8e0d0; font-size: 14px; font-weight: 500; }

.btn-delete-reward {
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-reward:hover { background: rgba(239, 68, 68, 0.2); }

.reward-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

@media (max-width: 600px) {
.reward-grid { grid-template-columns: 1fr; }
}

.reward-field { display: flex; flex-direction: column; gap: 8px; }

.reward-field label { color: #777; font-size: 13px; }

.reward-field .required { color: #ef4444; }

.reward-number-input { display: flex; align-items: center; background: #1a1a1a; border: 1px solid #3d4450; border-radius: 10px; overflow: hidden; }

.reward-number-input button {
    width: 44px;
    height: 44px;
    background: #d4a855;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.reward-number-input button:hover { background: #b8944a; }

.reward-number-input input {
    flex: 1;
    text-align: center;
    background: transparent;
    border: none;
    color: #c0b49a;
    font-size: 14px;
    padding: 12px;
}

.reward-number-input input:focus { outline: none; }

.reward-number-input .dot { width: 8px; height: 8px; background: #d4a855; border-radius: 50%; }

.reward-role-select { position: relative; }

.reward-role-select select {
    width: 100%;
    padding: 12px 16px;
    padding-left: 40px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
    appearance: none;
    cursor: pointer;
}

.reward-role-select i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #555; pointer-events: none; }

.reward-options { display: flex; flex-wrap: wrap; gap: 20px; }

.reward-checkbox { display: flex; align-items: center; gap: 10px; color: #777; font-size: 13px; }

.reward-checkbox input { accent-color: #d4a855; width: 18px; height: 18px; }

.btn-add-reward {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px;
    background: transparent;
    border: 2px dashed #3d4450;
    border-radius: 12px;
    color: #d4a855;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-reward:hover { border-color: #d4a855; background: rgba(212, 168, 85, 0.05); }

.levels-commands-list { display: flex; flex-direction: column; gap: 8px; }

.level-cmd-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #0c0c0c;
    border-radius: 10px;
    border: 1px solid #1f1f1f;
}

.level-cmd-info { display: flex; align-items: center; gap: 14px; }

.level-cmd-info > i {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4a855;
    font-size: 14px;
}

.level-cmd-text h4 { color: #e8e0d0; font-size: 14px; font-weight: 500; margin-bottom: 2px; }

.level-cmd-text p { color: #555; font-size: 12px; }

.level-cmd-actions { display: flex; align-items: center; gap: 12px; }

.btn-edit-cmd {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    border: none;
    border-radius: 8px;
    color: #777;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-edit-cmd:hover { background: #333a47; color: #fff; }

.level-cmd-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.level-cmd-modal-overlay.show { display: flex; }

.level-cmd-modal {
    background: #131313;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
}

.level-cmd-modal h3 { color: #e8e0d0; font-size: 18px; font-weight: 600; margin-bottom: 24px; text-align: center; }

.lcm-field { margin-bottom: 16px; }

.lcm-field label { display: block; color: #777; font-size: 13px; margin-bottom: 8px; text-align: right; }

.lcm-field .select-wrapper select {
    width: 100%;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
}

.lcm-toggle-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid #1f1f1f; }

.lcm-toggle-row:first-of-type { margin-top: 8px; }

.lcm-toggle-row span { color: #777; font-size: 13px; flex: 1; text-align: right; }

.lcm-toggle-row strong { color: #e8e0d0; }

.lcm-buttons { display: flex; gap: 12px; margin-top: 24px; }

.lcm-buttons .btn { flex: 1; padding: 12px 20px; border-radius: 10px; font-size: 14px; cursor: pointer; transition: all 0.2s; }

.lcm-buttons .btn-primary { background: #d4a855; border: none; color: #fff; }

.lcm-buttons .btn-primary:hover { background: #b8944a; }

.lcm-buttons .btn-secondary { background: transparent; border: 1px solid #3d4450; color: #777; }

.lcm-buttons .btn-secondary:hover { background: #1a1a1a; color: #fff; }

/* =============================================
   نظام تذاكر الدعم للمستخدم - User Support Tickets
   ============================================= */

.user-ticket-status.waiting { background: rgba(245, 158, 11, 0.15); color: #d4a855; }

.user-ticket-status.open { background: rgba(212, 168, 85, 0.15); color: #d4a855; }

.user-ticket-status.closed { background: rgba(107, 114, 128, 0.15); color: #555; }

.support-modal-overlay.show { display: flex; }

.ticket-status-badge.waiting { background: rgba(245, 158, 11, 0.15); color: #d4a855; }

.ticket-status-badge.closed { background: rgba(107, 114, 128, 0.15); color: #555; }

.chat-message { max-width: 80%; padding: 12px 16px; border-radius: 12px; }

.chat-message.user { background: #1a1a1a; align-self: flex-end; border-bottom-right-radius: 4px; }

.chat-message.admin { background: rgba(212, 168, 85, 0.2); align-self: flex-start; border-bottom-left-radius: 4px; }

.chat-message .msg-sender { font-size: 12px; font-weight: 600; margin-bottom: 4px; }

.chat-message.user .msg-sender { color: #777; }

.chat-message.admin .msg-sender { color: #d4a855; }

.chat-message .msg-text { color: #c0b49a; font-size: 14px; line-height: 1.5; }

.chat-message .msg-time { font-size: 10px; color: #555; margin-top: 6px; text-align: left; }

.ticket-chat-input .btn { padding: 10px 16px; }

/* =============================================
   نظام الدعم الفني - Live Chat Support
   ============================================= */

.support-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #6b7280; margin-right: auto; margin-left: 8px; }

.support-status-dot.online { background: #d4a855; box-shadow: 0 0 8px #d4a855; }

.support-status-dot.offline { background: #6b7280; }

.support-chat-container { display: flex; flex-direction: column; gap: 16px; }

.support-connection-status { background: #131313; border-radius: 12px; padding: 16px 20px; border: 1px solid #1f1f1f; }

.connection-info { display: flex; align-items: center; gap: 12px; }

.status-indicator { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

.status-indicator.online { background: #d4a855; box-shadow: 0 0 10px rgba(212, 168, 85, 0.5); animation: pulse-online 2s infinite; }

.status-indicator.offline { background: #6b7280; }

#adminStatusText { color: #c0b49a; font-size: 14px; }

.support-conversations-list { background: #131313; border-radius: 12px; border: 1px solid #1f1f1f; overflow: hidden; }

.conversations-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; background: #0c0c0c; border-bottom: 1px solid #1f1f1f; }

.conversations-header h4 { color: #e8e0d0; font-size: 15px; display: flex; align-items: center; gap: 10px; }

.conversations-header h4 i { color: #d4a855; }

.conversations-items { max-height: 300px; overflow-y: auto; }

.conversation-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #1f1f1f;
}

.conversation-item:last-child { border-bottom: none; }

.conversation-item:hover { background: #1a1a1a; }

.conversation-item.active { background: rgba(212, 168, 85, 0.1); border-right: 3px solid #d4a855; }

.conv-icon {
    width: 40px;
    height: 40px;
    background: #1a1a1a;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d4a855;
    font-size: 16px;
}

.conv-info { flex: 1; min-width: 0; }

.conv-info h5 {
    color: #e8e0d0;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-info p { color: #555; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.conv-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

.conv-time { color: #555; font-size: 11px; }

.conv-status { padding: 3px 8px; border-radius: 10px; font-size: 10px; font-weight: 500; }

.conv-status.waiting { background: rgba(245, 158, 11, 0.15); color: #d4a855; }

.conv-status.active { background: rgba(212, 168, 85, 0.15); color: #d4a855; }

.conv-status.closed { background: rgba(107, 114, 128, 0.15); color: #555; }

.conv-unread {
    width: 18px;
    height: 18px;
    background: #d4a855;
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-conversations { padding: 40px 20px; text-align: center; color: #555; }

.no-conversations i { font-size: 40px; margin-bottom: 12px; opacity: 0.5; }

.no-conversations p { margin-bottom: 16px; }

.support-chat-window {
    background: #131313;
    border-radius: 12px;
    border: 1px solid #1f1f1f;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 500px;
}

.chat-window-header { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: #0c0c0c; border-bottom: 1px solid #1f1f1f; }

.btn-back-chat {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    border: none;
    border-radius: 8px;
    color: #777;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back-chat:hover { background: #333a47; color: #fff; }

.chat-header-info { flex: 1; }

.chat-header-info h4 { color: #e8e0d0; font-size: 15px; margin-bottom: 2px; }

.chat-status { font-size: 12px; color: #555; }

.chat-status.active { color: #d4a855; }

.chat-header-actions { display: flex; gap: 8px; }

.btn-close-chat {
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.1);
    border: none;
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-chat:hover { background: rgba(239, 68, 68, 0.2); }

.chat-messages-area {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #0d1117;
}

.chat-msg { max-width: 75%; display: flex; flex-direction: column; }

.chat-msg.user { align-self: flex-end; }

.chat-msg.admin { align-self: flex-start; }

.chat-msg-bubble { padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.5; }

.chat-msg.user .chat-msg-bubble { background: #d4a855; color: #fff; border-bottom-right-radius: 4px; }

.chat-msg.admin .chat-msg-bubble { background: #1a1a1a; color: #c0b49a; border-bottom-left-radius: 4px; }

.chat-msg-info { display: flex; align-items: center; gap: 8px; margin-top: 4px; padding: 0 4px; }

.chat-msg.user .chat-msg-info { justify-content: flex-end; }

.chat-msg-sender { font-size: 11px; font-weight: 500; }

.chat-msg.user .chat-msg-sender { color: #777; }

.chat-msg.admin .chat-msg-sender { color: #d4a855; }

.chat-msg-time { font-size: 10px; color: #555; }

.chat-system-msg {
    text-align: center;
    padding: 8px 16px;
    background: rgba(212, 168, 85, 0.1);
    border-radius: 20px;
    color: #777;
    font-size: 12px;
    align-self: center;
}

.chat-waiting-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: rgba(245, 158, 11, 0.1);
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    color: #d4a855;
    font-size: 13px;
}

.chat-waiting-msg i { animation: spin 2s linear infinite; }

@keyframes spin {
    from { transform: rotate(0deg); }
}

.chat-input-area { border-top: 1px solid #1f1f1f; }

.chat-input-box { display: flex; gap: 8px; padding: 14px 20px; background: #0c0c0c; align-items: center; }

.chat-input-box textarea {
    flex: 1;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 24px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 14px;
    resize: none;
    max-height: 100px;
}

.chat-input-box textarea:focus { outline: none; border-color: #d4a855; }

.btn-send-msg {
    width: 44px;
    height: 44px;
    background: #d4a855;
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s;
}

.btn-send-msg:hover { background: #b8944a; transform: scale(1.05); }

.chat-closed-msg {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: rgba(107, 114, 128, 0.1);
    color: #555;
    font-size: 13px;
}

.auto-reply-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 10px;
    color: #d4a855;
    font-size: 12px;
    margin-bottom: 12px;
}

.auto-reply-indicator i { font-size: 14px; }

/* =============== Emoji Picker =============== */

.emoji-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.emoji-picker-modal.show { opacity: 1; visibility: visible; }

.emoji-picker-container {
    background: #0c0c0c;
    border-radius: 16px;
    width: 420px;
    max-width: 95vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 168, 85, 0.04);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.25s ease;
    overflow: hidden;
}

.emoji-picker-modal.show .emoji-picker-container { transform: scale(1) translateY(0); }

.emoji-picker-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid rgba(212, 168, 85, 0.06); background: #16181f; }

.emoji-picker-header h4 { color: #d9cdb8; font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 10px; }

.emoji-picker-header h4 i { color: #e0b96a; font-size: 18px; }

.emoji-close-btn {
    width: 32px;
    height: 32px;
    background: rgba(212, 168, 85, 0.04);
    border: none;
    border-radius: 8px;
    color: #777;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.emoji-close-btn:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.emoji-search-box { padding: 12px 16px; position: relative; border-bottom: 1px solid rgba(255, 255, 255, 0.04); }

.emoji-search-box i { position: absolute; right: 28px; top: 50%; transform: translateY(-50%); color: #555; font-size: 14px; }

.emoji-search-box input {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid rgba(212, 168, 85, 0.06);
    border-radius: 10px;
    padding: 12px 16px 12px 42px;
    color: #d9cdb8;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.emoji-search-box input:focus { outline: none; border-color: #d4a855; box-shadow: 0 0 0 3px rgba(212, 168, 85, 0.15); }

.emoji-search-box input::placeholder { color: #555; }

.emoji-categories { display: flex; gap: 4px; padding: 10px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.04); overflow-x: auto; scrollbar-width: none; }

.emoji-categories::-webkit-scrollbar { display: none; }

.emoji-cat-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: transparent;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-cat-btn:hover { background: rgba(255, 255, 255, 0.08); }

.emoji-cat-btn.active { background: rgba(212, 168, 85, 0.2); box-shadow: 0 0 0 2px rgba(212, 168, 85, 0.3); }

.emoji-grid-wrapper { flex: 1; overflow-y: auto; padding: 8px 12px; min-height: 280px; max-height: 350px; }

.emoji-grid-wrapper::-webkit-scrollbar { width: 6px; }

.emoji-grid-wrapper::-webkit-scrollbar-track { background: transparent; }

.emoji-grid-wrapper::-webkit-scrollbar-thumb { background: rgba(212, 168, 85, 0.08); border-radius: 3px; }

.emoji-grid-wrapper::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

.emoji-category-title { color: #777; font-size: 12px; font-weight: 500; padding: 8px 6px; text-transform: uppercase; letter-spacing: 0.5px; }

.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }

.emoji-item {
    width: 100%;
    aspect-ratio: 1;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item:hover { background: rgba(212, 168, 85, 0.08); transform: scale(1.15); }

.emoji-item:active { transform: scale(0.95); }

.emoji-item.small { font-size: 20px; }

.emoji-recent-section { padding: 12px 16px; border-top: 1px solid rgba(255, 255, 255, 0.04); background: #16181f; }

.emoji-recent-title { color: #555; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }

.emoji-recent-grid { display: flex; gap: 6px; flex-wrap: wrap; }

.emoji-recent-grid .emoji-item { width: 36px; height: 36px; font-size: 20px; }

.no-recent { color: #4b5563; font-size: 12px; font-style: italic; }

@media (max-width: 480px) {
.emoji-picker-container { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
.emoji-grid { grid-template-columns: repeat(6, 1fr); }
.emoji-item { font-size: 22px; }
}

/* =============== Premium Tickets V2 =============== */

.v2-tickets-layout { display: grid; grid-template-columns: 1fr 420px; gap: 24px; align-items: start; }

@media (max-width: 1200px) {
.v2-tickets-layout { grid-template-columns: 1fr; }
.v2-preview-panel { order: -1; }
}

.v2-editor-panel { display: flex; flex-direction: column; gap: 16px; }

.v2-form-group { margin-bottom: 20px; }

.v2-form-group:last-child { margin-bottom: 0; }

.v2-form-group label { display: block; color: #777; font-size: 13px; font-weight: 500; margin-bottom: 8px; }

.v2-form-group input[type="text"],
.v2-form-group textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid rgba(212, 168, 85, 0.06);
    border-radius: 10px;
    padding: 12px 16px;
    color: #d9cdb8;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s;
}

.v2-form-group textarea { min-height: 80px; resize: vertical; }

.v2-form-group input:focus,
.v2-form-group textarea:focus { outline: none; border-color: #d4a855; box-shadow: 0 0 0 3px rgba(212, 168, 85, 0.15); }

.v2-image-upload {
    width: 100%;
    height: 120px;
    background: #1a1a1a;
    border: 2px dashed rgba(212, 168, 85, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    overflow: hidden;
    position: relative;
}

.v2-image-upload:hover { border-color: #d4a855; background: rgba(212, 168, 85, 0.05); }

.v2-image-upload img { width: 100%; height: 100%; object-fit: cover; }

.v2-image-placeholder { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #555; }

.v2-image-placeholder i { font-size: 32px; color: #d4a855; }

.v2-image-placeholder span { font-size: 13px; }

.v2-color-row { display: flex; align-items: center; gap: 16px; }

.v2-color-row input[type="color"] { width: 50px; height: 40px; border: none; border-radius: 8px; cursor: pointer; background: transparent; }

.v2-color-presets { display: flex; gap: 8px; }

.v2-color-dot { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; transition: all 0.2s; border: 2px solid transparent; }

.v2-color-dot:hover { transform: scale(1.15); }

.v2-color-dot.active { border-color: #fff; }

.v2-sections-count { background: rgba(212, 168, 85, 0.15); color: #d4a855; padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 500; }

.v2-section-item { background: #0c0c0c; border: 1px solid rgba(212, 168, 85, 0.04); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }

.v2-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(212, 168, 85, 0.02);
    cursor: pointer;
    transition: background 0.2s;
}

.v2-section-header:hover { background: rgba(255, 255, 255, 0.04); }

.v2-section-emoji {
    width: 36px;
    height: 36px;
    background: #1a1a1a;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.v2-section-info { flex: 1; }

.v2-section-info h5 { color: #e8e0d0; font-size: 14px; font-weight: 500; margin-bottom: 2px; }

.v2-section-info p { color: #555; font-size: 12px; }

.v2-section-actions { display: flex; gap: 8px; }

.v2-section-actions button {
    width: 32px;
    height: 32px;
    background: rgba(212, 168, 85, 0.04);
    border: none;
    border-radius: 8px;
    color: #777;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.v2-section-actions button:hover { background: rgba(212, 168, 85, 0.08); color: #fff; }

.v2-section-actions button.delete:hover { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.v2-section-body { padding: 16px; display: none; border-top: 1px solid rgba(212, 168, 85, 0.04); }

.v2-section-item.expanded .v2-section-body { display: block; }

.v2-section-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }

.v2-section-form-row:last-child { margin-bottom: 0; }

@media (max-width: 600px) {
.v2-section-form-row { grid-template-columns: 1fr; }
}

.v2-emoji-picker-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #1a1a1a;
    border: 1px solid rgba(212, 168, 85, 0.06);
    border-radius: 10px;
    padding: 10px 14px;
    color: #777;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.v2-emoji-picker-btn:hover { border-color: #d4a855; background: rgba(212, 168, 85, 0.05); }

.v2-emoji-picker-btn .emoji { font-size: 20px; }

.btn-add-v2-section {
    width: 100%;
    background: rgba(212, 168, 85, 0.1);
    border: 2px dashed rgba(212, 168, 85, 0.3);
    border-radius: 12px;
    padding: 16px;
    color: #d4a855;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-add-v2-section:hover { background: rgba(212, 168, 85, 0.15); border-color: #d4a855; }

.v2-tags-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.v2-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 168, 85, 0.15);
    color: #d4a855;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
}

.v2-tag button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    display: flex;
    opacity: 0.7;
}

.v2-tag button:hover { opacity: 1; }

.v2-send-actions { display: flex; gap: 12px; justify-content: flex-end; padding: 16px 0; }

.v2-preview-panel { position: sticky; top: 80px; }

.v2-preview-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: #131313;
    border-radius: 12px 12px 0 0;
    border: 1px solid rgba(212, 168, 85, 0.04);
    border-bottom: none;
    color: #777;
    font-size: 14px;
}

.v2-preview-header i { color: #d4a855; font-size: 18px; }

.v2-preview-content { background: #111111; border-radius: 0 0 12px 12px; padding: 16px; min-height: 400px; border: 1px solid rgba(212, 168, 85, 0.04); border-top: none; }

.v2-discord-message { display: flex; gap: 16px; }

.v2-discord-avatar { flex-shrink: 0; }

.v2-discord-avatar img { width: 40px; height: 40px; border-radius: 50%; }

.v2-discord-body { flex: 1; min-width: 0; }

.v2-discord-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.v2-discord-name { color: #fff; font-weight: 500; font-size: 15px; }

.v2-discord-bot-tag { background: #d4a855; color: #fff; padding: 1px 5px; border-radius: 3px; font-size: 10px; font-weight: 600; }

.v2-discord-time { color: #6a6050; font-size: 12px; }

.v2-discord-component { background: #0d0d0d; border-radius: 8px; display: flex; overflow: hidden; margin-top: 4px; }

.v2-component-accent { width: 4px; background: #d4a855; flex-shrink: 0; }

.v2-component-content { flex: 1; padding: 16px; display: flex; gap: 16px; }

.v2-component-main { flex: 1; min-width: 0; }

.v2-component-title { color: #e8e0d0; font-size: 16px; font-weight: 600; margin-bottom: 8px; }

.v2-component-desc { color: #8a8070; font-size: 14px; line-height: 1.5; margin-bottom: 16px; }

.v2-component-thumbnail { flex-shrink: 0; }

.v2-component-thumbnail img { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; }

.v2-preview-section { border-top: 1px solid #1a1a1a; padding-top: 16px; margin-top: 16px; }

.v2-preview-section:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.v2-preview-section-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }

.v2-preview-section-emoji { font-size: 18px; }

.v2-preview-section-title { color: #e8e0d0; font-size: 15px; font-weight: 600; }

.v2-preview-section-desc { color: #8a8070; font-size: 13px; line-height: 1.4; margin-bottom: 12px; padding-right: 26px; }

.v2-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #d4a855;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: default;
    margin-right: 26px;
}

.v2-preview-btn:hover { background: #b8944a; }

.premium-only-nav { position: relative; }

.premium-only-nav::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(240, 177, 50, 0.05), transparent); border-radius: 10px; pointer-events: none; }

.v2-tickets-section .select-wrapper,
.v2-tickets-section select { position: relative; z-index: 101; }

/* ====== Inline styles moved to CSS ====== */

.premium-nav-icon { color: #d4a855; }

.premium-nav-text { color: #d4a855; }

.badge-pro { background: linear-gradient(135deg, #d4a855, #b8944a); }

.color-hint { margin-bottom: 16px; color: #666; }

.permission-title { margin-bottom: 16px; color: #fff; }

.setting-hint { color: #555; font-size: 13px; margin-bottom: 16px; }

.ticket-images-row { display: flex; gap: 40px; flex-wrap: wrap; }

.ticket-image-col { flex: 1; min-width: 250px; }

.ticket-image-col-sm { min-width: 150px; }

.ticket-image-info { margin-bottom: 12px; }

.ticket-image-hint { color: #555; font-size: 12px; }

.ticket-image-actions { display: flex; gap: 8px; margin-top: 8px; }

.permission-hint { color: #555; margin-bottom: 20px; }

.btn-add-category { margin-top: 16px; }

.embed-textarea { min-height: 100px; }

.btn-send-ticket-panel { margin-top: 16px; }

.btn-get-premium-full { margin-top: 20px; width: 100%; }

.twitter-icon { color: #1DA1F2; }

.wi-hint-text { margin-top: 15px; }

.btn-save-autoreply-inline { background: #b8944a; color: white; border: none; padding: 8px 16px; border-radius: 6px; cursor: pointer; margin-left: 8px; }

.btn-save-autoreply-inline:hover { background: #d4a855; }

.apps-actions-row { display: flex; gap: 12px; margin-bottom: 20px; }

.btn-save-apps-inline { background: #b8944a; color: white; border: none; padding: 12px 24px; border-radius: 8px; cursor: pointer; }

.btn-save-apps-inline:hover { background: #d4a855; }

.reject-icon { color: #ef4444; }

.accept-icon { color: #d4a855; }

.giveaway-input-sm { max-width: 300px; }

.giveaway-input-xs { width: 100px; }

.btn-create-giveaway { margin-top: 16px; }

.suggest-hint { color: #888; }

.rules-info-box { margin-top: 20px; }

.rules-info-hint { margin: 5px 0 0 0; color: #888; }

.starboard-input-xs { width: 100px; }

.premium-status-title { color: #d4a855; display: flex; align-items: center; gap: 10px; }

.premium-days-value { color: #d4a855; }

.btn-request-premium { background: linear-gradient(135deg, #d4a855, #e0b96a); padding: 14px 36px; font-size: 15px; }

.premium-order-hint { color: #555; font-size: 12px; margin-top: 12px; }

.payment-methods { display: flex; gap: 20px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

.payment-method { color: #555; font-size: 13px; }

.feature-comparison-card { margin-top: 20px; }

.v2-color-row { display: flex; gap: 8px; }

.rating-hint { color: #72767d; font-size: 11px; margin-top: 4px; display: block; }

.footer-text-hint { color: #888; font-size: 11px; }

.embed-actions-row { display: flex; align-items: center; gap: 12px; }

/* ====== v2 sub options (moved from inline) ====== */

.v2-sub-options { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(212,168,85,0.08); }

.v2-sub-options-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }

.v2-sub-option-item { display: flex; gap: 8px; align-items: center; }

.v2-sub-option-item input { flex: 1; padding: 8px 12px; background: rgba(0,0,0,0.3); border: 1px solid rgba(212,168,85,0.08); border-radius: 6px; color: #fff; font-size: 13px; }

.v2-sub-option-item input:focus { border-color: #d4a855; outline: none; }

.btn-remove-sub { background: rgba(237,66,69,0.2); border: none; color: #ED4245; padding: 8px 10px; border-radius: 6px; cursor: pointer; transition: all 0.2s; }

.btn-remove-sub:hover { background: rgba(237,66,69,0.4); }

.btn-add-sub-option { background: rgba(212,168,85,0.1); border: 1px dashed rgba(212,168,85,0.3); color: #d4a855; padding: 8px 16px; border-radius: 6px; cursor: pointer; font-size: 12px; transition: all 0.2s; width: 100%; }

.btn-add-sub-option:hover { background: rgba(212,168,85,0.2); border-style: solid; }

.btn-add-sub-option i { margin-left: 6px; }

/* ====== Premium nav hidden by default ====== */

/* ====== Settings Grid (Suggestions, etc) ====== */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
.setting-card {
    background: #131313;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(212,168,85,0.08);
}
.setting-card h3 {
    font-size: 15px;
    color: #d4a855;
    font-weight: 600;
    margin-bottom: 16px;
}
.setting-card h3 i { margin-left: 8px; }
.toggle-label { color: #999; font-size: 14px; }
.toggle-row { display: flex; align-items: center; gap: 12px; }
.toggle .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #1a1a1a;
    border-radius: 26px;
    transition: 0.3s;
}
.toggle .slider:before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: 3px;
    bottom: 3px;
    background: #555;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle input:checked + .slider { background: #d4a855; }
.toggle input:checked + .slider:before { transform: translateX(-22px); background: #fff; }
.select-input {
    width: 100%;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid rgba(212,168,85,0.1);
    border-radius: 10px;
    color: #ccc;
    font-size: 14px;
    font-family: 'Cairo', sans-serif;
    appearance: none;
    cursor: pointer;
    transition: border-color 0.2s;
}
.select-input:focus { outline: none; border-color: rgba(212,168,85,0.4); }
.color-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.color-dot { width: 32px; height: 32px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: 0.2s; }
.color-dot:hover, .color-dot.active, .color-dot.selected { border-color: #fff; transform: scale(1.15); box-shadow: 0 0 8px rgba(255,255,255,0.3); }
.wi-info-box {
    background: rgba(212,168,85,0.08);
    border: 1px solid rgba(212,168,85,0.12);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-top: 16px;
}
.wi-info-box i { color: #d4a855; font-size: 18px; margin-top: 2px; }
.wi-info-box strong { color: #d4a855; display: block; margin-bottom: 6px; font-size: 14px; }
.wi-info-box p { color: #888; font-size: 13px; line-height: 1.7; }
.wi-drag-indicator { color: #333; cursor: grab; font-size: 16px; }
.levels-commands-card { margin-top: 16px; }
/* ====== Chat Image & Attach ====== */
.btn-attach-img { background: none; border: 1px solid rgba(212,168,85,0.2); color: #d4a855; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: 0.2s; flex-shrink: 0; }
.btn-attach-img:hover { background: rgba(212,168,85,0.1); border-color: #d4a855; color: #f0c866; }
.chat-image-preview { display: flex; align-items: center; gap: 10px; padding: 10px 20px; background: #111; border-top: 1px solid rgba(212,168,85,0.1); }
.chat-image-preview img { max-height: 70px; max-width: 120px; border-radius: 8px; object-fit: cover; border: 1px solid rgba(212,168,85,0.15); }
.chat-image-preview button { background: rgba(239,68,68,0.15); border: none; color: #ef4444; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.chat-image-preview button:hover { background: rgba(239,68,68,0.3); }
.chat-msg-img { max-width: 260px; max-height: 180px; border-radius: 10px; margin-top: 6px; cursor: pointer; transition: 0.2s; display: block; border: 1px solid rgba(255,255,255,0.05); }
.chat-msg-img:hover { opacity: 0.85; }
/* =============================================
   الاختصارات - Shortcuts
   ============================================= */

.shortcut-header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #131313;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #1f1f1f;
}

.shortcut-title { display: flex; align-items: center; gap: 10px; color: #e8e0d0; font-size: 15px; font-weight: 500; }

.shortcut-title i { color: #d4a855; }

.shortcut-count {
    background: rgba(212, 168, 85, 0.15);
    color: #d4a855;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.shortcut-controls { display: flex; align-items: center; gap: 16px; }

.shortcut-list { background: #0d1117; min-height: 300px; max-height: 600px; overflow-y: auto; }

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #161b22;
    transition: background 0.15s;
}

.shortcut-item:hover { background: rgba(212, 168, 85, 0.05); }

.shortcut-item-right { display: flex; align-items: center; gap: 16px; flex: 1; }

.sc-item-trigger {
    color: #d4a855;
    font-size: 13px;
    font-weight: 600;
    padding: 5px 12px;
    background: rgba(212, 168, 85, 0.1);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    min-width: 60px;
    text-align: center;
}

.sc-item-info { display: flex; flex-direction: column; gap: 3px; }

.sc-item-type {
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
}

.sc-item-type.type-text { color: #22c55e; background: rgba(34, 197, 94, 0.1); }
.sc-item-type.type-embed { color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.sc-item-type.type-image { color: #a855f7; background: rgba(168, 85, 247, 0.1); }

.sc-item-preview {
    color: #8b949e;
    font-size: 12px;
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sc-item-left { display: flex; align-items: center; gap: 10px; }

.sc-item-roles {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sc-item-role-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
    color: #777;
}

.sc-item-actions { display: flex; align-items: center; gap: 8px; }

.shortcut-add-bar {
    padding: 16px 20px;
    background: #131313;
    border-radius: 0 0 12px 12px;
    border-top: 1px solid #1f1f1f;
    text-align: center;
}

.btn-add-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: transparent;
    border: 1px dashed #3d4450;
    border-radius: 8px;
    color: #555;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-shortcut:hover { border-color: #d4a855; color: #d4a855; }

.shortcut-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #555;
}

.shortcut-empty i { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }

.shortcut-empty p { font-size: 14px; }

/* Shortcut Modal */
.shortcut-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.shortcut-modal-overlay.show { display: flex; }

.shortcut-modal {
    background: #0c0c0c;
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* Type Selector */
.sc-type-selector {
    display: flex;
    gap: 8px;
}

.sc-type-btn {
    flex: 1;
    padding: 10px 14px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #777;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sc-type-btn:hover { border-color: #555; color: #c0b49a; }

.sc-type-btn.active {
    border-color: #d4a855;
    color: #d4a855;
    background: rgba(212, 168, 85, 0.08);
}

/* Color Row */
.sc-color-row { display: flex; align-items: center; gap: 12px; }

.sc-color-preview {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid #3d4450;
}

.sc-color-preview input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.sc-color-hex { color: #777; font-size: 13px; font-family: 'Courier New', monospace; }

/* Roles */
.sc-roles-container { position: relative; }

.sc-roles-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #777;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sc-roles-toggle:hover { border-color: #555; }

.sc-roles-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0; right: 0;
    background: #151515;
    border: 1px solid #3d4450;
    border-radius: 10px;
    z-index: 20;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.sc-roles-dropdown.show { display: block; }

.sc-roles-search { padding: 8px 12px; border-bottom: 1px solid #222; }

.sc-roles-search input {
    width: 100%;
    padding: 8px 12px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 6px;
    color: #c0b49a;
    font-family: inherit;
    font-size: 13px;
}

.sc-roles-search input:focus { outline: none; border-color: #d4a855; }

.sc-roles-list { max-height: 200px; overflow-y: auto; padding: 4px 0; }

.sc-role-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s;
    font-size: 13px;
    color: #c0b49a;
}

.sc-role-option:hover { background: rgba(212, 168, 85, 0.05); }

.sc-role-option.selected { background: rgba(212, 168, 85, 0.1); }

.sc-role-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sc-role-check {
    width: 16px;
    height: 16px;
    border: 1px solid #3d4450;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: transparent;
    flex-shrink: 0;
    margin-right: auto;
    transition: all 0.15s;
}

.sc-role-option.selected .sc-role-check {
    background: #d4a855;
    border-color: #d4a855;
    color: #fff;
}

.sc-selected-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.sc-selected-role-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(212, 168, 85, 0.1);
    border-radius: 6px;
    font-size: 12px;
    color: #d4a855;
}

.sc-selected-role-tag .remove-role {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.sc-selected-role-tag .remove-role:hover { opacity: 1; }

/* Rules Mode Selector */
.rules-mode-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.rules-mode-btn {
    flex: 1;
    padding: 10px 16px;
    background: #1a1a1a;
    border: 1px solid #3d4450;
    border-radius: 10px;
    color: #777;
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rules-mode-btn:hover { border-color: #555; color: #c0b49a; }

.rules-mode-btn.active {
    border-color: #d4a855;
    color: #d4a855;
    background: rgba(212, 168, 85, 0.08);
}

/* Rules Big Upload (Image Mode) */
.rules-big-upload {
    position: relative;
    border: 2px dashed #3d4450;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #555;
    min-height: 180px;
    justify-content: center;
    overflow: hidden;
}

.rules-big-upload:hover { border-color: #d4a855; color: #d4a855; }

.rules-big-upload i { font-size: 36px; opacity: 0.5; }

.rules-big-upload .upload-hint { font-size: 12px; opacity: 0.5; }

.rules-big-upload.has-image { padding: 0; border-style: solid; border-color: #2a2a2a; }

.rules-big-upload.has-image img {
    width: 100%;
    border-radius: 10px;
    display: block;
}

.rules-big-upload-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #d4a855;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 10px;
}

.rules-big-upload:hover .rules-big-upload-overlay { opacity: 1; }

/* Social Alerts */
.sa-empty {
    text-align: center;
    padding: 50px 20px;
    color: #555;
}
.sa-empty i { font-size: 40px; margin-bottom: 12px; display: block; opacity: 0.3; }
.sa-empty p { font-size: 15px; color: #888; margin-bottom: 4px; }
.sa-empty span { font-size: 12px; }

.sa-add-btn {
    width: 100%;
    padding: 14px;
    background: transparent;
    border: 2px dashed #3d4450;
    border-radius: 12px;
    color: #d4a855;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}
.sa-add-btn:hover { border-color: #d4a855; background: rgba(212,168,85,0.06); }

.sa-card {
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 14px;
    transition: all 0.2s;
}
.sa-card.sa-disabled { opacity: 0.5; }

.sa-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid #1e1e1e;
}

.sa-platform-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.sa-platform-badge i { font-size: 16px; }

.sa-card-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sa-test-btn, .sa-delete-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #3d4450;
    background: transparent;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.sa-test-btn:hover { border-color: #d4a855; color: #d4a855; }
.sa-delete-btn:hover { border-color: #ED4245; color: #ED4245; }

.sa-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sa-row {
    display: flex;
    gap: 14px;
}
.sa-row > .sa-field { flex: 1; }
.sa-field.sa-grow { flex: 2; }

.sa-field label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.sa-field input, .sa-field textarea, .sa-field select {
    width: 100%;
    padding: 10px 14px;
    background: #0e0e0e;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #e8e0d0;
    font-family: inherit;
    font-size: 13px;
    transition: border-color 0.2s;
}
.sa-field input:focus, .sa-field textarea:focus, .sa-field select:focus {
    border-color: #d4a855;
    outline: none;
}

.sa-field textarea {
    min-height: 70px;
    resize: vertical;
}

.sa-hint {
    display: block;
    font-size: 11px;
    color: #555;
    margin-top: 4px;
}

.sa-platform-select {
    display: flex;
    gap: 8px;
}

.sa-platform-select button {
    flex: 1;
    padding: 10px 12px;
    background: #0e0e0e;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    color: #777;
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.sa-platform-select button:hover { border-color: #555; color: #ccc; }

.sa-platform-select button.active {
    border-color: var(--btn-color);
    color: var(--btn-color);
    background: color-mix(in srgb, var(--btn-color) 8%, transparent);
}

@media (max-width: 600px) {
    .sa-row { flex-direction: column; gap: 10px; }
}

/* Tag Picker */
.tag-picker {
    background: #0e0e0e;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    transition: border-color 0.2s;
}
.tag-picker:focus-within { border-color: #d4a855; }
.tag-picker-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-picker-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.tag-picker-tag.channel-tag {
    background: rgba(212,168,85,0.12);
    border: 1px solid rgba(212,168,85,0.3);
    color: #d4a855;
}
.tag-picker-tag.role-tag {
    border-width: 1px;
    border-style: solid;
}
.tag-picker-tag .tag-remove {
    cursor: pointer;
    opacity: 0.6;
    font-size: 10px;
    margin-right: 2px;
}
.tag-picker-tag .tag-remove:hover { opacity: 1; }
.tag-picker-input-wrap { flex: 1; min-width: 120px; }
.tag-picker-input-wrap select {
    width: 100%;
    background: transparent;
    border: none;
    color: #888;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    cursor: pointer;
}
.tag-picker-input-wrap select option { background: #1a1a1a; color: #e8e0d0; }




















/* Channel Manager */
.cm-toolbar { padding:12px 20px; border-bottom:1px solid rgba(212,168,85,0.08); display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.cm-search { position:relative; flex:1; min-width:200px; }
.cm-search i { position:absolute; right:12px; top:50%; transform:translateY(-50%); color:#555; font-size:13px; }
.cm-search input { width:100%; padding:9px 38px 9px 14px; background:rgba(20,20,20,0.5); border:1px solid rgba(212,168,85,0.1); border-radius:8px; color:#d9cdb8; font-size:13px; outline:none; }
.cm-search input:focus { border-color:rgba(212,168,85,0.3); }
.cm-filters { display:flex; gap:4px; flex-wrap:wrap; }
.cm-filter-btn { padding:6px 12px; background:transparent; border:1px solid rgba(255,255,255,0.06); border-radius:6px; color:#777; font-size:12px; cursor:pointer; transition:all 0.2s; display:flex; align-items:center; gap:4px; }
.cm-filter-btn:hover { color:#d9cdb8; border-color:rgba(212,168,85,0.2); }
.cm-filter-btn.active { background:rgba(212,168,85,0.12); color:#d4a855; border-color:rgba(212,168,85,0.3); }
.cm-stats { display:flex; gap:20px; padding:12px 20px; border-bottom:1px solid rgba(212,168,85,0.06); }
.cm-stat { display:flex; flex-direction:column; align-items:center; gap:2px; }
.cm-stat-num { font-size:18px; font-weight:700; color:#d9cdb8; }
.cm-stat-label { font-size:11px; color:#555; }
.cm-tree { max-height:600px; overflow-y:auto; }
.cm-tree::-webkit-scrollbar { width:5px; }
.cm-tree::-webkit-scrollbar-track { background:transparent; }
.cm-tree::-webkit-scrollbar-thumb { background:rgba(212,168,85,0.15); border-radius:10px; }
.cm-loading { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:60px 20px; color:#555; gap:12px; }
.cm-loading i { font-size:28px; opacity:0.5; }
.cm-category-group { border-bottom:1px solid rgba(255,255,255,0.03); }
.cm-category-group.collapsed .cm-children { display:none; }
.cm-category-group.collapsed .cm-collapse-icon { transform:rotate(-90deg); }
.cm-category-header { display:flex; align-items:center; gap:8px; padding:10px 20px; cursor:pointer; transition:background 0.15s; font-size:12px; text-transform:uppercase; letter-spacing:0.5px; color:#888; font-weight:600; }
.cm-category-header:hover { background:rgba(212,168,85,0.04); }
.cm-category-header .cm-row-actions { margin-right:auto; opacity:0; transition:opacity 0.15s; }
.cm-category-header:hover .cm-row-actions { opacity:1; }
.cm-collapse-icon { font-size:10px; color:#555; transition:transform 0.2s; }
.cm-count { background:rgba(255,255,255,0.06); padding:1px 8px; border-radius:10px; font-size:11px; color:#666; }
.cm-empty-cat { padding:8px 20px 8px 48px; font-size:12px; color:#444; font-style:italic; }

/* Row */
.cm-row { display:flex; align-items:center; padding:7px 20px 7px 30px; gap:8px; transition:background 0.12s; cursor:default; user-select:none; position:relative; }
.cm-row:hover { background:rgba(212,168,85,0.04); }
.cm-row-info { display:flex; align-items:center; gap:8px; flex:1; min-width:0; }
.cm-row-info > i { font-size:15px; width:20px; text-align:center; flex-shrink:0; }
.cm-row-name { font-size:14px; color:#d9cdb8; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cm-row-topic { font-size:11px; color:#555; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:200px; }
.cm-row-meta { display:flex; gap:6px; align-items:center; }
.cm-badge { padding:2px 8px; border-radius:4px; font-size:11px; display:flex; align-items:center; gap:4px; }
.cm-badge-perm { background:rgba(255,255,255,0.05); color:#888; }
.cm-row-actions { display:flex; gap:4px; opacity:0; transition:opacity 0.15s; }
.cm-row:hover .cm-row-actions { opacity:1; }
.cm-row-actions button { width:28px; height:28px; border:none; background:rgba(255,255,255,0.04); border-radius:6px; color:#888; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:12px; transition:all 0.15s; }
.cm-row-actions button:hover { background:rgba(212,168,85,0.15); color:#d4a855; }
.cm-row-actions .cm-del:hover { background:rgba(231,76,60,0.15); color:#e74c3c; }

/* Drag Handle */
.cm-drag-handle { color:#333; cursor:grab; width:18px; display:flex; align-items:center; justify-content:center; font-size:11px; opacity:0; transition:opacity 0.12s; flex-shrink:0; }
.cm-row:hover .cm-drag-handle { opacity:0.6; color:#666; }
.cm-row:hover .cm-drag-handle:hover { opacity:1; color:#d4a855; }

/* Dragging state */
.cm-dragging { opacity:0.2 !important; background:rgba(212,168,85,0.03) !important; }
.cm-no-select * { user-select:none !important; -webkit-user-select:none !important; }

/* Ghost (follows cursor) */
.cm-ghost {
    position:fixed;
    z-index:99999;
    pointer-events:none;
    background:rgba(26,26,26,0.95);
    border:1px solid rgba(212,168,85,0.3);
    border-radius:8px;
    box-shadow:0 8px 32px rgba(0,0,0,0.5), 0 0 0 1px rgba(212,168,85,0.1);
    display:flex;
    align-items:center;
    gap:8px;
    padding:7px 20px 7px 30px;
    will-change:transform;
    transition:none;
}
.cm-ghost .cm-drag-handle { opacity:0.8; color:#d4a855; }
.cm-ghost .cm-row-actions { display:none; }

/* Drop indicator line */
.cm-drop-line {
    position:fixed;
    z-index:99998;
    height:2px;
    background:#d4a855;
    border-radius:2px;
    pointer-events:none;
    transition:top 0.08s ease-out, opacity 0.12s;
    opacity:0;
    box-shadow:0 0 6px rgba(212,168,85,0.4);
}
.cm-drop-line-dot {
    position:absolute;
    right:-3px;
    top:-3px;
    width:8px;
    height:8px;
    background:#d4a855;
    border-radius:50%;
    box-shadow:0 0 4px rgba(212,168,85,0.6);
}

/* Category highlight when hovering */
.cm-drop-highlight {
    background:rgba(212,168,85,0.1) !important;
    outline:1px dashed rgba(212,168,85,0.4);
    outline-offset:-1px;
    border-radius:4px;
}

/* Action buttons */
.cm-action-btn { padding:7px 14px; border:1px solid rgba(255,255,255,0.08); background:transparent; border-radius:8px; color:#999; cursor:pointer; font-size:13px; transition:all 0.2s; display:flex; align-items:center; gap:6px; }
.cm-action-btn:hover { border-color:rgba(212,168,85,0.3); color:#d4a855; }
.cm-action-btn.cm-create { background:linear-gradient(135deg,rgba(212,168,85,0.15),rgba(184,145,46,0.1)); border-color:rgba(212,168,85,0.25); color:#d4a855; }
.cm-action-btn.cm-create:hover { background:linear-gradient(135deg,rgba(212,168,85,0.25),rgba(184,145,46,0.15)); }

/* Modal */
.cm-modal-overlay { position:fixed; inset:0; background:rgba(0,0,0,0.7); z-index:9999; display:flex; align-items:center; justify-content:center; padding:20px; }
.cm-modal { background:#1a1a1a; border:1px solid rgba(212,168,85,0.12); border-radius:16px; width:100%; max-width:560px; max-height:85vh; overflow-y:auto; }
.cm-modal::-webkit-scrollbar { width:5px; }
.cm-modal::-webkit-scrollbar-thumb { background:rgba(212,168,85,0.15); border-radius:10px; }
.cm-modal-header { display:flex; align-items:center; justify-content:space-between; padding:18px 24px; border-bottom:1px solid rgba(212,168,85,0.08); }
.cm-modal-header h3 { font-size:16px; color:#d9cdb8; font-weight:600; }
.cm-modal-header button { background:none; border:none; color:#666; cursor:pointer; font-size:18px; padding:4px; }
.cm-modal-header button:hover { color:#d9cdb8; }
.cm-modal-body { padding:20px 24px; }
.cm-confirm { text-align:center; padding:20px 0; }
.cm-confirm p { color:#d9cdb8; font-size:15px; }
.cm-modal-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:20px; padding-top:16px; border-top:1px solid rgba(255,255,255,0.04); }
.cm-btn { padding:9px 20px; border:none; border-radius:8px; font-size:13px; cursor:pointer; font-weight:500; transition:all 0.2s; }
.cm-btn-cancel { background:rgba(255,255,255,0.06); color:#999; }
.cm-btn-cancel:hover { background:rgba(255,255,255,0.1); color:#ccc; }
.cm-btn-primary { background:linear-gradient(135deg,#d4a855,#b8912e); color:#111; }
.cm-btn-primary:hover { opacity:0.9; }
.cm-btn-danger { background:linear-gradient(135deg,#e74c3c,#c0392b); color:#fff; }
.cm-btn-danger:hover { opacity:0.9; }
.cm-btn-sm { padding:6px 12px; font-size:12px; }

/* Form */
.cm-form-row { margin-bottom:16px; }
.cm-form-row label { display:block; font-size:12px; color:#888; margin-bottom:6px; font-weight:500; }
.cm-form-row input, .cm-form-row select, .cm-form-row textarea { width:100%; padding:10px 14px; background:rgba(20,20,20,0.6); border:1px solid rgba(212,168,85,0.12); border-radius:8px; color:#d9cdb8; font-size:14px; outline:none; }
.cm-form-row input:focus, .cm-form-row select:focus { border-color:rgba(212,168,85,0.35); }
.cm-type-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:6px; }
.cm-type-btn { display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 6px; background:rgba(20,20,20,0.4); border:1px solid rgba(255,255,255,0.06); border-radius:10px; color:#777; cursor:pointer; transition:all 0.2s; font-size:11px; }
.cm-type-btn i { font-size:18px; }
.cm-type-btn:hover { border-color:rgba(212,168,85,0.2); color:#d9cdb8; }
.cm-type-btn.active { border-color:rgba(212,168,85,0.4); background:rgba(212,168,85,0.1); color:#d4a855; }

/* Permissions */
.cm-perm-add { display:flex; gap:8px; margin-bottom:16px; }
.cm-perm-add select { flex:1; padding:8px 12px; background:rgba(20,20,20,0.6); border:1px solid rgba(212,168,85,0.12); border-radius:8px; color:#d9cdb8; font-size:13px; outline:none; }
.cm-perm-empty { text-align:center; padding:30px; color:#555; }
.cm-perm-empty i { font-size:30px; margin-bottom:10px; display:block; opacity:0.3; }
.cm-perm-empty span { font-size:12px; }
.cm-perm-card { border:1px solid rgba(255,255,255,0.05); border-radius:10px; margin-bottom:12px; overflow:hidden; }
.cm-perm-card-header { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; background:rgba(20,20,20,0.4); }
.cm-del-sm { background:none; border:none; color:#666; cursor:pointer; font-size:14px; }
.cm-del-sm:hover { color:#e74c3c; }
.cm-perm-grid { display:grid; grid-template-columns:1fr 1fr; gap:1px; background:rgba(255,255,255,0.02); padding:4px; }
.cm-perm-item { display:flex; align-items:center; justify-content:space-between; padding:6px 12px; font-size:12px; color:#999; }
.cm-perm-item span { display:flex; align-items:center; gap:6px; }
.cm-perm-item span i { width:14px; text-align:center; font-size:11px; }
.cm-perm-toggle { display:flex; gap:2px; }
.cm-perm-toggle button { width:24px; height:22px; border:none; background:rgba(255,255,255,0.04); color:#555; cursor:pointer; font-size:11px; transition:all 0.15s; }
.cm-perm-toggle button:first-child { border-radius:4px 0 0 4px; }
.cm-perm-toggle button:last-child { border-radius:0 4px 4px 0; }
.cm-perm-toggle button.active.allow { background:rgba(87,242,135,0.2); color:#57F287; }
.cm-perm-toggle button.active.inherit { background:rgba(255,255,255,0.08); color:#999; }
.cm-perm-toggle button.active.deny { background:rgba(231,76,60,0.2); color:#e74c3c; }
.cm-perm-toggle button:hover { background:rgba(255,255,255,0.1); }

@media (max-width:768px) {
    .cm-type-grid { grid-template-columns:repeat(3,1fr); }
    .cm-perm-grid { grid-template-columns:1fr; }
    .cm-row { padding-right:12px; padding-left:24px; }
    .cm-row-topic { display:none; }
    .cm-row-actions { opacity:1; }
    .cm-drag-handle { opacity:0.5; }
}