/* =========================================================================
PROFILE.CSS - АВТОНОМНЫЙ ФАЙЛ (GLASSMORPHISM OVERLAP)
========================================================================= */

/* --- ПЕРЕМЕННЫЕ --- */
:root {
    --bg-main: #08080a;
    --bg-secondary: #121216;
    --bg-card: rgba(30, 30, 35, 0.4);
    --primary: #ff6b57;
    --primary-hover: #ff523b;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --font-primary: 'Inter', sans-serif;
}

/* --- БАЗОВЫЕ СТИЛИ --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    background-color: var(--bg-main);
    color: var(--text-main);
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 87, 0.08), transparent 100%),
        linear-gradient(180deg, #121318 0%, #0d0e12 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    flex: 1;
    padding-top: 130px;
    padding-bottom: 50px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* --- КНОПКИ --- */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #be3b29 0%, #9f2d20 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 107, 87, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 87, 0.5);
}

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

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

.w-100 {
    width: 100%;
}

/* =========================================================================
СТРУКТУРА ПРОФИЛЯ (Glassmorphism Overlap)
========================================================================= */
.tactical-profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 40px;
    align-items: start;
    transition: all 0.4s ease;
}

/* --- САЙДБАР (ЛЕВАЯ КОЛОНКА) --- */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 5;
}

.sidebar-user-header {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.avatar-wrapper {
    position: relative;
    width: 180px;
    height: 180px;
    margin: 0 auto 20px auto;
    transition: all 0.4s;
}

.profile-avatar-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: #1a1b22;
    border: 3px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    color: #fff;
    font-weight: 800;
    background-size: cover;
    background-position: center;
    transition: all 0.4s;
}

.level-badge {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: linear-gradient(135deg, var(--primary), #cc2b14);
    color: white;
    font-weight: 900;
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 3px solid #1a1a22;
    box-shadow: 0 4px 10px rgba(255, 107, 87, 0.5);
    z-index: 2;
    transition: all 0.4s;
}

.profile-nickname {
    font-size: 24px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px 0;
    word-break: break-all;
    letter-spacing: -0.5px;
}

.profile-main-badge {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255, 107, 87, 0.15);
    color: var(--primary);
    border: 1px solid rgba(255, 107, 87, 0.3);
    text-align: center;
    width: fit-content;
    margin: 0 auto 15px auto;
}

.btn-change-avatar {
    font-size: 13px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-change-avatar:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* КРАСИВЫЙ ВИДЖЕТ ИНФОРМАЦИИ (Premium Stats) */
.premium-stats-widget {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--glass-shadow);
}

.widget-header-small {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget-header-small i {
    color: var(--primary);
}

.premium-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: 0.3s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.stat-icon-colored {
    font-size: 16px;
}

.sc-content {
    display: flex;
    flex-direction: column;
}

.sc-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2px;
}

.sc-val {
    font-size: 13px;
    color: #fff;
    font-weight: 700;
    word-break: break-word;
}

.stat-card.full-width {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.sc-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sc-left .sc-label {
    margin: 0;
}

.faction-val {
    background: rgba(82, 190, 128, 0.15);
    color: #52be80;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    border: 1px solid rgba(82, 190, 128, 0.3);
}

.faction-val:hover,
.faction-val:focus-visible {
    color: #86efac;
    border-color: rgba(82, 190, 128, 0.7);
    background: rgba(82, 190, 128, 0.24);
}

.balance-card {
    background: linear-gradient(135deg, rgba(82, 190, 128, 0.1), rgba(0, 0, 0, 0.4));
    border-color: rgba(82, 190, 128, 0.2);
}

.balance-val {
    font-size: 18px;
    font-weight: 900;
    color: #52be80;
    text-shadow: 0 0 10px rgba(82, 190, 128, 0.4);
}

/* ИМУЩЕСТВО (Property Widget) */
.property-widget {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--glass-shadow);
}

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

.prop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: 0.3s;
}

.prop-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.prop-left {
    color: var(--text-muted);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.prop-left i {
    color: #58a6ff;
    width: 16px;
    text-align: center;
}

.prop-right {
    color: #fff;
    font-weight: 700;
}

/* МЕНЮ НАВИГАЦИИ */
.profile-nav-menu {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 10px;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    text-align: left;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-weight: 600;
}

.nav-tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-tab-btn.active {
    background: rgba(255, 107, 87, 0.15);
    color: var(--primary);
    border: 1px solid rgba(255, 107, 87, 0.3);
}

.nav-tab-btn.logout-btn {
    color: #ff5252;
    margin-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.05);
    border-radius: 0 0 12px 12px;
}

.nav-tab-btn.logout-btn:hover {
    background: rgba(255, 82, 82, 0.1);
    color: #ff5252;
}

/* --- ПРАВАЯ ЧАСТЬ (ОСНОВНОЙ КОНТЕНТ) --- */
.profile-main-area {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

/* БАННЕР */
.profile-banner-header {
    width: 100%;
    height: 250px;
    background-color: #0d1117;
    background-image:
        linear-gradient(135deg, #1f1a24 0%, #111318 50%, #0d1117 100%),
        radial-gradient(circle at top right, rgba(255, 107, 87, 0.15), transparent 50%);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    background-size: cover;
    background-position: center;
    transition: all 0.4s;
}

.profile-banner-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
}

.btn-open-settings {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: 0.2s;
    z-index: 10;
    font-weight: 600;
    font-family: inherit;
    font-size: 13px;
}

.btn-open-settings:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 87, 0.3);
}

/* ШИРОКАЯ БИОГРАФИЯ (О ПЕРСОНАЖЕ) - Overlap эффект по дефолту */
.wide-bio-box {
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
    margin-top: -60px;
    /* Overlap Effect на баннер */
    z-index: 2;
    position: relative;
}

.wide-bio-header h3 {
    color: #fff;
    font-size: 18px;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.wide-bio-header h3 i {
    color: var(--primary);
}

.wide-bio-content {
    color: #ccc;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ВКЛАДКИ КОНТЕНТА (Стена, Активность) */
.profile-tab-content {
    display: none;
    background: var(--bg-card);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--glass-shadow);
}

.profile-tab-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ЗАКРЕПЛЕННЫЙ ПОСТ (В СТЕНЕ) */
.pinned-post-box {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.1) 0%, rgba(20, 20, 25, 0.6) 100%);
    border: 1px solid rgba(88, 166, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(88, 166, 255, 0.1);
}

.ppb-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: #58a6ff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.ppb-date {
    font-weight: normal;
    font-size: 11px;
    color: #888;
    text-transform: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.ppb-content {
    font-size: 14px;
    color: #e1e4e8;
    line-height: 1.6;
    font-style: italic;
    word-wrap: break-word;
}

.ppb-media {
    position: relative;
    margin: 2px -8px 17px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(88, 166, 255, 0.24);
    border-radius: 15px;
    background: #0b0d12;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
}

.ppb-media[hidden] {
    display: none;
}

.ppb-media::after {
    position: absolute;
    inset: 0;
    content: '';
    box-shadow: inset 0 -70px 70px -70px rgba(0, 0, 0, 0.85);
    pointer-events: none;
}

.ppb-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Стена */
.wall-header h2 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wall-header h2 i {
    color: #58a6ff;
}

.wall-header p {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 25px;
}

.wall-input-area {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 30px;
    transition: all 0.3s;
}

.wall-input-area:focus-within {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.6);
}

.wall-input-area textarea {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    resize: vertical;
    min-height: 80px;
    outline: none;
    font-family: inherit;
    margin-bottom: 10px;
    font-size: 14px;
}

.wall-empty-state {
    padding: 20px;
    color: #8b949e;
    text-align: center;
}

.wall-comment {
    display: flex;
    gap: 15px;
    margin-bottom: 12px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    transition: 0.3s;
}

.wall-comment:hover {
    background: rgba(255, 255, 255, 0.025);
    border-color: rgba(255, 255, 255, 0.1);
}

.wall-comment-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    color: #fff;
    background: var(--wall-avatar-color, #315f91);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    font-weight: 800;
}

.wall-comment-avatar.has-image {
    background-position: center;
    background-size: cover;
}

.wall-comment-body {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.wall-comment-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 5px;
}

.wall-comment-head a {
    color: #58a6ff;
    font-size: 14px;
    font-weight: 700;
}

.wall-comment-head time {
    color: #8b949e;
    font-size: 11px;
}

.wall-comment-text {
    color: #c9d1d9;
    font-size: 13px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

/* АКТИВНОСТЬ */
.activity-top-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.activity-stat-box {
    flex: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s;
}

.activity-stat-box:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.1);
}

.activity-stat-box i {
    font-size: 28px;
    color: var(--primary);
    background: rgba(255, 107, 87, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.astat-info {
    display: flex;
    flex-direction: column;
}

.astat-title {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.astat-num {
    font-size: 28px;
    color: #fff;
    font-weight: 900;
}

.pinned-title {
    font-size: 18px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pinned-title i {
    color: #a371f7;
}

.github-style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    transition: all 0.3s;
}

.gh-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: all 0.3s;
}

.gh-card:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

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

.gh-card-title {
    color: #58a6ff;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gh-card-title:hover {
    text-decoration: underline;
    color: #79b8ff;
}

.gh-badge {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.5);
}

.gh-card-text {
    color: #ccc;
    font-size: 13px;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

.gh-card-footer {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #888;
    font-weight: 600;
}

.gh-lang-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

/* АДМИН ПАНЕЛЬ */
.content-title {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 25px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 20px;
}

.admin-search-box {
    background: rgba(0, 0, 0, 0.3);
    padding: 25px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 25px;
    transition: all 0.3s;
}

.admin-search-box label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #aaa;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.admin-search-box input {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 18px;
    border-radius: 8px;
    outline: none;
    flex: 1;
    font-size: 15px;
    transition: 0.3s;
}

.admin-search-box input:focus {
    border-color: var(--primary);
}

.admin-edit-form {
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s;
}

.admin-edit-form h3 {
    margin: 0 0 25px 0;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.stats-data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

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

.form-group input,
.form-group select {
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 12px 15px;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 15px;
    transition: 0.3s;
}

.form-group select {
    color-scheme: dark;
    cursor: pointer;
}

.form-group select option {
    background: #17171d;
    color: #fff;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
}

.field-help {
    display: block;
    margin-top: 7px;
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.45;
}

.admin-security-gate {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px;
    background: linear-gradient(145deg, rgba(255, 107, 87, 0.09), rgba(0, 0, 0, 0.25));
    border: 1px solid rgba(255, 107, 87, 0.22);
    border-radius: 16px;
}

.admin-security-gate.is-unlocked {
    background: linear-gradient(145deg, rgba(82, 190, 128, 0.09), rgba(0, 0, 0, 0.25));
    border-color: rgba(82, 190, 128, 0.26);
}

.admin-security-icon {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    color: #ff856f;
    background: rgba(255, 107, 87, 0.11);
    border-radius: 13px;
    font-size: 17px;
}

.admin-security-gate.is-unlocked .admin-security-icon {
    color: #63d78f;
    background: rgba(82, 190, 128, 0.11);
}

.admin-security-copy strong {
    display: block;
    color: #f4f4f6;
    font-size: 13px;
}

.admin-security-copy p {
    margin: 4px 0 0;
    color: #8f929c;
    font-size: 10px;
    line-height: 1.5;
}

.admin-code-entry {
    grid-column: 2 / 4;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.admin-code-entry[hidden] {
    display: none;
}

.admin-code-entry input {
    min-width: 0;
    padding: 11px 13px;
    color: #fff;
    background: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: 0;
    font:
        800 14px/1 Inter,
        sans-serif;
    letter-spacing: 0.25em;
}

.admin-security-gate > small {
    grid-column: 2 / 4;
    color: #8c909b;
    font-size: 9px;
}

.admin-security-gate > small.success {
    color: #66d894;
}

.admin-database-browser {
    margin-top: 22px;
    padding: 22px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
}

.admin-database-browser[hidden] {
    display: none;
}

.admin-database-browser > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 12px;
}

.admin-database-browser h3 {
    margin: 2px 0 5px;
    color: #f2f3f5;
    font-size: 17px;
}

.admin-database-browser h3 strong {
    color: #66d894;
}

.admin-database-browser header p {
    max-width: 720px;
    margin: 0;
    color: #898d97;
    font-size: 10px;
    line-height: 1.55;
}

.admin-dump-status {
    min-height: 16px;
    margin: 10px 0 13px;
    color: #a5a9b2;
    font-size: 10px;
}

.admin-dump-tables {
    display: grid;
    gap: 9px;
}

.admin-dump-table {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

.admin-dump-table > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    color: #ebedf0;
    cursor: pointer;
    list-style: none;
}

.admin-dump-table > summary::-webkit-details-marker {
    display: none;
}

.admin-dump-table > summary strong {
    font: 800 11px/1 monospace;
}

.admin-dump-table > summary span {
    color: #757b86;
    font-size: 8px;
}

.admin-dump-scroller {
    max-height: 390px;
    overflow: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-dump-scroller table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

.admin-dump-scroller th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 9px 10px;
    color: #8f96a3;
    background: #17181e;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    font: 800 8px/1 monospace;
    text-align: left;
}

.admin-dump-scroller td {
    max-width: 320px;
    padding: 7px 8px;
    color: #d8dbe0;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    border-right: 1px solid rgba(255, 255, 255, 0.04);
    font: 500 9px/1.35 monospace;
}

.admin-cell-readonly {
    display: block;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-cell-editor {
    display: grid;
    min-width: 180px;
    grid-template-columns: minmax(130px, 1fr) 30px;
    gap: 5px;
}

.admin-cell-editor input,
.admin-cell-editor select,
.admin-cell-editor textarea {
    min-width: 0;
    padding: 7px 8px;
    color: #fff;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 7px;
    outline: 0;
    font: 600 9px/1.25 monospace;
}

.admin-cell-editor textarea {
    resize: vertical;
}

.admin-cell-editor input:focus,
.admin-cell-editor select:focus,
.admin-cell-editor textarea:focus {
    border-color: #58a6ff;
}

.admin-cell-editor button {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #72adff;
    background: rgba(88, 166, 255, 0.09);
    border: 1px solid rgba(88, 166, 255, 0.18);
    border-radius: 7px;
    cursor: pointer;
}

.admin-cell-editor button:hover {
    color: #fff;
    background: #3b82f6;
}

.admin-dump-empty {
    padding: 20px;
    color: #7e838e;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    text-align: center;
    font-size: 10px;
}

@media (max-width: 760px) {
    .admin-security-gate {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .admin-security-gate > .btn,
    .admin-code-entry,
    .admin-security-gate > small {
        grid-column: 1 / -1;
    }

    .admin-database-browser {
        padding: 14px;
    }

    .admin-database-browser > header {
        flex-direction: column;
    }
}

/* ВКЛАДКА НАСТРОЕК */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.settings-section label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #c9d1d9;
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-top: 20px;
}

.settings-section label:first-child {
    margin-top: 0;
}

.settings-section textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    outline: none;
    resize: vertical;
    font-family: inherit;
    font-size: 13px;
    transition: 0.3s;
}

.settings-section textarea:focus {
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.6);
}

.pinned-image-editor {
    display: grid;
    gap: 11px;
}

.pinned-image-preview {
    position: relative;
    display: grid;
    min-height: 150px;
    overflow: hidden;
    place-items: center;
    aspect-ratio: 16 / 9;
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.28));
}

.pinned-image-preview.has-image {
    border-style: solid;
    border-color: rgba(88, 166, 255, 0.32);
}

.pinned-image-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pinned-image-preview img[hidden],
.pinned-image-placeholder[hidden] {
    display: none;
}

.pinned-image-placeholder {
    display: grid;
    max-width: 280px;
    gap: 10px;
    padding: 20px;
    place-items: center;
    color: var(--text-muted);
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
}

.pinned-image-placeholder i {
    color: #58a6ff;
    font-size: 28px;
}

.settings-image-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px;
}

.settings-image-actions .btn {
    min-height: 44px;
}

.danger-soft {
    color: #ff8272;
    border-color: rgba(255, 82, 82, 0.24);
}

.danger-soft:hover {
    color: #fff;
    background: rgba(255, 82, 82, 0.16);
}

.settings-hint {
    color: #74747e;
    font-size: 11px;
    line-height: 1.5;
}

.color-presets-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.color-preset {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    border: 2px solid transparent;
}

.color-preset:hover {
    transform: scale(1.1);
}

#custom-color-picker {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    background: transparent;
}

/* МОДАЛЬНЫЕ ОКНА (Только Кроппер остался) */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.crop-container {
    width: 90%;
    max-width: 800px;
    max-height: 70vh;
    background: #000;
    border: 1px solid #333;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
}

.crop-container img {
    max-width: 100%;
    max-height: 70vh;
}

/* Адаптивность для сложных сеток */
@media (max-width: 1024px) {
    .tactical-profile-layout {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
    }

    .profile-sidebar {
        width: 100% !important;
        display: flex;
        flex-direction: column;
        order: 2;
        border-right: none !important;
        position: static !important;
        height: auto !important;
    }

    .profile-main-area {
        width: 100% !important;
        order: 1;
        padding: 0 !important;
    }

    .profile-nav-menu {
        flex-direction: row !important;
        overflow-x: auto;
    }

    .nav-tab-btn {
        white-space: nowrap;
    }

    .profile-banner-header {
        position: static !important;
        width: 100% !important;
        margin: 0 0 20px 0 !important;
        height: 200px !important;
    }

    .wide-bio-box {
        margin-top: 0 !important;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.crop-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(8px);
}

.crop-dialog {
    width: min(900px, 95vw);
    padding: 25px;
    background: #15151a;
    border: 1px solid #252530;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.crop-dialog h3 {
    margin: 0 0 20px;
    color: #fff;
}

.crop-stage {
    width: 100%;
    height: min(440px, 55vh);
    margin-bottom: 20px;
    overflow: hidden;
    background: #050508;
    border: 1px solid #222;
    border-radius: 8px;
}

.crop-stage img {
    display: block;
    max-width: 100%;
}

.crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.sc-wallet-card {
    background: linear-gradient(135deg, rgba(255, 179, 71, 0.12), rgba(0, 0, 0, 0.42));
    border-color: rgba(255, 179, 71, 0.2);
}

.sc-wallet-val {
    color: #ffb347;
    font-size: 17px;
    font-family: 'Orbitron', sans-serif;
}

.account-settings-panel {
    margin: 8px 0 26px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.account-settings-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.account-settings-heading h3 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 18px;
}

.account-settings-heading h3 i {
    color: var(--primary);
    margin-right: 7px;
}

.account-settings-heading p {
    max-width: 700px;
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.6;
}

.security-badge {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid rgba(82, 190, 128, 0.25);
    border-radius: 999px;
    background: rgba(82, 190, 128, 0.09);
    color: #6edb9b;
    font-size: 11px;
    font-weight: 800;
}

.account-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.account-setting-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(0, 0, 0, 0.22));
}

.account-setting-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 107, 87, 0.11);
    color: var(--primary);
}

.account-setting-card label {
    padding-right: 42px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.account-setting-card input {
    width: 100%;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: 0;
    background: rgba(0, 0, 0, 0.34);
    color: #fff;
    font:
        500 13px 'Inter',
        sans-serif;
}

.account-setting-card input:focus {
    border-color: rgba(255, 107, 87, 0.65);
    box-shadow: 0 0 0 3px rgba(255, 107, 87, 0.08);
}

.account-setting-card .btn {
    justify-content: center;
}

.verify-row {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) auto;
    gap: 8px;
}

.verify-row .btn {
    padding-inline: 12px;
    white-space: nowrap;
    font-size: 11px;
}

.account-form-message {
    min-height: 16px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.account-form-message.success {
    color: #6edb9b;
}

.account-form-message.error {
    color: #ff7665;
}

.crop-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -6px 0 18px;
    color: #8b949e;
}

.crop-toolbar input[type='range'] {
    flex: 1;
    accent-color: var(--primary);
}

.crop-tool {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.045);
    color: #fff;
    cursor: pointer;
}

.crop-tool:hover {
    border-color: var(--primary);
    color: var(--primary);
}

#crop-ratio-label {
    min-width: 112px;
    text-align: right;
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 720px) {
    .account-settings-grid {
        grid-template-columns: 1fr;
    }

    .account-settings-heading {
        flex-direction: column;
    }

    .crop-dialog {
        padding: 16px;
    }

    .crop-stage {
        height: 48vh;
    }

    #crop-ratio-label {
        display: none;
    }
}

/* =========================================================================
PROFILE V7 — компактный профессиональный профиль с inline-редактированием
========================================================================= */
.profile-page-container {
    max-width: 1460px;
}

.tactical-profile-layout {
    grid-template-columns: 332px minmax(0, 1fr);
    gap: 28px;
}

.profile-sidebar {
    gap: 16px;
}

.sidebar-user-header,
.premium-stats-widget,
.property-widget,
.profile-nav-menu,
.profile-tab-content,
.wide-bio-box {
    border-radius: 24px;
}

.profile-nav-menu {
    position: sticky;
    top: 104px;
    z-index: 8;
    display: grid;
    grid-template-columns: 1fr;
    padding: 9px;
}

.nav-tab-btn {
    min-height: 45px;
}

.nav-tab-btn.logout-btn {
    margin-top: 3px;
}

.stats-widget-heading {
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.stats-widget-heading > span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.game-sync-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    color: #858894;
    background: rgba(0, 0, 0, 0.2);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: none;
    white-space: nowrap;
}

.game-sync-pill.is-linked {
    color: #6edb9b;
    border-color: rgba(82, 190, 128, 0.24);
    background: rgba(82, 190, 128, 0.08);
}

.game-sync-pill.has-warning {
    color: #ffb467;
    border-color: rgba(255, 180, 103, 0.24);
    background: rgba(255, 180, 103, 0.08);
}

.game-sync-pill.is-future {
    color: #aeb5c2;
    border-color: rgba(174, 181, 194, 0.18);
    background: rgba(174, 181, 194, 0.07);
}

.game-link-cta {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    width: 100%;
    margin: 0 0 14px;
    padding: 13px;
    border: 1px solid rgba(255, 107, 87, 0.22);
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, rgba(255, 107, 87, 0.12), rgba(255, 255, 255, 0.025));
    text-align: left;
    cursor: pointer;
    transition: 0.22s ease;
}

.game-link-cta:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 107, 87, 0.48);
    background: linear-gradient(135deg, rgba(255, 107, 87, 0.18), rgba(255, 255, 255, 0.04));
}

.game-link-cta.is-disabled {
    cursor: default;
    opacity: 0.76;
}

.game-link-cta.is-disabled:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
}

.game-link-cta.is-linked {
    border-color: rgba(82, 190, 128, 0.22);
    background: linear-gradient(135deg, rgba(82, 190, 128, 0.1), rgba(255, 255, 255, 0.025));
}

.game-link-cta-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 107, 87, 0.13);
    color: var(--primary);
}

.game-link-cta.is-linked .game-link-cta-icon {
    color: #6edb9b;
    background: rgba(82, 190, 128, 0.12);
}

.game-link-cta strong,
.game-link-cta small {
    display: block;
}

.game-link-cta strong {
    font-size: 12px;
    line-height: 1.3;
}

.game-link-cta small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.35;
}

.game-link-cta > i {
    color: #777b86;
    font-size: 10px;
}

.bank-card {
    background: linear-gradient(135deg, rgba(88, 166, 255, 0.09), rgba(0, 0, 0, 0.4));
    border-color: rgba(88, 166, 255, 0.17);
}

.bank-val {
    color: #79b8ff;
    font-size: 16px;
    font-weight: 900;
}

.game-stat-card {
    min-height: 78px;
}

.profile-banner-header {
    height: 275px;
    border-radius: 28px;
}

.btn-open-settings {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
}

.wide-bio-box {
    margin-top: -72px;
    padding: 26px 28px;
}

.wide-bio-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.wide-bio-header h3 {
    margin-bottom: 12px;
}

.inline-edit-trigger {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 11px;
    color: #aeb1ba;
    background: rgba(255, 255, 255, 0.035);
    cursor: pointer;
    transition: 0.2s;
}

.inline-edit-trigger:hover {
    color: #fff;
    border-color: rgba(255, 107, 87, 0.4);
    background: rgba(255, 107, 87, 0.12);
}

.wide-bio-content.is-empty {
    color: #747781;
    font-style: italic;
}

.editing-hidden {
    display: none !important;
}

.inline-editor {
    display: grid;
    gap: 13px;
    margin-top: 4px;
}

.inline-editor[hidden] {
    display: none;
}

.inline-editor textarea {
    width: 100%;
    min-height: 118px;
    padding: 15px 16px;
    resize: vertical;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 14px;
    outline: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    font: 500 13px/1.65 var(--font-primary);
}

.inline-editor textarea:focus {
    border-color: rgba(255, 107, 87, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 107, 87, 0.08);
}

.inline-editor-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.inline-editor-actions .btn {
    min-height: 42px;
    padding: 10px 18px;
}

.ppb-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.ppb-header .inline-edit-trigger {
    width: 32px;
    height: 32px;
}

.pinned-inline-editor {
    margin-top: 14px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.pinned-inline-editor .pinned-image-preview {
    max-width: 620px;
}

.account-settings-panel {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.admin-game-source {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: -13px 0 20px;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: #9699a4;
    background: rgba(255, 255, 255, 0.03);
    font-size: 10px;
    font-weight: 700;
}

.admin-game-source.is-game-linked {
    color: #6edb9b;
    border-color: rgba(82, 190, 128, 0.24);
    background: rgba(82, 190, 128, 0.08);
}

.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: grid;
    padding: 24px;
    place-items: center;
    opacity: 0;
    background: rgba(3, 4, 7, 0.78);
    backdrop-filter: blur(12px);
    transition: opacity 0.18s ease;
}

.profile-modal[hidden] {
    display: none;
}

.profile-modal.is-open {
    opacity: 1;
}

.profile-modal-open {
    overflow: hidden;
}

.profile-modal-card {
    position: relative;
    width: min(520px, 94vw);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(155deg, rgba(30, 30, 37, 0.98), rgba(15, 15, 20, 0.98));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
    transform: translateY(12px) scale(0.985);
    transition: transform 0.18s ease;
}

.profile-modal.is-open .profile-modal-card {
    transform: translateY(0) scale(1);
}

.compact-modal {
    width: min(500px, 94vw);
}

.profile-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #aeb1ba;
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
}

.profile-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
}

.modal-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--primary);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-modal-card h2 {
    margin: 0 42px 8px 0;
    font-size: 24px;
    line-height: 1.2;
}

.profile-modal-card > p {
    margin: 0 0 22px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.65;
}

.color-presets-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 20px;
}

.color-preset,
.custom-color-control {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    border: 2px solid transparent;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
}

.color-preset {
    background: var(--preset);
}

.color-preset:hover,
.color-preset.is-selected {
    transform: scale(1.08);
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

.custom-color-control {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: conic-gradient(#ff6b57, #d29922, #3fb950, #58a6ff, #a371f7, #ff6b57);
}

.custom-color-control::after {
    position: absolute;
    inset: 4px;
    content: '';
    border-radius: 50%;
    background: #1b1b21;
}

.custom-color-control i {
    position: relative;
    z-index: 1;
    font-size: 12px;
}

.custom-color-control input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.banner-action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.game-link-form,
.game-unlink-form {
    display: grid;
    gap: 10px;
}

.game-link-form[hidden],
.game-unlink-form[hidden] {
    display: none;
}

.game-link-form label,
.game-unlink-form label {
    color: #cfd1d8;
    font-size: 11px;
    font-weight: 800;
}

.game-link-form input,
.game-unlink-form input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 11px;
    outline: 0;
    color: #fff;
    background: rgba(0, 0, 0, 0.34);
    font: 500 13px var(--font-primary);
}

.game-link-form input:focus,
.game-unlink-form input:focus {
    border-color: rgba(255, 107, 87, 0.6);
    box-shadow: 0 0 0 3px rgba(255, 107, 87, 0.08);
}

.game-link-message {
    min-height: 18px;
    color: #8f929d;
    font-size: 11px;
}

.game-link-message.success {
    color: #6edb9b;
}

.game-link-message.error {
    color: #ff8272;
}

.linked-account-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 14px;
    border: 1px solid rgba(82, 190, 128, 0.2);
    border-radius: 13px;
    color: #dcefe3;
    background: rgba(82, 190, 128, 0.08);
}

.linked-account-summary > i {
    color: #6edb9b;
}

html[data-theme='light']
    :is(
        .game-link-cta,
        .inline-edit-trigger,
        .inline-editor textarea,
        .profile-modal-card,
        .game-link-form input,
        .game-unlink-form input,
        .admin-game-source
    ) {
    color: #272c35;
    background-color: rgba(255, 255, 255, 0.94);
    border-color: rgba(32, 36, 46, 0.12);
}

/* Profile v8: Discord-like account rows with editors shown only on demand. */
.account-settings-heading {
    align-items: center;
    margin-bottom: 0;
    padding: 0 2px 22px;
}

.account-settings-heading h3 {
    margin: 0;
    color: #f4f4f6;
    font-size: clamp(19px, 2vw, 25px);
    font-weight: 650;
    letter-spacing: -0.02em;
}

.account-data-list {
    overflow: hidden;
    background: rgba(18, 18, 24, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 18px;
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.2);
}

.account-data-row + .account-data-row {
    border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.account-data-summary {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    min-height: 91px;
    padding: 18px 22px;
}

.account-data-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #b8bac2;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

.account-data-label {
    display: block;
    margin-bottom: 7px;
    color: #91939d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.account-data-summary strong {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #f0f0f3;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.account-data-note {
    display: block;
    margin-top: 5px;
    color: #797c86;
    font-size: 10px;
    line-height: 1.4;
}

.account-change-trigger {
    min-width: 104px;
    padding: 11px 17px;
    color: #f4f4f6;
    background: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font:
        750 13px Inter,
        sans-serif;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        border-color 0.18s ease;
}

.account-change-trigger:hover {
    transform: translateY(-1px);
    background: #34363c;
    border-color: rgba(255, 255, 255, 0.12);
}

.account-change-trigger[aria-expanded='true'] {
    color: #ffb2a6;
    background: rgba(255, 107, 87, 0.12);
    border-color: rgba(255, 107, 87, 0.28);
}

.account-reveal-email {
    padding: 0;
    color: #879cff;
    background: transparent;
    border: 0;
    font:
        700 12px Inter,
        sans-serif;
    cursor: pointer;
}

.account-reveal-email:hover {
    color: #aab8ff;
    text-decoration: underline;
}

.account-inline-editor {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    padding: 0 22px 22px 80px;
    animation: accountEditorIn 0.2s ease both;
}

.account-inline-editor[hidden] {
    display: none;
}

.account-inline-editor > label {
    grid-column: 1 / -1;
    color: #b5b6bd;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.account-inline-editor > input,
.account-inline-editor .verify-row input {
    width: 100%;
    min-width: 0;
    padding: 13px 14px;
    color: #f4f4f6;
    background: rgba(5, 5, 9, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.105);
    border-radius: 10px;
    outline: 0;
    font:
        500 13px Inter,
        sans-serif;
}

.account-inline-editor > input:focus,
.account-inline-editor .verify-row input:focus {
    border-color: rgba(255, 107, 87, 0.66);
    box-shadow: 0 0 0 3px rgba(255, 107, 87, 0.08);
}

.account-inline-editor .verify-row {
    grid-template-columns: minmax(120px, 1fr) auto;
}

.account-inline-editor .send-change-code {
    min-width: 128px;
}

.account-editor-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 9px;
}

.account-form-message {
    grid-column: 1 / -1;
    min-height: 0;
}

.account-form-message:empty {
    display: none;
}

@keyframes accountEditorIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.oauth-connections-card {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 18px;
    background: rgba(18, 18, 24, 0.78);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.2);
}

.oauth-connections-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.oauth-connections-card h3 {
    margin: 4px 0 5px;
    color: #f2f2f5;
    font-size: 18px;
}

.oauth-connections-card header p {
    margin: 0;
    color: #858893;
    font-size: 11px;
    line-height: 1.5;
}

.oauth-security-note {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    padding: 8px 11px;
    color: #79dca3;
    background: rgba(82, 190, 128, 0.08);
    border: 1px solid rgba(82, 190, 128, 0.2);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.oauth-connection-list {
    display: grid;
}

.oauth-connection-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 17px 22px;
}

.oauth-connection-row + .oauth-connection-row {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.oauth-provider-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 13px;
    font-size: 19px;
}

.oauth-provider-icon.google {
    color: #8ab4f8;
    background: rgba(66, 133, 244, 0.1);
}

.oauth-provider-icon.yandex {
    color: #ff6b63;
    background: rgba(255, 59, 48, 0.1);
}

.oauth-connection-row strong {
    display: block;
    color: #f0f0f3;
    font-size: 14px;
}

.oauth-connection-row small {
    display: block;
    margin-top: 4px;
    color: #7f828d;
    font-size: 10px;
    line-height: 1.45;
}

.oauth-link-button {
    min-width: 118px;
    justify-content: center;
}

.oauth-link-button.is-linked {
    color: #79dca3;
    border-color: rgba(82, 190, 128, 0.2);
    background: rgba(82, 190, 128, 0.08);
}

.oauth-link-button:disabled {
    cursor: default;
    opacity: 0.8;
    transform: none;
}

.oauth-link-message {
    min-height: 0;
    margin: 0;
    padding: 0 22px;
    color: #858893;
    font-size: 11px;
}

.oauth-link-message:not(:empty) {
    padding-block: 13px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.oauth-link-message.success {
    color: #79dca3;
}

.oauth-link-message.error {
    color: #ff7665;
}

html[data-theme='light'] .account-data-list {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(24, 28, 38, 0.1);
    box-shadow: 0 18px 52px rgba(33, 38, 51, 0.08);
}

html[data-theme='light'] .account-data-row + .account-data-row {
    border-color: rgba(24, 28, 38, 0.09);
}

html[data-theme='light'] .account-settings-heading h3,
html[data-theme='light'] .account-data-summary strong {
    color: #252934;
}

html[data-theme='light'] .account-data-icon {
    color: #5f6573;
    background: #f0f1f4;
    border-color: rgba(24, 28, 38, 0.08);
}

html[data-theme='light'] .account-inline-editor > input,
html[data-theme='light'] .account-inline-editor .verify-row input {
    color: #252934;
    background: #f6f7f9;
    border-color: rgba(24, 28, 38, 0.14);
}

html[data-theme='light'] .oauth-connections-card {
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(24, 28, 38, 0.1);
}

html[data-theme='light'] .oauth-connections-card > header,
html[data-theme='light'] .oauth-connection-row + .oauth-connection-row,
html[data-theme='light'] .oauth-link-message:not(:empty) {
    border-color: rgba(24, 28, 38, 0.09);
}

html[data-theme='light'] .oauth-connections-card h3,
html[data-theme='light'] .oauth-connection-row strong {
    color: #252934;
}

@media (max-width: 720px) {
    .account-settings-heading {
        align-items: flex-start;
        gap: 12px;
    }

    .account-data-summary {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 13px;
        padding: 17px;
    }

    .account-data-icon {
        width: 38px;
        height: 38px;
    }

    .account-change-trigger {
        grid-column: 2;
        justify-self: start;
        min-width: 96px;
    }

    .account-inline-editor {
        grid-template-columns: 1fr;
        padding: 0 17px 19px 68px;
    }

    .account-inline-editor .verify-row {
        grid-template-columns: 1fr;
    }

    .account-inline-editor .send-change-code {
        width: 100%;
    }

    .account-editor-actions {
        flex-direction: column-reverse;
    }

    .account-editor-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .oauth-connections-card > header {
        flex-direction: column;
    }

    .oauth-connection-row {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 16px 17px;
    }

    .oauth-provider-icon {
        width: 42px;
        height: 42px;
    }

    .oauth-link-button {
        grid-column: 2;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .account-inline-editor {
        padding-left: 17px;
    }
}

html[data-theme='light'] .profile-modal {
    background: rgba(222, 226, 234, 0.76);
}

html[data-theme='light'] .profile-modal-card > p,
html[data-theme='light'] .game-link-cta small {
    color: #6b707c;
}

html[data-theme='light'] .custom-color-control::after {
    background: #fff;
}

@media (max-width: 1024px) {
    .profile-sidebar {
        order: 1;
    }

    .profile-main-area {
        order: 2;
    }

    .sidebar-user-header {
        order: 1;
    }

    .profile-nav-menu {
        position: static;
        order: 2;
        grid-template-columns: repeat(4, minmax(max-content, 1fr));
        overflow-x: auto;
    }

    .premium-stats-widget {
        order: 3;
    }

    .property-widget {
        order: 4;
    }

    .profile-banner-header {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 720px) {
    .container {
        padding-top: 96px;
        padding-inline: 12px;
    }

    .profile-nav-menu {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: max-content;
        justify-content: start;
    }

    .profile-nav-menu .nav-tab-btn {
        min-height: 42px;
        padding: 10px 13px;
    }

    .profile-banner-header {
        height: 190px !important;
        border-radius: 20px;
    }

    .btn-open-settings {
        top: 12px;
        right: 12px;
        padding: 9px 12px;
        font-size: 11px;
    }

    .wide-bio-box {
        padding: 20px;
    }

    .profile-tab-content {
        padding: 20px 16px;
    }

    .ppb-header {
        align-items: flex-start;
        gap: 12px;
    }

    .ppb-date {
        display: none;
    }

    .banner-action-grid {
        grid-template-columns: 1fr;
    }

    .profile-modal {
        padding: 12px;
    }

    .profile-modal-card {
        padding: 24px 18px;
        border-radius: 19px;
    }

    .settings-image-actions {
        grid-template-columns: 1fr;
    }
}

/* Profile v12: серверная приватность и аналитика под активностью форума. */
[data-privacy-block][hidden],
#btn-nav-activity[hidden],
#tab-activity[hidden] {
    display: none !important;
}

.activity-overview-card {
    margin-top: 24px;
    height: 229px;
    padding: 18px 20px 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(28, 28, 35, 0.92), rgba(13, 14, 19, 0.92));
    box-shadow: 0 18px 54px rgba(0, 0, 0, 0.22);
}

.activity-overview-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.activity-overview-card h2 {
    margin: 1px 0 0;
    color: #f5f5f7;
    font-size: 18px;
    line-height: 1.2;
}

.activity-kicker {
    display: block;
    color: #7f828d;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.activity-total {
    padding: 6px 10px;
    color: #ff9f91;
    background: rgba(255, 107, 87, 0.09);
    border: 1px solid rgba(255, 107, 87, 0.18);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 850;
    white-space: nowrap;
}

.activity-chart {
    position: relative;
    height: 105px;
    margin: 6px 0 0;
}

.activity-chart svg {
    display: block;
    width: 100%;
    height: 86px;
    overflow: visible;
}

.activity-grid-lines line {
    stroke: rgba(255, 255, 255, 0.055);
    stroke-width: 1;
    stroke-dasharray: 4 7;
}

.activity-area-path {
    fill: rgba(255, 107, 87, 0.075);
}

.activity-line-path {
    fill: none;
    stroke: #ff7763;
    stroke-width: 3;
    stroke-linejoin: round;
    stroke-linecap: round;
    filter: drop-shadow(0 3px 7px rgba(255, 82, 59, 0.32));
}

#activity-chart-points circle {
    fill: #15151b;
    stroke: #ff9584;
    stroke-width: 2;
}

#activity-chart-points circle {
    cursor: crosshair;
    transition:
        r 0.15s ease,
        fill 0.15s ease;
}

#activity-chart-points circle:hover,
#activity-chart-points circle:focus {
    r: 6px;
    fill: #ff7763;
    outline: none;
}

.activity-chart-tooltip {
    position: absolute;
    z-index: 5;
    display: grid;
    min-width: 145px;
    gap: 3px;
    padding: 9px 11px;
    color: #b9bec8;
    background: rgba(13, 13, 18, 0.96);
    border: 1px solid rgba(255, 119, 99, 0.3);
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36);
    font-size: 8px;
    line-height: 1.35;
    pointer-events: none;
    transform: translate(-50%, -100%);
}

.activity-chart-tooltip[hidden] {
    display: none;
}

.activity-chart-tooltip strong {
    color: #fff;
    font-size: 9px;
    text-transform: capitalize;
}

.activity-chart-tooltip span {
    white-space: nowrap;
}

.activity-chart-tooltip b {
    color: #ff9b8c;
}

.activity-chart-tooltip small {
    margin-top: 2px;
    color: #747782;
    font-size: 7px;
}

.activity-chart-labels {
    position: absolute;
    inset: auto 0 0;
    height: 18px;
}

.activity-chart-labels span {
    position: absolute;
    color: #71747e;
    font-size: 8px;
    font-weight: 700;
    transform: translateX(-50%);
    white-space: nowrap;
}

.activity-chart-private {
    min-height: 78px;
    margin: 10px 0;
    padding: 18px;
    color: #8e919b;
    border: 1px dashed rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    font-size: 11px;
    line-height: 1.6;
    text-align: center;
}

.activity-chart-private i {
    margin-right: 7px;
    color: #ff8574;
}

.activity-empty-state,
.activity-error-state {
    padding: 20px;
    text-align: center;
}

.activity-empty-state {
    color: #8b949e;
}

.activity-error-state {
    color: #ff6b57;
}

.activity-metric-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: -1px;
}

.activity-metric-strip > span {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0 7px;
    min-width: 0;
    align-items: center;
}

.activity-metric-strip i {
    grid-row: 1 / 3;
    display: grid;
    width: 27px;
    height: 27px;
    place-items: center;
    color: #ff8574;
    background: rgba(255, 107, 87, 0.08);
    border-radius: 8px;
    font-size: 10px;
}

.activity-metric-strip b {
    overflow: hidden;
    color: #e8e8ec;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-metric-strip small {
    color: #747782;
    font-size: 8px;
    white-space: nowrap;
}

.activity-extra-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 24px;
}

.activity-extra-stats > span {
    display: flex;
    min-height: 66px;
    flex-direction: column;
    justify-content: center;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.activity-extra-stats b {
    color: #fff;
    font-size: 18px;
}

.activity-extra-stats small {
    margin-top: 2px;
    color: #81838d;
    font-size: 9px;
}

.privacy-settings-card {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 18px;
    background: rgba(18, 18, 24, 0.78);
    box-shadow: 0 18px 52px rgba(0, 0, 0, 0.2);
}

.privacy-settings-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 21px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
}

.privacy-settings-heading h3 {
    margin: 0;
    color: #f2f2f5;
    font-size: 18px;
}

.privacy-settings-heading p {
    margin: 5px 0 0;
    color: #858893;
    font-size: 10px;
}

.privacy-open-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 39px;
    padding: 9px 13px;
    color: #ecedf0;
    background: #2b2d31;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font:
        750 11px Inter,
        sans-serif;
    cursor: pointer;
}

.privacy-open-all:hover {
    background: #36383e;
}

.privacy-toggle-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.privacy-toggle-list > label {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    min-height: 82px;
    padding: 15px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
    cursor: pointer;
}

.privacy-toggle-list > label:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.055);
}

.privacy-toggle-list > label > span {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 1px 11px;
    align-items: center;
}

.privacy-toggle-list > label > span i {
    grid-row: 1 / 3;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #b7b9c1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.privacy-toggle-list b {
    color: #ededf0;
    font-size: 12px;
}

.privacy-toggle-list small {
    color: #7c7f89;
    font-size: 9px;
}

.privacy-toggle-list input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.privacy-switch {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: #32343a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: 0.2s;
}

.privacy-switch::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    content: '';
    border-radius: 50%;
    background: #858892;
    transition: 0.2s;
}

.privacy-toggle-list input:checked + .privacy-switch {
    background: rgba(255, 107, 87, 0.3);
    border-color: rgba(255, 107, 87, 0.55);
}

.privacy-toggle-list input:checked + .privacy-switch::after {
    left: 21px;
    background: #ff8b79;
    box-shadow: 0 0 10px rgba(255, 107, 87, 0.4);
}

.privacy-settings-card > footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 22px;
}

.privacy-settings-card > footer span {
    color: #858893;
    font-size: 10px;
}

html[data-theme='light'] :is(.activity-overview-card, .privacy-settings-card) {
    color: #252934;
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(24, 28, 38, 0.1);
}

html[data-theme='light']
    :is(
        .activity-overview-card h2,
        .activity-extra-stats b,
        .privacy-settings-heading h3,
        .privacy-toggle-list b
    ) {
    color: #252934;
}

@media (max-width: 760px) {
    .activity-overview-card {
        height: auto;
        min-height: 229px;
    }

    .activity-metric-strip,
    .activity-extra-stats,
    .privacy-toggle-list {
        grid-template-columns: 1fr 1fr;
    }

    .privacy-toggle-list > label:nth-child(odd) {
        border-right: 1px solid rgba(255, 255, 255, 0.055);
    }

    .privacy-settings-heading,
    .privacy-settings-card > footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .privacy-settings-card > footer .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .activity-metric-strip {
        grid-template-columns: 1fr 1fr;
        row-gap: 10px;
    }

    .activity-extra-stats,
    .privacy-toggle-list {
        grid-template-columns: 1fr;
    }

    .privacy-toggle-list > label:nth-child(odd) {
        border-right: 0;
    }
}

.character-details-hero,
.achievement-section,
.character-private-grid > section,
.security-journal-card,
.admin-operations-card {
    padding: 22px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
}

.character-details-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.character-details-hero h2,
.achievement-section h2,
.security-journal-card h3,
.admin-operations-card h3 {
    margin: 4px 0;
    color: #f2f4f8;
}

.character-details-hero p {
    max-width: 620px;
    margin: 0;
    color: #8993a2;
    line-height: 1.5;
}

.character-level {
    display: grid;
    min-width: 92px;
    height: 92px;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #ff765f, #d93f29);
    border-radius: 24px;
    box-shadow: 0 16px 34px rgba(255, 82, 59, 0.25);
    font:
        900 18px Inter,
        sans-serif;
}

.character-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.character-metrics span {
    padding: 15px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
}

.character-metrics b,
.character-metrics small {
    display: block;
}

.character-metrics b {
    color: #eef2f7;
    font-size: 18px;
}

.character-metrics small {
    margin-top: 4px;
    color: #778291;
    font-size: 10px;
}

.achievement-section > header,
.security-journal-card > header,
.admin-operations-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.achievement-section > header > small {
    color: #6f7a89;
}

.achievement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.achievement-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 15px;
}

.achievement-card.locked {
    filter: saturate(0.2);
    opacity: 0.58;
}

.achievement-card.unlocked {
    border-color: rgba(250, 204, 21, 0.22);
    background: linear-gradient(145deg, rgba(250, 204, 21, 0.08), rgba(255, 255, 255, 0.02));
}

.achievement-card.pinned {
    box-shadow: inset 3px 0 #f59e0b;
}

.achievement-icon {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
    border-radius: 13px;
    font-size: 17px;
}

.achievement-card small,
.achievement-card strong,
.achievement-card p,
.achievement-card em {
    display: block;
}

.achievement-card small {
    color: #a68138;
    font:
        750 8px Inter,
        sans-serif;
    text-transform: uppercase;
}

.achievement-card strong {
    margin-top: 3px;
    color: #f5f6f8;
}

.achievement-card p {
    margin: 5px 0;
    color: #8a94a1;
    font-size: 10px;
    line-height: 1.4;
}

.achievement-card em {
    margin-top: 5px;
    color: #717d8c;
    font:
        700 8px Inter,
        sans-serif;
    font-style: normal;
}

.achievement-progress {
    display: block;
    height: 4px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 99px;
}

.achievement-progress i {
    display: block;
    height: 100%;
    background: #f59e0b;
}

.achievement-card > button {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #fbbf24;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.character-private-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.character-private-grid h3 {
    margin: 0 0 13px;
    color: #dbe1e9;
    font-size: 13px;
}

.character-private-grid h3 i {
    margin-right: 7px;
    color: #7ba8ff;
}

.details-list {
    display: grid;
    gap: 7px;
    color: #8792a0;
    font-size: 10px;
}

.details-list span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 9px;
}

.details-private {
    justify-content: flex-start !important;
}

.security-journal-card {
    margin-top: 14px;
}

.security-journal-card h4 {
    margin: 20px 0 9px;
    color: #cdd4de;
}

.security-session-list,
.security-event-list,
.admin-compact-list {
    display: grid;
    gap: 7px;
    margin-top: 14px;
}

.security-session-list article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 11px;
    background: rgba(255, 255, 255, 0.028);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.security-device {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    color: #7eb0ff;
    background: rgba(59, 130, 246, 0.12);
    border-radius: 10px;
}

.security-session-list strong,
.security-session-list small {
    display: block;
}

.security-session-list small {
    margin-top: 3px;
    color: #737e8c;
    font-size: 9px;
}

.security-session-list em {
    color: #6ee7b7;
    font:
        700 9px Inter,
        sans-serif;
    font-style: normal;
}

.security-session-list button {
    color: #fca5a5;
    background: transparent;
    border: 0;
    font-size: 9px;
    cursor: pointer;
}

.security-event-list span,
.admin-compact-list article {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.025);
    border-radius: 9px;
}

.security-event-list span {
    grid-template-columns: auto auto minmax(0, 1fr);
}

.security-event-list small {
    color: #737e8c;
    text-align: right;
}

.admin-operations-card {
    margin-bottom: 14px;
}

.admin-operations-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.admin-operations-grid h4 {
    color: #bfc7d3;
}

.admin-compact-list {
    max-height: 270px;
    overflow: auto;
}

.admin-compact-list article strong,
.admin-compact-list article small {
    display: block;
}

.admin-compact-list article small {
    margin-top: 4px;
    color: #737e8c;
}

@media (max-width: 760px) {
    .character-metrics,
    .achievement-grid,
    .character-private-grid,
    .admin-operations-grid {
        grid-template-columns: 1fr 1fr;
    }

    .character-details-hero {
        align-items: flex-start;
    }

    .character-level {
        min-width: 70px;
        height: 70px;
    }

    .security-journal-card > header {
        display: grid;
    }
}

@media (max-width: 480px) {
    .character-metrics,
    .achievement-grid,
    .character-private-grid,
    .admin-operations-grid {
        grid-template-columns: 1fr;
    }

    .character-details-hero {
        display: grid;
    }

    .achievement-section,
    .character-private-grid > section,
    .security-journal-card,
    .admin-operations-card {
        padding: 15px;
    }
}

.admin-permissions-form {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(200px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.admin-permissions-form label {
    display: grid;
    gap: 7px;
    color: var(--text-muted);
    font-size: 12px;
}

.admin-permissions-form input,
.admin-permissions-form select {
    min-height: 42px;
    padding: 0 12px;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 9px;
}

.admin-permissions-card > small {
    display: block;
    margin-top: 10px;
    color: var(--text-muted);
}

.admin-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 18px;
}

.admin-content-grid form {
    display: grid;
    gap: 10px;
    align-content: start;
}

.admin-content-grid label {
    display: grid;
    gap: 7px;
    color: var(--text-muted);
    font-size: 12px;
}

.admin-content-grid input,
.admin-content-grid select,
.admin-content-grid textarea {
    width: 100%;
    padding: 11px 12px;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 9px;
    resize: vertical;
}

.admin-content-card > small {
    display: block;
    margin-top: 12px;
    color: var(--text-muted);
}

@media (max-width: 760px) {
    .admin-permissions-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .admin-content-grid {
        grid-template-columns: 1fr;
    }
}
