/* Admin Messages Panel Styles */

/* Layout */
.admin-container {
    display: flex;
    min-height: calc(100vh - 60px); /* Account for navbar */
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: #2b2d31;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #3f4147;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #3f4147;
}

.sidebar-header h1 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-header i {
    color: #5865f2;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #b5bac1;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: #36373d;
    color: #fff;
}

.nav-item.active {
    background: #404249;
    color: #fff;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.nav-item .badge {
    margin-left: auto;
    background: #da373c;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid #3f4147;
}

/* Main Content */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tab-content {
    display: none;
    flex-direction: column;
    height: 100%;
}

.tab-content.active {
    display: flex;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #3f4147;
    background: #2b2d31;
}

.content-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-group.inline {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}

.form-group.inline .form-label {
    margin-bottom: 0;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #b5bac1;
}

.form-input,
.form-select,
.filter-select {
    background: #1e1f22;
    border: 1px solid #3f4147;
    border-radius: 4px;
    padding: 8px 12px;
    color: #dbdee1;
    font-size: 14px;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.filter-select:focus {
    outline: none;
    border-color: #5865f2;
}

.filter-select {
    min-width: 150px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-primary {
    background: #5865f2;
    color: #fff;
}

.btn-primary:hover {
    background: #4752c4;
}

.btn-secondary {
    background: #4e5058;
    color: #fff;
}

.btn-secondary:hover {
    background: #5d5f68;
}

.btn-danger {
    background: #da373c;
    color: #fff;
}

.btn-danger:hover {
    background: #c62e32;
}

/* States */
.loading-state,
.empty-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #b5bac1;
    text-align: center;
}

.loading-state i,
.empty-state i,
.error-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.error-state {
    color: #f23f43;
}

/* Reports */
.reports-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.report-card {
    background: #2b2d31;
    border-radius: 8px;
    padding: 16px;
    border-left: 4px solid #5865f2;
}

.report-card.pending {
    border-left-color: #f0b232;
}

.report-card.actioned {
    border-left-color: #3ba55d;
}

.report-card.dismissed {
    border-left-color: #6d6f78;
}

.report-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.report-reason {
    font-weight: 600;
    color: #fff;
}

.report-reason i {
    color: #f0b232;
    margin-right: 6px;
}

.report-status {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
}

.status-pending {
    background: rgba(240, 178, 50, 0.2);
    color: #f0b232;
}

.status-actioned {
    background: rgba(59, 165, 93, 0.2);
    color: #3ba55d;
}

.status-dismissed {
    background: rgba(109, 111, 120, 0.2);
    color: #b5bac1;
}

.report-message {
    background: #1e1f22;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.report-message-author {
    font-size: 13px;
    color: #b5bac1;
    margin-bottom: 6px;
}

.report-message-content {
    color: #dbdee1;
    white-space: pre-wrap;
    word-break: break-word;
}

.report-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #b5bac1;
    margin-bottom: 12px;
}

.report-meta i {
    margin-right: 4px;
    opacity: 0.7;
}

.report-details {
    font-size: 14px;
    color: #b5bac1;
    margin-bottom: 12px;
    padding: 10px;
    background: #1e1f22;
    border-radius: 4px;
}

.report-actions {
    display: flex;
    gap: 8px;
}

.report-resolution {
    font-size: 13px;
    color: #b5bac1;
    padding-top: 12px;
    border-top: 1px solid #3f4147;
}

/* Search */
.search-form {
    background: #2b2d31;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.search-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.search-row:last-child {
    margin-bottom: 0;
}

.search-actions {
    display: flex;
    gap: 8px;
    padding-top: 8px;
}

.search-results {
    min-height: 200px;
}

.results-count {
    font-size: 13px;
    color: #b5bac1;
    margin-bottom: 16px;
}

.messages-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-result {
    background: #2b2d31;
    border-radius: 6px;
    padding: 12px 16px;
}

.message-result.deleted {
    opacity: 0.6;
    background: #36373d;
}

.message-result-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
}

.message-author {
    color: #fff;
    font-weight: 600;
}

.message-channel {
    color: #b5bac1;
}

.message-time {
    color: #6d6f78;
    margin-left: auto;
}

.deleted-badge {
    background: #da373c;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
}

.message-result-content {
    color: #dbdee1;
    white-space: pre-wrap;
    word-break: break-word;
}

.message-attachments {
    font-size: 12px;
    color: #5865f2;
    margin-top: 6px;
}

.message-result-actions {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #3f4147;
}

/* Logs */
.logs-table {
    background: #2b2d31;
    border-radius: 8px;
    overflow: hidden;
}

.logs-header {
    display: grid;
    grid-template-columns: 160px 120px 120px 100px 1fr 140px;
    gap: 12px;
    padding: 12px 16px;
    background: #1e1f22;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #b5bac1;
}

.log-row {
    display: grid;
    grid-template-columns: 160px 120px 120px 100px 1fr 140px;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #3f4147;
    font-size: 14px;
}

.log-row:last-child {
    border-bottom: none;
}

.log-action {
    color: #fff;
    font-weight: 500;
}

.log-action i {
    margin-right: 6px;
    color: #5865f2;
}

.log-moderator,
.log-target {
    color: #dbdee1;
}

.log-channel,
.log-date {
    color: #b5bac1;
}

.log-reason {
    color: #6d6f78;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Banned Users */
.banned-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.banned-user-card {
    display: grid;
    grid-template-columns: 200px 1fr 150px auto;
    gap: 16px;
    align-items: center;
    background: #2b2d31;
    border-radius: 8px;
    padding: 16px;
}

.banned-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

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

.banned-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #5865f2;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #fff;
}

.banned-user-details {
    display: flex;
    flex-direction: column;
}

.banned-username {
    font-weight: 600;
    color: #fff;
}

.banned-userid {
    font-size: 12px;
    color: #6d6f78;
}

.banned-reason {
    color: #b5bac1;
}

.banned-meta {
    font-size: 13px;
    color: #6d6f78;
}

.banned-actions {
    display: flex;
    gap: 8px;
}

/* Responsive */
@media (max-width: 1200px) {
    .logs-header,
    .log-row {
        grid-template-columns: 140px 100px 100px 80px 1fr 120px;
    }
}

@media (max-width: 900px) {
    .admin-container {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #3f4147;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 8px;
    }

    .nav-item {
        white-space: nowrap;
        margin-bottom: 0;
        margin-right: 4px;
    }

    .sidebar-footer {
        display: none;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .logs-header,
    .log-row {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .banned-user-card {
        grid-template-columns: 1fr;
    }
}

/* Access Denied */
.admin-access-denied {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    color: #b5bac1;
}

.admin-access-denied i {
    font-size: 64px;
    margin-bottom: 24px;
    color: #da373c;
}

.admin-access-denied h2 {
    font-size: 24px;
    color: #fff;
    margin-bottom: 12px;
}

.admin-access-denied p {
    margin-bottom: 24px;
}
