:root {
    --bg-primary: #02040a;
    --bg-secondary: #05080f;
    --bg-card: rgba(5, 9, 16, 0.98);
    --accent-primary: #38bdf8;
    --accent-secondary: #818cf8;
    --accent-tertiary: #c084fc;
    --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #6366f1 50%, #a855f7 100%);
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --info: #c084fc;
    --border-color: rgba(56, 189, 248, 0.12);
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
    --neon-glow: 0 0 18px rgba(56, 189, 248, 0.18);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 85% 90%, rgba(168, 85, 247, 0.06) 0%, transparent 50%);
    background-size: 100% 100%, 100% 100%;
}

body {
    padding-top: 64px;
}

body.has-sidebar {
    padding-left: 200px;
}

html[dir="rtl"] body.has-sidebar {
    padding-left: 0;
    padding-right: 200px;
}

body.has-sidebar.sidebar-collapsed {
    padding-left: 44px;
}

html[dir="rtl"] body.has-sidebar.sidebar-collapsed {
    padding-left: 0;
    padding-right: 44px;
}

.navbar {
    background: rgba(2, 4, 10, 0.95);
    border-bottom: 1px solid var(--border-color);
    padding: 0 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    z-index: 1000;
    box-shadow: var(--neon-glow);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
}

.navbar-content {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
}

.navbar-typing {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    margin-left: 1rem;
    color: var(--accent-primary);
    font-size: 1rem;
    font-weight: 500;
    white-space: nowrap;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
}

html[dir="rtl"] .navbar-typing {
    margin-left: 0;
    margin-right: 1rem;
}

.typing-cursor {
    color: var(--accent-primary);
}

@keyframes blink {
    50% { opacity: 0; }
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-icon {
    font-size: 1.6rem;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.35));
}

.brand-logo {
    height: 56px;
    width: auto;
    object-fit: contain;
    border-radius: 10px;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.3));
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-primary);
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.12);
}

.sidebar {
    position: fixed;
    top: 64px;
    left: 0;
    width: 200px;
    height: calc(100% - 64px);
    background: rgba(2, 4, 10, 0.95);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 999;
    backdrop-filter: blur(12px);
    transition: width 0.25s ease, padding 0.25s ease;
    overflow: visible;
}

html[dir="rtl"] .sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--border-color);
}

.sidebar-toggle {
    position: absolute;
    top: 50%;
    right: -12px;
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 1000;
    transform: translateY(-50%);
    transition: color 0.2s ease;
}

html[dir="rtl"] .sidebar-toggle {
    right: auto;
    left: -12px;
}

.sidebar-toggle:hover {
    color: var(--accent-primary);
}

.sidebar-toggle::before {
    content: '\2039';
    font-size: 1.2rem;
    display: inline-block;
    transition: transform 0.25s ease;
}

.sidebar.collapsed .sidebar-toggle::before {
    content: '\203A';
}

.sidebar.collapsed {
    width: 44px;
    padding: 1rem 0.4rem;
    align-items: center;
}

.sidebar.collapsed .sidebar-links,
.sidebar.collapsed .sidebar-actions {
    display: none;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-links li {
    width: 100%;
}

.sidebar-links a,
.sidebar-links button {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: start;
}

.sidebar-links a i,
.sidebar-links a svg,
.sidebar-links button i,
.sidebar-links button svg {
    width: 24px;
    flex-shrink: 0;
}

.sidebar-links a i,
.sidebar-links button i {
    font-size: 1.2rem;
    text-align: center;
}

.sidebar-links a svg,
.sidebar-links button svg {
    height: 24px;
    fill: currentColor;
}

.sidebar-links a:hover,
.sidebar-links a.active,
.sidebar-links button:hover {
    color: var(--accent-primary);
    background: rgba(56, 189, 248, 0.08);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.12);
}

.sidebar-links li {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-badge {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent-primary);
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.notification-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    margin-bottom: 0.6rem;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-logo {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    object-fit: contain;
}

.notification-app {
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.notification-message {
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
    padding-left: 0;
}

.notification-meta {
    color: var(--text-secondary);
    font-size: 0.7rem;
}

.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    overflow: hidden;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.language-switcher select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    margin-bottom: 2rem;
    font-size: 2rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    backdrop-filter: blur(6px);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 44px rgba(2, 8, 23, 0.55), 0 0 0 1px rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
}

.card-header {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.08), rgba(168, 85, 247, 0.05));
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--accent-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.card-body {
    padding: 1.25rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 0.25rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

.toggle-label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    margin-top: 0.5rem;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border-radius: 26px;
    transition: 0.2s;
    border: 1px solid var(--border-color);
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: 0.2s;
}

.toggle-switch input:checked + .toggle-slider {
    background: rgba(56, 189, 248, 0.25);
    border-color: var(--accent-primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
    background: var(--accent-primary);
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

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

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
    transform: translateY(-2px);
}

.btn-danger {
    background: transparent;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover:not(:disabled) {
    background: rgba(248, 113, 113, 0.1);
    box-shadow: 0 0 14px rgba(248, 113, 113, 0.2);
}

.btn-success {
    background: transparent;
    color: #22c55e;
    border: 1px solid #22c55e;
}

.btn-success:hover:not(:disabled) {
    background: rgba(34, 197, 94, 0.1);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.2);
}

.btn-warning {
    background: transparent;
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.btn-warning:hover:not(:disabled) {
    background: rgba(245, 158, 11, 0.1);
    box-shadow: 0 0 14px rgba(245, 158, 11, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(56, 189, 248, 0.05);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(0, 168, 255, 0.08);
}

th, td {
    padding: 0.875rem 1rem;
    text-align: start;
    border-bottom: 1px solid var(--border-color);
}

th {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 168, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.75rem;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.user-id {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-family: monospace;
}

.message-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.message-author {
    font-weight: 600;
    color: var(--accent-primary);
}

.message-time {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.message-content {
    color: var(--text-primary);
    word-break: break-word;
    line-height: 1.5;
}

.message-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.log-entry {
    font-family: monospace;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(0, 168, 255, 0.1);
    color: var(--text-secondary);
}

.log-entry.error { color: var(--danger); }
.log-entry.warn { color: var(--warning); }
.log-entry.info { color: var(--text-secondary); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-message { background: rgba(56, 189, 248, 0.12); color: var(--accent-primary); }
.badge-mention { background: rgba(192, 132, 252, 0.12); color: var(--info); }
.badge-reply { background: rgba(52, 211, 153, 0.12); color: var(--success); }
.badge-sticker { background: rgba(251, 191, 36, 0.12); color: var(--warning); }
.badge-emoji { background: rgba(248, 113, 113, 0.12); color: var(--danger); }
.badge-voice { background: rgba(192, 132, 252, 0.12); color: var(--info); }
.badge-status { background: rgba(52, 211, 153, 0.12); color: var(--success); }
.badge-member_update,
.badge-member_join,
.badge-member_leave { background: rgba(192, 132, 252, 0.12); color: var(--info); }

.loading {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(56, 189, 248, 0.2);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--border-color);
}

@media (max-width: 768px) {
    .container { padding: 1rem; }
    .navbar-content { flex-direction: column; align-items: stretch; }
    .nav-links { justify-content: center; }
    .page-title { font-size: 1.5rem; }
}

[dir="ltr"] .nav-links { padding-left: 0; }
[dir="rtl"] .nav-links { padding-right: 0; }

/* Monitoring Layout */
.monitoring-layout {
    display: flex;
    height: calc(100vh - 72px);
    padding: 1rem;
    gap: 1rem;
}

.monitoring-sidebar {
    width: 320px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 168, 255, 0.05);
}

.sidebar-header h2 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--accent-primary);
}

.users-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.user-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
}

.user-row:hover {
    background: rgba(0, 168, 255, 0.08);
    border-color: var(--border-color);
}

.user-row.active {
    background: rgba(0, 168, 255, 0.12);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(0, 168, 255, 0.15);
}

.user-row-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.user-row-info {
    flex: 1;
    min-width: 0;
}

.user-row-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-row-username {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-icon {
    padding: 0.35rem 0.5rem;
    background: transparent;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.btn-icon:hover {
    background: rgba(231, 76, 60, 0.15);
}

.monitoring-feed {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.feed-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 168, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.feed-header h2 {
    font-size: 1.1rem;
    margin: 0;
    color: var(--accent-primary);
}

.feed-filters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feed-content {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

/* Discord-like messages */
.discord-message {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    background: rgba(10, 25, 41, 0.5);
    border: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.discord-message:hover {
    background: rgba(0, 168, 255, 0.05);
}

.discord-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(0, 168, 255, 0.3);
}

.discord-message-body {
    flex: 1;
    min-width: 0;
}

.discord-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.discord-display-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.15rem;
}

.discord-username {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.discord-time {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.discord-content {
    color: var(--text-primary);
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
}

.discord-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    background: rgba(5, 9, 16, 0.8);
    color: var(--text-secondary);
    white-space: nowrap;
}

.meta-chip i {
    color: var(--accent-primary);
    font-size: 0.85rem;
}

.status-chip {
    color: var(--accent-primary);
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.25);
}

.server-chip {
    color: var(--text-secondary);
}

.channel-chip {
    color: var(--info);
    background: rgba(192, 132, 252, 0.08);
    border-color: rgba(192, 132, 252, 0.2);
}

.move-chip {
    color: var(--warning);
    background: rgba(251, 191, 36, 0.08);
    border-color: rgba(251, 191, 36, 0.25);
}

.discord-location {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--accent-primary);
    opacity: 0.9;
    line-height: 1.4;
}

.discord-server {
    font-weight: 600;
    color: var(--text-primary);
    opacity: 0.9;
}

.discord-channel {
    color: var(--accent-primary);
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

/* Reply preview */
.reply-preview {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(0, 168, 255, 0.06);
    border-radius: 8px;
    border-inline-start: 3px solid var(--accent-primary);
}

.reply-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.reply-author {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--accent-primary);
}

.reply-content {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}

/* Attachments & Embeds */
.message-attachments {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.attachment-link {
    color: var(--accent-primary);
    font-size: 0.85rem;
    text-decoration: none;
}

.attachment-link:hover {
    text-decoration: underline;
}

.message-embeds {
    margin-top: 0.5rem;
}

.message-embed {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 0.75rem;
    border-inline-start: 4px solid var(--accent-primary);
    margin-bottom: 0.5rem;
}

.embed-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.embed-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.embed-url {
    font-size: 0.8rem;
    color: var(--accent-primary);
    word-break: break-all;
}

.message-stickers {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sticker-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
}

.discord-emoji {
    font-size: 1.2rem;
}

/* Voice events */
.voice-event {
    border-color: rgba(155, 89, 182, 0.3);
}

.voice-participants-inline {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.voice-participants-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.voice-participants-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
}

.voice-participant-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem 0.25rem 0.25rem;
    background: rgba(5, 9, 16, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    white-space: nowrap;
    cursor: default;
    transition: border-color 0.15s;
}

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

.voice-participant-chip-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

.voice-participant-chip-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Status events */
.status-event {
    border-color: rgba(46, 204, 113, 0.3);
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-inline-end: 0.25rem;
}

.status-online { background: var(--success); }
.status-idle { background: var(--warning); }
.status-dnd { background: var(--danger); }
.status-offline, .status-invisible { background: #747f8d; }

.status-activities {
    margin-top: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    width: 90%;
    max-width: 420px;
    overflow: hidden;
}

.modal-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    color: var(--accent-primary);
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 1.25rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* Login page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.06), rgba(168, 85, 247, 0.04));
    pointer-events: none;
}

.login-header {
    position: relative;
    margin-bottom: 1.75rem;
}

.login-icon {
    display: block;
    font-size: 3rem;
    margin-bottom: 0.75rem;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.3));
}

.login-logo {
    display: block;
    height: 90px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 0.75rem;
    border-radius: 18px;
    filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.25));
}

.login-header h1 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.login-form {
    position: relative;
    text-align: start;
}

/* Toast improvements */
.toast {
    position: fixed;
    bottom: 1.5rem;
    inset-inline-end: 1.5rem;
    min-width: 280px;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: var(--card-shadow);
    z-index: 9999;
    transform: translateY(150%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    backdrop-filter: blur(8px);
    font-weight: 500;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success { border-inline-start: 4px solid var(--success); }
.toast.error { border-inline-start: 4px solid var(--danger); }
.toast.warning { border-inline-start: 4px solid var(--warning); }

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-online { background: rgba(52, 211, 153, 0.12); color: var(--success); box-shadow: 0 0 8px rgba(52, 211, 153, 0.08); }
.status-offline { background: rgba(148, 163, 184, 0.12); color: var(--text-secondary); }
.status-error { background: rgba(248, 113, 113, 0.12); color: var(--danger); box-shadow: 0 0 8px rgba(248, 113, 113, 0.08); }
.status-connecting { background: rgba(251, 191, 36, 0.12); color: var(--warning); }

@media (max-width: 768px) {
    .container { padding: 1rem; }
    .navbar-content { flex-direction: column; align-items: stretch; }
    .nav-links { justify-content: center; }
    .navbar-actions { justify-content: center; }
    .page-title { font-size: 1.5rem; }
    .monitoring-layout {
        flex-direction: column;
        height: auto;
    }
    .monitoring-sidebar {
        width: 100%;
        max-height: 300px;
    }
    .feed-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .login-card { padding: 1.5rem; }
}

/* Hero / map */
.hero-section {
    text-align: center;
    margin-bottom: 2rem;
}

.page-description {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 680px;
    margin: 0.5rem auto 0;
    line-height: 1.6;
}

.users-map {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.user-card {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.08), rgba(168, 85, 247, 0.05));
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    backdrop-filter: blur(4px);
}

.user-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(2, 8, 23, 0.45), 0 0 0 1px rgba(56, 189, 248, 0.15);
}

.user-card-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--border-color);
    box-shadow: var(--neon-glow);
}

.user-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-card-name {
    margin: 0 0 0.6rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    word-break: break-word;
}

.user-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.user-card-country {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.user-card-count {
    font-weight: 600;
    color: var(--accent-primary);
}

.user-card-footer {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Navbar user info */
.navbar-actions {
    gap: 0.75rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.discord-login {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%) !important;
}

.form-error {
    color: var(--danger);
    font-size: 0.9rem;
    text-align: center;
}

.table-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
    vertical-align: middle;
}

.notifications-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1rem;
    z-index: 500;
}

.notification-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(56, 189, 248, 0.10));
    border: 1px solid rgba(192, 132, 252, 0.35);
    border-radius: 14px;
    color: #f3e8ff;
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.notification-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: rgba(192, 132, 252, 0.22);
    color: #e9d5ff;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.notification-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.notification-header strong {
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
}

.notification-header small {
    color: var(--text-secondary);
    font-size: 0.72rem;
    white-space: nowrap;
}

.notification-body p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: #f3e8ff;
}

.notification-from {
    font-size: 0.72rem;
    color: var(--accent-primary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.notification-dismiss {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    opacity: 0.7;
    transition: opacity 0.15s, color 0.15s;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.notification-dismiss:hover {
    opacity: 1;
    color: var(--danger);
}

.notification-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 440px;
    width: 92%;
    text-align: center;
    padding: 2.2rem 1.8rem;
    background: rgba(17, 24, 39, 0.72);
    border: 1px solid rgba(192, 132, 252, 0.35);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    animation: notification-in 0.3s ease-out;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

@keyframes notification-in {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.notification-modal-logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 1rem;
}

.notification-modal-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.notification-modal-type {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-primary, #38bdf8);
    margin-bottom: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
}

.notification-modal-type:empty {
    display: none;
}

.notification-modal-message {
    font-size: 1rem;
    line-height: 1.65;
    color: #e2e8f0;
    margin-bottom: 1.8rem;
    padding: 0 0.5rem;
}

.notification-modal-close {
    min-width: 140px;
}

.notification-type-urgent .notification-modal-type {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.2);
}

.notification-type-emergency .notification-modal-type {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    box-shadow: 0 0 14px rgba(239, 68, 68, 0.25);
}

.notification-type-note .notification-modal-type {
    color: #10b981;
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.2);
}

/* Servers page */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.2rem;
    padding: 1rem 0;
}

.server-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(192, 132, 252, 0.18);
    border-radius: 14px;
    padding: 1.2rem 1rem;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}

.server-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border-color: rgba(192, 132, 252, 0.4);
}

.server-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.8rem;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.28);
}

.server-name {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.server-meta {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.server-tokens {
    font-size: 0.78rem;
    color: #38bdf8;
    margin-top: 0.5rem;
}

.server-count {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.requester-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.requester-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.server-info-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.28);
}

.server-info-content h3 {
    margin-top: 0;
    margin-bottom: 0.6rem;
    color: #ffffff;
}

.server-info-content p {
    margin: 0.4rem 0;
    color: #94a3b8;
    font-size: 0.9rem;
}

.server-info-content a {
    color: #38bdf8;
}

.action-btns {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* Icons */
.brand-icon i, .login-icon i {
    color: var(--accent-primary);
    -webkit-text-fill-color: var(--accent-primary);
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.35));
}

.login-icon i {
    font-size: 3rem;
}

.btn-icon i {
    font-size: 1.1em;
    vertical-align: middle;
}

/* Landing page */
.landing-page {
    display: block;
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
        var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
}

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2.5rem;
    background: rgba(2, 4, 10, 0.92);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}

.landing-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.landing-brand img {
    height: 40px;
    width: auto;
    border-radius: 10px;
    filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.25));
}

.landing-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90vh;
    padding: 3rem 1.5rem;
    text-align: center;
    position: relative;
}

.hero-card {
    position: relative;
    z-index: 1;
    max-width: 760px;
    width: 100%;
    padding: 4rem 2.5rem;
    background: linear-gradient(145deg, rgba(5, 9, 16, 0.98), rgba(2, 4, 10, 0.95));
    border: 1px solid var(--border-color);
    border-radius: 32px;
    box-shadow: var(--card-shadow), 0 0 60px rgba(56, 189, 248, 0.08);
    overflow: hidden;
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 32px;
    padding: 1px;
    background: var(--accent-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0.45;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.22) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
    z-index: 0;
}

.hero-card h1 {
    position: relative;
    z-index: 1;
    font-size: clamp(2rem, 5.5vw, 3.8rem);
    font-weight: 800;
    margin: 0 0 1.25rem;
    line-height: 1.1;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    position: relative;
    z-index: 1;
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: var(--text-secondary);
    margin: 0 auto 2.5rem;
    max-width: 560px;
    line-height: 1.75;
}

.landing-features {
    padding: 6rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-header {
    margin-bottom: 3.5rem;
}

.section-header h2,
.landing-hook h2 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.section-header p,
.landing-hook p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    text-align: right;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    padding: 2rem;
    text-align: right;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 0 32px rgba(56, 189, 248, 0.12);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(168, 85, 247, 0.15));
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
}

.feature-icon i {
    font-size: 1.9rem;
    color: var(--accent-primary);
}

.feature-card h3 {
    font-size: 1.2rem;
    margin: 0 0 1rem;
    color: var(--text-primary);
    text-align: right;
}

.feature-card ul {
    margin: 0;
    padding: 0 1.1rem 0 0;
    color: var(--text-secondary);
    line-height: 1.85;
    font-size: 0.95rem;
    list-style: disc;
}

.feature-card li {
    margin-bottom: 0.35rem;
}

.landing-hook {
    padding: 6rem 1.5rem;
    text-align: center;
    background: linear-gradient(180deg, transparent 0%, rgba(56, 189, 248, 0.05) 50%, transparent 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.landing-hook p {
    max-width: 600px;
    margin: 0 auto 2rem;
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.landing-footer {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 14px;
}

@media (max-width: 640px) {
    .landing-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .landing-hero {
        min-height: auto;
        padding: 4rem 1rem;
    }

    .hero-card {
        padding: 2.5rem 1.5rem;
    }

    .features-grid {
        text-align: center;
    }

    .feature-card,
    .feature-card h3 {
        text-align: center;
    }

    .feature-card ul {
        display: inline-block;
        text-align: right;
    }
}

/* Logo-matched cyber theme */
:root {
    --bg-primary: #020506;
    --bg-secondary: #040b0e;
    --bg-card: rgba(6, 14, 18, 0.95);
    --accent-primary: #00f0ff;
    --accent-secondary: #00c3ff;
    --accent-tertiary: #ffffff;
    --accent-gradient: linear-gradient(135deg, #00f0ff 0%, #00c3ff 50%, #ffffff 100%);
    --text-primary: #f5fbff;
    --text-secondary: #8daab5;
    --success: #00f0ff;
    --warning: #ffcc00;
    --danger: #ff4d4d;
    --info: #00c3ff;
    --border-color: rgba(0, 240, 255, 0.12);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    --neon-glow: 0 0 18px rgba(0, 240, 255, 0.16);
}

body {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(circle at 20% 20%, rgba(0, 240, 255, 0.05) 0%, transparent 45%),
        radial-gradient(circle at 80% 80%, rgba(0, 195, 255, 0.04) 0%, transparent 45%),
        linear-gradient(rgba(0, 240, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 240, 255, 0.025) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    position: relative;
    color: var(--text-primary);
}


h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 0 14px rgba(0, 240, 255, 0.1);
}

.navbar {
    background: rgba(2, 5, 6, 0.96);
    border-bottom: 1px solid rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 24px rgba(0, 240, 255, 0.06);
}

.card,
.feature-card,
.hero-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 240, 255, 0.1);
    box-shadow: var(--card-shadow);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.card:hover,
.feature-card:hover,
.hero-card:hover {
    border-color: rgba(0, 240, 255, 0.3);
    box-shadow: 0 0 28px rgba(0, 240, 255, 0.12), var(--card-shadow);
}

.btn-primary {
    background: linear-gradient(135deg, #00f0ff 0%, #00a8ff 100%);
    color: #020506;
    font-weight: 700;
    border: none;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.25);
    transition: all 0.2s ease;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 0 32px rgba(0, 240, 255, 0.45);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--accent-primary);
    border: 1px solid rgba(0, 240, 255, 0.25);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.08);
}

.btn-secondary:hover:not(:disabled) {
    background: rgba(0, 240, 255, 0.08);
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.18);
}

.feature-icon {
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.12), rgba(0, 195, 255, 0.08));
    border: 1px solid rgba(0, 240, 255, 0.15);
}

.hero-card {
    position: relative;
    background: rgba(6, 14, 18, 0.92);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 28px;
    box-shadow: 0 0 60px rgba(0, 240, 255, 0.08), var(--card-shadow);
    backdrop-filter: blur(16px);
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.6), rgba(0, 195, 255, 0.2), transparent 60%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.landing-footer {
    border-top: 1px solid rgba(0, 240, 255, 0.1);
}

a {
    color: var(--accent-primary);
}

::selection {
    background: rgba(0, 240, 255, 0.25);
    color: #fff;
}

/* Role change indicators */
.role-added {
    color: #34d399;
    font-weight: 500;
}

.role-added i {
    margin-inline-end: 4px;
}

.role-removed {
    color: #f87171;
    font-weight: 500;
}

.role-removed i {
    margin-inline-end: 4px;
}

.nickname-change {
    color: #c084fc;
    font-weight: 500;
}

.nickname-change i {
    margin-inline-end: 4px;
}

/* Enhanced intelligence UI / motion effects - removed for performance */

h1, h2, .page-title {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand,
.landing-brand span {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card,
.feature-card,
.hero-card,
.modal-content {
    background: rgba(6, 14, 18, 0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 18px;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover,
.feature-card:hover,
.hero-card:hover,
.modal-content:hover {
    border-color: rgba(0, 240, 255, 0.35);
    box-shadow: 0 0 32px rgba(0, 240, 255, 0.12);
    transform: translateY(-3px);
}

.btn {
    transition: all 0.2s;
}

.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35) 0%, transparent 60%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.btn-primary:hover:not(:disabled)::after {
    opacity: 1;
    transform: scale(1);
}

.feature-icon {
    animation: iconPulse 3s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(0, 240, 255, 0.2); }
    50% { box-shadow: 0 0 20px rgba(0, 240, 255, 0.45); }
}

.hero-glow {
    position: absolute;
    top: 50%;
    right: 50%;
    width: 160%;
    height: 160%;
    transform: translate(50%, -50%);
    background: radial-gradient(circle, rgba(0, 240, 255, 0.14) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    animation: heroGlow 6s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { opacity: 0.4; transform: translate(50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(50%, -50%) scale(1.05); }
}

.hero-card h1,
.hero-card p,
.hero-card a {
    position: relative;
    z-index: 1;
}

.form-control,
input,
select,
textarea {
    background: rgba(4, 12, 15, 0.8);
    color: var(--text-primary);
    border: 1px solid rgba(0, 240, 255, 0.12);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.data-table,
.table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
}

.data-table th,
.table th {
    color: var(--accent-primary);
    border-bottom: 1px solid rgba(0, 240, 255, 0.2);
    padding: 0.75rem 1rem;
    text-align: right;
}

.data-table td,
.table td {
    border-bottom: 1px solid rgba(0, 240, 255, 0.08);
    padding: 0.75rem 1rem;
}

.data-table tr:hover,
.table tr:hover {
    background: rgba(0, 240, 255, 0.05);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 240, 255, 0.25);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 240, 255, 0.45);
}

.brand-logo {
    filter: drop-shadow(0 0 10px rgba(0, 240, 255, 0.45));
    transition: transform 0.3s;
}

.brand-logo:hover {
    transform: scale(1.05);
}

/* تم إزالة الحركات المستمرة لتخفيف الموارد */

/* ===== إحصائيات الصفحة الرئيسية ===== */
.stats-page .page-title {
    margin-bottom: 0.25rem;
}

.stats-page .page-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    border-color: rgba(56, 189, 248, 0.25);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: #fff;
    font-size: 1.4rem;
    flex-shrink: 0;
}

html[dir="rtl"] .stat-card .stat-icon {
    margin-left: 0;
    margin-right: 0;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.stats-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

.stats-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.countries-table {
    width: 100%;
    border-collapse: collapse;
}

.countries-table th,
.countries-table td {
    padding: 0.85rem 1rem;
    text-align: start;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

html[dir="rtl"] .countries-table th,
html[dir="rtl"] .countries-table td {
    text-align: right;
}

.countries-table th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countries-table tr:last-child td {
    border-bottom: none;
}

.countries-table tr:hover td {
    background: rgba(56, 189, 248, 0.04);
}

.country-rank {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.1);
    color: var(--accent-primary);
}

.country-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

html[dir="rtl"] .country-cell {
    gap: 0.75rem;
}

.country-flag {
    width: 32px;
    height: 22px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.country-name {
    font-weight: 500;
    color: var(--text-primary);
}

.count-value {
    font-weight: 600;
    color: var(--accent-primary);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .countries-table th,
    .countries-table td {
        padding: 0.65rem 0.75rem;
    }

    .registered-users-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.75rem;
    }

    .registered-user-avatar-wrap {
        width: 60px;
        height: 60px;
    }

    .registered-user-card {
        padding: 0.65rem;
        border-radius: 16px;
    }

    .registered-user-name {
        font-size: 0.8rem;
    }
}

/* Registered users */
.registered-section {
    margin-top: 1.75rem;
}

.registered-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.registered-user-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
    padding: 0.8rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(56, 189, 248, 0.12);
    border-radius: 18px;
    backdrop-filter: blur(10px);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
}

.registered-user-card:hover {
    transform: translateY(-4px);
    border-color: rgba(56, 189, 248, 0.35);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.registered-user-card.online {
    border-color: rgba(52, 211, 153, 0.35);
}

.registered-user-avatar-wrap {
    position: relative;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    transition: background 0.2s;
}

.registered-user-avatar-wrap.online {
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 0 14px rgba(52, 211, 153, 0.45);
}

.registered-user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--bg-primary);
    background: var(--bg-primary);
}

.registered-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.online-badge {
    font-size: 0.6rem;
    font-weight: 600;
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
    border-radius: 10px;
    padding: 0.1rem 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.registered-user-country {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.registered-user-flag {
    width: 16px;
    height: 11px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.registered-user-meta {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.registered-user-meta.online {
    color: #34d399;
    font-weight: 500;
}

.registered-user-monitored {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.registered-user-monitored i {
    color: var(--accent-primary);
    font-size: 0.75rem;
}

.online-text {
    color: #34d399;
    font-weight: 500;
}
