/* =========================================================
   GregPlay — Личный кабинет (dashboard redesign)
   ========================================================= */
.cabinet-page {
    min-height: 100vh;
    position: relative;
    background:
        radial-gradient(circle at 12% 8%, rgba(129, 79, 216, 0.16), transparent 26%),
        radial-gradient(circle at 88% 12%, rgba(99, 70, 168, 0.12), transparent 30%),
        linear-gradient(180deg, #0a0617 0%, #0d0915 100%);
}

.cabinet-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: url(/img/cabinet-texture.webp?v=1) center / 760px repeat;
    opacity: 0.05;
    mix-blend-mode: screen;
}

.cabinet-page .nav,
.cabinet-main,
.cabinet-page .footer { position: relative; z-index: 1; }

.cabinet-page .footer {
    margin-top: 80px;
}

.cabinet-main {
    padding: 104px 0 0;
}

.cabinet-layout {
    width: calc(100% - (var(--page-gutter, 64px) * 2));
    max-width: 1640px;
    margin: 0 auto;
    padding: 24px 0 0;
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

/* ============ SIDEBAR ============ */
.cab-sidebar {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cab-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(180deg, rgba(22, 13, 38, 0.9), rgba(13, 9, 21, 0.92));
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32);
}

.cab-nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #b8aec9;
    font-weight: 600;
    font-size: 14.5px;
    text-decoration: none;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.cab-nav-item:hover {
    color: #f2eafd;
    background: rgba(129, 79, 216, 0.1);
}

.cab-nav-item.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(160, 107, 255, 0.28), rgba(129, 79, 216, 0.16));
    box-shadow: inset 0 0 0 1px rgba(160, 107, 255, 0.4);
}

.cab-nav-item.is-active::before {
    content: "";
    position: absolute;
    left: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #c4a5ff, #814fd8);
}

.cab-nav-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cab-nav-item.is-active .cab-nav-ico {
    background: rgba(160, 107, 255, 0.22);
    border-color: rgba(160, 107, 255, 0.45);
}

.cab-nav-ico svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cab-help {
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at 80% 0%, rgba(129, 79, 216, 0.2), transparent 60%),
        rgba(18, 12, 30, 0.85);
}

.cab-help-title {
    display: block;
    font-family: "Sora", sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #f5f0ff;
}

.cab-help-text {
    margin: 8px 0 16px;
    color: #a99fc0;
    font-size: 13px;
    line-height: 1.5;
}

.cab-help-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cab-help-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: #e8ddff;
    border: 1px solid rgba(160, 107, 255, 0.4);
    background: rgba(129, 79, 216, 0.16);
    transition: background 0.2s ease, transform 0.2s ease;
}

.cab-help-btn:hover {
    background: rgba(129, 79, 216, 0.28);
    transform: translateY(-1px);
}

.cab-help-ico {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 12px;
    color: #c4a5ff;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cab-help-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ============ CONTENT ============ */
.cab-content {
    display: grid;
    gap: 24px;
    min-width: 0;
}

.cab-card {
    position: relative;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background:
        linear-gradient(180deg, rgba(21, 15, 31, 0.92), rgba(13, 10, 19, 0.94));
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.28);
    padding: 24px;
    overflow: hidden;
    animation: cab-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cab-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(129, 79, 216, 0.07), transparent 38%);
}

.cab-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 22px;
    right: 22px;
    height: 1px;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(160, 107, 255, 0.55), transparent);
}

.cab-card > * { position: relative; z-index: 1; }

/* ============ HERO ============ */
.cab-hero {
    position: relative;
    border-radius: 24px;
    border: 1px solid rgba(160, 107, 255, 0.22);
    overflow: hidden;
    padding: 30px;
    box-shadow: 0 26px 64px rgba(0, 0, 0, 0.38);
    animation: cab-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cab-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        linear-gradient(100deg, rgba(9, 5, 20, 0.94) 0%, rgba(11, 6, 24, 0.82) 30%, rgba(12, 6, 26, 0.5) 58%, rgba(22, 12, 44, 0.42) 100%),
        url(/img/cabinet-hero-bg.webp?v=1);
    background-size: cover, cover;
    background-position: center, center right;
    background-repeat: no-repeat;
}

.cab-hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 20% 30%, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(1.5px 1.5px at 60% 20%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 80% 40%, rgba(255, 255, 255, 0.7), transparent),
        radial-gradient(1px 1px at 35% 60%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1.5px 1.5px at 90% 70%, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 50% 80%, rgba(255, 255, 255, 0.55), transparent);
    opacity: 0.7;
    animation: cab-twinkle 6s ease-in-out infinite alternate;
}

.cab-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.95fr);
    gap: 28px;
    align-items: stretch;
}

.cab-hero-intro {
    display: flex;
    gap: 22px;
    align-items: flex-start;
    position: relative;
}

.cab-hero-intro::before {
    content: "";
    position: absolute;
    top: -46px;
    left: -46px;
    width: 208px;
    height: 208px;
    background: url(/img/avatar-glow.webp?v=1) center / contain no-repeat;
    pointer-events: none;
    z-index: 0;
    animation: cab-halo 3.6s ease-in-out infinite;
}

.cab-hero-intro > * { position: relative; z-index: 1; }

@keyframes cab-halo {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.82; transform: scale(1.06); }
}

.cab-avatar {
    width: 116px;
    height: 116px;
    flex-shrink: 0;
    border-radius: 22px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(160deg, rgba(196, 165, 255, 0.18), rgba(129, 79, 216, 0.1));
    border: 2px solid rgba(196, 165, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(129, 79, 216, 0.18), 0 0 32px rgba(160, 107, 255, 0.45);
    animation: cab-avatar-glow 3.5s ease-in-out infinite;
}

.cab-avatar img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }

.cab-avatar-fallback {
    font-family: "Sora", sans-serif;
    font-size: 46px;
    font-weight: 800;
    color: #e9dcff;
}

.cab-hero-copy { min-width: 0; }

.cab-hero-welcome {
    color: #cbbdf0;
    font-size: 14px;
    font-weight: 600;
}

.cab-hero-name {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin: 6px 0 12px;
    font-family: "Sora", sans-serif;
    font-size: clamp(30px, 3.6vw, 46px);
    line-height: 1.02;
    color: #fff;
}

.cab-hero-sub {
    color: #c4bbd9;
    line-height: 1.65;
    max-width: 560px;
    margin: 0 0 22px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    white-space: nowrap;
}

.role-user { color: #e1dcea; }
.role-moderator { color: #e5d6ff; border-color: rgba(152, 93, 255, 0.4); background: rgba(152, 93, 255, 0.16); }
.role-admin {
    color: #ecdfff;
    border-color: rgba(160, 107, 255, 0.55);
    background: linear-gradient(135deg, rgba(160, 107, 255, 0.32), rgba(129, 79, 216, 0.22));
    box-shadow: 0 0 18px rgba(160, 107, 255, 0.35);
}

/* profile chips */
.cab-profile-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-width: 620px;
}

.cab-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(13, 8, 24, 0.55);
    border: 1px solid rgba(196, 165, 255, 0.18);
    backdrop-filter: blur(6px);
}

.cab-chip-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 10px;
    color: #c4a5ff;
    background: rgba(160, 107, 255, 0.16);
}

.cab-chip-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.cab-chip-body { display: flex; flex-direction: column; min-width: 0; }
.cab-chip-label { color: #9c92b6; font-size: 11px; font-weight: 600; }
.cab-chip-value { color: #f4f0fc; font-size: 14.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cab-status-ok { color: #20e898; }

/* hero stat cards */
.cab-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-content: start;
}

.cab-stat-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(13, 8, 24, 0.62);
    border: 1px solid rgba(196, 165, 255, 0.2);
    backdrop-filter: blur(6px);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.cab-stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(196, 165, 255, 0.5);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.cab-stat-ico {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: #c4a5ff;
    background: rgba(160, 107, 255, 0.16);
    border: 1px solid rgba(160, 107, 255, 0.28);
}

.cab-stat-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cab-stat-ico.ico-coin { color: #ffd479; background: rgba(255, 196, 87, 0.14); border-color: rgba(255, 196, 87, 0.3); }
.cab-stat-ico.ico-star { color: #ffcf52; background: rgba(255, 207, 82, 0.14); border-color: rgba(255, 207, 82, 0.3); }
.cab-stat-ico.ico-case { color: #7fe3c4; background: rgba(75, 198, 173, 0.14); border-color: rgba(75, 198, 173, 0.3); }
.cab-stat-ico.ico-crown { color: #c4a5ff; }
.cab-stat-ico.ico-server { color: #8bb6ff; background: rgba(110, 150, 255, 0.14); border-color: rgba(110, 150, 255, 0.3); }
.cab-stat-ico.ico-clock { color: #b69bff; }

.cab-stat-body { display: flex; flex-direction: column; gap: 2px; }
.cab-stat-label { color: #a99fc0; font-size: 12px; font-weight: 600; }
.cab-stat-value { color: #fff; font-family: "Sora", sans-serif; font-size: 22px; font-weight: 800; line-height: 1.1; }
.cab-stat-value.sm { font-size: 16px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }

.cab-stat-act {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    color: #e8ddff;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    background: rgba(160, 107, 255, 0.18);
    border: 1px solid rgba(160, 107, 255, 0.35);
    transition: background 0.2s ease, transform 0.2s ease;
}

.cab-stat-act:hover { background: rgba(160, 107, 255, 0.34); transform: scale(1.08); }
.cab-stat-act svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ============ ROWS ============ */
.cab-row { display: grid; gap: 24px; }
.cab-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
.cab-row-bottom { grid-template-columns: 2fr 1fr; align-items: start; }

/* card head */
.cab-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.cab-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Sora", sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: #f5f1fc;
}

.cab-title-ico {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    color: #c4a5ff;
    background: rgba(160, 107, 255, 0.14);
}

.cab-title-ico svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.cab-card-link {
    color: #b69bff;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    margin-left: auto;
    transition: color 0.2s ease;
}

.cab-card-title { min-width: 0; }

.cab-card-link:hover { color: #d7c4ff; }

.cab-help-dot {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #a99fc0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ============ SKIN CARD ============ */
.cab-skin-stage {
    position: relative;
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 30% 20%, rgba(129, 79, 216, 0.2), transparent 55%),
        rgba(10, 7, 16, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 16px;
}

.cab-skin-img,
.cab-skin-ph {
    width: 56px;
    height: 112px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.4));
}

.cab-skin-ph-back { opacity: 0.85; }

.cab-skin-copy strong { display: block; font-family: "Sora", sans-serif; font-size: 16px; color: #f4f0fc; margin-bottom: 6px; }
.cab-skin-copy p { margin: 0; color: #a99fc0; font-size: 12.5px; line-height: 1.5; }

.cab-skin-btn {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    margin-bottom: 14px;
}
.cab-skin-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.cab-skin-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    color: #8d83a3;
    font-size: 12px;
}

.cab-dot { width: 7px; height: 7px; border-radius: 50%; background: #20e898; box-shadow: 0 0 8px rgba(32, 232, 152, 0.8); }

/* ============ GAME STATS ============ */
.cab-stat-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.cab-tile {
    position: relative;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cab-tile-label { display: block; color: #9c92b6; font-size: 11.5px; font-weight: 600; margin-bottom: 8px; }
.cab-tile-value { display: block; color: #f4f0fc; font-family: "Sora", sans-serif; font-size: 16px; font-weight: 700; }

.cab-tile-ico {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #8a7cb0;
}
.cab-tile-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.cab-tile-pulse {
    position: absolute;
    top: 16px;
    right: 14px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #20e898;
    box-shadow: 0 0 0 0 rgba(32, 232, 152, 0.6);
    animation: cab-pulse 2s ease-out infinite;
}

.cab-progress { margin-top: 14px; }
.cab-progress-head { display: flex; justify-content: space-between; font-size: 13px; color: #c4bbd9; margin-bottom: 8px; }
.cab-progress-head strong { color: #f4f0fc; }

.cab-progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
}

.cab-progress-fill {
    height: 100%;
    width: var(--p, 0%);
    border-radius: 999px;
    background: linear-gradient(90deg, #a06bff, #814fd8);
    box-shadow: 0 0 12px rgba(160, 107, 255, 0.6);
    transform-origin: left;
    animation: cab-fill 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cab-progress-pct {
    display: block;
    text-align: right;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #b69bff;
    letter-spacing: 0.02em;
}

/* ============ SECURITY FORM ============ */
.cab-form { display: grid; gap: 14px; }
.cab-field { display: grid; gap: 7px; }
.cab-field > span { font-size: 13px; font-weight: 600; color: #c4bbd9; }

.cab-input-wrap { position: relative; display: block; }

.cabinet-input {
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #f0edf6;
    font: inherit;
    padding: 12px 44px 12px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cabinet-input::placeholder { color: #6f6589; }
.cabinet-input:focus {
    outline: none;
    border-color: rgba(160, 107, 255, 0.6);
    box-shadow: 0 0 0 4px rgba(129, 79, 216, 0.14);
}

.cab-eye {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #8a7cb0;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: color 0.2s ease;
}
.cab-eye:hover { color: #c4a5ff; }
.cab-eye svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.cab-form-btn { width: 100%; min-height: 46px; border-radius: 12px; margin-top: 4px; }

.inline-message {
    border-radius: 12px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #dbd5e5;
    line-height: 1.55;
    font-size: 14px;
}
.inline-message.error { color: #ffd4d1; border-color: rgba(255, 96, 125, 0.4); background: rgba(255, 96, 125, 0.12); }
.inline-message.success { color: #dcffe9; border-color: rgba(32, 232, 152, 0.4); background: rgba(32, 232, 152, 0.12); }
.cab-form button:disabled { opacity: 0.7; cursor: wait; transform: none; }

/* ============ PURCHASES TABLE ============ */
.table-wrap { overflow-x: auto; }
.cabinet-table { width: 100%; border-collapse: collapse; }

/* Purchases keep their own scroll area on compact layouts instead of being clipped by the card. */
.cab-card-purchases .table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.cab-tx-table { min-width: 640px; table-layout: auto; }
.cab-tx-table th, .cab-tx-table td { padding: 13px 14px; font-size: 13px; vertical-align: middle; line-height: 1.45; }
.cab-tx-table th:first-child, .cab-tx-table td:first-child { padding-left: 2px; }
.cab-tx-table th:last-child, .cab-tx-table td:last-child { padding-right: 2px; }
.cab-tx-table td:nth-child(3) { white-space: normal; word-break: break-word; color: #d8d1e8; min-width: 120px; }
.cab-tx-date { white-space: nowrap; }
.cab-amt-up, .cab-amt-down { white-space: nowrap; }
.cab-tx-table th:nth-child(2), .cab-tx-table td:nth-child(2) { white-space: nowrap; }
.cab-tx-table th:nth-child(4), .cab-tx-table td:nth-child(4) { text-align: right; }
.cab-tx-table th:nth-child(5), .cab-tx-table td:nth-child(5) { text-align: center; white-space: nowrap; }

.cabinet-table th, .cabinet-table td {
    padding: 13px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    text-align: left;
    font-size: 14px;
}

.cabinet-table th {
    color: #9a90aa;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.cabinet-table tbody tr { transition: background 0.18s ease; }
.cabinet-table tbody tr:hover { background: rgba(160, 107, 255, 0.06); }
.cabinet-table td { color: #e9e4f3; }
.cab-tx-date { color: #a99fc0; white-space: nowrap; }
.cab-amt-up { color: #20e898; font-weight: 700; white-space: nowrap; }
.cab-amt-down { color: #ff8aa0; font-weight: 700; white-space: nowrap; }

.purchase-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
}
.purchase-status-pending { color: #dbc6ff; border: 1px solid rgba(129, 79, 216, 0.4); background: rgba(129, 79, 216, 0.14); }
.purchase-status-completed { color: #b9ffd6; border: 1px solid rgba(32, 232, 152, 0.4); background: rgba(32, 232, 152, 0.12); }
.purchase-status-failed { color: #ffd7d3; border: 1px solid rgba(255, 96, 125, 0.4); background: rgba(255, 96, 125, 0.14); }

/* ============ NOTIFICATIONS ============ */
.cab-notif-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.cab-notif {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    transition: background 0.2s ease, border-color 0.2s ease;
}
.cab-notif:hover { background: rgba(160, 107, 255, 0.07); border-color: rgba(160, 107, 255, 0.22); }

.cab-notif-ico {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: #c4a5ff;
    background: rgba(160, 107, 255, 0.14);
}
.cab-notif-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cab-notif-ico.nt-gift { color: #ffcf6b; background: rgba(255, 207, 107, 0.13); }
.cab-notif-ico.nt-shield { color: #8bb6ff; background: rgba(110, 150, 255, 0.13); }
.cab-notif-ico.nt-coin { color: #7fe3c4; background: rgba(75, 198, 173, 0.13); }

.cab-notif-body { min-width: 0; }
.cab-notif-body strong { display: block; color: #f2eefb; font-size: 14px; font-weight: 700; }
.cab-notif-body p { margin: 2px 0 0; color: #a99fc0; font-size: 12.5px; line-height: 1.4; }

.cab-notif-time { display: inline-flex; align-items: center; gap: 6px; color: #8d83a3; font-size: 11.5px; white-space: nowrap; }
.cab-unread { width: 7px; height: 7px; border-radius: 50%; background: #a06bff; box-shadow: 0 0 8px rgba(160, 107, 255, 0.8); }

/* ============ REFERRAL ============ */
.cab-ref-banner {
    margin: 0 0 16px;
    border-radius: 14px;
    overflow: hidden;
    line-height: 0;
    border: 1px solid rgba(160, 107, 255, 0.24);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 10px 26px rgba(0, 0, 0, 0.32);
}
.cab-ref-banner img {
    display: block;
    width: 100%;
    height: 124px;
    object-fit: cover;
    object-position: center 38%;
}

.cab-ref-lead { color: #c4bbd9; line-height: 1.55; margin: 0 0 16px; }
.cab-ref-label { display: block; color: #9c92b6; font-size: 12px; font-weight: 600; margin-bottom: 8px; }

.cab-ref-link {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}
.cab-ref-link input {
    flex: 1;
    min-height: 46px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #d7c4ff;
    font: 500 13px "JetBrains Mono", monospace;
    padding: 12px 50px 12px 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cab-ref-link input:focus { outline: none; border-color: rgba(160, 107, 255, 0.5); }

.cab-ref-copy {
    position: absolute;
    right: 6px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: #c4a5ff;
    cursor: pointer;
    background: rgba(160, 107, 255, 0.16);
    border: 1px solid rgba(160, 107, 255, 0.3);
    transition: background 0.2s ease, transform 0.2s ease;
}
.cab-ref-copy:hover { background: rgba(160, 107, 255, 0.3); transform: scale(1.05); }
.cab-ref-copy.copied { color: #20e898; border-color: rgba(32, 232, 152, 0.5); background: rgba(32, 232, 152, 0.16); }
.cab-ref-copy svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.cab-ref-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.cab-ref-stat {
    position: relative;
    padding: 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}
.cab-ref-ico {
    position: absolute;
    top: 14px;
    right: 14px;
    color: #8a7cb0;
}
.cab-ref-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cab-ref-num { display: block; color: #fff; font-family: "Sora", sans-serif; font-size: 26px; font-weight: 800; }
.cab-ref-cap { display: block; color: #a99fc0; font-size: 12px; margin-top: 2px; }

/* ============ SETTINGS ============ */
.cab-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.cab-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}
.cab-toggle span { display: flex; flex-direction: column; }
.cab-toggle strong { color: #f2eefb; font-size: 14px; font-weight: 700; }
.cab-toggle small { color: #a99fc0; font-size: 12px; margin-top: 2px; }
.cab-toggle input { display: none; }
.cab-toggle i {
    position: relative;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
    transition: background 0.22s ease;
}
.cab-toggle i::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #d8d2e6;
    transition: transform 0.22s ease, background 0.22s ease;
}
.cab-toggle input:checked + i { background: linear-gradient(135deg, #a06bff, #814fd8); border-color: rgba(160, 107, 255, 0.5); }
.cab-toggle input:checked + i::after { transform: translateX(20px); background: #fff; }

.cab-settings-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cab-settings-actions .btn { min-height: 44px; }
.cabinet-logout { min-width: 200px; }

.section-loading { color: #bfb8cb; }

/* empty state (e.g. no purchases yet) */
.cab-empty { text-align: center; padding: 26px 16px 16px; }
.cab-empty-img {
    width: 156px;
    height: auto;
    margin: 0 auto 14px;
    filter: drop-shadow(0 14px 30px rgba(129, 79, 216, 0.45));
    animation: cab-float 4s ease-in-out infinite;
}
.cab-empty h3 { font-family: "Sora", sans-serif; font-size: 18px; color: #f2eefb; margin-bottom: 8px; }
.cab-empty p { color: #a99fc0; line-height: 1.6; max-width: 360px; margin: 0 auto; }

@keyframes cab-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* ============ ANIMATIONS ============ */
@keyframes cab-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes cab-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}
@keyframes cab-pulse {
    0% { box-shadow: 0 0 0 0 rgba(32, 232, 152, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(32, 232, 152, 0); }
    100% { box-shadow: 0 0 0 0 rgba(32, 232, 152, 0); }
}
@keyframes cab-avatar-glow {
    0%, 100% { box-shadow: 0 0 0 4px rgba(129, 79, 216, 0.18), 0 0 26px rgba(160, 107, 255, 0.35); }
    50% { box-shadow: 0 0 0 4px rgba(129, 79, 216, 0.26), 0 0 40px rgba(160, 107, 255, 0.6); }
}
@keyframes cab-twinkle {
    from { opacity: 0.45; }
    to { opacity: 0.85; }
}

.cab-content > *:nth-child(1) { animation-delay: 0.02s; }
.cab-content > *:nth-child(2) { animation-delay: 0.08s; }
.cab-content > *:nth-child(3) { animation-delay: 0.14s; }
.cab-content > *:nth-child(4) { animation-delay: 0.2s; }

@media (prefers-reduced-motion: reduce) {
    .cab-card, .cab-hero, .cab-progress-fill, .cab-avatar, .cab-tile-pulse, .cab-hero-bg::before { animation: none !important; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1860px) {
    .cab-row-bottom { grid-template-columns: 1fr 1fr; }
    .cab-card-purchases { grid-column: 1 / -1; }
}

@media (max-width: 1540px) {
    .cab-hero-grid { grid-template-columns: 1fr; }
    .cab-hero-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cab-row-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #sec-security { grid-column: 1 / -1; }
}

@media (max-width: 1280px) {
    .cab-row-bottom { grid-template-columns: 1fr 1fr; }
    .cab-card-purchases { grid-column: 1 / -1; }
}

@media (max-width: 1080px) {
    .cabinet-layout { grid-template-columns: 1fr; }
    .cab-sidebar { position: static; }
    .cab-nav { flex-direction: row; flex-wrap: wrap; }
    .cab-nav-item { flex: 1 1 auto; }
    .cab-nav-item.is-active::before { display: none; }
    .cab-row-3 { grid-template-columns: 1fr; }
    #sec-security { grid-column: auto; }
}

@media (max-width: 860px) {
    .cab-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cab-row-bottom { grid-template-columns: 1fr; }
    .cab-stat-tiles { grid-template-columns: 1fr; }
    .cab-settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .cabinet-layout { width: calc(100% - 32px); }
    .cab-hero, .cab-card { padding: 18px; }
    .cab-hero-intro { flex-direction: column; }
    .cab-profile-chips { grid-template-columns: 1fr; }
    .cab-hero-stats { grid-template-columns: 1fr; }
    .cab-ref-stats { grid-template-columns: 1fr; }
    .cab-card-head { align-items: flex-start; }
    .cab-card-link { width: 100%; margin-left: 0; }
    .cab-notif { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
    .cab-notif-time { grid-column: 2; }
    .cab-nav-item span:last-child { font-size: 13px; }
}

/* ============ NOTIFICATIONS BELL + MODAL ============ */
.cab-bell { position: relative; display: inline-flex; align-items: center; }
.cab-bell-btn {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(160, 107, 255, 0.08);
    color: #e9e3fb; cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.cab-bell-btn:hover { background: rgba(160, 107, 255, 0.18); border-color: rgba(160, 107, 255, 0.34); }
.cab-bell-btn:active { transform: scale(0.96); }
.cab-bell-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.cab-bell-badge {
    position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 9px; background: #ff4d6d; color: #fff;
    font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px rgba(13, 10, 19, 0.95);
}

.cab-bell-panel {
    position: fixed; z-index: 9999;
    width: 380px; max-width: calc(100vw - 32px);
    border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.10);
    background: linear-gradient(180deg, rgba(24, 18, 35, 0.98), rgba(15, 11, 22, 0.99));
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.5);
    padding: 14px; backdrop-filter: blur(8px);
    animation: cabBellIn 0.16s ease;
}
@keyframes cabBellIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.cab-bell-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cab-bell-head strong { color: #f2eefb; font-size: 15px; font-weight: 700; }
.cab-bell-readall {
    background: none; border: 0; color: #b79bff; font-size: 12.5px; cursor: pointer; padding: 4px 6px; border-radius: 8px;
}
.cab-bell-readall:hover { color: #d6c6ff; background: rgba(160, 107, 255, 0.12); }
.cab-bell-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.cab-bell-all {
    width: 100%; margin-top: 12px; padding: 10px; border-radius: 11px;
    border: 1px solid rgba(160, 107, 255, 0.28); background: rgba(160, 107, 255, 0.12);
    color: #e7defc; font-size: 13.5px; font-weight: 600; cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}
.cab-bell-all:hover { background: rgba(160, 107, 255, 0.22); border-color: rgba(160, 107, 255, 0.45); }

.cab-notif.is-unread { background: rgba(160, 107, 255, 0.10); border-color: rgba(160, 107, 255, 0.26); }
.cab-notif[data-id] { cursor: pointer; }

/* Modal */
body.cab-modal-open { overflow: hidden; }
.cab-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px; }
.cab-modal-backdrop { position: absolute; inset: 0; background: rgba(6, 4, 12, 0.66); backdrop-filter: blur(4px); }
.cab-modal-dialog {
    position: relative; z-index: 1; width: 560px; max-width: 100%; max-height: 82vh;
    display: flex; flex-direction: column;
    border-radius: 20px; border: 1px solid rgba(255, 255, 255, 0.10);
    background: linear-gradient(180deg, rgba(22, 16, 33, 0.99), rgba(14, 10, 21, 1));
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    animation: cabModalIn 0.18s ease;
}
@keyframes cabModalIn { from { opacity: 0; transform: translateY(10px) scale(0.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.cab-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 14px; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.cab-modal-title { margin: 0; color: #f4f0fc; font-size: 18px; font-weight: 700; }
.cab-modal-close {
    width: 34px; height: 34px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04); color: #c9c0de; font-size: 15px; cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.cab-modal-close:hover { background: rgba(255, 77, 109, 0.18); color: #fff; border-color: rgba(255, 77, 109, 0.4); }
.cab-modal-list { list-style: none; margin: 0; padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }

@media (max-width: 600px) {
    .cab-bell-panel { max-width: calc(100vw - 24px); }
    .cab-modal { padding: 12px; }
    .cab-modal-dialog { max-height: 88vh; }
}
