.global-top-nav,
.global-top-nav * {
    box-sizing:border-box;
}
.global-top-nav {
    --gtn-bg:rgba(255,255,255,.84);
    --gtn-panel:rgba(255,255,255,.94);
    --gtn-text:#111318;
    --gtn-muted:#667085;
    --gtn-line:rgba(17,24,39,.12);
    --gtn-shadow:rgba(15,23,42,.16);
    --gtn-strong:#111318;
    --gtn-strong-text:#fff;
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:9998;
    min-height:66px;
    padding:10px 18px;
    display:grid;
    grid-template-columns:auto minmax(0, 1fr) auto;
    align-items:center;
    gap:14px;
    color:var(--gtn-text);
    background:linear-gradient(180deg, var(--gtn-bg), color-mix(in srgb, var(--gtn-bg) 78%, transparent));
    border-bottom:1px solid var(--gtn-line);
    box-shadow:0 18px 48px rgba(15,23,42,.08);
    backdrop-filter:blur(18px);
    transform:translateY(0);
    transition:transform .24s ease, opacity .24s ease;
}
html.theme-dark .global-top-nav,
body.theme-dark .global-top-nav,
.theme-dark .global-top-nav {
    --gtn-bg:rgba(2,6,8,.82);
    --gtn-panel:rgba(17,24,39,.9);
    --gtn-text:#f8fafc;
    --gtn-muted:#cbd5e1;
    --gtn-line:rgba(255,255,255,.16);
    --gtn-shadow:rgba(0,0,0,.42);
    --gtn-strong:#f8fafc;
    --gtn-strong-text:#020403;
}
.global-top-nav.is-hidden {
    transform:translateY(calc(-100% - 6px));
    opacity:.08;
}
.global-top-nav-trigger {
    position:fixed;
    top:0;
    left:0;
    right:0;
    height:14px;
    z-index:9997;
}
.global-top-nav-brand {
    min-width:160px;
    display:flex;
    align-items:center;
    gap:10px;
    color:var(--gtn-text);
    text-decoration:none;
    white-space:nowrap;
}
.global-top-nav-mark {
    width:34px;
    height:34px;
    border-radius:13px;
    display:grid;
    place-items:center;
    overflow:hidden;
    background:#101113;
    box-shadow:0 12px 26px var(--gtn-shadow);
    flex:0 0 auto;
}
.global-top-nav-mark img { width:100%; height:100%; display:block; }
.global-top-nav-name {
    font-size:20px;
    font-weight:950;
    letter-spacing:0;
}
.global-top-nav-strip {
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:5px;
    overflow:auto;
    padding:3px;
    scrollbar-width:none !important;
}
.global-top-nav-strip::-webkit-scrollbar { display:none; }
.global-top-nav-link {
    flex:0 0 auto;
    height:38px;
    padding:0 11px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    color:var(--gtn-muted);
    text-decoration:none;
    font-size:12.5px;
    font-weight:850;
    border:1px solid transparent;
    transition:background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.global-top-nav-link:hover,
.global-top-nav-link.active {
    color:var(--gtn-text);
    background:var(--gtn-panel);
    border-color:var(--gtn-line);
    transform:translateY(-1px);
}
.global-top-nav-link svg { width:14px; height:14px; }
.global-top-nav-admin { display:none; }
.global-top-nav.show-admin .global-top-nav-admin { display:inline-flex; }
.global-top-nav-actions {
    position:relative;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:8px;
}
.global-top-nav-icon,
.global-top-nav-points {
    height:38px;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    color:var(--gtn-text);
    background:var(--gtn-panel);
    border:1px solid var(--gtn-line);
    box-shadow:0 12px 28px var(--gtn-shadow);
    font-size:12.5px;
    font-weight:900;
    white-space:nowrap;
}
.global-top-nav-icon {
    width:40px;
    padding:0;
}
.global-top-nav-points {
    padding:0 13px;
}
.global-top-nav-icon svg,
.global-top-nav-points svg { width:15px; height:15px; }
.global-top-nav-coin {
    width:19px;
    height:19px;
    border-radius:999px;
    display:grid;
    place-items:center;
    color:#111827;
    background:#facc15;
}

@media (max-width: 1520px) {
    .global-top-nav {
        padding-left:16px;
        padding-right:16px;
        gap:10px;
    }
    .global-top-nav-brand {
        min-width:174px;
        gap:8px;
    }
    .global-top-nav-mark {
        width:32px;
        height:32px;
        border-radius:9px;
    }
    .global-top-nav-name {
        font-size:18px;
    }
    .global-top-nav-strip {
        gap:2px;
    }
    .global-top-nav-link {
        height:36px;
        padding:0 8px;
        gap:5px;
        font-size:11px;
    }
    .global-top-nav-link svg {
        width:12.5px;
        height:12.5px;
    }
}
.global-user-menu {
    position:absolute;
    top:48px;
    right:0;
    z-index:10000;
    width:278px;
    padding:12px;
    border-radius:22px;
    display:none;
    background:var(--gtn-panel);
    border:1px solid var(--gtn-line);
    box-shadow:0 24px 70px var(--gtn-shadow);
    backdrop-filter:blur(22px);
}
.global-user-menu.open { display:block; }
.global-user-card {
    display:flex;
    align-items:center;
    gap:10px;
    padding:8px;
}
.global-user-avatar {
    width:42px;
    height:42px;
    border-radius:15px;
    display:grid;
    place-items:center;
    background:var(--gtn-strong);
    color:var(--gtn-strong-text);
    font-weight:950;
}
.global-user-info { min-width:0; flex:1; }
.global-user-name {
    color:var(--gtn-text);
    font-size:14px;
    font-weight:950;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.global-user-sub {
    margin-top:3px;
    color:var(--gtn-muted);
    font-size:12px;
    font-weight:750;
}
.global-user-points {
    margin:8px 0;
    padding:10px 12px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    background:color-mix(in srgb, var(--gtn-strong) 7%, transparent);
    border:1px solid var(--gtn-line);
    color:var(--gtn-muted);
    font-size:12px;
    font-weight:850;
}
.global-user-points strong {
    color:var(--gtn-text);
    font-size:18px;
}
.global-user-actions {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
}
.global-user-actions button,
.global-user-actions a {
    min-width:0;
    height:34px;
    border-radius:999px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:rgba(255,255,255,.48);
    color:var(--gtn-text);
    border:1px solid var(--gtn-line);
    text-decoration:none;
    font-size:12px;
    font-weight:900;
    cursor:pointer;
}
html.theme-dark .global-user-actions button,
html.theme-dark .global-user-actions a,
body.theme-dark .global-user-actions button,
body.theme-dark .global-user-actions a {
    background:rgba(15,23,42,.68);
}
.global-user-actions .primary {
    background:var(--gtn-strong);
    border-color:var(--gtn-strong);
    color:var(--gtn-strong-text);
}
html.theme-dark .global-user-actions .primary,
body.theme-dark .global-user-actions .primary {
    background:rgba(15,23,42,.78);
    border-color:rgba(248,250,252,.88);
    color:#f8fafc;
}
.global-user-actions .full { grid-column:1 / -1; }
.global-recharge-overlay {
    --gtn-panel:#ffffff;
    --gtn-text:#111318;
    --gtn-muted:#667085;
    --gtn-line:rgba(17,24,39,.12);
    --gtn-strong:#111318;
    --gtn-strong-text:#ffffff;
    position:fixed;
    inset:0;
    z-index:10001;
    display:none;
    align-items:center;
    justify-content:center;
    padding:20px;
    background:rgba(15,23,42,.34);
    backdrop-filter:blur(14px);
}
html.theme-dark .global-recharge-overlay,
body.theme-dark .global-recharge-overlay {
    --gtn-panel:#111827;
    --gtn-text:#f8fafc;
    --gtn-muted:#cbd5e1;
    --gtn-line:rgba(255,255,255,.16);
    --gtn-strong:#f8fafc;
    --gtn-strong-text:#020403;
}
.global-recharge-overlay.show { display:flex; }
.global-recharge-modal {
    width:min(520px, 100%);
    max-height:min(720px, calc(100vh - 40px));
    overflow:auto;
    border-radius:26px;
    background:#ffffff;
    color:var(--gtn-text);
    border:1px solid var(--gtn-line);
    box-shadow:0 30px 90px rgba(0,0,0,.24);
    padding:18px;
}
html.theme-dark .global-recharge-modal,
body.theme-dark .global-recharge-modal { background:#111827; }
.global-recharge-head {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin-bottom:14px;
}
.global-recharge-head h3 { margin:0; font-size:20px; font-weight:950; }
.global-recharge-head p { margin:6px 0 0; color:var(--gtn-muted); font-size:13px; font-weight:750; }
.global-recharge-packages {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    margin-bottom:14px;
}
.global-recharge-packages button {
    min-width:0;
    min-height:58px;
    padding:10px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    border:1px solid var(--gtn-line);
    border-radius:8px;
    background:#f8fafc;
    color:var(--gtn-text);
    cursor:pointer;
}
.global-recharge-packages button strong { font-size:13px; font-weight:950; }
.global-recharge-packages button span { color:var(--gtn-muted); font-size:12px; font-weight:850; }
.global-recharge-packages button.active {
    border-color:#2563eb;
    box-shadow:inset 0 0 0 1px #2563eb;
    background:#eff6ff;
}
html.theme-dark .global-recharge-packages button,
body.theme-dark .global-recharge-packages button { background:#0f172a; }
html.theme-dark .global-recharge-packages button.active,
body.theme-dark .global-recharge-packages button.active { background:#172554; }
.global-recharge-close {
    width:34px;
    height:34px;
    border-radius:12px;
    background:#f8fafc;
    color:var(--gtn-text);
    border:1px solid var(--gtn-line);
    font-size:20px;
}
.global-recharge-field label { display:block; margin-bottom:7px; color:var(--gtn-muted); font-size:12px; font-weight:900; }
.global-recharge-field input {
    width:100%;
    height:42px;
    border-radius:14px;
    border:1px solid var(--gtn-line);
    background:#f8fafc;
    color:var(--gtn-text);
    padding:0 12px;
    font-size:15px;
    font-weight:850;
    outline:none;
}
html.theme-dark .global-recharge-field input,
body.theme-dark .global-recharge-field input,
html.theme-dark .global-recharge-close,
body.theme-dark .global-recharge-close {
    background:#0f172a;
}
.global-recharge-preview {
    margin:12px 0;
    padding:12px;
    border-radius:16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    color:var(--gtn-muted);
    border:1px solid var(--gtn-line);
    background:#f8fafc;
    font-size:13px;
    font-weight:850;
}
.global-recharge-preview strong { color:var(--gtn-text); font-size:22px; }
html.theme-dark .global-recharge-preview,
body.theme-dark .global-recharge-preview { background:#0f172a; }
.global-recharge-pay {
    width:100%;
    height:42px;
    border-radius:999px;
    background:var(--gtn-strong);
    color:var(--gtn-strong-text);
    border:0;
    font-weight:950;
}
.global-recharge-tip { margin-top:10px; color:var(--gtn-muted); font-size:12px; line-height:1.45; }
.global-recharge-qr {
    display:none;
    grid-template-columns:184px minmax(0,1fr);
    align-items:center;
    gap:16px;
    margin-top:14px;
    padding:14px;
    border:1px solid var(--gtn-line);
    border-radius:16px;
    background:#f8fafc;
}
.global-recharge-qr.show { display:grid; }
.global-recharge-qr-frame {
    width:184px;
    aspect-ratio:1;
    padding:8px;
    border:1px solid #dbe3ee;
    border-radius:8px;
    background:#fff;
}
.global-recharge-qr-frame img { display:block; width:100%; height:100%; object-fit:contain; }
.global-recharge-qr-copy { min-width:0; color:var(--gtn-muted); font-size:12px; line-height:1.6; }
.global-recharge-qr-copy strong { display:block; margin-bottom:6px; color:var(--gtn-text); font-size:14px; }
.global-recharge-qr-copy a { display:inline-flex; margin-top:9px; color:#2563eb; font-weight:900; text-decoration:none; }
html.theme-dark .global-recharge-qr,
body.theme-dark .global-recharge-qr { background:#0f172a; }
.global-recharge-orders { margin-top:18px; }
.global-recharge-orders h4 { margin:0 0 8px; color:var(--gtn-text); font-size:14px; font-weight:950; }
.global-recharge-order {
    display:grid;
    grid-template-columns:1fr auto;
    gap:5px 10px;
    padding:10px 0;
    border-top:1px solid var(--gtn-line);
    color:var(--gtn-muted);
    font-size:12px;
}
.global-recharge-order strong { color:var(--gtn-text); font-size:13px; }
.global-recharge-status {
    align-self:start;
    border:1px solid currentColor;
    border-radius:999px;
    padding:2px 8px;
    font-size:10px;
    font-weight:950;
}
.global-recharge-status.paying { color:#0369a1; }
.global-recharge-status.pending { color:#a16207; }
.global-recharge-status.approved { color:#15803d; }
.global-recharge-status.rejected { color:#b91c1c; }
@media (max-width: 1040px) {
    .global-top-nav {
        grid-template-columns:1fr auto;
        gap:8px 12px;
    }
    .global-top-nav-strip {
        grid-column:1 / -1;
        grid-row:2;
        justify-content:flex-start;
    }
}
@media (max-width: 640px) {
    .global-top-nav {
        padding:8px 12px;
    }
    .global-top-nav-brand { min-width:0; }
    .global-top-nav-name { font-size:17px; }
    .global-top-nav-link { height:34px; padding:0 10px; font-size:12px; }
    .global-top-nav-actions { gap:7px; }
    .global-top-nav-points { max-width:118px; padding:0 10px; }
    .global-top-nav-points span:last-child { overflow:hidden; text-overflow:ellipsis; }
    .global-user-menu { width:min(278px, calc(100vw - 24px)); right:-2px; }
    .global-recharge-qr { grid-template-columns:1fr; justify-items:center; text-align:center; }
    .global-recharge-qr-copy { width:100%; }
}

/* Keep global navigation aligned with the Atelier homepage header. */
.global-top-nav {
    min-height:72px;
    padding:11px clamp(16px,3vw,38px);
    grid-template-columns:auto minmax(0,1fr) auto;
    gap:18px;
    background:color-mix(in srgb, var(--gtn-bg) 88%, transparent);
    border-bottom:1px solid var(--gtn-line);
    box-shadow:none;
    backdrop-filter:blur(24px) saturate(120%);
}
.global-top-nav-brand {
    min-width:190px;
    gap:10px;
}
.global-top-nav-mark {
    width:34px;
    height:34px;
    border-radius:9px;
    box-shadow:none;
}
.global-top-nav-name {
    font-size:17px;
    font-weight:850;
}
.global-top-nav-strip {
    justify-content:flex-start;
    gap:1px;
    padding:2px;
}
.global-top-nav-link {
    height:34px;
    padding:0 8px;
    border-radius:6px;
    gap:5px;
    font-size:11.5px;
    font-weight:750;
    transition:color .18s ease, background .18s ease;
}
.global-top-nav-link svg {
    width:13px;
    height:13px;
}
.global-top-nav-link:hover {
    color:var(--gtn-text);
    background:color-mix(in srgb, var(--gtn-text) 6%, transparent);
    border-color:transparent;
    transform:none;
}
.global-top-nav-link.active {
    color:var(--gtn-strong-text);
    background:var(--gtn-strong);
    border-color:var(--gtn-strong);
    transform:none;
}
.global-top-nav-actions {
    gap:10px;
}
.global-top-nav-icon,
.global-top-nav-points {
    height:36px;
    border-radius:8px;
    background:color-mix(in srgb, var(--gtn-panel) 96%, transparent);
    box-shadow:none;
}
.global-top-nav-icon {
    width:38px;
}
.global-top-nav-points {
    padding:0 12px;
    font-size:12.5px;
}
.global-user-menu {
    top:44px;
    border-radius:10px;
}
@media (max-width: 1040px) {
    .global-top-nav {
        grid-template-columns:1fr auto;
        gap:8px 12px;
    }
    .global-top-nav-strip {
        grid-column:1 / -1;
        grid-row:2;
        justify-content:flex-start;
    }
}
@media (max-width: 760px) {
    .global-top-nav {
        padding:10px 14px;
        min-height:64px;
        gap:8px 10px;
    }
    .global-top-nav-brand {
        min-width:0;
        gap:8px;
    }
    .global-top-nav-mark {
        width:32px;
        height:32px;
        border-radius:8px;
    }
    .global-top-nav-name {
        font-size:16px;
    }
    .global-top-nav-link {
        height:32px;
        padding:0 9px;
        font-size:10.5px;
    }
    .global-top-nav-link svg {
        display:none;
    }
    .global-top-nav-icon {
        width:34px;
        height:34px;
    }
    .global-top-nav-points {
        height:34px;
        max-width:132px;
        padding:0 11px;
        font-size:11px;
    }
}
