/* ============================================================
   АДМИН-ПАНЕЛЬ — СТИЛИ
   ============================================================ */

/* ===== ШАПКА АДМИНКИ (красная) ===== */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: linear-gradient(180deg, rgba(14,14,16,0.6) 0%, rgba(14,14,16,0.4) 70%, rgba(14,14,16,0.2) 100%);
    backdrop-filter: blur(10px);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.admin-logo {
    font-size: 24px;
    font-weight: 800;
    color: #e2604f;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    gap: 8px;
    animation: logoPulse 3s ease-in-out infinite;
    text-decoration: none;
}

/* ===== ЗАГОЛОВОК СТРАНИЦЫ ===== */
.admin-page-header {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease;
}
.admin-page-title {
    font-size: 38px;
    font-weight: 900;
    background: linear-gradient(135deg, #e2604f, #ff8800, #e2604f);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease infinite;
}
@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== СТАТИСТИКА (4 карточки) ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
.stat-card {
    background: rgba(24,24,27,0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(214,175,106, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.stat-card:hover::before { opacity: 1; }
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.2s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }
.stat-card:hover {
    transform: translateY(-8px);
    background: rgba(32,32,36,0.6);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}
.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: #d6af6a;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}
.stat-card:hover .stat-number { transform: scale(1.1); }
.stat-label { color: #889; font-size: 14px; }
.stat-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 8px;
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ===== СЕТКА КАРТОЧЕК ДЕЙСТВИЙ ===== */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}
.admin-card-wrapper {
    animation: fadeInUp 0.7s ease forwards;
    opacity: 0;
}
.admin-card-wrapper:nth-child(1)  { animation-delay: 0.3s; }
.admin-card-wrapper:nth-child(2)  { animation-delay: 0.35s; }
.admin-card-wrapper:nth-child(3)  { animation-delay: 0.4s; }
.admin-card-wrapper:nth-child(4)  { animation-delay: 0.45s; }
.admin-card-wrapper:nth-child(5)  { animation-delay: 0.5s; }
.admin-card-wrapper:nth-child(6)  { animation-delay: 0.55s; }
.admin-card-wrapper:nth-child(7)  { animation-delay: 0.6s; }
.admin-card-wrapper:nth-child(8)  { animation-delay: 0.65s; }
.admin-card-wrapper:nth-child(9)  { animation-delay: 0.7s; }
.admin-card-wrapper:nth-child(10) { animation-delay: 0.75s; }
.admin-card-wrapper:nth-child(11) { animation-delay: 0.8s; }
.admin-card-wrapper:nth-child(12) { animation-delay: 0.85s; }

.admin-card {
    background: rgba(24,24,27,0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}
.admin-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(214,175,106, 0.05) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}
.admin-card:hover::before { opacity: 1; }
.admin-card:hover {
    transform: translateY(-10px) scale(1.02);
    background: rgba(32,32,36,0.6);
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    border-color: rgba(255,255,255,0.15);
}
.admin-card .icon {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    animation: float 3s ease-in-out infinite;
    transition: transform 0.3s ease;
}
.admin-card:hover .icon { transform: scale(1.15) rotate(-5deg); }
.admin-card .name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}
.admin-card .desc {
    color: #85807a;
    font-size: 14px;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}
.admin-card:hover .desc { color: #b9b4ac; }

/* Бейдж (счётчик в углу карточки) */
.admin-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(226,96,79,0.2);
    color: #e2604f;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid rgba(226,96,79,0.2);
}

/* ===== ФОРМА В КАРТОЧКЕ ===== */
.admin-card-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
}
.admin-card-form input {
    width: 100%;
    padding: 10px 14px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    outline: none;
    transition: 0.3s;
}
.admin-card-form input:focus {
    border-color: #d6af6a;
    background: rgba(0,0,0,0.6);
    box-shadow: 0 0 20px rgba(214,175,106, 0.1);
}
.admin-card-form input::placeholder { color: #555; }
.admin-card-form .btn { width: 100%; justify-content: center; }

/* ===== КАРТОЧКИ-СПИСКИ (заблокированные, заявки, коды) ===== */
.admin-list-card {
    background: rgba(24,24,27,0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 20px 25px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}
.admin-list-card:hover {
    transform: translateY(-4px);
    background: rgba(32,32,36,0.6);
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}
.admin-list-card .info { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.admin-list-card .info .nick { font-size: 19px; font-weight: 700; color: #d6af6a; }
.admin-list-card .info .reason { font-size: 14px; color: #85807a; }
.admin-list-card .info .balance { font-size: 14px; color: #b9b4ac; }
.admin-list-card .info .date { font-size: 12px; color: #555; }

/* ===== ФОРМЫ (для add_balance, take_balance) ===== */
.admin-form-card {
    background: rgba(24,24,27,0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 24px;
    padding: 30px 25px;
    max-width: 400px;
    margin: 0 auto;
}
.admin-form-group { margin-bottom: 25px; }
.admin-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #b9b4ac;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
}
.admin-form-group input {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    transition: 0.3s ease;
    outline: none;
}
.admin-form-group input:focus {
    border-color: #d6af6a;
    box-shadow: 0 0 20px rgba(214,175,106, 0.1);
    background: rgba(0,0,0,0.6);
}
.admin-form-group input::placeholder { color: #555; }

/* ===== ТАБЛИЦЫ ===== */
.admin-table-wrapper { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table th {
    text-align: left;
    padding: 10px 12px;
    color: #85807a;
    font-weight: 600;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: #b9b4ac;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

/* ===== КАРТОЧКИ СОТРУДНИКОВ ===== */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}
.staff-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 18px 20px;
    transition: all 0.3s ease;
}
.staff-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.1);
    transform: translateY(-3px);
}
.staff-card .staff-nick {
    font-size: 18px;
    font-weight: 700;
    color: #d6af6a;
}
.staff-card .staff-meta {
    font-size: 13px;
    color: #85807a;
    margin-top: 4px;
}
.staff-card .staff-stats {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    flex-wrap: wrap;
}
.staff-card .staff-stats span {
    background: rgba(255,255,255,0.05);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 13px;
}
.staff-card .staff-stats .give { color: #8fd3a0; }
.staff-card .staff-stats .take { color: #e2604f; }

/* ===== КНОПКИ АДМИНКИ ===== */
.btn-approve {
    padding: 8px 20px;
    background: #8fd3a0;
    color: #0a0a0f;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}
.btn-approve:hover { box-shadow: 0 0 30px rgba(143,211,160,0.3); }

.btn-reject {
    padding: 8px 20px;
    background: #e2604f;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}
.btn-reject:hover { box-shadow: 0 0 30px rgba(226,96,79,0.3); }

.btn-fire {
    padding: 8px 20px;
    background: linear-gradient(135deg, #e2604f, #b84a3c);
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-fire:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(226,96,79,0.3);
}

.btn-unblock {
    padding: 10px 28px;
    background: linear-gradient(135deg, #8fd3a0, #6fb784);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    color: #0a0a0f;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-unblock:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(143,211,160,0.3);
}

.btn-block {
    padding: 10px 25px;
    background: linear-gradient(135deg, #e2604f, #b84a3c);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-block:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(226,96,79,0.3);
}

/* ===== ПУСТЫЕ СОСТОЯНИЯ ===== */
.admin-empty {
    text-align: center;
    padding: 60px 20px;
    color: #85807a;
    background: rgba(24,24,27,0.2);
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.03);
    animation: fadeInUp 0.6s ease;
}
.admin-empty .icon { font-size: 64px; margin-bottom: 15px; opacity: 0.4; }
.admin-empty .title { font-size: 20px; font-weight: 600; color: #fff; }
.admin-empty .desc { font-size: 14px; margin-top: 5px; }

/* ===== ПРОФИЛЬ ИГРОКА (в админке) ===== */
.player-profile {
    background: rgba(24,24,27,0.4);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease;
}
.player-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.player-profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #d6af6a;
}
.player-profile-avatar-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border: 2px solid #d6af6a;
}
.player-profile h2 { font-size: 24px; font-weight: 700; color: #d6af6a; }
.player-profile .balance { font-size: 18px; color: #b9b4ac; }
.player-profile .balance span { color: #d6af6a; font-weight: 700; }
.player-profile .meta { font-size: 13px; color: #85807a; margin-top: 4px; }

.player-stats {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.player-stat-item {
    background: rgba(255,255,255,0.03);
    padding: 8px 16px;
    border-radius: 12px;
    text-align: center;
}
.player-stat-item .num { font-size: 20px; font-weight: 700; color: #d6af6a; }
.player-stat-item .label { font-size: 11px; color: #85807a; }

/* ===== МОДАЛЬНОЕ ОКНО (для блокировки, действий) ===== */
.admin-modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(6px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}
.admin-modal-overlay.active { display: flex; }

.admin-modal-box {
    background: #1b1b1e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 35px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.admin-modal-box h3 {
    font-size: 22px;
    font-weight: 700;
    color: #e2604f;
    margin-bottom: 8px;
    text-align: center;
}
.admin-modal-box .modal-nick {
    font-size: 18px;
    color: #d6af6a;
    text-align: center;
    margin-bottom: 15px;
}
.admin-modal-box textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: 0.3s;
    font-family: inherit;
}
.admin-modal-box textarea:focus {
    border-color: #e2604f;
    background: rgba(0,0,0,0.6);
}
.admin-modal-box textarea::placeholder { color: #555; }

.admin-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}
.admin-modal-actions button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.admin-modal-actions .confirm {
    background: linear-gradient(135deg, #e2604f, #b84a3c);
    color: #fff;
}
.admin-modal-actions .confirm:hover { transform: scale(1.05); box-shadow: 0 5px 20px rgba(226,96,79,0.3); }
.admin-modal-actions .cancel {
    background: rgba(255,255,255,0.05);
    color: #b9b4ac;
    border: 1px solid rgba(255,255,255,0.1);
}
.admin-modal-actions .cancel:hover { background: rgba(255,255,255,0.1); }

/* ===== АДАПТИВ ===== */
@media (max-width: 900px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .admin-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
    .admin-header { padding: 15px 20px; flex-direction: column; }
    .stats-grid { grid-template-columns: 1fr; }
    .admin-grid { grid-template-columns: 1fr; }
    .admin-page-title { font-size: 28px; }
    .admin-card { min-height: 180px; padding: 20px 15px; }
    .admin-card .icon { font-size: 36px; }
    .admin-list-card { flex-direction: column; align-items: stretch; text-align: center; }
    .staff-grid { grid-template-columns: 1fr; }
    .admin-modal-box { padding: 25px; }
}