/* Modern Dashboard CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #5865f2;
    --primary-dark: #4752c4;
    --primary-darker: #3c45a5;
    --success: #43b581;
    --warning: #faa61a;
    --danger: #ed4245;
    --bg-primary: #1e1e2e;
    --bg-secondary: #2a2a3e;
    --bg-card: rgba(255, 255, 255, 0.08);
    --bg-hover: rgba(255, 255, 255, 0.12);
    --text-primary: #dcddde;
    --text-secondary: #b9bbbe;
    --text-muted: #72767d;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 0;
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

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

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-links a.active {
    background: rgba(88, 101, 242, 0.2);
    color: var(--primary);
}

.nav-links a.logout {
    background: rgba(240, 71, 71, 0.2);
    color: var(--danger);
    margin-left: auto;
}

.nav-links a.logout:hover {
    background: rgba(240, 71, 71, 0.3);
}

/* Container */
.container,
.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.container-fluid {
    max-width: 100%;
    padding: 2rem 3rem;
}

/* Page Header */
h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin: 2rem 0 1rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: -1rem;
    margin-bottom: 2rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.2);
    border-color: rgba(88, 101, 242, 0.3);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stat-value.positive {
    color: var(--success);
}

.stat-value.negative {
    color: var(--danger);
}

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

.stat-change {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* Sections */
.section,
.command-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.section-header,
.commands-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
}

/* Buttons */
.btn,
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-darker) 100%);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-icon {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.btn-icon:hover {
    background: rgba(88, 101, 242, 0.3);
    color: var(--primary);
}

.btn-icon.delete:hover {
    background: rgba(240, 71, 71, 0.3);
    color: var(--danger);
}

.btn-icon.toggle:hover {
    background: rgba(250, 166, 26, 0.3);
    color: var(--warning);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="color"],
textarea,
select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
}

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

/* Filter Box */
.filter-box,
.filter-controls {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-box label {
    color: var(--text-secondary);
    font-weight: 600;
}

.filter-box select {
    flex: 1;
    min-width: 200px;
}

/* Messages */
.messages-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.message-item:hover {
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.15);
    transform: translateY(-2px);
}

.message-item.delete {
    border-left: 4px solid var(--danger);
}

.message-item.edit {
    border-left: 4px solid var(--warning);
}

.message-item.create {
    border-left: 4px solid var(--success);
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.message-type {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.message-type.delete {
    background: rgba(240, 71, 71, 0.2);
    color: var(--danger);
}

.message-type.edit {
    background: rgba(250, 166, 26, 0.2);
    color: var(--warning);
}

.message-type.create {
    background: rgba(67, 181, 129, 0.2);
    color: var(--success);
}

.user-avatar-inline {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.message-user a {
    color: #00b0f4;
    text-decoration: none;
    font-weight: 600;
}

.message-user a:hover {
    text-decoration: underline;
}

.message-channel {
    color: var(--text-secondary);
}

.message-time {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: auto;
}

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

.edit-before,
.edit-after {
    padding: 0.5rem;
    border-radius: 6px;
    margin: 0.5rem 0;
}

.edit-before {
    background: rgba(240, 71, 71, 0.1);
}

.edit-after {
    background: rgba(67, 181, 129, 0.1);
}

.attachment-badge {
    display: inline-block;
    background: rgba(88, 101, 242, 0.2);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

.message-meta {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.message-meta a {
    color: var(--primary);
    text-decoration: none;
}

.message-meta a:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem 0;
}

.pagination span {
    color: var(--text-secondary);
    font-weight: 600;
}

/* Result Count */
.result-count {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-icon,
.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-enabled,
.command-status.enabled {
    background: rgba(67, 181, 129, 0.2);
    color: var(--success);
}

.badge-disabled,
.command-status.disabled {
    background: rgba(240, 71, 71, 0.2);
    color: var(--danger);
}

/* Command Cards */
.command-card,
.command-row {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.command-card:hover,
.command-row:hover {
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.2);
    transform: translateY(-2px);
}

.command-row.disabled {
    opacity: 0.6;
}

.command-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.command-info {
    flex: 1;
}

.command-name-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.command-name-row h3 {
    margin: 0;
    color: #fff;
    font-size: 1.2rem;
}

.command-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.command-badge.general { background: rgba(88, 101, 242, 0.2); color: var(--primary); }
.command-badge.fun { background: rgba(250, 166, 26, 0.2); color: var(--warning); }
.command-badge.moderation { background: rgba(240, 71, 71, 0.2); color: var(--danger); }
.command-badge.info { background: rgba(67, 181, 129, 0.2); color: var(--success); }
.command-badge.utility { background: rgba(0, 176, 244, 0.2); color: #00b0f4; }
.command-badge.custom { background: rgba(153, 170, 181, 0.2); color: #99aab5; }

.command-desc {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.command-details {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.command-actions-row {
    display: flex;
    gap: 0.5rem;
}

/* Tabs */
.tabs,
.command-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0;
    flex-wrap: wrap;
}

.tab,
.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 1.25rem;
    border-radius: 8px 8px 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

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

.tab.active,
.filter-btn.active {
    background: rgba(88, 101, 242, 0.15);
    color: var(--primary);
}

.tab.active::after,
.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* Leaderboard */
.leaderboard {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leaderboard-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.leaderboard-item:hover {
    transform: translateX(5px);
    border-color: rgba(88, 101, 242, 0.5);
}

.leaderboard-item.rank-1 {
    border-left: 4px solid #ffd700;
}

.leaderboard-item.rank-2 {
    border-left: 4px solid #c0c0c0;
}

.leaderboard-item.rank-3 {
    border-left: 4px solid #cd7f32;
}

.rank-badge {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.leaderboard-item.rank-1 .rank-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
}

.leaderboard-item.rank-2 .rank-badge {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000;
}

.leaderboard-item.rank-3 .rank-badge {
    background: linear-gradient(135deg, #cd7f32, #daa06d);
    color: #000;
}

.leaderboard-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.leaderboard-info {
    flex: 1;
}

.leaderboard-name {
    color: #00b0f4;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
}

.leaderboard-name:hover {
    text-decoration: underline;
}

.leaderboard-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

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

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

.login-box {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
}

.login-box h1 {
    justify-content: center;
    margin-bottom: 0.5rem;
}

.login-box p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.discord-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    background: #5865f2;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.discord-login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(88, 101, 242, 0.4);
}

.divider {
    margin: 1.5rem 0;
    text-align: center;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.divider span {
    background: var(--bg-card);
    padding: 0 1rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.error-message {
    background: rgba(240, 71, 71, 0.2);
    color: var(--danger);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(240, 71, 71, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .container,
    .container-fluid {
        padding: 1rem;
    }

    .navbar {
        padding: 1rem;
    }

    .nav-links {
        gap: 0.25rem;
    }

    .nav-links a {
        font-size: 0.85rem;
        padding: 0.5rem 0.75rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 1.5rem;
    }

    .command-main {
        flex-direction: column;
    }

    .command-actions-row {
        width: 100%;
        justify-content: flex-end;
    }
}

/* Utility Classes */
.text-muted {
    color: var(--text-muted);
}

.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-3 { margin-bottom: 2rem; }

/* Attachments Grid */
.attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.attachment-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.attachment-card:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.2);
}

.attachment-card-header {
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid var(--border);
}

.file-type-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.file-type-badge.image {
    background: rgba(67, 181, 129, 0.2);
    color: var(--success);
}

.file-type-badge.video {
    background: rgba(88, 101, 242, 0.2);
    color: var(--primary);
}

.file-type-badge.audio {
    background: rgba(250, 166, 26, 0.2);
    color: var(--warning);
}

.file-type-badge.file {
    background: rgba(153, 170, 181, 0.2);
    color: #99aab5;
}

.attachment-card-preview {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.attachment-card-preview a {
    display: block;
    width: 100%;
    height: 100%;
}

.attachment-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.attachment-card-preview img:hover {
    transform: scale(1.05);
}

.attachment-card-placeholder {
    width: 100%;
    height: 200px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.placeholder-icon {
    font-size: 4rem;
    opacity: 0.5;
}

.placeholder-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-align: center;
    padding: 0 1rem;
    word-break: break-word;
}

.attachment-card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.attachment-filename {
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    word-break: break-word;
}

.attachment-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar-tiny {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.user-link {
    color: #00b0f4;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

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

.attachment-metadata {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.attachment-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.btn-small {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.btn-small.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-small.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.btn-small.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-small.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Responsive adjustments for attachments */
@media (max-width: 768px) {
    .attachments-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .attachment-card-preview {
        height: 250px;
    }
}

/* Member Events Styles */
.member-events {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.member-event {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.member-event:hover {
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.15);
    transform: translateX(5px);
}

.member-event.join {
    border-left: 4px solid var(--success);
}

.member-event.leave {
    border-left: 4px solid var(--danger);
}

.member-event.role_add {
    border-left: 4px solid var(--primary);
}

.member-event.role_remove {
    border-left: 4px solid var(--warning);
}

.event-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.event-type {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(88, 101, 242, 0.2);
    color: var(--primary);
}

.member-event.join .event-type {
    background: rgba(67, 181, 129, 0.2);
    color: var(--success);
}

.member-event.leave .event-type {
    background: rgba(240, 71, 71, 0.2);
    color: var(--danger);
}

.member-event.role_add .event-type {
    background: rgba(88, 101, 242, 0.2);
    color: var(--primary);
}

.member-event.role_remove .event-type {
    background: rgba(250, 166, 26, 0.2);
    color: var(--warning);
}

.event-user a {
    color: #00b0f4;
    text-decoration: none;
    font-weight: 600;
}

.event-user a:hover {
    text-decoration: underline;
}

.event-time {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 2.5rem;
}

.event-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.event-details strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.event-details code {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: var(--primary);
    font-size: 0.85rem;
}

/* Moderation Actions Styles */
.mod-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.mod-action {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.mod-action:hover {
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.15);
    transform: translateX(5px);
}

.mod-action.ban {
    border-left: 4px solid var(--danger);
}

.mod-action.unban {
    border-left: 4px solid var(--success);
}

.mod-action.mute {
    border-left: 4px solid var(--warning);
}

.mod-action.unmute {
    border-left: 4px solid #00b0f4;
}

.mod-action.kick {
    border-left: 4px solid #ff6b6b;
}

.mod-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.mod-type {
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.mod-action.ban .mod-type {
    background: rgba(240, 71, 71, 0.2);
    color: var(--danger);
}

.mod-action.unban .mod-type {
    background: rgba(67, 181, 129, 0.2);
    color: var(--success);
}

.mod-action.mute .mod-type {
    background: rgba(250, 166, 26, 0.2);
    color: var(--warning);
}

.mod-action.unmute .mod-type {
    background: rgba(0, 176, 244, 0.2);
    color: #00b0f4;
}

.mod-action.kick .mod-type {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
}

.mod-time {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.mod-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-left: 1rem;
}

.mod-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.mod-details strong {
    color: var(--text-primary);
    margin-right: 0.5rem;
}

.mod-details a {
    color: #00b0f4;
    text-decoration: none;
    font-weight: 600;
}

.mod-details a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .event-header,
    .mod-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-time,
    .mod-time {
        margin-left: 0;
    }
    
    .event-details,
    .mod-details {
        padding-left: 0;
    }
}

/* Invites Page Styles */
.invites-section {
    margin-bottom: 3rem;
}

.top-inviters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.inviter-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.inviter-card:hover {
    transform: translateY(-5px);
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 8px 24px rgba(88, 101, 242, 0.2);
}

.inviter-card.rank-1 {
    border-left: 4px solid #ffd700;
}

.inviter-card.rank-2 {
    border-left: 4px solid #c0c0c0;
}

.inviter-card.rank-3 {
    border-left: 4px solid #cd7f32;
}

.inviter-rank {
    background: var(--primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.inviter-card.rank-1 .inviter-rank {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #000;
}

.inviter-card.rank-2 .inviter-rank {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    color: #000;
}

.inviter-card.rank-3 .inviter-rank {
    background: linear-gradient(135deg, #cd7f32, #daa06d);
    color: #000;
}

.inviter-info {
    flex: 1;
}

.inviter-name {
    color: #00b0f4;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.inviter-name:hover {
    text-decoration: underline;
}

.inviter-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.inviter-code {
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.recent-invites-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.invite-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.3s ease;
}

.invite-item:hover {
    border-color: rgba(88, 101, 242, 0.5);
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.15);
    transform: translateX(5px);
}

.invite-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.invite-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--border);
}

.invite-user-info {
    flex: 1;
}

.invite-user-name {
    color: #00b0f4;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    display: block;
}

.invite-user-name:hover {
    text-decoration: underline;
}

.invite-time {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-left: auto;
}

.invite-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    font-size: 0.9rem;
}

.invite-detail {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.invite-detail-label {
    color: var(--text-secondary);
    font-weight: 600;
}

.invite-detail-value {
    color: var(--text-primary);
}

.invite-code-badge {
    background: rgba(88, 101, 242, 0.2);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Responsive adjustments for invites */
@media (max-width: 768px) {
    .top-inviters-grid {
        grid-template-columns: 1fr;
    }
    
    .invite-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .invite-time {
        margin-left: 0;
    }
    
    .invite-details {
        grid-template-columns: 1fr;
    }
}

/* Edit Command Form - More Padding */
.command-form .form-group {
    margin-bottom: 2rem; /* Increase space between sections */
}

.command-form input[type="text"],
.command-form textarea,
.command-form select {
    padding: 12px 15px; /* More padding inside inputs */
}

.command-form label {
    margin-bottom: 8px; /* More space between label and input */
    display: block;
}

/* Specific padding for form sections */
.command-form {
    padding: 2rem; /* Overall form padding */
}

/* Clickable Stat Cards */
.stat-card.clickable {
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.stat-card.clickable::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(88, 101, 242, 0.1), rgba(88, 101, 242, 0.2));
    transition: width 0.3s ease;
    z-index: 0;
}

.stat-card.clickable:hover::before {
    width: 100%;
}

.stat-card.clickable:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 32px rgba(88, 101, 242, 0.3);
    border-color: rgba(88, 101, 242, 0.5);
}

.stat-card.clickable:active {
    transform: translateY(-2px) scale(1.01);
}

.stat-card.clickable .stat-icon,
.stat-card.clickable .stat-info {
    position: relative;
    z-index: 1;
}

.stat-card.clickable .stat-value,
.stat-card.clickable .stat-label {
    transition: color 0.2s ease;
}

.stat-card.clickable:hover .stat-value {
    color: #fff;
}

.stat-card.clickable:hover .stat-label {
    color: #dcddde;
}

/* Add click ripple effect */
.stat-card.clickable::after {
    content: '→';
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1;
}

.stat-card.clickable:hover::after {
    opacity: 1;
    right: 1.5rem;
}

/* Specific hover colors for different stat types */
.stat-card.clickable:nth-child(1):hover {
    border-color: rgba(52, 152, 219, 0.5);
    box-shadow: 0 12px 32px rgba(52, 152, 219, 0.3);
}

.stat-card.clickable:nth-child(2):hover {
    border-color: rgba(46, 204, 113, 0.5);
    box-shadow: 0 12px 32px rgba(46, 204, 113, 0.3);
}

.stat-card.clickable:nth-child(3):hover {
    border-color: rgba(231, 76, 60, 0.5);
    box-shadow: 0 12px 32px rgba(231, 76, 60, 0.3);
}

.stat-card.clickable:nth-child(4):hover {
    border-color: rgba(255, 107, 107, 0.5);
    box-shadow: 0 12px 32px rgba(255, 107, 107, 0.3);
}

.stat-card.clickable:nth-child(5):hover {
    border-color: rgba(155, 89, 182, 0.5);
    box-shadow: 0 12px 32px rgba(155, 89, 182, 0.3);
}

.stat-card.clickable:nth-child(6):hover {
    border-color: rgba(241, 196, 15, 0.5);
    box-shadow: 0 12px 32px rgba(241, 196, 15, 0.3);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .stat-card.clickable::after {
        display: none;
    }
    
    .stat-card.clickable:hover {
        transform: translateY(-3px) scale(1.01);
    }
}

/* Message Channel Link (in header) */
.message-channel-link {
    color: #7289da;
    text-decoration: none;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.message-channel-link:hover {
    background: rgba(114, 137, 218, 0.2);
    color: #fff;
    text-decoration: none;
}

.message-channel-link::before {
    content: '🔗';
    opacity: 0;
    transition: opacity 0.2s ease;
}

.message-channel-link:hover::before {
    opacity: 1;
}

/* Message Jump Link (in meta section) */
.message-jump-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.message-jump-link:hover {
    background: rgba(88, 101, 242, 0.2);
    color: #fff;
    text-decoration: none;
}

/* Message Meta Section */
.message-meta {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.message-meta a {
    color: var(--primary);
    text-decoration: none;
}

.message-meta a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .message-channel-link::before {
        opacity: 1; /* Always show icon on mobile */
    }
}

/* --- Responsive Navbar (Desktop + Mobile Unified) --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 32px;
  height: 28px;
  cursor: pointer;
  margin-left: auto;
  z-index: 1003;
}

.menu-toggle span {
  background: #fff;
  height: 3px;
  border-radius: 2px;
  width: 100%;
  transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Default nav behavior (desktop) */
#navCenter {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: transparent;
  position: relative;
  transform: none;
  height: auto;
  width: auto;
  z-index: 100;
  transition: none;
}


/* Mobile-specific slide-in behavior */
/* === UNIVERSAL FIXES === */

/* Remove purple underlines globally */
a, a:visited, a:hover, a:active {
  text-decoration: none !important;
  border: none !important;
  outline: none !important;
}
a::before, a::after {
  border: none !important;
  text-decoration: none !important;
}
.dashboard-card i,
.dashboard-metric i,
.dashboard-metric a {
  text-decoration: none !important;
  border: none !important;
}


/* === DESKTOP: restore standard behavior === */
@media (min-width: 901px) {
  #navCenter {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    background: transparent;
    z-index: 1;
  }

  body.menu-open::before {
    content: none !important;
  }
}
/* === DESKTOP: restore standard behavior === */
@media (min-width: 901px) {
  #navCenter {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    background: transparent;
    z-index: 1;
  }

  body.menu-open::before {
    content: none !important;
  }
}
/* Disable conflicting mobile nav styles from earlier in stylesheet */
@media (max-width: 900px) {
  #navCenter {
    position: fixed !important;
    left: auto !important;
    right: 0 !important;
  }
}

@media (min-width: 901px) {
  #navCenter {
    position: static !important;
  }
}

