/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --glass:   rgba(0, 0, 0, 0.55);
    --border:  rgba(255, 255, 255, 0.18);
    --blur:    blur(12px);
    --radius:  10px;
    --font:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

body {
    background: #0d0d0d;
    color: #fff;
    font-family: var(--font);
    overflow: hidden;
    height: 100vh;
}

/* ══════════════════════════════════════
   GALLERY PAGE
══════════════════════════════════════ */
#bg {
    position: fixed;
    inset: 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    cursor: pointer;
}

#no-image {
    display: none;
    position: fixed;
    inset: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 1.1rem;
    line-height: 1.8;
    pointer-events: none;
}
#no-image.visible { display: flex; }

.ui {
    position: fixed;
    left: 0; right: 0;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 20;
    pointer-events: none;
}
.ui > * { pointer-events: auto; }

.ui-top {
    top: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.65) 0%, transparent 100%);
}
.ui-bottom {
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, transparent 100%);
    padding-bottom: 22px;
}

.counter {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,.85);
    text-shadow: 0 1px 6px rgba(0,0,0,.6);
    letter-spacing: .02em;
}

.user-area { display: flex; align-items: center; gap: 8px; }

.top-left-group { display: flex; flex-direction: row; align-items: center; gap: 10px; }

.btn-back { font-size: 12px; padding: 4px 10px; }
.btn-back.inactive { opacity: .35; cursor: default; pointer-events: none; }

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    background: var(--glass);
    color: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    transition: background .15s, border-color .15s, transform .1s;
    white-space: nowrap;
}
.btn:hover  { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.35); }
.btn:active { transform: scale(.97); }

.btn-primary {
    background: #fff;
    color: #000;
    border-color: transparent;
    font-weight: 600;
}
.btn-primary:hover { background: #e8e8e8; }

.btn-warn   { background: rgba(220,80,0,.55); }
.btn-warn:hover { background: rgba(220,80,0,.75); }

.btn-danger { background: rgba(200,30,30,.6); border-color: rgba(255,80,80,.25); }
.btn-danger:hover { background: rgba(200,30,30,.85); }

.btn-google svg { flex-shrink: 0; }

.btn-large { padding: 11px 24px; font-size: 15px; width: 100%; justify-content: center; margin-top: 12px; }

/* Grouped buttons (joined borders) */
.btn-group { display: flex; }
.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.btn-group .btn:last-child  { border-radius: 0 var(--radius) var(--radius) 0; }
.btn-group .btn:only-child  { border-radius: var(--radius); }
.btn-group .btn + .btn      { margin-left: -1px; }

.btn-sm { padding: 4px 10px; font-size: 12px; }

/* Avatar */
.avatar    { width: 30px; height: 30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.4); object-fit: cover; }
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }

/* ── Report modal ── */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(4px);
    z-index: 80;
}
.modal-backdrop.visible { display: block; }

.modal {
    display: none;
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(.96);
    width: min(420px, 92vw);
    background: rgba(18,18,18,.97);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 28px 24px 20px;
    z-index: 90;
    transition: transform .2s;
}
.modal.visible { display: block; transform: translate(-50%, -50%) scale(1); }

.modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.modal-sub   { font-size: 13px; color: rgba(255,255,255,.45); margin-bottom: 16px; }

.report-reasons { display: flex; flex-direction: column; gap: 6px; }

.reason-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    color: #fff;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    transition: background .15s, border-color .15s;
}
.reason-btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); }
.reason-btn.reason-critical { border-color: rgba(255,60,60,.3); }
.reason-btn.reason-critical:hover { background: rgba(200,30,30,.2); border-color: rgba(255,60,60,.5); }
.reason-emoji { font-size: 1.3rem; flex-shrink: 0; }
.reason-btn span:nth-child(2) { flex: 1; }
.reason-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 6px;
    background: rgba(255,80,0,.35);
    border: 1px solid rgba(255,80,0,.4);
    white-space: nowrap;
}

/* Toast */
#toast {
    position: fixed;
    bottom: 76px;
    left: 50%;
    transform: translateX(-50%) translateY(14px);
    background: rgba(10,10,10,.9);
    color: #fff;
    padding: 9px 20px;
    border-radius: 20px;
    font-size: 13px;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    transition: opacity .25s, transform .25s;
    white-space: nowrap;
}
#toast.show         { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.toast-error  { border-color: rgba(255,80,80,.4); }


/* ══════════════════════════════════════
   INNER PAGES (upload, admin)
══════════════════════════════════════ */
body.page {
    overflow-y: auto;
    height: auto;
    background: #0d0d0d;
}

.page-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}
.page-header h1 { font-size: 1.5rem; font-weight: 700; }

/* Coin badge (frontend + upload) */
.coin-badge {
    font-size: 13px;
    font-weight: 700;
    color: #f5c542;
    text-shadow: 0 1px 6px rgba(0,0,0,.5);
    white-space: nowrap;
    letter-spacing: .02em;
}
.coin-badge-link {
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 20px;
    border: 1px solid rgba(245,197,66,.25);
    transition: background .15s, border-color .15s;
}
.coin-badge-link:hover { background: rgba(245,197,66,.12); border-color: rgba(245,197,66,.5); }

.user-chip {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,.6);
}

/* Alerts */
.alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-error   { background: rgba(200,30,30,.25); border: 1px solid rgba(200,30,30,.5); }
.alert-success { background: rgba(30,160,80,.2);  border: 1px solid rgba(30,160,80,.45); }

/* Upload drop zone */
.drop-zone {
    position: relative;
    border: 2px dashed rgba(255,255,255,.2);
    border-radius: 16px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color .2s, background .2s;
    cursor: pointer;
    margin-bottom: 4px;
}
.drop-zone:hover, .drop-zone.drag { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.04); }

.drop-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }

.drop-zone label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    cursor: pointer;
    padding: 32px;
    z-index: 1;
}
.drop-icon { font-size: 2.5rem; }
.drop-zone label p { color: rgba(255,255,255,.7); font-size: 14px; }
.drop-zone label .hint { color: rgba(255,255,255,.35); font-size: 12px; }
.drop-zone .link { color: #fff; text-decoration: underline; }

#preview img {
    max-width: 100%;
    max-height: 320px;
    display: block;
    object-fit: contain;
}

/* ── Admin stats row ── */
.stats-row {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
}
.stat-card {
    flex: 1;
    background: rgba(255,255,255,.06);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.stat-card.stat-warn { border-color: rgba(255,160,0,.4); background: rgba(255,120,0,.08); }
.stat-num   { font-size: 2rem; font-weight: 700; }
.stat-label { font-size: 12px; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .06em; }

/* Tabs */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.tab {
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    border-radius: var(--radius) var(--radius) 0 0;
    transition: color .15s, background .15s;
    display: flex;
    align-items: center;
    gap: 7px;
}
.tab:hover  { color: rgba(255,255,255,.8); background: rgba(255,255,255,.05); }
.tab.active { color: #fff; border-bottom: 2px solid #fff; }

.badge {
    background: rgba(255,80,80,.7);
    color: #fff;
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}

/* Image grid */
.grid-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.img-card {
    background: rgba(255,255,255,.05);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.img-thumb-wrap img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }

.img-card-footer {
    padding: 8px 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}
.img-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
}
.img-date { font-size: 11px; color: rgba(255,255,255,.35); white-space: nowrap; flex-shrink: 0; }
.img-card-actions {
    display: flex;
    gap: 4px;
}
.img-card-actions .btn { flex: 1; justify-content: center; font-size: 11px; padding: 5px 6px; }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    text-align: left;
    padding: 10px 12px;
    color: rgba(255,255,255,.4);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    vertical-align: middle;
}
.data-table .thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }
.thumb-clickable { cursor: zoom-in; transition: opacity .15s; }
.thumb-clickable:hover { opacity: .85; }
a:has(.thumb-clickable) { display: block; }
.data-table tr:hover td { background: rgba(255,255,255,.03); }
.data-table .actions { display: flex; gap: 6px; align-items: center; white-space: nowrap; flex-wrap: wrap; }
.data-table tr { height: 72px; }
.row-banned td { opacity: .5; }

.badge-role {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: .03em;
}
.badge-role.admin      { background: rgba(100,80,255,.35);  border: 1px solid rgba(100,80,255,.5); }
.badge-role.moderator  { background: rgba(0,160,180,.3);    border: 1px solid rgba(0,200,220,.45); color: #5de0f0; }
.badge-role.member     { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.badge-role.banned     { background: rgba(200,30,30,.3);    border: 1px solid rgba(200,30,30,.5); }
.badge-role.vip        { background: linear-gradient(135deg, rgba(255,180,0,.3), rgba(255,120,0,.3)); border: 1px solid rgba(255,200,50,.5); color: #ffd232; font-weight: 700; }

.btn-vip { background: linear-gradient(135deg, rgba(255,180,0,.25), rgba(255,100,0,.25)); border-color: rgba(255,200,50,.4); color: #ffd232; }
.btn-vip:hover { background: linear-gradient(135deg, rgba(255,180,0,.4), rgba(255,100,0,.4)); border-color: rgba(255,200,50,.7); }

.empty { color: rgba(255,255,255,.3); font-size: 14px; padding: 24px 0; text-align: center; }

/* ── Images cachées (admin) ── */
.img-card.hidden-img { opacity: .7; border-color: rgba(255,120,0,.4); }

.img-thumb-wrap { position: relative; overflow: hidden; display: block; }

/* Full-image overlay with centered badge */
.img-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.badge-hidden {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    padding: 4px 12px; border-radius: 8px;
    background: rgba(0,0,0,.8);
    border: 1px solid rgba(255,100,0,.65);
    color: #ffa04a;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    white-space: nowrap;
}

/* Uploader avatar on image cards */
.uploader-avatar-link { display: flex; align-items: center; text-decoration: none; }
.uploader-avatar-link:hover { opacity: .75; }
.avatar-initial {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    color: rgba(255,255,255,.55);
    flex-shrink: 0;
}

/* Deleted image placeholder in tables */
.thumb-deleted {
    width: 56px; height: 56px;
    border-radius: 6px;
    background: rgba(255,255,255,.04);
    border: 1px dashed rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    opacity: .4;
}

.reason-tag {
    font-size: 11px;
    color: rgba(255,255,255,.4);
    padding: 2px 8px;
    background: rgba(255,255,255,.05);
    border-radius: 5px;
    white-space: nowrap;
}

/* ── Member profile ── */
.member-card {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,.1);
}
.member-card-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.02) 100%);
    pointer-events: none;
}
.member-card-body {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 28px 28px 24px;
    flex-wrap: wrap;
}

.member-avatar-wrap { position: relative; flex-shrink: 0; }
.member-avatar {
    width: 88px; height: 88px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.2);
    object-fit: cover;
    display: block;
    box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.member-avatar-placeholder {
    width: 88px; height: 88px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.15);
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: rgba(255,255,255,.5);
}
.member-badge {
    position: absolute;
    bottom: -4px; right: -4px;
    font-size: 10px !important;
    padding: 2px 7px !important;
}
.member-badge-vip {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    vertical-align: middle;
    font-size: 11px !important;
    padding: 2px 8px !important;
    position: static !important;
}

.member-info { flex: 1; min-width: 0; }
.member-name  { font-size: 1.4rem; font-weight: 700; line-height: 1.2; margin-bottom: 5px; }
.member-email { font-size: 13px; color: rgba(255,255,255,.4); margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-coins { font-size: 14px; font-weight: 700; color: #f5c542; margin-top: 5px; letter-spacing: .02em; }
.member-since { font-size: 12px; color: rgba(255,255,255,.28); letter-spacing: .02em; margin-top: 3px; }

.member-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-self: flex-start;
    margin-top: 4px;
}
.coins-controls {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,.07);
    width: 100%;
}
.coins-label { font-size: 12px; color: rgba(255,255,255,.45); font-weight: 600; white-space: nowrap; }
.coins-custom-input {
    width: 90px;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,.18);
    background: rgba(255,255,255,.07);
    color: #fff;
    font-size: 12px;
    text-align: center;
}
.coins-custom-input::placeholder { color: rgba(255,255,255,.3); }
.coins-custom-input::-webkit-inner-spin-button,
.coins-custom-input::-webkit-outer-spin-button { opacity: .4; }

/* Coin transaction history */
.tx-type   { font-size: 12px; color: rgba(255,255,255,.65); }
.tx-amount { font-size: 13px; font-weight: 700; }
.tx-credit { color: #7ec87e; }
.tx-debit  { color: #f07070; }

.profile-stats { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.profile-stat {
    flex: 1;
    min-width: 100px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    padding: 16px 18px;
    text-align: center;
    transition: background .15s;
}
.profile-stat:hover { background: rgba(255,255,255,.07); }
.profile-stat.stat-warn { border-color: rgba(255,160,0,.35); background: rgba(255,120,0,.07); }
.report-limit { display: block; font-size: 10px; color: rgba(255,160,0,.7); margin-top: 5px; letter-spacing: .02em; }
.report-limit-reached { color: #f07070; font-weight: 700; }
.profile-stat .num   { font-size: 1.8rem; font-weight: 700; display: block; line-height: 1; margin-bottom: 6px; }
.profile-stat .label { font-size: 11px; color: rgba(255,255,255,.38); text-transform: uppercase; letter-spacing: .06em; }

.chart-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 24px;
}
.chart-card-title { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.4); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 16px; }

.section-title {
    font-size: 12px; font-weight: 700;
    color: rgba(255,255,255,.35);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 28px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.profile-thumb { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.profile-thumb-hidden { border: 1px solid rgba(255,120,0,.4); }
.profile-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.profile-thumb:hover img { transform: scale(1.05); }
.profile-thumb-date {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, transparent 100%);
    color: rgba(255,255,255,.7);
    font-size: 10px;
    padding: 14px 6px 5px;
    opacity: 0;
    transition: opacity .2s;
}
.profile-thumb:hover .profile-thumb-date { opacity: 1; }

.status-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 6px;
    letter-spacing: .02em;
    white-space: nowrap;
}
.status-tag.resolved        { background: rgba(255,255,255,.05); color: rgba(255,255,255,.3); border: 1px solid rgba(255,255,255,.08); }
.status-tag.pending         { background: rgba(255,160,0,.12);  color: #ffa04a;              border: 1px solid rgba(255,160,0,.25); }
.status-tag.status-deleted  { background: rgba(200,30,30,.15);  color: #f07070;              border: 1px solid rgba(200,30,30,.3); }
.status-tag.status-dismissed{ background: rgba(80,180,80,.12);  color: #7ec87e;              border: 1px solid rgba(80,180,80,.25); }

.muted { color: rgba(255,255,255,.3); font-size: 13px; }

a.member-link {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.2);
    transition: color .12s, border-color .12s;
}
a.member-link:hover { color: #fff; border-color: rgba(255,255,255,.7); }

/* ── Pagination ── */
.pagination { display: flex; gap: 4px; margin: 14px 0 4px; flex-wrap: wrap; }
.page-btn {
    padding: 5px 11px;
    border-radius: var(--radius);
    font-size: 13px;
    color: rgba(255,255,255,.6);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.page-btn:hover  { background: rgba(255,255,255,.12); color: #fff; }
.page-btn.active { background: rgba(255,255,255,.18); color: #fff; border-color: rgba(255,255,255,.3); font-weight: 700; }
.page-sep { padding: 5px 4px; color: rgba(255,255,255,.3); font-size: 13px; align-self: center; }

/* Like button */
.btn.liked { background: rgba(255, 210, 50, .2); border-color: rgba(255, 210, 50, .5); color: #ffd232; }

/* ── Avatar link on gallery ── */
a.avatar-link { display: inline-block; line-height: 0; border-radius: 50%; }
a.avatar-link:hover { opacity: .8; }
a.avatar-link.avatar-vip {
    outline: 2px solid #ffd232;
    outline-offset: 2px;
    box-shadow: 0 0 10px rgba(255, 210, 50, .55);
}


/* ── VIP Stats on member page ── */
.vip-stats-section {
    background: linear-gradient(135deg, rgba(255,180,0,.05), rgba(255,80,0,.05));
    border: 1px solid rgba(255,200,50,.18);
    border-radius: 16px;
    padding: 20px 20px 18px;
    margin-bottom: 20px;
}
.vip-stats-header {
    font-size: 14px;
    font-weight: 700;
    color: #ffd232;
    margin-bottom: 14px;
    letter-spacing: .03em;
}
.vip-stats-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.vip-stat-card {
    flex: 1;
    min-width: 100px;
    background: rgba(255,210,50,.07);
    border: 1px solid rgba(255,210,50,.18);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
}
.vip-stat-num   { font-size: 1.5rem; font-weight: 800; color: #ffd232; }
.vip-stat-label { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 3px; }

.vip-top-title  { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.7); margin-bottom: 10px; }
.vip-top-list   { display: flex; gap: 10px; flex-wrap: wrap; }
.vip-top-item   { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.vip-top-thumb  { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,.1); }
.vip-top-meta   { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: rgba(255,255,255,.45); text-align: center; }

/* ── VIP Promo Code Banner in shop ── */
.vip-promo-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,210,50,.08);
    border: 1px solid rgba(255,210,50,.3);
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.vip-promo-banner-icon { font-size: 1.5rem; flex-shrink: 0; }
.vip-promo-banner-body { flex: 1; min-width: 0; }
.vip-promo-banner-title { font-size: 13px; font-weight: 700; color: #ffd232; }
.vip-promo-banner-sub   { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 2px; }
.vip-auto-badge {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    color: #ffd232;
    background: rgba(255,210,50,.12);
    border: 1px solid rgba(255,210,50,.35);
    border-radius: 20px;
    padding: 4px 14px;
    white-space: nowrap;
}

/* ══════════════════════════════════════
   RESPONSIVE — TABLET  (≤ 768 px)
══════════════════════════════════════ */
@media (max-width: 768px) {
    /* ── Gallery bars ── */
    .ui { padding: 12px 14px; }
    .user-area { gap: 6px; }

    /* ── Inner pages ── */
    .page-wrap { padding: 18px 14px 44px; }
    .page-header { flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
    .page-header h1 { font-size: 1.2rem; }
    .user-chip { margin-left: 0; }

    /* Stats: 2-column grid */
    .stats-row { flex-wrap: wrap; }
    .stat-card { flex: 1 1 calc(50% - 8px); }

    /* Tabs: horizontal scroll */
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: none; }
    .tabs::-webkit-scrollbar { display: none; }
    .tab { white-space: nowrap; padding: 8px 13px; }

    /* Image grid */
    .grid-images { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

    /* Tables: horizontal scroll */
    .data-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Member card */
    .member-card-body { padding: 18px 16px; gap: 16px; }

    /* Profile stats: 2 per row */
    .profile-stat { flex: 1 1 calc(50% - 6px); min-width: 120px; }

    /* Pagination */
    .page-btn { padding: 5px 9px; font-size: 12px; }
}

/* ══════════════════════════════════════
   RESPONSIVE — MOBILE  (≤ 480 px)
══════════════════════════════════════ */
@media (max-width: 480px) {
    /* ── Gallery top bar: wrap so user-area goes below counter ── */
    .ui-top { flex-wrap: wrap; row-gap: 6px; align-items: center; padding: 10px 12px; }
    .counter { width: 100%; }
    .user-area { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }

    /* ── Gallery bottom bar ── */
    .ui-bottom { padding: 0 12px 14px; gap: 8px; }

    /* Collapse button text on gallery; keep icons */
    .hide-xs { display: none !important; }
    .show-xs { display: inline !important; }

    /* Slightly smaller buttons on gallery */
    .ui .btn { padding: 6px 9px; font-size: 12px; }

    /* ── Inner pages ── */
    .page-wrap { padding: 14px 12px 30px; }
    .page-header h1 { font-size: 1.05rem; }

    /* Buttons on inner pages */
    body.page .btn:not(.btn-large) { font-size: 12px; padding: 6px 10px; }
    body.page .btn-sm { font-size: 11px; padding: 3px 8px; }

    /* Stats: still 2 per row */
    .stat-card { flex: 1 1 calc(50% - 8px); padding: 14px 12px; }
    .stat-num  { font-size: 1.6rem; }

    /* Image grid */
    .grid-images { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; }

    /* Member avatar */
    .member-avatar,
    .member-avatar-placeholder { width: 68px; height: 68px; }
    .member-name { font-size: 1.1rem; }
    .member-card-body { padding: 14px 12px; gap: 12px; }

    /* Profile grid */
    .profile-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 5px; }

    /* Profile stats */
    .profile-stat { flex: 1 1 calc(50% - 6px); min-width: 0; padding: 12px 10px; }
    .profile-stat .num { font-size: 1.45rem; }

    /* Chart */
    .chart-card { padding: 14px 14px; }

    /* Coin controls: wrap tighter */
    .coins-controls { gap: 5px; }

    /* Member actions */
    .member-actions { gap: 5px; }

    /* Pagination */
    .pagination { gap: 3px; }
    .page-btn { padding: 4px 8px; font-size: 11px; }
}

/* Default: hide-xs elements are visible */
.hide-xs { display: inline; }
.show-xs { display: none; }

/* ══════════════════════════════════════
   SHOP PAGE
══════════════════════════════════════ */
.shop-subtitle {
    color: rgba(255,255,255,.45);
    font-size: 14px;
    margin-bottom: 28px;
    text-align: center;
}

.skip-promo-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, rgba(255,210,50,.12), rgba(255,160,0,.08));
    border: 1px solid rgba(255,210,50,.35);
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.skip-promo-banner-icon { font-size: 2rem; flex-shrink: 0; }
.skip-promo-banner-body { flex: 1; min-width: 160px; }
.skip-promo-banner-title { font-weight: 700; font-size: 14px; color: #ffd232; margin-bottom: 2px; }
.skip-promo-banner-sub   { font-size: 12px; color: rgba(255,255,255,.5); }
.skip-promo-banner-code  {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.08);
    border: 1px dashed rgba(255,210,50,.4);
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background .15s;
    white-space: nowrap;
}
.skip-promo-banner-code:hover { background: rgba(255,255,255,.13); }
.skip-promo-banner-code code  { font-size: 1rem; font-weight: 700; color: #ffd232; letter-spacing: .06em; }

.shop-notice {
    text-align: center;
    padding: 48px 20px;
    color: rgba(255,255,255,.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.shop-card {
    position: relative;
    background: var(--card-color);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 28px 20px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
    transition: transform .15s, box-shadow .15s;
}
.shop-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
}
.shop-card-featured {
    padding-top: 38px;
}

.shop-card-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, rgba(255,210,50,.9), rgba(255,160,30,.9));
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 0 0 10px 10px;
    white-space: nowrap;
    letter-spacing: .03em;
}

.shop-card-emoji  { font-size: 2.6rem; line-height: 1; }
.shop-card-name   { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.55); text-transform: uppercase; letter-spacing: .06em; }

.shop-card-coins  { display: flex; align-items: baseline; gap: 5px; margin: 4px 0; }
.shop-card-coins-num   { font-size: 2rem; font-weight: 800; color: #ffd232; }
.shop-card-coins-label { font-size: 13px; color: rgba(255,255,255,.4); }

.shop-card-price  { font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: 8px; }

.shop-card-btn    { width: 100%; justify-content: center; }

.shop-fine {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,.25);
    margin-top: 8px;
}

@media (max-width: 480px) {
    .shop-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .shop-card { padding: 22px 12px 16px; }
    .shop-card-featured { padding-top: 34px; }
    .shop-card-emoji { font-size: 2rem; }
    .shop-card-coins-num { font-size: 1.6rem; }
}

/* ══════════════════════════════════════
   VIP SHOP SECTION
══════════════════════════════════════ */
.vip-section {
    background: linear-gradient(135deg, rgba(255,180,0,.06), rgba(255,80,0,.06));
    border: 1px solid rgba(255,200,50,.2);
    border-radius: 20px;
    padding: 28px 24px 24px;
    margin-bottom: 14px;
}

.vip-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.vip-section-title {
    font-size: 1.25rem;
    font-weight: 800;
    background: linear-gradient(90deg, #ffd232, #ff9000);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.vip-active-badge {
    font-size: 12px;
    font-weight: 600;
    color: #ffd232;
    background: rgba(255,210,50,.12);
    border: 1px solid rgba(255,210,50,.3);
    border-radius: 20px;
    padding: 3px 12px;
}

/* Benefits grid */
.vip-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.vip-benefit {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,200,50,.12);
    border-radius: 12px;
    padding: 14px 14px;
}
.vip-benefit-icon { font-size: 1.4rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.vip-benefit-title { font-size: 13px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.vip-benefit-desc  { font-size: 12px; color: rgba(255,255,255,.4); line-height: 1.4; }

/* Plans row */
.vip-plans {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.vip-plan {
    position: relative;
    flex: 1 1 140px;
    background: rgba(255,180,0,.07);
    border: 1px solid rgba(255,200,50,.25);
    border-radius: 16px;
    padding: 20px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    transition: transform .15s, border-color .15s;
}
.vip-plan:hover { transform: translateY(-2px); border-color: rgba(255,200,50,.5); }
.vip-plan-featured { border-color: rgba(255,200,50,.5); background: rgba(255,180,0,.12); }
.vip-plan-best     { border-color: rgba(255,140,0,.6); background: rgba(255,120,0,.12); }

.vip-plan-badge {
    position: absolute;
    top: -1px; left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #ffd232, #ff9000);
    color: #000;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 12px;
    border-radius: 0 0 10px 10px;
    white-space: nowrap;
}
.vip-plan-duration { font-size: 13px; font-weight: 700; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .05em; }
.vip-plan-price    { font-size: 1.5rem; font-weight: 800; color: #ffd232; }
.vip-plan-coins    { font-size: 1.5rem; }
.vip-plan-saving   { font-size: 11px; color: rgba(255,255,255,.35); text-decoration: line-through; margin-top: -4px; }
.vip-plan-btn      { width: 100%; justify-content: center; margin-top: 4px; }

.vip-extend-note {
    margin-top: 14px;
    font-size: 12px;
    color: rgba(255,200,50,.6);
    text-align: center;
}

.member-vip-until {
    font-size: 12px;
    color: #ffd232;
    margin-top: 4px;
    opacity: .8;
}

@media (max-width: 480px) {
    .vip-section { padding: 20px 14px 18px; }
    .vip-benefits { grid-template-columns: 1fr; }
    .vip-plans { flex-direction: column; }
}

/* ══════════════════════════════════════
   NOTIFICATIONS
══════════════════════════════════════ */
.notif-wrap {
    position: relative;
}

.notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    cursor: pointer;
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    transition: background .15s;
    color: #fff;
    padding: 0;
}
.notif-bell:hover { background: rgba(255,255,255,.15); }

.notif-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    background: #e53935;
    border: 2px solid #0d0d0d;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    pointer-events: none;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    background: rgba(18,18,18,.98);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,.6);
    z-index: 200;
    overflow: hidden;
}

.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: 13px;
    font-weight: 700;
    color: rgba(255,255,255,.8);
}
.notif-clear {
    background: none;
    border: none;
    color: rgba(255,255,255,.35);
    font-size: 11px;
    cursor: pointer;
    padding: 0;
    transition: color .15s;
}
.notif-clear:hover { color: rgba(255,255,255,.7); }

#notifList {
    max-height: 320px;
    overflow-y: auto;
}

.notif-item {
    padding: 11px 16px;
    border-bottom: 1px solid rgba(255,255,255,.05);
    transition: background .1s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,.04); }
.notif-unread { background: rgba(255,255,255,.04); }
.notif-unread::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #4fc3f7;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    vertical-align: middle;
    margin-top: -2px;
}

.notif-msg  { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.4; }
.notif-time { font-size: 11px; color: rgba(255,255,255,.3); margin-top: 3px; }

.notif-empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.25);
}

@media (max-width: 480px) {
    .notif-dropdown { width: calc(100vw - 24px); right: -8px; }
}

/* ══════════════════════════════════════
   ADMIN STATS TAB
══════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 28px;
}

.stats-kpi {
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: 18px 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stats-kpi-accent {
    background: rgba(255,200,50,.07);
    border-color: rgba(255,200,50,.25);
}
.stats-kpi-val {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}
.stats-kpi-label {
    font-size: 11px;
    color: rgba(255,255,255,.38);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.stats-charts {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 28px;
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-kpi-val { font-size: 1.4rem; }
}

/* ══════════════════════════════════════
   PROMO CODES TAB
══════════════════════════════════════ */
.promo-create-form {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 14px;
    padding: 20px 20px 16px;
    margin-bottom: 24px;
}

.promo-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.promo-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 140px;
}
.promo-form-field label {
    font-size: 12px;
    color: rgba(255,255,255,.45);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.promo-form-field input {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    padding: 8px 12px;
    outline: none;
    transition: border-color .15s;
    font-family: var(--font);
}
.promo-form-field input:focus { border-color: rgba(255,255,255,.45); }
.promo-form-field input::placeholder { color: rgba(255,255,255,.2); }
.promo-form-submit { flex: 0 0 auto; }

.promo-code-tag {
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 6px;
    padding: 2px 8px;
    letter-spacing: .05em;
    color: #fff;
}

@media (max-width: 480px) {
    .promo-form-row { flex-direction: column; }
    .promo-form-submit .btn { width: 100%; justify-content: center; }
}
