* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.desktop-mode {
    max-width: 100% !important;
    font-size: 16px;
}

body.desktop-mode .container {
    max-width: 1920px !important;
    margin: 0 auto;
}

body.desktop-mode .members-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
}


body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    color: #ffffff;
    line-height: 1.5;
    min-height: 100vh;
}

/* body {
    max-width: 480px;
    margin: 0 auto;
    background: #0a0a0a;
} */

.container {
    padding: 20px 20px 100px 20px; /* увеличили bottom для нижней панели */
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    background: rgba(18, 18, 18, 0.98);
    border-top: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-around;
    padding: 6px 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
    padding: 6px 4px;
    border-radius: 8px;
    transition: all 0.15s;
}

.nav-item:active {
    transform: scale(0.95);
}

.nav-icon-svg {
    width: 22px;
    height: 22px;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.nav-item.active .nav-icon-svg {
    opacity: 1;
}

.nav-label {
    font-size: 0.65rem;
    color: #666;
    font-weight: 500;
}

.nav-item.active .nav-label {
    color: #fff;
}

.nav-avatar-wrapper {
    position: relative;
    width: 22px;
    height: 22px;
}

.nav-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #666;
}

.nav-item.active .nav-avatar {
    border-color: #fff;
}

.notification-badge {
    position: absolute;
    top: 0px;
    right: 5px;
    background: #ff3b30;
    color: white;
    border-radius: 10px;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    border: 1.5px solid #0a0a0a;
    animation: subtlePulse 3s ease-in-out infinite;
    letter-spacing: 0.3px;
}

@keyframes subtlePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.9;
    }
}

.notification-badge.hidden {
    display: none;
}

.nav-item {
    position: relative;
}

.application-approve-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #00d084 0%, #00a86b 100%);
    color: white;
    letter-spacing: 0.5px;
}

.application-approve-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.application-approve-btn:hover::before {
    width: 300px;
    height: 300px;
}

.application-approve-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(0, 208, 132, 0.4),
        0 0 20px rgba(0, 208, 132, 0.3);
}

.application-approve-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.application-reject-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    letter-spacing: 0.5px;
}

.application-reject-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.application-reject-btn:hover::before {
    width: 300px;
    height: 300px;
}

.application-reject-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 25px rgba(255, 65, 108, 0.4),
        0 0 20px rgba(255, 65, 108, 0.3);
}

.application-reject-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* ДОПОЛНИТЕЛЬНАЯ АНИМАЦИЯ ДЛЯ ИКОНОК В КНОПКАХ */
.application-approve-btn .btn-icon,
.application-reject-btn .btn-icon {
    font-size: 1.2em;
    transition: transform 0.3s;
}

.application-approve-btn:hover .btn-icon {
    transform: rotate(15deg) scale(1.1);
}

.application-reject-btn:hover .btn-icon {
    transform: rotate(-15deg) scale(1.1);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 80px;
}


/* СЕКЦИИ КОНТЕНТА */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* ОБЩИЙ ПЛАН */
.plan-section {
    background: #1c1c1e;
    border: 1px solid #2c2c2e;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.plan-header {
    text-align: center;
    margin-bottom: 20px;
}

.plan-header h2 {
    color: #fff;
    margin-bottom: 8px;
}

.plan-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.plan-stat-card {
    background: #2c2c2e;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.plan-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #007aff;
    margin-bottom: 5px;
}

.plan-stat-label {
    font-size: 0.85rem;
    color: #8e8e93;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
    justify-content: center;
}

.admin-btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.admin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.admin-btn-edit {
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    color: white;
}

.admin-btn-coins {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
}

.admin-btn-gci {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
}

.admin-btn-report {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: white;
}

/* СПИСОК ВСЕХ УЧАСТНИКОВ */
.all-members-section {
    margin-top: 30px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.member-mini-card {
    background: #1c1c1e;
    border: 1px solid #2c2c2e;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.member-mini-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,122,255,0.3);
    border-color: #007aff;
}

.member-mini-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2c2c2e;
    margin: 0 auto 12px;
}

.member-mini-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.member-mini-position {
    color: #8e8e93;
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.member-mini-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #2c2c2e;
}

.member-mini-stat {
    text-align: center;
}

.member-mini-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: #007aff;
}

.member-mini-stat-label {
    font-size: 0.65rem;
    color: #8e8e93;
    text-transform: uppercase;
}

.member-mini-class {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 8px;
}

/* .container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
    */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.header p {
    color: #8e8e93;
    font-size: 0.95rem;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    padding: 8px;
    background: rgba(28, 28, 30, 0.6);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.tab-btn {
    background: transparent;
    border: none;
    color: #8e8e93;
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.tab-btn svg {
    width: 18px;
    height: 18px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.tab-btn.active {
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

.tab-btn.active svg {
    opacity: 1;
}

.tab-btn:hover:not(.active) {
    background: rgba(142, 142, 147, 0.12);
    color: #fff;
}

.leaderboard {
    background: #1c1c1e;
    border: 1px solid #2c2c2e;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
}

.leaderboard-header {
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    padding: 15px 20px;
    text-align: center;
    font-weight: 600;
}

.leader-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #2c2c2e;
    transition: all 0.2s;
    cursor: pointer;
}

.leader-item:hover {
    background: #2c2c2e;
}

.leader-item:last-child {
    border-bottom: none;
}

.leader-rank {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #007aff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 15px;
    flex-shrink: 0;
}

.leader-rank.first { 
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%); 
    color: #000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}
.leader-rank.second { 
    background: linear-gradient(135deg, #c0c0c0 0%, #e8e8e8 100%); 
    color: #000;
    box-shadow: 0 0 15px rgba(192, 192, 192, 0.5);
}
.leader-rank.third { 
    background: linear-gradient(135deg, #cd7f32 0%, #e6a157 100%); 
    color: #fff;
    box-shadow: 0 0 15px rgba(205, 127, 50, 0.5);
}

.leader-photo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #2c2c2e;
    margin-right: 15px;
    flex-shrink: 0;
}

.leader-info {
    flex: 1;
    min-width: 0;
}

.leader-name {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leader-position {
    color: #8e8e93;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.leader-class {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 2px;
}


.class-samurai .class-mini-icon {
    filter: brightness(1) invert(1);
    opacity: 1;
}

.class-knights .class-mini-icon,
.class-vikings .class-mini-icon,
.class-spartans .class-mini-icon {
    filter: brightness(1);
    opacity: 0.8;
}

.class-icon-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.leader-score {
    text-align: right;
    font-weight: 600;
    color: #007aff;
    font-size: 1.1rem;
    margin-left: 10px;
    flex-shrink: 0;
}

.profile-btn {
    display: block;
    width: fit-content;
    margin: 0 auto 30px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #34c759 0%, #28a745 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(52, 199, 89, 0.3);
}

.profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 199, 89, 0.4);
}

.btn-row {
    display: flex;
    gap: 5px; /* расстояние между кнопками */
    justify-content: center; /* центрируем по горизонтали */
    margin-bottom: 15px;
}

.add-btn {
    display: block;
    width: fit-content;
    margin: 0 auto 15px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    color: black;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    box-shadow: 0 4px 15px rgba(120, 126, 133, 0.3);
}

.add-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(159, 173, 189, 0.4);
}

.employees-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.employees-list-desktop {
    max-height: 600px;
    overflow-y: auto;
}

.employee-card {
    background: #1c1c1e;
    border: 1px solid #2c2c2e;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
}

.employee-card:hover {
    box-shadow: 0 4px 20px rgba(0,122,255,0.2);
    border-color: #007aff;
}

.employee-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #2c2c2e;
    flex-shrink: 0;
}

.employee-info {
    flex: 1;
    cursor: pointer;
    min-width: 0;
}

.employee-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.employee-position {
    color: #8e8e93;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.employee-class {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 4px;
}

.employee-telegram {
    color: #007aff;
    font-size: 0.8rem;
    margin-top: 2px;
}

.employee-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #007aff;
}

.stat-label {
    font-size: 0.75rem;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.style-badge {
    background: #2c2c2e;
    color: #8e8e93;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 500;
}

.style-badge.style-1 { background: linear-gradient(45deg, #333, #555); color: #fff; }
.style-badge.style-2 { background: linear-gradient(45deg, #667eea, #764ba2); color: #fff; }
.style-badge.style-3 { background: linear-gradient(45deg, #00ff00, #00ffff); color: #000; }
.style-badge.style-4 { background: linear-gradient(45deg, #ff6b9d, #ffa8e4); color: #fff; }
.style-badge.style-5 { background: linear-gradient(45deg, #9c27b0, #e1bee7); color: #fff; }
.style-badge.style-6 { background: linear-gradient(45deg, #ff9800, #ffcc02); color: #000; }
.style-badge.style-7 { background: linear-gradient(45deg, #00bcd4, #4dd0e1); color: #fff; }

.action-btns {
    display: flex;
    gap: 5px; /* расстояние между кнопками */
    flex-wrap: wrap; /* если не помещаются, переносятся */
    justify-content: center;
}

.edit-btn, .moderate-btn {
    border: none;
    padding: 5px 10px; /* поменьше */
    border-radius: 6px;
    font-size: 0.75rem; /* чуть меньше текста */
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 5px; /* расстояние между кнопками */
    color: #fff;
}


.edit-btn {
    background: #228a3aff;
    color: white;
}

.edit-btn:hover {
    background: #1d682eff;
    transform: scale(1.05);
}

.moderate-btn {
    background: #ff9500;
    color: white;
}

.moderate-btn:hover {
    background: #e8940e;
    transform: scale(1.05);
}

/* Модальные окна */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #1c1c1e;
    border-radius: 12px;
    padding: 24px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #2c2c2e;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffffff;
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #8e8e93;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #ffffff;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #2c2c2e;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
    background: #2c2c2e;
    color: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.1);
}

.form-control option {
    background: #2c2c2e;
    color: #fff;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.photo-upload-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.photo-upload {
    border: 2px dashed #2c2c2e;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    background: #2c2c2e;
}

.photo-upload:hover {
    border-color: #007aff;
}

.photo-upload input {
    display: none;
}

.photo-preview {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    display: none;
}

.photo-preview.background {
    border-radius: 8px;
}

.submit-btn {
    width: 100%;
    padding: 12px;
    background: #007aff;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover {
    background: #0056b3;
}

.delete-btn {
    background: #ff3b30;
    margin-top: 10px;
}

.delete-btn:hover {
    background: #d70015;
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
    color: #8e8e93;
}

.loading-img {
    width: 160px;
    height: 160px;
    margin-bottom: 24px;
}

.loading-text {
    font-size: 16px;
    color: #8e8e93;
    margin: 0;
}

.access-denied {
    text-align: center;
    color: #ff3b30;
    padding: 40px;
}

@media (min-width: 200px) {
    .employee-card {
        flex-direction: column;
        text-align: center;
    }
    
    .employee-stats {
        justify-content: center;
    }
    
    .form-row, .photo-upload-group {
        grid-template-columns: 1fr;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .leader-item {
        flex-wrap: wrap;
    }
    
    .leader-score {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    .stars-breakdown {
            display: flex;
        gap: 8px;
        margin-top: 10px;
        padding: 10px;
        background: rgba(25, 25, 25, 0.5);
        border-radius: 8px;
        flex-wrap: wrap;
    }

    .star-type {
        display: flex;
        align-items: center;
        gap: 4px;
        padding: 4px 8px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 6px;
        border: 1px solid #2c2c2e;
    }

    .star-icon {
        font-size: 1.2em;
    }

    .star-count {
        font-weight: 600;
        color: #FFD700;
        font-size: 0.9em;
    }
    .employee-card-compact {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px;
        background: #1c1c1e;
        border: 1px solid #2c2c2e;
        border-radius: 12px;
        margin-bottom: 10px;
        transition: all 0.2s;
        position: relative;
    }

    .employee-card-compact:hover {
        border-color: #007aff;
        transform: translateX(5px);
        box-shadow: 0 4px 15px rgba(0,122,255,0.2);
    }

    .rank-badge {
        width: 35px;
        height: 35px;
        background: linear-gradient(135deg, #007aff, #0056b3);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1.1em;
        color: white;
        flex-shrink: 0;
    }

    .employee-photo-compact {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #2c2c2e;
        flex-shrink: 0;
    }

    .employee-details-compact {
        flex: 1;
        cursor: pointer;
        min-width: 0;
    }

    .employee-name-compact {
        font-size: 1em;
        font-weight: 600;
        color: #ffffff;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .employee-id-compact {
        font-size: 0.75em;
        color: #8e8e93;
        margin-top: 2px;
    }

    .employee-class-compact {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 10px;
        border-radius: 8px;
        font-size: 0.7rem;
        font-weight: 600;
        margin-top: 4px;
        background: #2c2c2e;
        border: 1px solid #3a3a3c;
        color: #8e8e93;
    }

    .class-mini-icon {
        width: 18px;
        height: 18px;
        object-fit: contain;
        filter: brightness(0) invert(1);
        /* opacity: 0.9; */
    }

    .mini-stats-row {
        display: flex;
        gap: 10px;
        margin-top: 6px;
        flex-wrap: wrap;
    }

    .mini-stat {
        font-size: 0.75em;
        color: #007aff;
        font-weight: 600;
    }

    .mini-stat.gold {
        color: #FFD700;
    }

    .mini-stat.green {
        color: #1ca34a;
    }

    .admin-actions-compact {
        display: flex;
        gap: 5px;
        flex-shrink: 0;
    }

    .admin-btn-mini {
        width: 35px;
        height: 35px;
        border: none;
        border-radius: 8px;
        font-size: 1.2em;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #2c2c2e;
    }

    .admin-btn-mini:hover {
        transform: scale(1.1);
    }

    .admin-btn-edit:hover {
        background: #34c759;
    }

    .admin-btn-coins:hover {
        background: #FFD700;
    }

    .stars-breakdown-mini {
        display: flex;
        gap: 6px;
        margin-top: 6px;
        flex-wrap: wrap;
    }

    .stars-breakdown-mini span {
        font-size: 0.7em;
        padding: 2px 6px;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 4px;
        border: 1px solid #2c2c2e;
    }

    .admin-btn-gci {
        background: #2c2c2e;
    }

    .admin-btn-gci:hover {
        background: #134122;
    }
    .employee-card-new {
        display: flex;
        flex-direction: column;
        background: #1c1c1e;
        border: 1px solid #2c2c2e;
        border-radius: 12px;
        padding: 12px;
        margin-bottom: 12px;
        transition: all 0.3s;
        position: relative;
    }

    .employee-card-new:hover {
        border-color: #007aff;
        box-shadow: 0 4px 15px rgba(0,122,255,0.2);
    }

    .class-header {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
        padding: 6px 10px;
        border-radius: 8px;
        width: fit-content;
        background: #2c2c2e;
        border: 1px solid #3a3a3c;
    }

    .class-header.knights,
    .class-header.vikings,
    .class-header.samurai,
    .class-header.spartans {
        background: #2c2c2e;
    }

    .class-icon-small {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

    .class-header.knights .class-icon-small,
    .class-header.vikings .class-icon-small,
    .class-header.spartans .class-icon-small {
        filter: brightness(1) invert(0) opacity(0.8);
    }

    .class-header.samurai .class-icon-small {
        filter: brightness(1) invert(1) opacity(0.8);
    }

    .class-name-small {
        font-weight: 600;
        font-size: 0.85em;
        color: #8e8e93;
    }

    .employee-main-row {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .rank-circle {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1.1em;
        flex-shrink: 0;
        border: 2px solid;
        transition: all 0.2s;
    }

    .rank-circle.rank-1 {
        background: #2c2c2e;
        border-color: #8e8e93;
        color: #FFD700;
    }

    .rank-circle.rank-2 {
        background: #2c2c2e;
        border-color: #8e8e93;
        color: #C0C0C0;
    }

    .rank-circle.rank-3 {
        background: #2c2c2e;
        border-color: #8e8e93;
        color: #CD7F32;
    }

    .rank-circle.rank-other {
        background: #1c1c1e;
        border-color: #3a3a3c;
        color: #8e8e93;
    }
    .divider-line {
        width: 2px;
        height: 50px;
        background: linear-gradient(180deg, transparent, #007aff, transparent);
        flex-shrink: 0;
    }
    .employee-avatar-new {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid #2c2c2e;
        flex-shrink: 0;
    }

    /* Информация справа от аватарки */
    .employee-info-new {
        flex: 1;
        min-width: 0;
        cursor: pointer;
    }

    .employee-header-row {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        margin-bottom: 4px;
    }

    .employee-name-new {
        font-size: 1.05em;
        font-weight: 700;
        color: #fff;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .employee-id-badge {
        font-size: 0.7em;
        color: #666;
        font-weight: 500;
    }

    .employee-position-new {
        font-size: 0.85em;
        color: #8e8e93;
        margin-bottom: 6px;
    }

    /* Статистика в одну строку */
    .stats-inline {
        display: flex;
        gap: 12px;
        flex-wrap: wrap;
        margin-bottom: 8px;
    }

    .stat-item-inline {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 0.8em;
    }

    .stat-label-inline {
        color: #8e8e93;
    }

    .stat-value-inline {
        font-weight: 700;
        color: #fff;
    }

    .stat-value-inline.gold {
        color: #FFD700;
    }

    .stat-value-inline.green {
        color: #34c759;
    }

    .stat-value-inline.blue {
        color: #007aff;
    }

    .stat-value-inline.stars {
        color: #FFD700;
    }

    .action-btn-new {
        flex: 1;
        padding: 8px 12px;
        border: 1px solid #3a3a3c;
        border-radius: 8px;
        font-size: 0.8em;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        background: #2c2c2e;
    }

    .action-btn-edit {
        color: #bebebe;
    }

    .action-btn-edit:hover {
        background: #52c75920;
        border-color: #52c759;
    }

    .action-btn-coins {
        color: #b8860b;
    }

    .action-btn-coins:hover {
        background: #b8860b20;
        border-color: #b8860b;
    }

    .action-btn-gci {
        color: #5a9acc;
    }

    .action-btn-gci:hover {
        background: #5a9acc20;
        border-color: #5a9acc;
    }

    .action-btn-new:hover {
        transform: translateY(-1px);
    }

    .action-btn-new:active {
        transform: translateY(0);
    }
    .employee-right-info {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 3px;
    }

    .employee-stars-badge {
        font-size: 0.7em;
        color: #b8860b;
        font-weight: 700;
        display: flex;
        align-items: center;
        gap: 2px;
        padding: 2px 6px;
        background: rgba(184, 134, 11, 0.15);
        border-radius: 6px;
        border: 1px solid rgba(184, 134, 11, 0.3);
    }
    .class-filter-footer {
        position: fixed;
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: 440px;
        background: rgba(28, 28, 30, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid #2c2c2e;
        border-radius: 16px;
        padding: 8px;
        display: flex;
        justify-content: space-around;
        gap: 8px;
        z-index: 999;
    }

    .filter-item {
        flex: 1;
        max-width: 60px;
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(44, 44, 46, 0.5);
        border: 2px solid transparent;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.2s;
        padding: 8px;
    }

    .filter-item:hover {
        background: rgba(44, 44, 46, 0.8);
    }

    .filter-item.active {
        background: rgba(0, 122, 255, 0.2);
        border-color: #007aff;
    }

    .filter-icon {
        width: 24px;
        height: 24px;
        stroke: #8e8e93;
    }

    .filter-item.active .filter-icon {
        stroke: #007aff;
    }

    .filter-icon-img {
        width: 28px;
        height: 28px;
        object-fit: contain;
        filter: brightness(0) invert(0.5);
        opacity: 0.7;
        transition: all 0.2s;
    }

    .filter-item.active .filter-icon-img {
        opacity: 1;
        transform: scale(1.1);
    }
    #leaderboardSection .class-filter-footer {
        position: fixed;
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: 440px;
        background: rgba(28, 28, 30, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid #2c2c2e;
        border-radius: 16px;
        padding: 8px;
        display: flex;
        justify-content: space-around;
        gap: 8px;
        z-index: 999;
    }

    #membersSection .class-filter-footer {
        position: fixed;
        bottom: 70px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 40px);
        max-width: 440px;
        background: rgba(28, 28, 30, 0.95);
        backdrop-filter: blur(10px);
        border: 1px solid #2c2c2e;
        border-radius: 16px;
        padding: 8px;
        display: flex;
        justify-content: space-around;
        gap: 8px;
        z-index: 999;
    }

    /* Скрываем футер когда секция неактивна */
    .content-section:not(.active) .class-filter-footer {
        display: none;
    }
    .leaderboard-filter-bar {
        display: flex;
        justify-content: space-around;
        gap: 8px;
        margin-bottom: 20px;
        padding: 8px;
        background: rgba(28, 28, 30, 0.6);
        border-radius: 12px;
        border: 1px solid #2c2c2e;
    }

    .filter-metric {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 10px 8px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.2s;
        background: transparent;
    }

    .filter-metric:hover {
        background: rgba(44, 44, 46, 0.5);
    }

    .filter-metric.active {
        background: rgba(0, 122, 255, 0.2);
        border: 1px solid #007aff;
    }

    .metric-icon {
        width: 20px;
        height: 20px;
        color: #8e8e93;
        transition: color 0.2s;
    }

    .filter-metric.active .metric-icon {
        color: #007aff;
    }

    .filter-metric span {
        font-size: 0.75em;
        color: #8e8e93;
        font-weight: 600;
    }

    .filter-metric.active span {
        color: #007aff;
    }
    .achievement-card {
        background: #1c1c1e;
        border: 2px solid #2c2c2e;
        border-radius: 12px;
        padding: 12px;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s;
        position: relative;
    }

    .achievement-card:hover {
        border-color: #007aff;
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0,122,255,0.3);
    }

    .achievement-card img {
        width: 100%;
        aspect-ratio: 1;
        object-fit: cover;
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .achievement-card-name {
        font-size: 0.75em;
        color: #fff;
        font-weight: 600;
        margin-top: 6px;
    }

    .achievement-card-desc {
        font-size: 0.65em;
        color: #8e8e93;
        margin-top: 4px;
    }

    .current-achievement-item {
        background: #2c2c2e;
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 12px;
        display: flex;
        gap: 15px;
        align-items: center;
        border: 1px solid #3a3a3c;
    }

    .current-achievement-item img {
        width: 60px;
        height: 60px;
        border-radius: 8px;
        object-fit: cover;
    }

    .achievement-info-section {
        flex: 1;
    }

    .achievement-progress-wrapper {
        margin-top: 8px;
    }

    .achievement-progress-bar-full {
        width: 100%;
        height: 8px;
        background: rgba(255,255,255,0.1);
        border-radius: 4px;
        overflow: hidden;
        margin-bottom: 4px;
    }

    .achievement-progress-fill-full {
        height: 100%;
        background: linear-gradient(90deg, #FFD700, #FFA500);
        border-radius: 4px;
        transition: width 0.3s;
    }

    .achievement-progress-text-full {
        font-size: 0.75em;
        color: #FFD700;
        font-weight: 600;
    }

    .achievement-actions {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .achievement-btn {
        padding: 8px 16px;
        border: none;
        border-radius: 8px;
        font-size: 0.85em;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
    }

    .achievement-btn-delete {
        background: linear-gradient(135deg, #ff3b30 0%, #d70015 100%);
        color: white;
    }

    .achievement-btn-delete:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(255, 59, 48, 0.4);
    }

    .achievement-btn-progress {
        background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
        color: white;
    }

    .achievement-btn-progress:hover {
        transform: scale(1.05);
    }
    .actions-row {
        display: flex;
        gap: 8px;
        margin-top: 8px;
        position: relative;
        z-index: 10;
    }
    #achievementsModal .modal-content {
        max-width: 600px;
        max-height: 80vh;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    #achievementsModal .modal-body {
        overflow-y: auto;
        overflow-x: hidden;
        padding: 20px;
        flex: 1;
    }

    /* Секция доступных достижений - минималистично */
    .achievements-section {
        background: transparent;
        padding: 0;
        margin-bottom: 25px;
    }

    .achievements-section h3 {
        font-size: 0.9em;
        color: #8e8e93;
        margin-bottom: 12px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Карточки достижений - минималистично */
    .achievement-card-mini {
        background: #2c2c2e;
        border: 1px solid #3a3a3c;
        border-radius: 8px;
        padding: 10px;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s;
    }

    .achievement-card-mini:hover {
        border-color: #007aff;
        background: #3a3a3c;
    }

    .achievement-card-mini img {
        width: 100%;
        aspect-ratio: 1;
        object-fit: cover;
        border-radius: 6px;
        margin-bottom: 6px;
    }

    .achievement-card-mini-name {
        font-size: 0.7em;
        color: #fff;
        font-weight: 500;
    }

    /* Список текущих достижений - компактно */
    .current-achievement-compact {
        background: #2c2c2e;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 10px;
        display: flex;
        gap: 12px;
        align-items: center;
        border: 1px solid #3a3a3c;
    }

    .current-achievement-compact img {
        width: 50px;
        height: 50px;
        border-radius: 6px;
        object-fit: cover;
        flex-shrink: 0;
    }

    .achievement-compact-info {
        flex: 1;
        min-width: 0;
    }

    .achievement-compact-name {
        font-size: 0.85em;
        font-weight: 600;
        color: #fff;
        margin-bottom: 4px;
    }

    .achievement-compact-progress {
        font-size: 0.75em;
        color: #FFD700;
    }

    /* Минималистичные кнопки действий */
    .achievement-compact-actions {
        display: flex;
        gap: 6px;
        flex-shrink: 0;
    }

    .achievement-action-btn {
        width: 32px;
        height: 32px;
        border: 1px solid #3a3a3c;
        background: transparent;
        border-radius: 6px;
        cursor: pointer;
        font-size: 1em;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s;
    }

    .achievement-action-btn:hover {
        background: #3a3a3c;
    }

    .achievement-action-btn.delete:hover {
        background: #ff3b30;
        border-color: #ff3b30;
    }

    .achievement-action-btn.progress:hover {
        background: #007aff;
        border-color: #007aff;
    }

    /* Модалка подтверждения добавления достижения */
    #confirmAchievementModal {
        z-index: 1001;
    }

    #confirmAchievementModal .modal-content {
        max-width: 400px;
        padding: 20px;
    }

    .confirm-achievement-preview {
        text-align: center;
        margin-bottom: 20px;
    }

    .confirm-achievement-preview img {
        width: 100px;
        height: 100px;
        border-radius: 12px;
        object-fit: cover;
        margin-bottom: 12px;
    }

    .confirm-achievement-name {
        font-size: 1.1em;
        font-weight: 600;
        color: #fff;
        margin-bottom: 8px;
    }

    .confirm-buttons {
        display: flex;
        gap: 10px;
    }

    .confirm-btn {
        flex: 1;
        padding: 12px;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
    }

    .confirm-btn.primary {
        background: #007aff;
        color: white;
    }

    .confirm-btn.primary:hover {
        background: #0056b3;
    }

    .confirm-btn.secondary {
        background: #3a3a3c;
        color: #fff;
    }

    .confirm-btn.secondary:hover {
        background: #4a4a4c;
    }
}