/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2);
}

/* Container */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.2);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.logo i {
    font-size: 2rem;
    color: #5865F2;
}

.logo h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    margin-bottom: 30px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.bot-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bot-details h3 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.bot-status {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.nav-menu ul {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 10px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: #b9bbbe;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-menu li.active a {
    background: rgba(88, 101, 242, 0.2);
    color: #5865F2;
    border-left: 3px solid #5865F2;
}

.server-info {
    margin-top: auto;
    padding: 15px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
}

.server-info h4 {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: #b9bbbe;
}

.server-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.server-stat code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 5px;
}

.status-indicator.online {
    background: #2ecc71;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 20px;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    margin-bottom: 30px;
}

.header-left h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.header-left p {
    color: #b9bbbe;
    font-size: 0.9rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #b9bbbe;
}

.search-box input {
    padding: 10px 15px 10px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    width: 300px;
}

.search-box input:focus {
    outline: none;
    border-color: #5865F2;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4752C4 0%, #3C45A5 100%);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-info p {
    color: #b9bbbe;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    padding: 25px;
    margin-bottom: 30px;
}

.quick-actions h3 {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-btn {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.action-btn i {
    font-size: 1.5rem;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    margin-bottom: 20px;
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Roles Container */
.roles-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.roles-table, .role-permissions {
    padding: 20px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-actions {
    display: flex;
    gap: 10px;
}

.table-actions input {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    width: 200px;
}

.table-content {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(255, 255, 255, 0.05);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

th {
    font-weight: 500;
    color: #b9bbbe;
    font-size: 0.9rem;
}

.role-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 8px;
    vertical-align: middle;
}

.role-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Permissions List */
.permissions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.permission-name {
    font-weight: 500;
}

.permission-desc {
    color: #b9bbbe;
    font-size: 0.9rem;
}

/* Channels */
.channels-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.channel-card {
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.channel-card:hover {
    transform: translateY(-5px);
    border-color: #5865F2;
}

.channel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.channel-type {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.channel-type.text {
    background: rgba(88, 101, 242, 0.2);
    color: #5865F2;
}

.channel-type.voice {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.channel-type.category {
    background: rgba(155, 89, 182, 0.2);
    color: #9b59b6;
}

.channel-info p {
    color: #b9bbbe;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.channel-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.channel-stats {
    padding: 20px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* Members Section */
.members-container {
    padding: 20px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.member-card {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.member-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info h4 {
    margin-bottom: 5px;
}

.member-tag {
    color: #b9bbbe;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.member-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.role-tag {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.8rem;
}

.member-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
}

.role-manager {
    margin-top: 20px;
}

.role-selector {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 10px;
}

.role-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
}

.role-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Music Section */
.music-controls, .music-commands {
    padding: 25px;
    margin-bottom: 20px;
}

.settings-grid, .commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.setting-item label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.features-list {
    list-style: none;
    margin-top: 20px;
}

.features-list li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.command {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.command code {
    display: block;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
    border-radius: 6px;
    margin-bottom: 8px;
}

/* Settings */
.settings-container {
    padding: 20px;
}

.settings-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
}

.setting-card {
    padding: 20px;
}

.setting-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.setting-card p {
    color: #b9bbbe;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.setting-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.setting-options textarea,
.setting-options select {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: 'Poppins', sans-serif;
}

.setting-options textarea {
    min-height: 100px;
    resize: vertical;
}

.time-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.time-selector input {
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.log-events {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #5865F2;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.1);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: 'Poppins', sans-serif;
}

.form-group input[type="color"] {
    height: 40px;
    padding: 5px;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
}

.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.permission-checkbox:hover {
    background: rgba(255, 255, 255, 0.1);
}

.display-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* Edit Modal */
#edit-role-modal .modal-content,
#edit-channel-modal .modal-content,
#assign-role-modal .modal-content {
    max-width: 600px;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border-left: 4px solid;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
    z-index: 1001;
}

.notification.success {
    border-left-color: #2ecc71;
}

.notification.error {
    border-left-color: #e74c3c;
}

.notification.info {
    border-left-color: #3498db;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading States */
.loading {
    text-align: center;
    padding: 20px;
    color: #b9bbbe;
}

.loading i {
    margin-right: 10px;
}

.loading-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 15px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 80px;
        padding: 15px;
    }
    
    .logo h2,
    .bot-details,
    .nav-menu a span,
    .server-info h4,
    .server-stat span:first-child {
        display: none;
    }
    
    .logo {
        justify-content: center;
    }
    
    .bot-info {
        justify-content: center;
        padding: 10px;
    }
    
    .bot-avatar {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .nav-menu a {
        justify-content: center;
        padding: 12px;
    }
    
    .server-info {
        padding: 10px;
    }
    
    .roles-container,
    .channels-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo {
        margin-bottom: 0;
    }
    
    .bot-info,
    .server-info {
        display: none;
    }
    
    .nav-menu ul {
        display: flex;
        gap: 10px;
    }
    
    .nav-menu li {
        margin-bottom: 0;
    }
    
    .main-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .header-right {
        width: 100%;
        justify-content: center;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .members-grid,
    .settings-cards {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Tags and Badges */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 2px;
}

.tag.bot {
    background: rgba(88, 101, 242, 0.2);
    color: #5865F2;
}

.tag.admin {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.tag.moderator {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
}

/* Member Management Specific */
.member-management {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.member-filters {
    padding: 20px;
    margin-bottom: 20px;
}

.filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9rem;
    color: #b9bbbe;
}

.filter-group select {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    min-width: 150px;
}

/* Role Assignment Modal */
.role-list-modal {
    max-height: 400px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin: 15px 0;
}

.role-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    cursor: pointer;
}

.role-check-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.role-check-color {
    width: 15px;
    height: 15px;
    border-radius: 4px;
}

/* Channel Edit Modal */
.channel-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.channel-setting-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.channel-setting-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

/* Loading Animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #5865F2;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #b9bbbe;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: white;
}

/* Confirmation Dialog */
.confirm-dialog {
    text-align: center;
    padding: 20px;
}

.confirm-dialog p {
    margin-bottom: 20px;
    color: #b9bbbe;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* ... (previous styles remain the same) ... */

/* New Styles for Enhanced Features */

/* Color Picker */
.color-picker {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 2px;
    cursor: pointer;
}

.color-picker input[type="text"] {
    flex: 1;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-family: monospace;
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Members Filters */
.members-filters {
    padding: 20px;
    margin-bottom: 20px;
}

.filter-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9rem;
    color: #b9bbbe;
    display: flex;
    align-items: center;
    gap: 5px;
}

.filter-group input,
.filter-group select {
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
}

.filter-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Members Container */
.members-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.members-table {
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.table-content {
    flex: 1;
    overflow-y: auto;
}

.table-footer {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Member Details */
.member-details {
    height: fit-content;
    position: sticky;
    top: 20px;
}

.empty-details {
    text-align: center;
    padding: 40px 20px;
    color: #b9bbbe;
}

.empty-details i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* Member Row Styles */
.member-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

.member-row:hover {
    background: rgba(255, 255, 255, 0.05);
}

.member-row.selected {
    background: rgba(88, 101, 242, 0.1);
    border-left: 3px solid #5865F2;
}

.member-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
}

.member-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-info-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-name {
    font-weight: 500;
}

.member-tag {
    font-size: 0.8rem;
    color: #b9bbbe;
}

/* Roles in Table */
.roles-cell {
    max-width: 300px;
}

.role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.role-badge {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.role-badge-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* Member Details View */
.member-details-view {
    padding: 20px;
}

.member-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.member-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.member-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-basic-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.member-basic-info .member-tag {
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.member-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #5865F2;
}

.stat-label {
    font-size: 0.8rem;
    color: #b9bbbe;
}

/* Role Permissions in Edit Modal */
.permissions-section {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 10px;
}

.permission-category {
    margin-bottom: 20px;
}

.permission-category h5 {
    margin-bottom: 10px;
    color: #b9bbbe;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Bulk Assignment Modal */
.bulk-assign-content {
    max-height: 500px;
    overflow-y: auto;
}

.selection-summary {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.selection-summary h4 {
    margin-bottom: 10px;
    color: #5865F2;
}

.selected-members-list {
    max-height: 150px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-top: 10px;
}

.selected-member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 5px;
}

.role-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 15px 0;
}

.role-selection-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.role-selection-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.role-selection-item.selected {
    background: rgba(88, 101, 242, 0.2);
    border: 1px solid #5865F2;
}

.role-color-indicator {
    width: 15px;
    height: 15px;
    border-radius: 4px;
}

/* Action Buttons in Tables */
.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-icon-small {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Checkbox Styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5865F2;
}

/* Loading States */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 15px;
}

.loading-spinner-large {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #5865F2;
    animation: spin 1s linear infinite;
}

/* Role Actions Guide */
.role-actions-guide {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.role-actions-guide ul {
    list-style: none;
    margin-top: 10px;
}

.role-actions-guide li {
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #b9bbbe;
}

/* Responsive Design for New Features */
@media (max-width: 1024px) {
    .members-container {
        grid-template-columns: 1fr;
    }
    
    .member-details {
        position: static;
        margin-top: 20px;
    }
    
    .filter-controls {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .btn-icon-small {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }
    
    .header-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .header-actions button {
        width: 100%;
    }
}

/* Animation for modal content */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-content {
    animation: modalSlideIn 0.3s ease-out;
}

/* Custom scrollbar for dropdowns */
.permissions-section::-webkit-scrollbar,
.selected-members-list::-webkit-scrollbar {
    width: 6px;
}

.permissions-section::-webkit-scrollbar-track,
.selected-members-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.permissions-section::-webkit-scrollbar-thumb,
.selected-members-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Hover effects for interactive elements */
.interactive-item {
    transition: all 0.2s ease;
}

.interactive-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Status indicators */
.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.online {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.status-badge.offline {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
}

.status-badge.idle {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

.status-badge.dnd {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* Confirmation dialog */
.confirmation-dialog {
    text-align: center;
    padding: 20px;
}

.confirmation-dialog .dialog-icon {
    font-size: 3rem;
    color: #f1c40f;
    margin-bottom: 15px;
}

.confirmation-dialog .dialog-message {
    margin-bottom: 20px;
    line-height: 1.5;
}

.confirmation-dialog .dialog-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #5865F2, #764ba2);
    transition: width 0.3s ease;
}

/* Badge for member count */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    background: #5865F2;
    color: white;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Tooltip enhancements */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    font-size: 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 8px;
    pointer-events: none;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Color input validation */
.color-input.invalid {
    border-color: #e74c3c !important;
}

.color-input.valid {
    border-color: #2ecc71 !important;
}

/* Role preview in modal */
.role-preview {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
}

.role-preview .preview-role {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

.role-preview-color {
    width: 15px;
    height: 15px;
    border-radius: 4px;
}

/* Empty state styling */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #b9bbbe;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h4 {
    margin-bottom: 10px;
    color: white;
}

/* Success/Error message styling */
.message-box {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-box.success {
    background: rgba(46, 204, 113, 0.1);
    border-left: 4px solid #2ecc71;
    color: #2ecc71;
}

.message-box.error {
    background: rgba(231, 76, 60, 0.1);
    border-left: 4px solid #e74c3c;
    color: #e74c3c;
}

.message-box.info {
    background: rgba(52, 152, 219, 0.1);
    border-left: 4px solid #3498db;
    color: #3498db;
}

/* Quick actions in tables */
.quick-action-group {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.quick-action-btn {
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Role management specific */
.role-management-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.role-stats {
    display: flex;
    gap: 15px;
}

.role-stat {
    text-align: center;
}

.role-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #5865F2;
}

.role-stat-label {
    font-size: 0.8rem;
    color: #b9bbbe;
}

/* Member selection styles */
.selection-indicator {
    width: 8px;
    height: 8px;
    background: #5865F2;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.selected-count {
    background: #5865F2;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Animation for row selection */
@keyframes highlightRow {
    0% {
        background: rgba(88, 101, 242, 0.3);
    }
    100% {
        background: rgba(88, 101, 242, 0.1);
    }
}

.member-row.selected {
    animation: highlightRow 0.5s ease;
}

/* Responsive table for mobile */
@media (max-width: 768px) {
    .table-responsive {
        display: block;
        overflow-x: auto;
    }
    
    .members-table table {
        min-width: 600px;
    }
    
    .role-badges {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
    }
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.2) 50%, 
        rgba(255, 255, 255, 0.1) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 12px;
    margin: 5px 0;
}

.skeleton-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}