/**
 * Admins Page Styles - Card Grid Layout
 */

.admins-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.admins-header {
    text-align: center;
    margin-bottom: 40px;
}

.admins-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-primary, #fff);
}

.admins-search {
    width: 100%;
    max-width: 600px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary, #fff);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.admins-search:focus {
    outline: none;
    border-color: var(--primary-color, #4a9eff);
    background: rgba(255, 255, 255, 0.08);
}

.admins-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary, #888);
}

.admins-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-primary, #fff);
}

/* Role sections */
.admin-role-section {
    margin-bottom: 50px;
}

.admin-role-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.admin-role-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color, #4a9eff);
    margin: 0;
}

.admin-role-count {
    font-size: 0.9rem;
    color: var(--text-secondary, #888);
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 20px;
}

/* Grid layout for admin cards */
.admins-grid {
    display: grid;
    width: 100%;
    gap: 20px;
    grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 769px) {
    .admins-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .admins-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1441px) {
    .admins-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Admin card styling */
.admin-card {
    position: relative;
    background: var(--card, rgba(255, 255, 255, 0.03));
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-card-header {
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

.admin-avatar {
    width: 120px;
    height: 120px;
    margin-bottom: 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-avatar .avatar_image {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.05);
    position: relative;
    z-index: 0;
}

.admin-avatar .avatar_frame {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    pointer-events: none;
    z-index: 1;
}

.admin-badge {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-badge.owner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.admin-badge.head_admin {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.admin-badge.admin {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.admin-badge.moderator {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
}

.admin-card-body {
    padding: 20px;
}

.admin-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 15px;
    text-align: center;
}

.admin-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary, #aaa);
}

.admin-meta-item svg {
    width: 16px;
    height: 16px;
    fill: var(--primary-color, #4a9eff);
    flex-shrink: 0;
}

.admin-steamid {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.admin-card-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    min-height: 50px;
    background: rgba(255, 255, 255, 0.02);
}

.admin-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary, #fff);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.admin-action-btn svg {
    width: 16px;
    height: 16px;
}

.admin-action-btn.demote {
    color: #ff6b6b;
}

.admin-action-btn.demote:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

.admin-action-btn.promote {
    color: #51cf66;
}

.admin-action-btn.promote:hover {
    background: rgba(81, 207, 102, 0.1);
    border-color: rgba(81, 207, 102, 0.3);
}

.admin-current-level {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color, #4a9eff);
}

/* Hidden class for search filtering */
.admin-card.hidden {
    display: none;
}

.admin-role-section.hidden {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admins-header h1 {
        font-size: 2rem;
    }

    .admin-role-header h2 {
        font-size: 1.4rem;
    }

    .admin-avatar {
        width: 100px;
        height: 100px;
    }

    .admin-name {
        font-size: 1.1rem;
    }
}

/* Tabs */
.admins-tabs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.admin-tab {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary, #fff);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-tab.active {
    background: rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.5);
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Clans Section */
.clans-section {
    width: 100%;
}

.clans-controls {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.btn-create-clan {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid rgba(74, 144, 226, 0.4);
    border-radius: 8px;
    color: #4a90e2;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-create-clan:hover {
    background: rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.6);
}

.clans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.clan-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.clan-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.clan-card-header {
    margin-bottom: 15px;
}

.clan-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid rgba(74, 144, 226, 0.4);
    border-radius: 6px;
    color: #4a90e2;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.clan-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
}

.clan-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 12px 0;
}

.clan-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 12px;
}

.clan-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.clan-meta-item svg {
    width: 18px;
    height: 18px;
}

.clan-card-footer {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary, #fff);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clan-btn svg {
    width: 16px;
    height: 16px;
}

.clan-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.clan-btn-delete {
    color: #ff6b6b;
}

.clan-btn-delete:hover {
    background: rgba(255, 107, 107, 0.1);
    border-color: rgba(255, 107, 107, 0.3);
}

.clans-empty {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.clans-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-large {
    max-width: 800px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

.modal h2 {
    margin-bottom: 25px;
    color: var(--text-primary, #fff);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary, #fff);
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: rgba(74, 144, 226, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.btn-cancel,
.btn-submit {
    flex: 1;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.btn-submit {
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid rgba(74, 144, 226, 0.4);
    color: #4a90e2;
}

.btn-submit:hover {
    background: rgba(74, 144, 226, 0.3);
    border-color: rgba(74, 144, 226, 0.6);
}

.members-controls {
    margin-bottom: 20px;
}

.btn-add-member {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(74, 144, 226, 0.2);
    border: 1px solid rgba(74, 144, 226, 0.4);
    border-radius: 6px;
    color: #4a90e2;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-member:hover {
    background: rgba(74, 144, 226, 0.3);
}

/* Members List */
.members-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.member-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.member-info {
    flex: 1;
}

.member-name {
    font-weight: 600;
    color: var(--text-primary, #fff);
    margin-bottom: 4px;
}

.member-steamid {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.member-role {
    min-width: 120px;
}

.role-select {
    width: 100%;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary, #fff);
    font-size: 0.9rem;
    cursor: pointer;
}

.role-select:focus {
    outline: none;
    border-color: rgba(74, 144, 226, 0.5);
}

.btn-remove-member {
    padding: 8px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 6px;
    color: #ff6b6b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-member:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.4);
}

.btn-remove-member svg {
    width: 18px;
    height: 18px;
    display: block;
}

.members-empty {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.5);
}

/* ====================================
   Tabs Styling
   ==================================== */
.admins-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.admins-tab {
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary, #888);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admins-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.admins-tab.active {
    background: var(--primary-color, #4a9eff);
    border-color: var(--primary-color, #4a9eff);
    color: #fff;
}

.admins-tab-content {
    display: none;
}

.admins-tab-content.active {
    display: block;
}

.admins-search-container {
    text-align: center;
    margin-bottom: 30px;
}

/* ====================================
   Clan Moderators Styling
   ==================================== */
.clan-moderators-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn-add-clan-mod {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color, #4a9eff);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-clan-mod:hover {
    background: var(--primary-hover, #3a8eef);
    transform: translateY(-2px);
}

.clan-moderators-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.clan-mod-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.clan-mod-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.clan-mod-card.hidden {
    display: none;
}

.clan-mod-permissions {
    display: flex;
    gap: 8px;
    margin: 15px 0;
    flex-wrap: wrap;
}

.permission-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-secondary, #888);
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.permission-badge.active {
    background: rgba(74, 158, 255, 0.2);
    border-color: var(--primary-color, #4a9eff);
    color: var(--primary-color, #4a9eff);
}

.permission-badge svg {
    width: 14px;
    height: 14px;
}

.clan-mod-added {
    font-size: 0.85rem;
    color: var(--text-secondary, #888);
    margin-top: 10px;
}

.clan-mod-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-edit-clan-mod,
.btn-remove-clan-mod {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary, #888);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit-clan-mod:hover {
    background: rgba(74, 158, 255, 0.2);
    border-color: var(--primary-color, #4a9eff);
    color: var(--primary-color, #4a9eff);
}

.btn-remove-clan-mod:hover {
    background: rgba(255, 59, 48, 0.2);
    border-color: #ff3b30;
    color: #ff3b30;
}

/* ====================================
   Clan Moderator Modal Styling
   ==================================== */
.clan-mod-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clan-mod-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.clan-mod-modal-content {
    position: relative;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow: auto;
    z-index: 1;
}

.clan-mod-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.clan-mod-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary, #fff);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary, #888);
    cursor: pointer;
    padding: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: var(--text-primary, #fff);
}

.clan-mod-modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary, #fff);
    font-weight: 500;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary, #fff);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color, #4a9eff);
    background: rgba(255, 255, 255, 0.08);
}

.form-group input[type="text"][readonly] {
    opacity: 0.6;
    cursor: not-allowed;
}

.permissions-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.permission-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.permission-checkbox span {
    color: var(--text-primary, #fff);
}

.clan-mod-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color, #4a9eff);
    border: none;
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover, #3a8eef);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #888);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #fff);
}

/* ====================================
   Responsive Design
   ==================================== */
@media (max-width: 768px) {
    .clan-moderators-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .clan-moderators-grid {
        grid-template-columns: 1fr;
    }
    
    .admins-tabs {
        flex-direction: column;
    }
}

/* ====================================
   Enhanced Checkbox Styling
   ==================================== */
.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

.permission-checkbox:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.permission-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.permission-checkbox input[type="checkbox"]:checked {
    background: var(--primary-color, #4a9eff);
    border-color: var(--primary-color, #4a9eff);
}

.permission-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.permission-checkbox input[type="checkbox"]:hover {
    border-color: var(--primary-color, #4a9eff);
}

.permission-checkbox span {
    color: var(--text-primary, #fff);
    font-size: 1rem;
}

.permission-checkbox input[type="checkbox"]:checked + span {
    color: var(--primary-color, #4a9eff);
    font-weight: 500;
}

/* ====================================
   Clan Audit Logs Styling
   ==================================== */
.audit-logs-header {
    margin-bottom: 30px;
}

.audit-logs-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.audit-filter {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary, #fff);
    font-size: 0.95rem;
    min-width: 200px;
}

.audit-filter:focus {
    outline: none;
    border-color: var(--primary-color, #4a9eff);
    background: rgba(255, 255, 255, 0.08);
}

.btn-apply-filters,
.btn-clear-filters {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-apply-filters {
    background: var(--primary-color, #4a9eff);
    border: none;
    color: #fff;
}

.btn-apply-filters:hover {
    background: var(--primary-hover, #3a8eef);
}

.btn-clear-filters {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #888);
}

.btn-clear-filters:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary, #fff);
}

.audit-logs-stats {
    display: flex;
    gap: 30px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.audit-stat {
    color: var(--text-secondary, #888);
    font-size: 0.95rem;
}

.audit-stat strong {
    color: var(--text-primary, #fff);
    font-weight: 600;
}

.audit-logs-table-container {
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

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

.audit-logs-table thead tr {
    background: rgba(255, 255, 255, 0.05);
}

.audit-logs-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary, #fff);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.audit-logs-table td {
    padding: 12px 15px;
    color: var(--text-secondary, #888);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.audit-log-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.audit-log-row.admin-action {
    border-left: 3px solid var(--primary-color, #4a9eff);
}

.audit-log-row.user-action {
    border-left: 3px solid rgba(255, 255, 255, 0.1);
}

.audit-time {
    font-size: 0.9rem;
    white-space: nowrap;
}

.action-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.action-badge.action-create_clan {
    background: rgba(52, 199, 89, 0.2);
    color: #34c759;
}

.action-badge.action-update_clan {
    background: rgba(74, 158, 255, 0.2);
    color: #4a9eff;
}

.action-badge.action-delete_clan {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

.action-badge.action-invite_member,
.action-badge.action-respond_invite_accept {
    background: rgba(52, 199, 89, 0.2);
    color: #34c759;
}

.action-badge.action-kick_member,
.action-badge.action-leave_clan,
.action-badge.action-respond_invite_decline {
    background: rgba(255, 149, 0, 0.2);
    color: #ff9500;
}

.action-badge.action-transfer_owner,
.action-badge.action-request_join {
    background: rgba(175, 82, 222, 0.2);
    color: #af52de;
}

.actor-info,
.target-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.actor-name,
.target-name {
    font-weight: 500;
    color: var(--text-primary, #fff);
}

.actor-steamid,
.target-steamid {
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
    font-family: monospace;
}

.audit-details {
    max-width: 300px;
    white-space: normal;
    word-wrap: break-word;
}

.type-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.type-badge.type-admin {
    background: rgba(74, 158, 255, 0.2);
    color: #4a9eff;
}

.type-badge.type-user {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #888);
}

.audit-ip {
    font-family: monospace;
    font-size: 0.85rem;
}

.text-muted {
    color: var(--text-secondary, #666);
}

.audit-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
}

.pagination-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-primary, #fff);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background: var(--primary-color, #4a9eff);
    border-color: var(--primary-color, #4a9eff);
    transform: translateY(-2px);
}

.pagination-info {
    color: var(--text-secondary, #888);
    font-size: 0.95rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .audit-logs-table {
        font-size: 0.9rem;
    }

    .audit-logs-table th,
    .audit-logs-table td {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .audit-logs-filters {
        flex-direction: column;
    }

    .audit-filter {
        width: 100%;
        min-width: unset;
    }

    .audit-logs-stats {
        flex-direction: column;
        gap: 10px;
    }

    .audit-logs-table-container {
        overflow-x: scroll;
    }

    .audit-logs-table {
        min-width: 800px;
    }
}
