/* ================= THEME ================= */
:root {
    color-scheme: dark;
    --color-background: #070709;
    --color-on-background: #ffffff;
    --color-background-hover: #18181B;
    --color-on-background-hover: #ffffff;
    --color-primary: #18181B;
    --color-primary-disabled: #1c1c1c;
    --color-on-primary: #ffffff;
    --color-error: #de0000;
    --color-on-error: #ffffff;
    --the-button-on-top: brightness(100%) saturate(100%);
    --level-button: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, .5));
    --color-background-list: #070709de;
    --sidebar-width: 65px;
    --topbar-height: 72px;
}

/* ================= BASE ================= */
*, *::before, *::after {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
}

body {
    min-height: 100vh;
    overflow: hidden;
    background: var(--color-background);
    color: var(--color-on-background);
    font-family: 'Poppins', sans-serif;
}

a {
    color: inherit;
}

main {
    min-height: 100%;
    background: var(--color-background);
    color: var(--color-on-background);
}

/* Only pages that actually use the legacy 3-column grid keep it. */
.page-list,
.page-roulette {
    display: grid;
    grid-template-columns: minmax(16rem, .6fr) minmax(0, 1fr) minmax(16rem, .6fr);
    grid-template-rows: minmax(0, 1fr);
    column-gap: 2rem;
    min-height: 100%;
}

.page-list > div,
.page-roulette > div {
    min-height: 0;
    overflow-y: auto;
}

.spinner {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.make-it-red {
    color: var(--color-error);
}

input[type="checkbox"],
input[type="radio"] {
    height: 1.25rem;
    width: 1.25rem;
    cursor: pointer;
    margin: 0;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #4b4b52;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #686870;
}

::picker(select) {
    background: var(--color-background);
    color: var(--color-on-background);
}

/* ================= LEADERBOARD ROW (LEFT COLUMN) ================= */
.board-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    height: 55px !important;
    padding: 0 16px !important;
    gap: 14px !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    transition: all 0.2s ease-in-out !important;
    border-radius: 12px !important;
}

.board-row:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    filter: brightness(1.2) !important;
    transform: translateX(4px) !important;
}

.board-row.active {
    background-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4) !important;
}

.user-icon-container {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    flex-shrink: 0 !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}

.board-user-icon {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.board-row .user {
    flex: 1 !important;
    text-align: left !important;
    white-space: nowrap !important;
}

.player-name-text {
    font-size: 1.05rem !important;
    font-weight: bold !important;
    color: #fff !important;
    white-space: nowrap !important;
}

.board-row .total {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

.score-badge {
    display: inline-block !important;
    white-space: nowrap !important;
    font-family: 'Consolas', monospace !important;
    font-size: 0.9rem !important;
    font-weight: bold !important;
    color: #ffd700 !important;
    background: rgba(0, 0, 0, 0.35) !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(255, 215, 0, 0.3) !important;
}

/* ================= PROFILE CARD (RIGHT COLUMN) ================= */
.profile-header-card {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 16px !important;
    padding: 20px 25px !important;
    margin-bottom: 25px !important;
}

.profile-info {
    flex: 1 !important;
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

.player-title {
    margin: 0 0 10px 0 !important;
    font-size: 2rem !important;
    font-weight: 800 !important;
}

.player-stats-row {
    display: flex !important;
    align-items: center !important;
    margin-bottom: 0 !important;
}

.stat-badge.score-gold {
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-size: 1.2rem !important;
    font-weight: bold !important;
    color: #ffb703 !important;
    background: rgba(255, 183, 3, 0.15) !important;
    border: 1px solid rgba(255, 183, 3, 0.4) !important;
    padding: 6px 14px !important;
    border-radius: 8px !important;
    box-shadow: 0 0 12px rgba(255, 183, 3, 0.2) !important;
}

/* Discord text row */
.discord-text-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding-left: 2px !important;
    margin-top: 4px !important;
    background: transparent !important;
    border: none !important;
}

.discord-text-icon,
.discord-badge-icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

.discord-text-id {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
}

/* Avatar & Social Icons */
.profile-avatar-box {
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    gap: 10px !important;
}

.profile-user-avatar {
    width: 130px !important;
    height: 130px !important;
    border-radius: 12px !important;
    object-fit: cover !important;
    display: block !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.player-socials-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 10px !important;
    width: 100% !important;
    flex-wrap: wrap !important;
}

.discord-tag {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: rgba(88, 101, 242, 0.18) !important;
    border: 1px solid rgba(88, 101, 242, 0.45) !important;
    padding: 4px 10px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
}

.discord-tag:hover {
    background: rgba(88, 101, 242, 0.35) !important;
    border-color: #5865F2 !important;
    transform: translateY(-2px) !important;
}

.discord-icon {
    width: 16px !important;
    height: 16px !important;
    object-fit: contain !important;
    flex-shrink: 0 !important;
}

.discord-username {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    color: #e2e8f0 !important;
    letter-spacing: 0.2px !important;
}

.copy-toast {
    position: absolute !important;
    top: -28px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: #5865F2 !important;
    color: #fff !important;
    font-size: 0.7rem !important;
    font-weight: bold !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    animation: fadeInOut 1.5s forwards !important;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 5px); }
    15% { opacity: 1; transform: translate(-50%, 0); }
    85% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -5px); }
}

.player-socials-row .social-icon {
    width: 22px !important;
    height: 22px !important;
    object-fit: contain !important;
    opacity: 0.85 !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
    display: block !important;
}

.player-socials-row .social-icon:hover {
    opacity: 1 !important;
    transform: scale(1.2) !important;
}

.social-icon.gdvn-icon {
    width: auto !important;
    height: 26px !important;
    max-width: 60px !important;
    border-radius: 4px !important;
    object-fit: contain !important;
}

.social-icon.gdvn-icon:hover {
    transform: scale(1.1) !important;
}

/* ================= PROFILE SECTIONS & LEVEL CARDS ================= */
.profile-section {
    margin-bottom: 25px !important;
    text-align: left !important;
}

.section-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #e0e0e0 !important;
    margin-bottom: 12px !important;
}

.level-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 12px !important;
}

.level-card {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 14px 18px !important;
    border-radius: 12px !important;
    background-size: cover !important;
    background-position: center !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    text-decoration: none !important;
    color: #fff !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.level-card:hover {
    transform: translateY(-3px) scale(1.02) !important;
    border-color: rgba(255, 215, 0, 0.6) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.2) !important;
}

.level-card.hardest-card {
    padding: 18px 22px !important;
    border: 2px solid rgba(255, 215, 0, 0.5) !important;
}

.level-card-info {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.level-rank {
    font-family: 'Consolas', monospace !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
    color: #ffd700 !important;
}

.level-title {
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
}

.level-card-score {
    font-family: 'Consolas', monospace !important;
    font-size: 0.95rem !important;
    font-weight: bold !important;
    color: #4cc9f0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(76, 201, 240, 0.3) !important;
}

/* ================= FILTER TABS ================= */
.filter-tabs {
    display: flex !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
    flex-wrap: wrap !important;
}

.filter-tabs button {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ccc !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.filter-tabs button:hover {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #fff !important;
}

.filter-tabs button.active {
    background: #ffd700 !important;
    color: #000 !important;
    border-color: #ffd700 !important;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4) !important;
}

.empty-msg {
    color: #888 !important;
    font-style: italic !important;
    padding: 10px 0 !important;
}

.uncompleted-card {
    opacity: 0.75 !important;
    filter: grayscale(0.2) !important;
}

.uncompleted-card:hover {
    opacity: 1 !important;
    filter: grayscale(0) !important;
}


/* ================= PROFILE PAGE ================= */
.page-profile {
    width: 100%;
    min-height: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 40px;
    font-family: 'Poppins', sans-serif;
    display: block !important;
}

.page-profile > div {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    box-sizing: border-box;
}

.page-profile > div:first-child {
    max-width: 700px;
}

.page-profile > div:last-child {
    width: 100%;
}

.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: bold;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
}

.toast-notification.success { background-color: #2e7d32; }
.toast-notification.error { background-color: #d32f2f; }
.toast-notification.info { background-color: #0288d1; }

@keyframes slideIn {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}


/* ================= APP SHELL ================= */

#app {
    min-height: 100vh;
}


/* ================= GLASS SIDEBAR ================= */

.app-sidebar {
    position: fixed;

    top: var(--topbar-height);
    left: 0;

    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));

    padding: 12px 8px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    overflow: hidden;

    z-index: 2000;

    background: rgba(12, 12, 16, 0.30);

    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);

    border-right: 1px solid rgba(255,255,255,.08);

    box-shadow:
        inset -1px 0 0 rgba(255,255,255,.025),
        8px 0 30px rgba(0,0,0,.14);

    transition:
        width .3s cubic-bezier(.22, 1, .36, 1),
        background .25s ease,
        box-shadow .25s ease;
}


/* ánh sáng nhẹ trên mặt kính */

.app-sidebar::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.055) 0%,
            transparent 28%,
            rgba(255,255,255,.012) 65%,
            transparent 100%
        );
}


/* Hover sidebar */

.app-sidebar:hover {
    width: 250px;

    background: rgba(12, 12, 16, 0.40);

    box-shadow:
        inset -1px 0 0 rgba(255,255,255,.035),
        12px 0 36px rgba(0,0,0,.18);
}


/* ================= SIDEBAR CONTENT ================= */

.sidebar-nav,
.sidebar-footer {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;

    gap: 8px;
}


.sidebar-footer {
    padding-top: 12px;

    border-top:
        1px solid rgba(255,255,255,.07);
}


.sidebar-item {
    width: 100%;
    min-height: 44px;

    padding: 10px 12px;

    border: 0;
    border-radius: 10px;

    display: flex;
    align-items: center;

    gap: 16px;

    flex-shrink: 0;

    background: transparent;

    color: #a1a1aa;

    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    font: inherit;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}


.sidebar-item:hover,
.sidebar-item.router-link-exact-active {
    background:
        rgba(255,255,255,.08);

    color: #fff;
}


.sidebar-item:hover {
    transform: translateX(2px);
}


.sidebar-item-admin,
.sidebar-logout {
    color: #ef4444;
}


.sidebar-login {
    background:
        linear-gradient(
            135deg,
            #6366f1,
            #a855f7
        );

    color: #fff;
}


/* ================= SIDEBAR ICON ================= */

.sidebar-icon {
    width: 24px;
    min-width: 24px;
    height: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
}


.sidebar-icon img {
    width: 20px !important;
    height: 20px !important;

    min-width: 20px !important;
    max-width: 20px !important;

    object-fit: contain !important;

    filter: var(--the-button-on-top);
}


/* label chỉ hiện khi hover sidebar */

.sidebar-label {
    opacity: 0;

    pointer-events: none;

    font-size: 14px;
    font-weight: 500;

    transition:
        opacity .18s ease;
}


.app-sidebar:hover .sidebar-label {
    opacity: 1;
}


/* ================= SIDEBAR USER ================= */

.user-info-box {
    min-height: 44px;

    padding: 6px 8px;

    display: flex;
    align-items: center;

    gap: 12px;
}


.user-avatar {
    width: 32px !important;
    height: 32px !important;

    min-width: 32px;

    border-radius: 50%;

    object-fit: cover;

    border:
        1px solid rgba(168,85,247,.7);
}


.sidebar-user-label {
    display: flex;
    flex-direction: column;
}


.sidebar-username {
    color: #fff;

    font-weight: 700;
    font-size: 13px;
}


/* gradient ADMIN */

.sidebar-admin-label {
    font-size: 10px;
    font-weight: 700;

    background:
        linear-gradient(
            90deg,
            #EECDA3,
            #EF629F,
            #EECDA3
        );

    background-size: 200% auto;

    background-clip: text;
    -webkit-background-clip: text;

    color: transparent;
    -webkit-text-fill-color: transparent;

    animation:
        admin-gradient 3s linear infinite;
}


@keyframes admin-gradient {
    to {
        background-position:
            200% center;
    }
}


/* ================= MAIN CONTENT ================= */

.main-content {
    margin-left:
        var(--sidebar-width);

    width:
        calc(100% - var(--sidebar-width));

    height: 100vh;

    min-width: 0;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background:
        var(--color-background);

    color:
        var(--color-on-background);
}


/* ================= GLASS TOPBAR ================= */

.topbar {
    height: var(--topbar-height);
    min-height: var(--topbar-height);

    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    padding: 0 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    z-index: 3000;

    background: rgba(12, 12, 16, 0.28);

    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);

    border-bottom: 1px solid rgba(255,255,255,.08);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.055),
        0 8px 30px rgba(0,0,0,.13);

    color: #fff;
    overflow: hidden;
}


/* ánh phản chiếu trên topbar */

.topbar::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.06),
            transparent 32%,
            rgba(255,255,255,.012) 68%,
            transparent
        );
}


/* line kính phía dưới */

.topbar::after {
    content: "";

    position: absolute;

    left: 24px;
    right: 24px;

    bottom: 0;

    height: 1px;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.12),
            transparent
        );
}


/* ================= TOPBAR CONTENT ================= */

.topbar-left,
.topbar-center,
.topbar-right {
    position: relative;

    z-index: 1;

    display: flex;
    align-items: center;
}


.topbar-left,
.topbar-right {
    flex-shrink: 0;
}


.topbar-center {
    flex: 1;

    justify-content: center;

    min-width: 0;
}


.topbar-right {
    gap: 10px;
}


/* ================= BRAND ================= */

.topbar-brand {
    display: inline-flex;

    align-items: center;

    gap: 12px;

    text-decoration: none;
}


.topbar-logo {
    width: 42px;
    height: 42px;

    border-radius: 10px;

    object-fit: cover;
}


.topbar-brand-text {
    display: flex;
    flex-direction: column;

    line-height: 1.1;

    white-space: nowrap;
}


.topbar-brand-text h2 {
    margin: 0;

    color: #fff;

    font-size: 21px;
    font-weight: 700;
}


.topbar-brand-text span {
    margin-top: 4px;

    color: #8f8f98;

    font-size: 11px;
}


/* ================= GLASS SEARCH ================= */

.topbar-search {
    width:
        min(470px, 100%);

    height: 44px;

    padding:
        0 13px;

    display: flex;

    align-items: center;

    gap: 9px;

    border-radius: 14px;

    background:
        rgba(255,255,255,.055);

    backdrop-filter:
        blur(16px)
        saturate(160%);

    -webkit-backdrop-filter:
        blur(16px)
        saturate(160%);

    border:
        1px solid rgba(255,255,255,.10);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.045),
        0 5px 18px rgba(0,0,0,.11);

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}


.topbar-search:focus-within {
    background:
        rgba(255,255,255,.075);

    border-color:
        rgba(168,85,247,.45);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 0 0 3px rgba(168,85,247,.08),
        0 8px 24px rgba(0,0,0,.14);

    transform:
        translateY(-1px);
}


.topbar-search-icon {
    color: #a1a1aa;

    font-size: 20px;

    line-height: 1;
}


.topbar-search input {
    flex: 1;

    min-width: 0;

    border: 0;

    outline: 0;

    background: transparent;

    color: #fff;

    font: inherit;

    font-size: 14px;
}


.topbar-search input::placeholder {
    color: #8a8a93;
}


.topbar-shortcut {
    padding:
        4px 7px;

    border-radius: 7px;

    background:
        rgba(255,255,255,.07);

    border:
        1px solid rgba(255,255,255,.05);

    color: #a0a0a8;

    font-size: 11px;

    white-space: nowrap;
}


/* ================= GLASS TOPBAR BUTTONS ================= */

.topbar-btn,
.topbar-icon-btn,
.topbar-user {
    min-height: 40px;

    border:
        1px solid rgba(255,255,255,.09);

    border-radius: 11px;

    background:
        rgba(255,255,255,.055);

    backdrop-filter:
        blur(14px)
        saturate(160%);

    -webkit-backdrop-filter:
        blur(14px)
        saturate(160%);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 4px 14px rgba(0,0,0,.09);

    color: #fff;

    text-decoration: none;

    transition:
        transform .2s cubic-bezier(.22,1,.36,1),
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}


.topbar-btn {
    padding:
        0 15px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;
}


.topbar-icon-btn {
    width: 40px;

    display: inline-flex;

    align-items: center;
    justify-content: center;
}


.topbar-icon-btn img {
    width: 19px;
    height: 19px;

    filter:
        var(--the-button-on-top);
}


.topbar-user {
    padding:
        0 10px;

    display: inline-flex;

    align-items: center;

    gap: 8px;

    font-size: 13px;
    font-weight: 600;
}


.topbar-user img {
    width: 27px;
    height: 27px;

    border-radius: 50%;

    object-fit: cover;
}


.topbar-btn:hover,
.topbar-icon-btn:hover,
.topbar-user:hover {
    transform:
        translateY(-2px);

    background:
        rgba(255,255,255,.095);

    border-color:
        rgba(255,255,255,.15);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 7px 20px rgba(0,0,0,.13);
}


/* ================= PAGE CONTENT ================= */

.page-shell {
    flex: 1;

    min-height: 0;

    overflow: hidden;

    /*
       QUAN TRỌNG:
       content chạy phía sau topbar.
       Vì vậy topbar mới blur được thumbnail/background phía sau.
    */

    padding-top:
        var(--topbar-height);

    background:
        var(--color-background);
}


.page-shell > * {
    min-width: 0;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 1050px) {

    .topbar-center {
        display: none;
    }

}


@media (max-width: 760px) {

    .topbar-brand-text span,
    .topbar-user span,
    .topbar-btn:first-child {
        display: none;
    }

    .topbar {
        padding-inline: 14px;
    }

}

.page-list {
    height: calc(100vh - var(--topbar-height));
    min-height: 0;

    overflow: hidden;
}

/* Cột danh sách level */
.page-list .list-container {
    min-height: 0;
    height: 100%;

    overflow-y: auto;
}

/* Cột thông tin level */
.page-list .level-container {
    min-height: 0;
    height: 100%;

    overflow-y: auto;
}

/* Cột moderators */
.page-list .meta-container {
    min-height: 0;
    height: 100%;

    overflow: hidden;

    position: sticky;
    top: 0;

    align-self: start;
}

.page-list .meta {
    height: 100%;

    overflow: hidden;
}

/* =========================================================
   TOPBAR GLASS V4
   ========================================================= */

.topbar {
    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.075) 0%,
            rgba(255,255,255,.022) 38%,
            rgba(255,255,255,.010) 68%,
            rgba(255,255,255,.045) 100%
        ),
        rgba(8, 8, 12, .52) !important;

    backdrop-filter: blur(30px) saturate(185%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(185%) !important;

    border-bottom: 1px solid rgba(255,255,255,.10) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.075),
        inset 0 -1px 0 rgba(255,255,255,.018),
        0 10px 34px rgba(0,0,0,.16) !important;
}

.topbar-search,
.topbar-btn,
.topbar-icon-btn,
.topbar-user {
    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.085),
            rgba(255,255,255,.035)
        ) !important;

    border-color: rgba(255,255,255,.11) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.055),
        0 5px 18px rgba(0,0,0,.11) !important;
}

.topbar-search:focus-within {
    border-color: rgba(129,140,248,.50) !important;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.075),
        0 0 0 3px rgba(99,102,241,.10),
        0 8px 26px rgba(0,0,0,.15) !important;
}

/* =========================================================
   FROSTED GLASS TOPBAR
   ========================================================= */

.topbar {
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.055),
            rgba(255, 255, 255, 0.018) 45%,
            rgba(255, 255, 255, 0.008) 75%
        ),
        rgba(10, 10, 14, 0.42) !important;

    backdrop-filter:
        blur(28px)
        saturate(165%)
        brightness(0.95) !important;

    -webkit-backdrop-filter:
        blur(28px)
        saturate(165%)
        brightness(0.95) !important;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.09) !important;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 8px 28px rgba(0, 0, 0, 0.14) !important;
}

.topbar::before {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            110deg,
            rgba(255,255,255,.045),
            transparent 30%,
            transparent 70%,
            rgba(255,255,255,.018)
        );
}

.topbar-search:focus-within {
    border-color:
        rgba(255,255,255,.25) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.07),
        0 0 0 1px rgba(255,255,255,.06),
        0 0 18px rgba(255,255,255,.055) !important;

    transform:
        translateY(-1px);
}


/* =========================================================
   FINAL TOPBAR FROSTED GLASS — SCLVN
   Keep this block LAST in main.css
   ========================================================= */

/*
   The page content now actually exists behind the fixed topbar.
   This is what makes backdrop-filter visibly frost thumbnails
   while the list scrolls underneath it.
*/
.page-shell {
    flex: 1 !important;
    min-height: 0 !important;
    height: 100vh !important;

    padding-top: 0 !important;
    overflow: hidden !important;

    background: transparent !important;
}

.topbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;

    z-index: 3000 !important;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.055) 0%,
            rgba(255,255,255,.020) 48%,
            rgba(255,255,255,.010) 100%
        ),
        rgba(10,10,14,.24) !important;

    backdrop-filter:
        blur(26px)
        saturate(175%)
        brightness(.92) !important;

    -webkit-backdrop-filter:
        blur(26px)
        saturate(175%)
        brightness(.92) !important;

    border-bottom:
        1px solid rgba(255,255,255,.105) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.085),
        inset 0 -1px 0 rgba(255,255,255,.025),
        0 9px 28px rgba(0,0,0,.16) !important;
}

/* Soft reflected sheen on the glass */
.topbar::before {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;

    pointer-events: none !important;

    background:
        linear-gradient(
            115deg,
            rgba(255,255,255,.07) 0%,
            rgba(255,255,255,.018) 24%,
            transparent 48%,
            rgba(255,255,255,.018) 76%,
            transparent 100%
        ) !important;

    opacity: .72 !important;
}

/* Fine glass edge */
.topbar::after {
    content: "" !important;
    position: absolute !important;
    left: 16px !important;
    right: 16px !important;
    bottom: 0 !important;
    height: 1px !important;

    pointer-events: none !important;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255,255,255,.16),
            transparent
        ) !important;
}

/* Search field = slightly denser frosted pane */
.topbar-search {
    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.075),
            rgba(255,255,255,.032)
        ),
        rgba(18,18,23,.28) !important;

    backdrop-filter:
        blur(18px)
        saturate(165%) !important;

    -webkit-backdrop-filter:
        blur(18px)
        saturate(165%) !important;

    border:
        1px solid rgba(255,255,255,.12) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.055),
        0 5px 18px rgba(0,0,0,.10) !important;
}

.topbar-search:focus-within {
    border-color:
        rgba(255,255,255,.24) !important;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.075),
        0 0 0 1px rgba(255,255,255,.055),
        0 0 16px rgba(255,255,255,.060),
        0 7px 20px rgba(0,0,0,.12) !important;
}


/* =========================================================
   FINAL GLOBAL SCROLL FIX + TOPBAR USER ROLE
   ========================================================= */

.page-shell {
    flex: 1 !important;
    min-height: 0 !important;
    height: 100vh !important;
    padding-top: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: transparent !important;
}

/* Normal pages scroll with page-shell and begin below the fixed topbar. */
.page-shell > *:not(.page-list):not(.page-roulette) {
    min-height: 100vh !important;
    padding-top: var(--topbar-height) !important;
}

/* List and Roulette keep their own scoped scrolling. */
.page-shell > .page-list,
.page-shell > .page-roulette {
    padding-top: 0 !important;
}

.topbar-user {
    min-height: 42px !important;
    padding: 5px 10px !important;
}

.topbar-user-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    min-width: 0;
    line-height: 1.05;
}

.topbar-username {
    color: #fff;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.topbar-admin-label {
    margin-top: 3px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .08em;

    background: linear-gradient(
        90deg,
        #EECDA3,
        #EF629F,
        #EECDA3
    );
    background-size: 200% auto;

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    animation: admin-gradient 3s linear infinite;
}


/* =========================================================
   SUBMIT + ADMIN UI V7
   ========================================================= */

.page-submit,
.page-admin {
    width: 100% !important;
    min-height: 100vh !important;
    padding:
        calc(var(--topbar-height) + 30px)
        26px
        42px !important;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    background:
        radial-gradient(circle at 50% -10%, rgba(255,255,255,.045), transparent 32%),
        var(--color-background) !important;
}

/* ---------- Submit ---------- */

.submit-shell {
    width: min(880px, 100%);
    margin: 0 auto;
}

.submit-header,
.admin-header {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.submit-header h1,
.admin-header h1 {
    margin: 4px 0 4px;
    color: #fff;
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1.05;
    letter-spacing: -.035em;
}

.submit-header p,
.admin-header p,
.submit-section-head p {
    margin: 0;
    color: #898993;
    font-size: 12px;
    line-height: 1.6;
}

.submit-kicker,
.admin-kicker,
.admin-record-label {
    color: #8d8d98;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .16em;
}

.submit-header-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.09);
}

.submit-header-icon svg,
.submit-state-icon svg,
.admin-empty-icon svg,
.admin-refresh-btn svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.submit-header-icon svg {
    width: 21px;
    height: 21px;
}

.submit-card,
.submit-state-card,
.admin-record-card,
.admin-empty,
.admin-access-card {
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.09);
    background:
        linear-gradient(135deg, rgba(255,255,255,.038), rgba(255,255,255,.014)),
        rgba(12,12,16,.78);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.035),
        0 14px 34px rgba(0,0,0,.18);
}

.submit-card {
    padding: 22px;
}

.submit-section-head {
    padding-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.submit-section-head h2 {
    margin: 0 0 4px;
    font-size: 17px;
}

.submit-user-chip {
    padding: 6px 9px 6px 6px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.07);
    color: #d7d7dd;
    font-size: 10px;
    font-weight: 650;
}

.submit-user-chip img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
}

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

.submit-form-grid {
    padding-top: 20px;
}

.submit-field,
.admin-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.submit-field > span,
.admin-field > span {
    color: #a8a8b0;
    font-size: 10px;
    font-weight: 650;
}

.submit-field small {
    color: #666670;
    font-size: 9px;
    font-weight: 500;
}

.submit-field-full,
.admin-field-full {
    grid-column: 1 / -1;
}

.submit-field input,
.submit-field select,
.submit-field textarea,
.admin-field input {
    width: 100%;
    min-width: 0;
    padding: 11px 12px;

    border: 1px solid rgba(255,255,255,.085);
    border-radius: 10px;
    outline: none;

    background: rgba(255,255,255,.035);
    color: #f1f1f3;

    font: inherit;
    font-size: 11px;

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.submit-field textarea {
    resize: vertical;
    min-height: 92px;
}

.submit-field input:focus,
.submit-field select:focus,
.submit-field textarea:focus,
.admin-field input:focus {
    border-color: rgba(255,255,255,.20);
    background: rgba(255,255,255,.055);
    box-shadow:
        0 0 0 3px rgba(255,255,255,.025),
        0 0 15px rgba(255,255,255,.025);
}

.submit-percent-field,
.admin-percent-field {
    position: relative;
}

.submit-percent-field input,
.admin-percent-field input {
    padding-right: 32px;
}

.submit-percent-field strong,
.admin-percent-field strong {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #777781;
    font-size: 10px;
}

.submit-mobile-card,
.admin-mobile-card {
    min-height: 61px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    align-self: end;

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.075);
    background: rgba(255,255,255,.025);

    cursor: pointer;
}

.submit-mobile-card input,
.admin-mobile-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.submit-check-ui,
.admin-check-ui {
    position: relative;
    width: 34px;
    height: 19px;
    flex-shrink: 0;

    border-radius: 999px;
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.10);
}

.submit-check-ui::after,
.admin-check-ui::after {
    content: "";
    position: absolute;
    top: 2px;
    left: 2px;

    width: 13px;
    height: 13px;
    border-radius: 50%;

    background: #a2a2aa;
    transition: transform .22s cubic-bezier(.22,1,.36,1);
}

.submit-mobile-card input:checked + .submit-check-ui,
.admin-mobile-card input:checked + .admin-check-ui {
    background: rgba(255,255,255,.18);
    border-color: rgba(255,255,255,.23);
}

.submit-mobile-card input:checked + .submit-check-ui::after,
.admin-mobile-card input:checked + .admin-check-ui::after {
    transform: translateX(15px);
    background: #fff;
}

.submit-mobile-card > span:last-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.submit-mobile-card strong {
    color: #eeeef1;
    font-size: 10px;
}

.submit-mobile-card small {
    color: #777781;
    font-size: 9px;
}

.submit-actions {
    margin-top: 18px;
    padding-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-top: 1px solid rgba(255,255,255,.06);
}

.submit-actions p {
    margin: 0;
    max-width: 430px;
    color: #6f6f79;
    font-size: 9px;
    line-height: 1.6;
}

.submit-primary-btn,
.admin-primary-btn,
.admin-refresh-btn,
.admin-reject-btn,
.admin-video-btn {
    min-height: 38px;
    padding: 9px 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.11);

    font: inherit;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;

    cursor: pointer;

    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.submit-primary-btn,
.admin-primary-btn {
    color: #08080b;
    background: #f2f2f4;
    border-color: rgba(255,255,255,.65);
}

.submit-primary-btn:hover,
.admin-primary-btn:hover {
    transform: translateY(-1px);
    background: #fff;
    box-shadow: 0 0 16px rgba(255,255,255,.07);
}

.submit-primary-btn:disabled,
.admin-primary-btn:disabled,
.admin-reject-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

.submit-error {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #fecaca;
    background: rgba(239,68,68,.08);
    border: 1px solid rgba(239,68,68,.18);
    font-size: 10px;
}

.submit-state-card,
.admin-access-card {
    min-height: 300px;
    padding: 34px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.submit-state-card h2,
.admin-access-card h1 {
    margin: 13px 0 5px;
}

.submit-state-card p,
.admin-access-card p {
    margin: 0 0 18px;
    color: #84848e;
    font-size: 11px;
}

.submit-state-icon,
.admin-empty-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.09);
    background: rgba(255,255,255,.04);
}

.submit-state-icon svg,
.admin-empty-icon svg {
    width: 21px;
    height: 21px;
}

/* ---------- Admin ---------- */

.admin-shell,
.admin-access-card {
    width: min(1000px, 100%);
    margin: 0 auto;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-count,
.admin-pending-pill {
    padding: 6px 9px;
    border-radius: 999px;
    color: #d0d0d6;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.075);
    font-size: 9px;
    font-weight: 700;
}

.admin-refresh-btn,
.admin-video-btn {
    color: #d8d8dd;
    background: rgba(255,255,255,.04);
}

.admin-refresh-btn:hover,
.admin-video-btn:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,.07);
    border-color: rgba(255,255,255,.14);
}

.admin-refresh-btn svg {
    width: 14px;
    height: 14px;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.admin-record-card {
    padding: 20px;
}

.admin-record-head {
    padding-bottom: 15px;
    margin-bottom: 17px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    border-bottom: 1px solid rgba(255,255,255,.06);
}

.admin-record-head h2 {
    margin: 3px 0 0;
    color: #fff;
    font-size: 17px;
}

.admin-pending-pill {
    color: #ffe68a;
    background: rgba(202,138,4,.10);
    border-color: rgba(250,204,21,.20);
}

.admin-mobile-card {
    min-height: 58px;
}

.admin-mobile-card > span:last-child {
    color: #dddde1;
    font-size: 10px;
    font-weight: 650;
}

.admin-record-meta {
    margin-top: 15px;
    padding: 12px 13px;
    display: grid;
    gap: 8px;
    border-radius: 11px;
    background: rgba(255,255,255,.025);
    border: 1px solid rgba(255,255,255,.055);
}

.admin-record-meta p {
    margin: 0;
    display: grid;
    grid-template-columns: 100px minmax(0,1fr);
    gap: 12px;
    font-size: 9px;
}

.admin-record-meta strong {
    color: #787882;
}

.admin-record-meta span {
    color: #c9c9ce;
    overflow-wrap: anywhere;
}

.admin-record-actions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-decision-actions {
    display: flex;
    gap: 8px;
}

.admin-reject-btn {
    color: #fca5a5;
    background: rgba(239,68,68,.06);
    border-color: rgba(239,68,68,.14);
}

.admin-reject-btn:hover {
    transform: translateY(-1px);
    background: rgba(239,68,68,.10);
    border-color: rgba(239,68,68,.24);
}

.admin-empty {
    min-height: 300px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.admin-empty h2 {
    margin: 13px 0 4px;
}

.admin-empty p {
    margin: 0;
    color: #85858f;
    font-size: 11px;
}

@media (max-width: 720px) {
    .page-submit,
    .page-admin {
        padding:
            calc(var(--topbar-height) + 20px)
            14px
            30px !important;
    }

    .submit-form-grid,
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .submit-field-full,
    .admin-field-full {
        grid-column: auto;
    }

    .submit-section-head,
    .submit-actions,
    .admin-header,
    .admin-record-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .submit-user-chip {
        width: fit-content;
    }

    .admin-header-actions,
    .admin-decision-actions {
        width: 100%;
    }

    .admin-header-actions > *,
    .admin-decision-actions > * {
        flex: 1;
    }
}


/* =========================================================
   AUTH / LOGIN UI V8
   ========================================================= */

.page-auth {
    width: 100% !important;
    min-height: 100vh !important;

    padding:
        calc(var(--topbar-height) + 34px)
        26px
        42px !important;

    display: flex !important;
    align-items: center;
    justify-content: center;

    overflow-y: auto !important;
    overflow-x: hidden !important;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(255,255,255,.045),
            transparent 31%
        ),
        var(--color-background) !important;
}

.auth-shell {
    width: min(850px, 100%);
    min-height: 520px;

    display: grid;
    grid-template-columns: .82fr 1fr;

    overflow: hidden;

    border-radius: 22px;
    border: 1px solid rgba(255,255,255,.095);

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.033),
            rgba(255,255,255,.010)
        ),
        rgba(10,10,14,.86);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.045),
        0 0 0 1px rgba(255,255,255,.016),
        0 0 20px rgba(255,255,255,.025),
        0 20px 54px rgba(0,0,0,.25);
}

/* ---------- Left brand panel ---------- */

.auth-brand-panel {
    position: relative;

    padding: 34px;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.07),
            rgba(255,255,255,.018) 42%,
            rgba(255,255,255,.008)
        ),
        rgba(255,255,255,.015);

    border-right: 1px solid rgba(255,255,255,.07);
}

.auth-brand-panel::before {
    content: "";

    position: absolute;
    inset: -30%;

    pointer-events: none;

    background:
        radial-gradient(
            circle,
            rgba(255,255,255,.07),
            transparent 45%
        );

    transform: translate(-22%, -25%);
}

.auth-brand-mark {
    position: relative;
    z-index: 1;

    width: 52px;
    height: 52px;

    overflow: hidden;

    border-radius: 15px;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        0 10px 28px rgba(0,0,0,.20);
}

.auth-brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
}

.auth-kicker {
    color: #8a8a94;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .17em;
}

.auth-brand-copy h1 {
    margin: 8px 0 10px;

    color: #fff;

    font-size: clamp(31px, 4vw, 45px);
    line-height: .98;
    letter-spacing: -.055em;
}

.auth-brand-copy p {
    max-width: 280px;

    margin: 0;

    color: #888892;

    font-size: 11px;
    line-height: 1.72;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    gap: 8px;

    color: #73737d;

    font-size: 9px;
}

.auth-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: rgba(255,255,255,.65);

    box-shadow:
        0 0 7px rgba(255,255,255,.18);
}

/* ---------- Right card ---------- */

.auth-card {
    padding: 36px;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background:
        rgba(8,8,12,.42);

    backdrop-filter:
        blur(18px)
        saturate(145%);

    -webkit-backdrop-filter:
        blur(18px)
        saturate(145%);
}

.auth-card-header {
    margin-bottom: 23px;
}

.auth-card-header h2 {
    margin: 5px 0 5px;

    color: #fff;

    font-size: 24px;
    letter-spacing: -.035em;
}

.auth-card-header p {
    max-width: 360px;

    margin: 0;

    color: #7e7e88;

    font-size: 10px;
    line-height: 1.6;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.auth-field > span {
    color: #a3a3ac;

    font-size: 9px;
    font-weight: 650;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap svg {
    position: absolute;

    top: 50%;
    left: 12px;

    width: 16px;
    height: 16px;

    transform: translateY(-50%);

    fill: none;
    stroke: #676771;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;

    pointer-events: none;

    transition:
        stroke .2s ease;
}

.auth-input-wrap input {
    width: 100%;

    padding:
        11px
        12px
        11px
        39px;

    border:
        1px solid rgba(255,255,255,.085);

    border-radius: 11px;

    outline: none;

    background:
        rgba(255,255,255,.035);

    color: #f2f2f4;

    font: inherit;
    font-size: 11px;

    transition:
        border-color .2s ease,
        background .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.auth-input-wrap input::placeholder {
    color: #595962;
}

.auth-input-wrap:focus-within svg {
    stroke: rgba(255,255,255,.72);
}

.auth-input-wrap input:focus {
    transform:
        translateY(-1px);

    border-color:
        rgba(255,255,255,.20);

    background:
        rgba(255,255,255,.055);

    box-shadow:
        0 0 0 3px rgba(255,255,255,.025),
        0 0 16px rgba(255,255,255,.028);
}

/* ---------- Buttons ---------- */

.auth-primary-btn,
.auth-secondary-btn,
.auth-danger-btn,
.auth-google-btn {
    min-height: 40px;

    padding: 9px 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border-radius: 11px;

    font: inherit;
    font-size: 10px;
    font-weight: 700;

    text-decoration: none;

    cursor: pointer;

    transition:
        transform .2s ease,
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.auth-full-btn {
    width: 100%;
}

.auth-primary-btn {
    border:
        1px solid rgba(255,255,255,.62);

    background:
        #f1f1f3;

    color:
        #09090c;
}

.auth-primary-btn:hover {
    transform:
        translateY(-1px);

    background:
        #fff;

    box-shadow:
        0 0 17px rgba(255,255,255,.075);
}

.auth-primary-btn:disabled,
.auth-google-btn:disabled {
    opacity: .48;

    cursor: not-allowed;

    transform: none;
}

.auth-google-btn,
.auth-secondary-btn {
    border:
        1px solid rgba(255,255,255,.085);

    background:
        rgba(255,255,255,.035);

    color:
        #d5d5da;
}

.auth-google-btn:hover,
.auth-secondary-btn:hover {
    transform:
        translateY(-1px);

    border-color:
        rgba(255,255,255,.15);

    background:
        rgba(255,255,255,.060);
}

.auth-google-btn svg {
    width: 16px;
    height: 16px;

    fill: currentColor;
}

.auth-danger-btn {
    border:
        1px solid rgba(239,68,68,.14);

    background:
        rgba(239,68,68,.055);

    color:
        #fca5a5;
}

.auth-danger-btn:hover {
    transform:
        translateY(-1px);

    border-color:
        rgba(239,68,68,.24);

    background:
        rgba(239,68,68,.09);
}

/* ---------- Error / divider ---------- */

.auth-error {
    padding: 10px 11px;

    display: flex;
    align-items: flex-start;
    gap: 8px;

    border-radius: 10px;

    border:
        1px solid rgba(239,68,68,.17);

    background:
        rgba(239,68,68,.065);

    color:
        #fecaca;

    font-size: 9px;
    line-height: 1.5;
}

.auth-error svg {
    width: 14px;
    height: 14px;

    flex-shrink: 0;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-divider {
    position: relative;

    margin: 1px 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-divider::before {
    content: "";

    position: absolute;

    left: 0;
    right: 0;

    height: 1px;

    background:
        rgba(255,255,255,.06);
}

.auth-divider span {
    position: relative;

    padding: 0 10px;

    background:
        #0c0c10;

    color:
        #5e5e67;

    font-size: 8px;
}

/* ---------- Bottom toggle ---------- */

.auth-card-footer {
    margin-top: 20px;

    padding-top: 16px;

    display: flex;
    justify-content: center;
    gap: 5px;

    border-top:
        1px solid rgba(255,255,255,.055);

    color:
        #72727c;

    font-size: 9px;
}

.auth-card-footer button {
    padding: 0;

    border: 0;

    background: none;

    color:
        #dfdfe3;

    font: inherit;
    font-size: inherit;
    font-weight: 700;

    cursor: pointer;
}

.auth-card-footer button:hover {
    text-decoration: underline;
}

/* ---------- Signed-in card ---------- */

.auth-logged-user {
    padding-bottom: 20px;

    display: flex;
    align-items: center;
    gap: 14px;

    border-bottom:
        1px solid rgba(255,255,255,.06);
}

.auth-logged-user > img {
    width: 52px;
    height: 52px;

    border-radius: 50%;

    object-fit: cover;

    border:
        1px solid rgba(255,255,255,.12);
}

.auth-logged-user h2 {
    margin: 4px 0 2px;

    color: #fff;

    font-size: 18px;
}

.auth-logged-user p {
    margin: 0;

    color: #73737d;

    font-size: 9px;
}

.auth-account-actions {
    margin-top: 20px;

    display: grid;
    gap: 9px;
}

/* ---------- Responsive ---------- */

@media (max-width: 760px) {
    .page-auth {
        align-items: flex-start;

        padding:
            calc(var(--topbar-height) + 20px)
            14px
            30px !important;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: 220px;

        padding: 24px;
    }

    .auth-brand-copy h1 {
        font-size: 34px;
    }

    .auth-card {
        padding: 26px 22px;
    }
}
