:root {
    --sg-bg: #050816;
    --sg-bg-2: #080B1F;
    --sg-panel: rgba(15, 18, 45, 0.72);
    --sg-panel-2: rgba(22, 25, 62, 0.82);
    --sg-border: rgba(160, 112, 255, 0.28);
    --sg-purple: #9B5CFF;
    --sg-purple-2: #6D35FF;
    --sg-cyan: #27D6FF;
    --sg-pink: #E45CFF;
    --sg-green: #35E58C;
    --sg-gold: #F7C948;
    --sg-white: #F8FAFC;
    --sg-muted: #A7A9C0;
    --sg-danger: #FF5B8A;
    --sg-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
    --sg-glow: 0 0 32px rgba(155, 92, 255, 0.38);
    --sg-radius-lg: 28px;
    --sg-radius: 18px;
    --sg-sidebar-width: 280px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    width: 100%;
    max-width: 100%;
    min-height: 100%;
    background: var(--sg-bg);
    overflow-x: hidden;
}

body {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--sg-white);
    background:
        radial-gradient(circle at 20% 0%, rgba(155, 92, 255, 0.24), transparent 35%),
        radial-gradient(circle at 82% 14%, rgba(39, 214, 255, 0.12), transparent 32%),
        var(--sg-bg);
    overflow-x: hidden;
}

body,
input,
button,
select,
textarea {
    font: inherit;
}

button,
input,
select,
textarea {
    border: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg,
canvas {
    display: block;
    max-width: 100%;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(8, 11, 31, 0.9);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--sg-purple), rgba(39, 214, 255, 0.72));
    border: 2px solid rgba(8, 11, 31, 0.9);
    border-radius: 999px;
}

::selection {
    background: rgba(155, 92, 255, 0.38);
    color: var(--sg-white);
}

.sg-cosmic-noise,
.sg-stars-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.sg-cosmic-noise {
    opacity: 0.2;
    mix-blend-mode: screen;
    background-image:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.18) 0 1px, transparent 1px),
        radial-gradient(circle at 68% 44%, rgba(155, 92, 255, 0.22) 0 1px, transparent 1px),
        radial-gradient(circle at 35% 82%, rgba(39, 214, 255, 0.16) 0 1px, transparent 1px);
    background-size: 78px 78px, 118px 118px, 164px 164px;
}

.sg-stars-layer {
    opacity: 0.55;
    background-image:
        radial-gradient(circle, rgba(248, 250, 252, 0.8) 0 1px, transparent 1.2px),
        radial-gradient(circle, rgba(155, 92, 255, 0.72) 0 1px, transparent 1.3px),
        radial-gradient(circle, rgba(228, 92, 255, 0.6) 0 1px, transparent 1.2px);
    background-size: 150px 150px, 230px 230px, 310px 310px;
    animation: sgStarDrift 55s linear infinite;
}

.sg-glass-panel {
    position: relative;
    border: 1px solid var(--sg-border);
    background:
        linear-gradient(145deg, rgba(18, 22, 55, 0.82), rgba(7, 10, 29, 0.78)),
        rgba(15, 18, 45, 0.72);
    box-shadow: var(--sg-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.sg-glass-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 12%, rgba(155, 92, 255, 0.22), transparent 32%),
        radial-gradient(circle at 78% 88%, rgba(39, 214, 255, 0.1), transparent 28%);
    opacity: 0.9;
}

.sg-reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: sgFadeUp 0.72s ease forwards;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.sg-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.sg-toast {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: min(420px, calc(100vw - 32px));
    padding: 14px 16px;
    border: 1px solid rgba(53, 229, 140, 0.34);
    border-radius: 16px;
    color: var(--sg-white);
    background: rgba(7, 28, 30, 0.86);
    box-shadow: 0 18px 42px rgba(53, 229, 140, 0.2);
    backdrop-filter: blur(16px);
    animation: sgToastIn 0.5s ease both;
}

.sg-toast i {
    color: var(--sg-green);
}

.sg-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--sg-white);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sg-brand img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    filter: drop-shadow(0 0 18px rgba(155, 92, 255, 0.75));
}

.sg-brand strong,
.sg-brand small {
    display: block;
    font-family: "Space Grotesk", sans-serif;
    line-height: 1;
}

.sg-brand strong {
    font-size: 1.03rem;
    font-weight: 700;
}

.sg-brand small {
    margin-top: 7px;
    color: rgba(248, 250, 252, 0.7);
    font-size: 0.76rem;
    font-weight: 600;
}

.sg-icon-btn {
    position: relative;
    display: inline-grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(160, 112, 255, 0.22);
    border-radius: 14px;
    color: var(--sg-white);
    background: rgba(15, 18, 45, 0.66);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, color 0.22s ease;
}

.sg-icon-btn:hover {
    border-color: rgba(155, 92, 255, 0.72);
    color: var(--sg-cyan);
    box-shadow: var(--sg-glow);
    transform: translateY(-2px);
}

.sg-primary-btn,
.sg-secondary-btn,
.sg-full-btn,
.sg-mini-btn {
    position: relative;
    isolation: isolate;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 1px solid rgba(196, 151, 255, 0.72);
    border-radius: 14px;
    color: var(--sg-white);
    background: linear-gradient(135deg, var(--sg-purple), var(--sg-purple-2) 58%, rgba(39, 214, 255, 0.42));
    box-shadow: 0 0 34px rgba(155, 92, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
    overflow: hidden;
}

.sg-primary-btn::before,
.sg-secondary-btn::before,
.sg-full-btn::before,
.sg-mini-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}

.sg-primary-btn:hover,
.sg-secondary-btn:hover,
.sg-full-btn:hover,
.sg-mini-btn:hover {
    transform: translateY(-2px);
    filter: saturate(1.16);
    box-shadow: 0 0 46px rgba(155, 92, 255, 0.62), 0 18px 40px rgba(109, 53, 255, 0.28);
}

.sg-primary-btn:hover::before,
.sg-secondary-btn:hover::before,
.sg-full-btn:hover::before,
.sg-mini-btn:hover::before {
    transform: translateX(120%);
}

.sg-primary-btn.is-loading {
    pointer-events: none;
    color: rgba(248, 250, 252, 0.72);
}

.sg-primary-btn.is-loading i {
    animation: sgSpin 0.8s linear infinite;
}

.sg-dropdown {
    position: relative;
}

.sg-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 40;
    min-width: 210px;
    padding: 10px;
    border: 1px solid var(--sg-border);
    border-radius: 18px;
    background: rgba(8, 11, 31, 0.94);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.sg-dropdown.is-open .sg-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sg-dropdown-menu a,
.sg-dropdown-menu button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    color: rgba(248, 250, 252, 0.82);
    background: transparent;
    text-align: left;
    transition: background 0.2s ease, color 0.2s ease;
}

.sg-dropdown-menu a:hover,
.sg-dropdown-menu button:hover {
    color: var(--sg-white);
    background: rgba(155, 92, 255, 0.15);
}

.sg-dropdown-title {
    margin: 2px 8px 8px;
    color: var(--sg-white);
    font-weight: 700;
}

.sg-notification-menu {
    min-width: 300px;
}

.sg-notification-menu a {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
}

.sg-notification-menu small {
    color: var(--sg-muted);
}

.sg-language {
    display: inline-flex;
    min-width: 92px;
    height: 44px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(160, 112, 255, 0.24);
    border-radius: 14px;
    color: var(--sg-white);
    background: rgba(15, 18, 45, 0.72);
}

/* Auth pages */
.sg-auth {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(0, 1.04fr) minmax(440px, 0.96fr);
    gap: clamp(28px, 4vw, 72px);
    padding: clamp(26px, 4vw, 58px);
    overflow: hidden;
    background-position: center;
    background-size: cover;
}

.sg-auth::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(5, 8, 22, 0.5), rgba(5, 8, 22, 0.88) 50%, rgba(5, 8, 22, 0.54)),
        radial-gradient(circle at 55% 48%, rgba(155, 92, 255, 0.18), transparent 34%);
}

.sg-auth-signin {
    background-image: url("../images/bg-signin-galaxy.jpg");
}

.sg-auth-signup {
    grid-template-columns: minmax(0, 1.08fr) minmax(460px, 0.92fr);
    background-image: url("../images/bg-signup-galaxy.jpg");
}

.sg-auth-visual,
.sg-auth-panel-wrap {
    position: relative;
    min-width: 0;
}

.sg-auth-visual {
    position: relative;
    min-width: 0;
    overflow: visible;
    z-index: 2;
    display: flex;
    min-height: calc(100vh - 116px);
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
}

.sg-auth-brand {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 4;
}

.sg-auth-copy {
    position: relative;
    z-index: 3;
    max-width: 650px;
    margin-top: 84px;
    overflow: visible;
}

.sg-auth-copy h1,
.sg-auth-heading,
.hero-title {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(42px, 5vw, 76px);
    line-height: 1.08;
    letter-spacing: -0.04em;
    max-width: 680px;
    overflow: visible;
    word-break: normal;
}

.sg-auth-copy h1 span,
.sg-signup-copy h1 span {
    color: var(--sg-purple);
    text-shadow: 0 0 28px rgba(155, 92, 255, 0.55);
}

.sg-auth-copy p,
.sg-auth-subtitle,
.hero-subtitle {
    max-width: 560px;
    margin: 26px 0 0;
    color: rgba(248, 250, 252, 0.72);
    font-size: clamp(1.02rem, 1.4vw, 1.3rem);
    line-height: 1.7;
    margin-bottom: 34px;
}

.sg-auth-panel-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sg-auth-language {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
}

.sg-auth-card {
    width: min(620px, 100%);
    padding: clamp(30px, 4.2vw, 54px);
    border-radius: var(--sg-radius-lg);
}

.sg-register-card {
    width: min(680px, 100%);
    padding: clamp(22px, 2.7vw, 34px);
}

.sg-register-card .sg-auth-card-head {
    margin-bottom: 18px;
}

.sg-register-card .sg-card-orb {
    width: 58px;
    height: 58px;
    margin-bottom: 12px;
}

.sg-register-card .sg-form {
    gap: 12px;
}

.sg-register-card .sg-field {
    gap: 6px;
}

.sg-register-card .sg-input-wrap {
    min-height: 50px;
}

.sg-register-card .sg-input-wrap input,
.sg-register-card .sg-input-wrap select,
.sg-register-card .sg-phone-prefix {
    height: 50px;
}

.sg-register-card .sg-phone-prefix {
    background-position: calc(100% - 23px) 21px, calc(100% - 17px) 21px !important;
}

.sg-register-card .sg-input-wrap select {
    background-position: calc(100% - 22px) 21px, calc(100% - 16px) 21px;
}

.sg-register-card .sg-primary-btn {
    min-height: 54px;
}

.sg-auth-card > * {
    position: relative;
    z-index: 1;
}

.sg-auth-card-head {
    margin-bottom: 30px;
    text-align: center;
}

.sg-card-orb {
    display: inline-grid;
    width: 66px;
    height: 66px;
    margin-bottom: 18px;
    place-items: center;
    border: 1px solid rgba(155, 92, 255, 0.46);
    border-radius: 50%;
    color: var(--sg-white);
    background: radial-gradient(circle at 35% 20%, rgba(228, 92, 255, 0.7), rgba(109, 53, 255, 0.42) 48%, rgba(5, 8, 22, 0.34));
    box-shadow: 0 0 30px rgba(155, 92, 255, 0.48);
}

.sg-auth-card h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.85rem, 2.2vw, 2.55rem);
    letter-spacing: 0;
}

.sg-auth-card-head p {
    margin: 10px 0 0;
    color: var(--sg-muted);
    font-size: 1.05rem;
}

.sg-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 14px;
    border-radius: 14px;
    font-size: 0.92rem;
}

.sg-alert-danger {
    border: 1px solid rgba(255, 91, 138, 0.38);
    color: #ffd5e1;
    background: rgba(255, 91, 138, 0.12);
}

.sg-form {
    display: grid;
    gap: 18px;
}

.sg-field {
    display: grid;
    gap: 9px;
}

.sg-field label {
    color: rgba(248, 250, 252, 0.9);
    font-size: 0.96rem;
    font-weight: 600;
}

.sg-input-wrap {
    position: relative;
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(160, 112, 255, 0.22);
    border-radius: 13px;
    color: rgba(248, 250, 252, 0.72);
    background: rgba(10, 14, 39, 0.72);
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.sg-input-wrap > i {
    width: 52px;
    color: rgba(248, 250, 252, 0.68);
    text-align: center;
    font-size: 1.1rem;
}

.sg-input-wrap input,
.sg-input-wrap select {
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0 16px 0 0;
    color: var(--sg-white);
    background: transparent;
    outline: none;
}

.sg-input-wrap select {
    appearance: none;
    color: var(--sg-muted);
    background-image: linear-gradient(45deg, transparent 50%, rgba(248, 250, 252, 0.8) 50%), linear-gradient(135deg, rgba(248, 250, 252, 0.8) 50%, transparent 50%);
    background-position: calc(100% - 22px) 25px, calc(100% - 16px) 25px;
    background-size: 7px 7px, 7px 7px;
    background-repeat: no-repeat;
}

.sg-input-wrap input::placeholder {
    color: rgba(167, 169, 192, 0.72);
}

.sg-input-wrap.sg-field-focus {
    border-color: rgba(155, 92, 255, 0.74);
    background: rgba(12, 16, 46, 0.86);
    box-shadow: 0 0 0 4px rgba(155, 92, 255, 0.13), 0 0 26px rgba(155, 92, 255, 0.22);
}

.sg-input-wrap.is-invalid {
    border-color: rgba(255, 91, 138, 0.86);
    box-shadow: 0 0 0 4px rgba(255, 91, 138, 0.1);
}

.sg-password-toggle {
    display: grid;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    place-items: center;
    color: rgba(248, 250, 252, 0.68);
    background: transparent;
}

.sg-field-error {
    color: var(--sg-danger);
    font-size: 0.83rem;
}

.sg-phone-wrap {
    gap: 0;
}

.sg-phone-prefix {
    width: 132px;
    flex: 0 0 132px;
    height: 58px;
    padding: 0 36px 0 18px;
    border-right: 1px solid rgba(160, 112, 255, 0.2);
    color: var(--sg-white) !important;
    background-position: calc(100% - 23px) 25px, calc(100% - 17px) 25px !important;
}

.sg-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 4px 0 10px;
}

.sg-form-row a,
.sg-auth-switch a,
.sg-terms a {
    color: #c58cff;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(197, 140, 255, 0.5);
    text-underline-offset: 3px;
}

.sg-check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba(248, 250, 252, 0.74);
    font-size: 0.96rem;
}

.sg-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sg-check span {
    display: inline-grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(160, 112, 255, 0.58);
    border-radius: 7px;
    background: rgba(10, 14, 39, 0.8);
    transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.sg-check input:checked + span {
    border-color: rgba(197, 140, 255, 0.95);
    background: linear-gradient(135deg, var(--sg-purple), var(--sg-purple-2));
    box-shadow: 0 0 22px rgba(155, 92, 255, 0.5);
}

.sg-check input:checked + span::after {
    content: "";
    width: 7px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.sg-check.is-invalid span {
    border-color: rgba(255, 91, 138, 0.86);
    box-shadow: 0 0 0 4px rgba(255, 91, 138, 0.1);
}

.sg-terms {
    align-items: flex-start;
    line-height: 1.5;
}

.sg-terms-error {
    margin-top: -8px;
}

.sg-primary-btn {
    width: 100%;
    min-height: 62px;
    padding: 0 24px;
    font-weight: 800;
    font-size: 1.05rem;
}

.sg-divider {
    display: flex;
    align-items: center;
    gap: 18px;
    margin: 30px 0 22px;
    color: rgba(248, 250, 252, 0.72);
}

.sg-divider::before,
.sg-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, rgba(160, 112, 255, 0.26), transparent);
}

.sg-social-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.sg-social-grid a {
    display: grid;
    min-height: 82px;
    place-items: center;
    border: 1px solid rgba(160, 112, 255, 0.2);
    border-radius: 16px;
    color: var(--sg-white);
    background: rgba(15, 18, 45, 0.58);
    font-size: 1.8rem;
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.sg-social-grid a:hover {
    transform: translateY(-3px);
    border-color: rgba(155, 92, 255, 0.72);
    background: rgba(155, 92, 255, 0.14);
    box-shadow: var(--sg-glow);
}

.sg-social-grid .fa-google {
    color: #fff;
    text-shadow: 0 0 16px rgba(66, 133, 244, 0.9);
}

.sg-social-grid .fa-discord {
    color: #8ea1ff;
}

.sg-social-grid .fa-linkedin-in {
    color: #4aa3ff;
}

.sg-auth-switch {
    margin: 28px 0 0;
    color: rgba(248, 250, 252, 0.72);
    text-align: center;
    font-size: 1rem;
}

.sg-auth-stats,
.auth-stats,
.hero-stats {
    position: relative;
    z-index: 3;
    margin-top: 34px;
    max-width: 680px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 24px;
    border-radius: 18px;
    width: min(760px, 96%);
}

.sg-auth-stats > div {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 12px;
    align-items: center;
    padding: 0 18px;
}

.sg-auth-stats > div + div {
    border-left: 1px solid rgba(160, 112, 255, 0.18);
}

.sg-auth-stats i {
    grid-row: span 2;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 15px;
    color: var(--sg-purple);
    background: rgba(155, 92, 255, 0.16);
    box-shadow: inset 0 0 20px rgba(155, 92, 255, 0.18);
}

.sg-auth-stats strong {
    font-size: 1.2rem;
    line-height: 1;
}

.sg-auth-stats span {
    color: var(--sg-muted);
    font-size: 0.86rem;
}

.sg-auth-footer,
.auth-footer,
.login-footer {
    position: relative;
    z-index: 3;
    margin-top: 34px;
    display: flex;
    align-items: center;
    gap: 28px;
    color: rgba(248, 250, 252, 0.54);
    font-size: 0.92rem;
}

.sg-auth-footer a {
    transition: color 0.2s ease;
}

.sg-auth-footer a:hover {
    color: var(--sg-white);
}

.sg-auth-planet {
    position: absolute;
    pointer-events: none;
    filter: drop-shadow(0 0 52px rgba(155, 92, 255, 0.32));
    animation: sgFloat 8s ease-in-out infinite;
}

.sg-auth-planet-large {
    right: -18%;
    bottom: -28%;
    width: min(780px, 74vw);
    opacity: 0.8;
}

.sg-auth-planet-small {
    right: 12%;
    top: 13%;
    width: 160px;
    opacity: 0.8;
    animation-duration: 10s;
}

.sg-signup-visual {
    justify-content: flex-end;
    padding-bottom: 110px;
}

.sg-network-art {
    position: absolute;
    top: 10%;
    left: 2%;
    z-index: 1;
    width: min(760px, 74vw);
    opacity: 0.78;
    filter: drop-shadow(0 0 30px rgba(155, 92, 255, 0.42));
    animation: sgPulse 4.5s ease-in-out infinite;
}

.sg-signup-planet {
    right: -8%;
    bottom: -22%;
    width: min(720px, 70vw);
    opacity: 0.78;
}

.sg-signup-copy {
    max-width: 760px;
    margin-bottom: 32px;
}

.sg-signup-copy h1 {
    font-size: clamp(2.8rem, 4.4vw, 4.6rem);
}

.sg-feature-list {
    position: relative;
    z-index: 5;
    display: grid;
    max-width: 620px;
    gap: 20px;
}

.sg-feature-card {
    display: flex;
    max-width: 450px;
    align-items: center;
    gap: 20px;
}

.sg-feature-card > div {
    min-width: 0;
}

.sg-feature-card i {
    display: grid;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(155, 92, 255, 0.4);
    border-radius: 16px;
    color: #d7b6ff;
    background: rgba(109, 53, 255, 0.18);
    box-shadow: inset 0 0 18px rgba(155, 92, 255, 0.22), 0 0 24px rgba(155, 92, 255, 0.18);
    font-size: 1.35rem;
}

.sg-feature-card h3 {
    margin: 0 0 6px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.15rem;
}

.sg-feature-card p {
    margin: 0;
    color: rgba(248, 250, 252, 0.7);
    line-height: 1.45;
}

.sg-signup-footer {
    bottom: 12px;
}

/* Dashboard */
.sg-dashboard-body {
    background:
        linear-gradient(rgba(5, 8, 22, 0.84), rgba(5, 8, 22, 0.88)),
        url("../images/bg-dashboard-galaxy.jpg") center top / cover fixed,
        var(--sg-bg);
}

.sg-dashboard-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.sg-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    display: flex;
    width: var(--sg-sidebar-width);
    flex-direction: column;
    border-right: 1px solid rgba(160, 112, 255, 0.18);
    background:
        linear-gradient(180deg, rgba(7, 12, 34, 0.96), rgba(5, 8, 22, 0.94)),
        url("../images/card-nebula.jpg") center / cover;
    box-shadow: 18px 0 80px rgba(0, 0, 0, 0.32);
}

.sg-sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(155, 92, 255, 0.08), transparent 42%);
    pointer-events: none;
}

.sg-sidebar > * {
    position: relative;
    z-index: 1;
}

.sg-sidebar-head {
    display: flex;
    min-height: 94px;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(160, 112, 255, 0.12);
}

.sg-sidebar .sg-brand {
    gap: 10px;
    letter-spacing: 0.11em;
}

.sg-sidebar .sg-brand img {
    width: 54px;
    height: 54px;
}

.sg-sidebar .sg-brand strong {
    font-size: 0.94rem;
}

.sg-sidebar-close {
    display: none;
}

.sg-sidebar-nav {
    display: grid;
    gap: 6px;
    padding: 18px 16px;
    overflow-y: auto;
}

.sg-sidebar-nav a,
.sg-sidebar-logout button {
    display: flex;
    min-height: 50px;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    color: rgba(248, 250, 252, 0.75);
    background: transparent;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.sg-sidebar-nav a > i:first-child,
.sg-sidebar-logout i {
    width: 22px;
    text-align: center;
    color: rgba(248, 250, 252, 0.72);
}

.sg-menu-caret {
    margin-left: auto;
    font-size: 0.78rem;
    color: rgba(248, 250, 252, 0.44);
}

.sg-sidebar-nav a:hover,
.sg-sidebar-nav a.is-active {
    border-color: rgba(155, 92, 255, 0.34);
    color: var(--sg-white);
    background: linear-gradient(135deg, rgba(155, 92, 255, 0.36), rgba(109, 53, 255, 0.12));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 24px rgba(155, 92, 255, 0.16);
    transform: translateX(2px);
}

.sg-sidebar-nav a.is-active > i:first-child {
    color: var(--sg-white);
    text-shadow: 0 0 16px rgba(155, 92, 255, 0.9);
}

.sg-sidebar-promo {
    margin: auto 18px 18px;
    padding: 24px 20px;
    border: 1px solid rgba(160, 112, 255, 0.28);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(8, 11, 31, 0.2), rgba(8, 11, 31, 0.84)),
        url("../images/card-nebula.jpg") center / cover;
    overflow: hidden;
}

.sg-sidebar-promo h3 {
    margin: 10px 0 8px;
    color: #d9b2ff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.05rem;
}

.sg-sidebar-promo p,
.sg-promo-kicker {
    color: rgba(248, 250, 252, 0.72);
}

.sg-sidebar-promo p {
    margin: 0 0 18px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.sg-promo-kicker {
    font-size: 0.76rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sg-sidebar-promo a {
    display: inline-flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border: 1px solid rgba(197, 140, 255, 0.5);
    border-radius: 12px;
    background: rgba(109, 53, 255, 0.32);
    font-weight: 700;
}

.sg-sidebar-logout {
    padding: 0 16px 24px;
}

.sg-sidebar-logout button {
    width: 100%;
}

.sg-sidebar-logout button:hover {
    color: var(--sg-white);
    background: rgba(255, 91, 138, 0.12);
}

.sg-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: none;
    background: rgba(2, 4, 12, 0.66);
    backdrop-filter: blur(4px);
}

.sg-dashboard-main {
    width: calc(100% - var(--sg-sidebar-width));
    margin-left: var(--sg-sidebar-width);
    padding: 28px clamp(22px, 2.2vw, 38px) 34px;
}

.sg-dashboard-header {
    position: sticky;
    top: 0;
    z-index: 45;
    display: flex;
    min-height: 66px;
    align-items: center;
    gap: 18px;
    padding: 10px 0 18px;
    background: linear-gradient(180deg, rgba(5, 8, 22, 0.92), rgba(5, 8, 22, 0.72) 74%, transparent);
    backdrop-filter: blur(10px);
}

.sg-sidebar-open {
    display: none;
}

.sg-header-search {
    display: flex;
    width: min(420px, 36vw);
    min-height: 46px;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    padding: 0 16px;
    border: 1px solid rgba(160, 112, 255, 0.18);
    border-radius: 14px;
    color: rgba(248, 250, 252, 0.68);
    background: rgba(15, 18, 45, 0.42);
}

.sg-header-search input {
    width: 100%;
    min-width: 0;
    color: var(--sg-white);
    background: transparent;
    outline: none;
}

.sg-header-search input::placeholder {
    color: rgba(167, 169, 192, 0.72);
}

.sg-header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sg-badge-dot {
    position: absolute;
    top: -6px;
    right: -2px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    color: var(--sg-white);
    background: var(--sg-purple);
    box-shadow: 0 0 16px rgba(155, 92, 255, 0.82);
    font-size: 0.72rem;
    font-weight: 800;
}

.sg-profile-trigger {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    color: var(--sg-white);
    background: transparent;
}

.sg-profile-avatar {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border: 1px solid rgba(160, 112, 255, 0.52);
    border-radius: 50%;
    background: rgba(155, 92, 255, 0.16);
    box-shadow: 0 0 20px rgba(155, 92, 255, 0.26);
    overflow: hidden;
}

.sg-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sg-profile-trigger strong,
.sg-profile-trigger small {
    display: block;
    text-align: left;
}

.sg-profile-trigger strong {
    font-size: 0.95rem;
}

.sg-profile-trigger small {
    margin-top: 4px;
    color: var(--sg-muted);
    font-size: 0.8rem;
}

.sg-dashboard-hero {
    position: relative;
    display: flex;
    min-height: 158px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: 22px;
    background:
        linear-gradient(90deg, rgba(5, 8, 22, 0.7), rgba(5, 8, 22, 0.18)),
        url("../images/bg-dashboard-galaxy.jpg") center 36% / cover;
}

.sg-dashboard-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(160, 112, 255, 0.16);
    border-radius: inherit;
    pointer-events: none;
}

.sg-dashboard-hero > div {
    position: relative;
    z-index: 2;
    padding: 28px;
}

.sg-dashboard-hero p {
    margin: 0 0 8px;
    color: var(--sg-muted);
}

.sg-dashboard-hero h1 {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 12px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.8rem, 2.7vw, 2.8rem);
    letter-spacing: 0;
}

.sg-dashboard-hero h1 span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    color: var(--sg-white);
    background: radial-gradient(circle, var(--sg-purple), var(--sg-purple-2));
    box-shadow: 0 0 20px rgba(155, 92, 255, 0.64);
    font-size: 0.9rem;
}

.sg-member-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border: 1px solid rgba(155, 92, 255, 0.46);
    border-radius: 999px;
    color: #d9b2ff;
    background: rgba(155, 92, 255, 0.12);
    font-weight: 700;
    font-size: 0.86rem;
}

.sg-dashboard-hero img {
    position: absolute;
    right: 8%;
    top: 4%;
    width: 168px;
    opacity: 0.78;
    filter: drop-shadow(0 0 34px rgba(155, 92, 255, 0.4));
    animation: sgFloat 8s ease-in-out infinite;
}

.sg-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.sg-stat-card,
.sg-rank-card,
.sg-bonus-card,
.sg-quick-card,
.sg-chart-card,
.sg-commission-card,
.sg-country-card,
.sg-dashboard-footer {
    border-radius: var(--sg-radius);
}

.sg-stat-card {
    display: grid;
    min-height: 150px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    padding: 22px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.sg-stat-card:hover,
.sg-rank-card:hover,
.sg-bonus-card:hover,
.sg-quick-card:hover,
.sg-chart-card:hover,
.sg-commission-card:hover,
.sg-country-card:hover {
    border-color: rgba(155, 92, 255, 0.5);
    box-shadow: 0 24px 78px rgba(0, 0, 0, 0.52), 0 0 36px rgba(155, 92, 255, 0.18);
    transform: translateY(-3px);
}

.sg-stat-card > * {
    position: relative;
    z-index: 1;
}

.sg-stat-icon {
    display: grid;
    width: 60px;
    height: 60px;
    place-items: center;
    border-radius: 50%;
    color: #e3cfff;
    background: radial-gradient(circle at 35% 25%, rgba(155, 92, 255, 0.75), rgba(109, 53, 255, 0.18));
    box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.1), 0 0 26px rgba(155, 92, 255, 0.34);
    font-size: 1.45rem;
}

.sg-stat-content p {
    margin: 0 0 8px;
    color: rgba(248, 250, 252, 0.84);
    font-weight: 700;
}

.sg-stat-content p i {
    margin-left: 4px;
    color: rgba(248, 250, 252, 0.52);
    font-size: 0.78rem;
}

.sg-stat-content strong {
    display: block;
    margin-bottom: 7px;
    font-family: "Space Grotesk", sans-serif;
    font-size: clamp(1.45rem, 2vw, 2rem);
    letter-spacing: 0;
}

.sg-stat-content span {
    color: var(--sg-green);
    font-size: 0.86rem;
}

.sg-sparkline {
    position: absolute;
    right: 18px;
    bottom: 12px;
    z-index: 1;
    width: 150px;
    height: 52px;
    opacity: 0.86;
}

.sg-mini-btn {
    min-height: 36px;
    margin-top: 10px;
    padding: 0 18px;
    border-radius: 9px;
    font-size: 0.86rem;
    font-weight: 800;
}

.sg-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(330px, 0.95fr) minmax(280px, 0.82fr);
    gap: 16px;
    margin-top: 18px;
}

.sg-rank-card,
.sg-bonus-card,
.sg-quick-card,
.sg-chart-card,
.sg-commission-card,
.sg-country-card {
    padding: 22px;
    overflow: hidden;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.sg-rank-card {
    background:
        linear-gradient(135deg, rgba(15, 18, 45, 0.9), rgba(7, 10, 29, 0.9)),
        url("../images/card-nebula.jpg") center / cover;
}

.sg-rank-card > *,
.sg-bonus-card > *,
.sg-quick-card > *,
.sg-chart-card > *,
.sg-commission-card > *,
.sg-country-card > *,
.sg-dashboard-footer > * {
    position: relative;
    z-index: 1;
}

.sg-rank-head {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.sg-rank-head img {
    width: 104px;
    filter: drop-shadow(0 0 20px rgba(155, 92, 255, 0.5));
}

.sg-rank-head p,
.sg-bonus-card p {
    margin: 0 0 6px;
    color: var(--sg-muted);
}

.sg-rank-head h2,
.sg-bonus-card h2,
.sg-quick-card h2,
.sg-card-title-row h2 {
    margin: 0;
    font-family: "Space Grotesk", sans-serif;
    letter-spacing: 0;
}

.sg-rank-head h2 {
    font-size: clamp(1.32rem, 1.7vw, 1.72rem);
}

.sg-rank-head span,
.sg-bonus-card span {
    display: block;
    margin-top: 8px;
    color: rgba(248, 250, 252, 0.76);
    line-height: 1.5;
}

.sg-next-rank {
    grid-column: 2;
    display: inline-block;
    width: fit-content;
    margin-top: 8px;
    padding: 8px 12px;
    border: 1px solid rgba(160, 112, 255, 0.2);
    border-radius: 12px;
    background: rgba(8, 11, 31, 0.42);
}

.sg-next-rank span,
.sg-next-rank strong {
    display: block;
}

.sg-next-rank span {
    color: var(--sg-muted);
    font-size: 0.86rem;
}

.sg-next-rank strong {
    margin-top: 6px;
    color: #f3d6ff;
}

.sg-progress-wrap {
    margin-top: 22px;
}

.sg-progress-bar {
    height: 13px;
    overflow: hidden;
    border: 1px solid rgba(160, 112, 255, 0.24);
    border-radius: 999px;
    background: rgba(5, 8, 22, 0.72);
}

.sg-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--sg-purple), var(--sg-purple-2), var(--sg-cyan));
    box-shadow: 0 0 22px rgba(155, 92, 255, 0.68);
}

.sg-progress-labels {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 12px;
    color: rgba(248, 250, 252, 0.78);
    font-size: 0.94rem;
}

.sg-secondary-btn {
    min-height: 44px;
    margin-top: 24px;
    padding: 0 20px;
    border-radius: 11px;
    font-weight: 800;
}

.sg-bonus-card {
    min-height: 270px;
    background:
        linear-gradient(130deg, rgba(22, 25, 62, 0.92), rgba(7, 10, 29, 0.86)),
        url("../images/card-nebula.jpg") center / cover;
}

.sg-bonus-card h2 {
    max-width: 230px;
    color: #c895ff;
    font-size: 1.8rem;
}

.sg-bonus-card img {
    position: absolute;
    right: 24px;
    top: 42px;
    z-index: 1;
    width: 154px;
    filter: drop-shadow(0 0 28px rgba(228, 92, 255, 0.44));
    animation: sgFloat 7.5s ease-in-out infinite;
}

.sg-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    color: #ffc0d5;
    background: transparent;
    font-size: 1.1rem;
}

.sg-countdown {
    position: absolute;
    left: 22px;
    bottom: 20px;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(4, 58px);
    gap: 10px;
}

.sg-countdown div {
    display: grid;
    min-height: 64px;
    place-items: center;
    border: 1px solid rgba(160, 112, 255, 0.22);
    border-radius: 10px;
    background: rgba(10, 14, 39, 0.68);
}

.sg-countdown strong {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.3rem;
}

.sg-countdown span {
    margin: 0;
    color: var(--sg-muted);
    font-size: 0.72rem;
}

.sg-quick-card h2 {
    margin-bottom: 18px;
    font-size: 1.25rem;
}

.sg-quick-list {
    display: grid;
    gap: 10px;
}

.sg-quick-list a {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 14px;
    border: 1px solid rgba(160, 112, 255, 0.18);
    border-radius: 11px;
    color: rgba(248, 250, 252, 0.82);
    background: rgba(10, 14, 39, 0.55);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.sg-quick-list a:hover {
    transform: translateX(3px);
    border-color: rgba(155, 92, 255, 0.48);
    background: rgba(155, 92, 255, 0.12);
}

.sg-quick-list i:first-child {
    margin-right: 9px;
    color: var(--sg-purple);
}

.sg-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(330px, 0.88fr) minmax(330px, 0.95fr);
    gap: 16px;
    margin-top: 18px;
}

.sg-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.sg-card-title-row h2 {
    font-size: 1.25rem;
}

.sg-card-title-row a {
    color: #c58cff;
    font-size: 0.9rem;
    font-weight: 700;
}

.sg-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(160, 112, 255, 0.2);
    border-radius: 9px;
    color: rgba(248, 250, 252, 0.78);
    background: rgba(10, 14, 39, 0.66);
    font-size: 0.82rem;
}

.sg-growth-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

.sg-growth-summary div + div {
    border-left: 1px solid rgba(160, 112, 255, 0.16);
    padding-left: 14px;
}

.sg-growth-summary span {
    display: block;
    color: var(--sg-muted);
    font-size: 0.88rem;
}

.sg-growth-summary strong {
    display: block;
    margin-top: 6px;
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.2rem;
}

.sg-growth-summary em {
    color: var(--sg-green);
    font-style: normal;
    font-size: 0.88rem;
}

.sg-growth-chart {
    width: 100%;
    height: 310px;
}

.sg-commission-list {
    display: grid;
    gap: 9px;
}

.sg-commission-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(160, 112, 255, 0.12);
}

.sg-commission-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(155, 92, 255, 0.4);
    border-radius: 10px;
    color: var(--sg-purple);
    background: rgba(155, 92, 255, 0.12);
}

.sg-commission-item strong {
    display: block;
    color: var(--sg-white);
    font-size: 0.9rem;
}

.sg-commission-item small {
    display: block;
    margin-top: 4px;
    color: rgba(248, 250, 252, 0.54);
    font-size: 0.74rem;
}

.sg-commission-item small span {
    margin-left: 8px;
}

.sg-commission-amount {
    text-align: right;
}

.sg-commission-amount span {
    display: inline-block;
    margin-top: 5px;
    padding: 3px 7px;
    border: 1px solid rgba(53, 229, 140, 0.26);
    border-radius: 7px;
    color: var(--sg-green);
    background: rgba(53, 229, 140, 0.1);
    font-size: 0.66rem;
    font-weight: 700;
}

.sg-full-btn {
    width: 100%;
    min-height: 46px;
    margin-top: 16px;
    padding: 0 16px;
    justify-content: space-between;
    border-radius: 11px;
    font-weight: 800;
}

.sg-world-map {
    width: 100%;
    height: 178px;
    object-fit: contain;
    margin: -4px 0 8px;
    filter: drop-shadow(0 0 22px rgba(155, 92, 255, 0.22));
}

.sg-country-list {
    display: grid;
    gap: 8px;
}

.sg-country-list div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 56px 70px;
    gap: 10px;
    align-items: center;
    min-height: 28px;
    color: rgba(248, 250, 252, 0.84);
}

.sg-country-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sg-country-list strong {
    text-align: right;
    font-weight: 700;
}

.sg-country-list em {
    color: var(--sg-green);
    text-align: right;
    font-style: normal;
    font-weight: 700;
}

.sg-dashboard-footer {
    display: grid;
    grid-template-columns: minmax(320px, 1.8fr) repeat(4, minmax(130px, 0.6fr));
    gap: 0;
    margin-top: 22px;
    padding: 20px 22px;
    border: 1px solid var(--sg-border);
    background: rgba(15, 18, 45, 0.66);
    backdrop-filter: blur(18px);
    overflow: hidden;
}

.sg-footer-quote,
.sg-footer-stat {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sg-footer-quote {
    color: rgba(248, 250, 252, 0.8);
    line-height: 1.55;
}

.sg-footer-quote i,
.sg-footer-stat i {
    color: var(--sg-purple);
    font-size: 1.55rem;
    text-shadow: 0 0 18px rgba(155, 92, 255, 0.55);
}

.sg-footer-stat {
    padding-left: 20px;
    border-left: 1px solid rgba(160, 112, 255, 0.15);
}

.sg-footer-stat span,
.sg-footer-stat strong {
    display: block;
}

.sg-footer-stat span {
    color: var(--sg-muted);
    font-size: 0.83rem;
}

.sg-footer-stat strong {
    margin-top: 4px;
    font-family: "Space Grotesk", sans-serif;
}

@keyframes sgStarDrift {
    from {
        background-position: 0 0, 0 0, 0 0;
    }
    to {
        background-position: 340px 420px, -260px 320px, 180px -360px;
    }
}

@keyframes sgFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -18px, 0);
    }
}

@keyframes sgPulse {
    0%,
    100% {
        opacity: 0.68;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.025);
    }
}

@keyframes sgFadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes sgSpin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes sgToastIn {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1280px) {
    .sg-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-dashboard-grid,
    .sg-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-quick-card,
    .sg-country-card {
        grid-column: span 2;
    }

    .sg-country-card {
        display: grid;
        grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1fr);
        gap: 10px 22px;
    }

    .sg-country-card .sg-card-title-row,
    .sg-country-card .sg-full-btn {
        grid-column: span 2;
    }
}

@media (max-width: 1199px) {
    .sg-auth,
    .sg-auth-signup {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .sg-auth-visual {
        min-height: 620px;
    }

    .sg-auth-panel-wrap {
        align-items: flex-start;
    }

    .sg-auth-language {
        top: -604px;
    }

    .sg-auth-stats,
    .auth-stats,
    .hero-stats {
        position: relative !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
    }

    .sg-auth-footer,
    .auth-footer,
    .login-footer {
        position: relative;
        flex-wrap: wrap;
        margin-top: 36px;
    }

    .sg-sidebar-open {
        display: inline-grid;
    }

    .sg-sidebar {
        transform: translateX(-105%);
        transition: transform 0.28s ease;
    }

    .sg-sidebar.is-open {
        transform: translateX(0);
    }

    .sg-sidebar.is-open + .sg-sidebar-backdrop,
    .sg-sidebar-backdrop.is-open {
        display: block;
    }

    .sg-sidebar-close {
        display: inline-grid;
    }

    .sg-dashboard-main {
        width: 100%;
        margin-left: 0;
    }

    .sg-header-search {
        margin-left: 0;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .sg-auth-shell {
        grid-template-columns: minmax(0, 0.95fr) minmax(420px, 0.85fr);
        gap: 28px;
        padding: 24px 28px;
    }

    .sg-auth-copy,
    .auth-heading,
    .hero-title {
        font-size: clamp(42px, 5.2vw, 58px);
        line-height: 1.08;
        max-width: 560px;
        margin-bottom: 20px;
    }

    .sg-auth-copy p,
    .auth-subtitle,
    .hero-subtitle {
        font-size: 16px;
        max-width: 500px;
        margin-bottom: 24px;
    }

    .sg-auth-stats,
    .auth-stats,
    .hero-stats {
        margin-top: 24px;
        max-width: 620px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .sg-auth-shell {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 22px;
    }

    .sg-auth-visual,
    .auth-left {
        text-align: center;
    }

    .sg-auth-copy h1,
    .auth-heading,
    .hero-title {
        font-size: clamp(38px, 7vw, 54px);
        max-width: 720px;
        margin-left: auto;
        margin-right: auto;
    }

    .sg-auth-copy p,
    .auth-subtitle,
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .sg-auth-stats,
    .auth-stats,
    .hero-stats {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 767px) {
    .sg-auth-shell {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 16px;
        align-items: start;
    }

    .sg-auth-visual,
    .auth-left {
        text-align: center;
    }

    .sg-auth-copy h1,
    .auth-heading,
    .hero-title {
        font-size: clamp(32px, 10vw, 44px);
        line-height: 1.1;
        max-width: 100%;
        margin: 18px auto 14px;
        letter-spacing: -0.03em;
    }

    .sg-auth-copy p,
    .auth-subtitle,
    .hero-subtitle {
        font-size: 15px;
        max-width: 100%;
        margin-bottom: 18px;
    }

    .sg-auth-stats,
    .auth-stats,
    .hero-stats {
        width: 100%;
        max-width: 440px;
        margin: 18px auto 0;
    }
}

@media (max-width: 360px) {
    .sg-auth-copy h1,
    .auth-heading,
    .hero-title {
        font-size: 30px;
    }
}

@media (max-width: 900px) {
    .sg-auth {
        padding: 22px;
    }

    .sg-auth-visual {
        min-height: 580px;
    }

    .sg-auth-copy {
        margin-top: 112px;
    }

    .sg-auth-stats {
        position: relative;
        bottom: auto;
        left: auto;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: auto;
    }

    .sg-auth-stats > div {
        padding: 12px;
    }

    .sg-auth-stats > div + div {
        border-left: 0;
    }

    .sg-auth-language {
        top: -560px;
    }

    .sg-stat-grid,
    .sg-dashboard-grid,
    .sg-analytics-grid {
        grid-template-columns: 1fr;
    }

    .sg-quick-card,
    .sg-country-card {
        grid-column: auto;
    }

    .sg-country-card {
        display: block;
    }

    .sg-rank-head {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .sg-rank-head img {
        width: 96px;
    }

    .sg-next-rank {
        grid-column: 1 / -1;
        padding: 14px 0 0;
        border-left: 0;
        border-top: 1px solid rgba(160, 112, 255, 0.18);
    }

    .sg-dashboard-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 0;
    }

    .sg-footer-quote {
        grid-column: 1 / -1;
    }

    .sg-footer-stat:nth-child(2n) {
        border-left: 0;
        padding-left: 0;
    }
}

@media (max-width: 700px) {
    .sg-auth {
        padding: 16px;
    }

    .sg-auth-visual,
    .sg-auth-panel-wrap {
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
    }

    .sg-auth-copy,
    .sg-feature-list,
    .sg-feature-card {
        width: 100%;
        max-width: min(calc(100vw - 32px), 350px);
    }

    .sg-auth-language {
        display: none;
    }

    .sg-brand img {
        width: 52px;
        height: 52px;
    }

    .sg-auth-card,
    .sg-register-card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .sg-auth-copy h1,
    .auth-heading,
    .hero-title {
        font-size: clamp(32px, 10vw, 44px);
        line-height: 1.1;
        max-width: 100%;
        margin: 18px auto 14px;
        letter-spacing: -0.03em;
        overflow: visible;
    }

    .sg-auth-copy p,
    .auth-subtitle,
    .hero-subtitle,
    .sg-feature-card p {
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .sg-auth-footer,
    .auth-footer,
    .login-footer {
        width: 100%;
        max-width: 350px;
        gap: 12px 18px;
    }

    .sg-auth-footer span,
    .auth-footer span,
    .login-footer span {
        flex-basis: 100%;
    }

    .sg-auth-visual {
        min-height: 630px;
    }

    .sg-auth-stats,
    .auth-stats,
    .hero-stats {
        grid-template-columns: 1fr;
        padding: 14px;
        width: 100%;
        max-width: 440px;
        margin: 18px auto 0;
    }

    .sg-feature-card {
        gap: 14px;
    }

    .sg-feature-card i {
        width: 56px;
        height: 56px;
        font-size: 1.1rem;
    }

    .sg-social-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-form-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .sg-phone-prefix {
        width: 108px;
        flex-basis: 108px;
        padding-left: 12px;
        font-size: 0.9rem;
    }

    .sg-dashboard-main {
        padding: 18px 14px 24px;
    }

    .sg-dashboard-header {
        flex-wrap: wrap;
    }

    .sg-header-search {
        order: 3;
        width: 100%;
    }

    .sg-header-actions {
        margin-left: auto;
        gap: 8px;
    }

    .sg-header-actions .sg-dropdown:last-child {
        display: none;
    }

    .sg-header-actions .sg-dropdown:nth-child(2) {
        display: none;
    }

    .sg-dashboard-header .sg-language {
        min-width: 78px;
    }

    .sg-profile-trigger span:not(.sg-profile-avatar),
    .sg-profile-trigger > i {
        display: none;
    }

    .sg-dashboard-hero {
        min-height: 180px;
    }

    .sg-dashboard-hero > div {
        padding: 22px;
    }

    .sg-stat-card {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 18px;
    }

    .sg-sparkline {
        width: 120px;
        opacity: 0.5;
    }

    .sg-growth-summary {
        grid-template-columns: 1fr;
    }

    .sg-growth-summary div + div {
        padding-left: 0;
        border-left: 0;
    }

    .sg-countdown {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        right: 16px;
        left: 16px;
    }

    .sg-countdown div {
        min-width: 0;
    }

    .sg-commission-item,
    .sg-country-list div {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .sg-commission-amount,
    .sg-country-list strong,
    .sg-country-list em {
        grid-column: 2;
        text-align: left;
    }

    .sg-dashboard-footer {
        grid-template-columns: 1fr;
    }

    .sg-footer-stat {
        padding-left: 0;
        border-left: 0;
    }
}

@media (max-width: 430px) {
    .sg-auth-copy p,
    .sg-auth-card-head p {
        font-size: 0.96rem;
    }

    .sg-input-wrap {
        min-height: 54px;
    }

    .sg-input-wrap input,
    .sg-input-wrap select,
    .sg-phone-prefix {
        height: 54px;
    }

    .sg-sidebar {
        width: min(310px, 88vw);
    }
}

/* Responsive patch: auth and dashboard layout only */
.sg-auth,
.sg-dashboard-shell,
.sg-dashboard-main,
.sg-auth-card,
.sg-register-card,
.sg-glass-panel,
.sg-stat-card,
.sg-rank-card,
.sg-bonus-card,
.sg-quick-card,
.sg-chart-card,
.sg-commission-card,
.sg-country-card,
.sg-dashboard-footer {
    max-width: 100%;
}

.sg-auth {
    width: 100%;
    min-height: 100dvh;
    background-repeat: no-repeat;
    overflow-x: hidden;
}

.sg-auth-visual,
.sg-auth-panel-wrap,
.sg-dashboard-main,
.sg-dashboard-content,
.sg-card-title-row,
.sg-stat-content,
.sg-rank-head,
.sg-commission-item,
.sg-country-list div,
.sg-header-actions {
    min-width: 0;
}

.sg-auth-card {
    width: 100%;
    max-width: 560px;
}

.sg-register-card {
    max-width: 680px;
}

.sg-signup-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.sg-signup-form-grid .full {
    grid-column: 1 / -1;
}

.sg-growth-chart {
    max-width: 100%;
}

.sg-chart-card {
    overflow: hidden;
}

.sg-chart-card canvas,
.sg-sparkline {
    max-width: 100% !important;
}

.sg-commission-card,
.sg-country-card,
.sg-dashboard-footer {
    overflow: hidden;
}

.sg-commission-list,
.sg-country-list,
.sg-quick-list {
    min-width: 0;
}

.sg-commission-item strong,
.sg-commission-item small,
.sg-country-list span,
.sg-quick-list span,
.sg-dashboard-hero h1 {
    overflow-wrap: anywhere;
}

.sg-dropdown-trigger:focus-visible,
.sg-icon-btn:focus-visible,
.sg-primary-btn:focus-visible,
.sg-secondary-btn:focus-visible,
.sg-full-btn:focus-visible,
.sg-mini-btn:focus-visible,
.sg-sidebar-nav a:focus-visible,
.sg-input-wrap:focus-within,
.sg-check input:focus-visible + span {
    outline: 2px solid rgba(39, 214, 255, 0.88);
    outline-offset: 3px;
}

@media (min-width: 1200px) {
    .sg-auth,
    .sg-auth-signup {
        min-height: 100dvh;
        grid-template-columns: minmax(0, 1fr) minmax(420px, 0.92fr);
        gap: 48px;
        padding: 32px;
        align-items: center;
        overflow: hidden;
    }

    .sg-auth-visual {
        min-height: calc(100dvh - 64px);
    }

    .sg-auth-card {
        margin-left: auto;
    }

    .sg-auth-language {
        display: block;
        top: 0;
        right: 0;
    }

    .sg-auth-footer {
        position: absolute;
    }

    .sg-dashboard-shell {
        display: flex;
        width: 100%;
        min-height: 100dvh;
        position: relative;
    }

    .sg-sidebar {
        position: fixed;
        inset: auto auto auto auto;
        top: 20px;
        left: 20px;
        bottom: 20px;
        width: 260px;
        min-width: 260px;
        max-width: 260px;
        height: calc(100dvh - 40px);
        border-radius: 24px;
        transform: none !important;
        z-index: 50;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sg-sidebar-open,
    .sg-sidebar-close,
    .sg-sidebar-backdrop {
        display: none !important;
    }

    .sg-dashboard-main {
        display: block;
        visibility: visible;
        opacity: 1;
        width: calc(100% - 320px);
        max-width: calc(100% - 320px);
        min-height: 100dvh;
        margin-left: 300px;
        padding: 20px 20px 32px;
        position: relative;
        z-index: 10;
    }

    body.sidebar-open {
        overflow: auto !important;
    }

    .sg-dashboard-header {
        display: grid;
        grid-template-columns: minmax(180px, auto) minmax(260px, 1fr) auto;
        align-items: center;
        gap: 14px;
        min-height: 72px;
        margin-bottom: 18px;
    }

    .sg-header-search {
        width: 100%;
        max-width: 520px;
        margin-left: 0;
    }

    .sg-header-actions {
        justify-self: end;
    }

    .sg-stat-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .sg-dashboard-grid,
    .sg-analytics-grid {
        grid-template-columns: 2fr 1.1fr 0.95fr;
    }

    .sg-quick-card,
    .sg-country-card {
        grid-column: auto;
    }

    .sg-country-card {
        display: block;
    }

    .sg-dashboard-footer {
        grid-template-columns: minmax(280px, 1.4fr) repeat(4, minmax(110px, 0.65fr));
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .sg-auth,
    .sg-auth-signup {
        grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
        gap: 28px;
        min-height: 100dvh;
        padding: 24px;
        align-items: center;
        overflow: hidden;
    }

    .sg-auth-visual {
        min-height: calc(100dvh - 48px);
    }

    .sg-auth-copy h1,
    .sg-signup-copy h1 {
        font-size: clamp(2.65rem, 5vw, 3.9rem);
    }

    .sg-auth-language {
        display: block;
        top: 0;
        right: 0;
    }

    .sg-auth-card {
        max-width: 520px;
        margin-left: auto;
    }

    .sg-register-card {
        max-width: 580px;
    }

    .sg-auth-stats {
        bottom: 40px;
        padding: 18px;
    }

    .sg-auth-stats > div {
        padding: 0 10px;
    }

    .sg-auth-footer {
        position: absolute;
        gap: 18px;
    }

    .sg-dashboard-shell {
        display: flex;
        width: 100%;
        min-height: 100dvh;
    }

    .sg-sidebar {
        position: fixed;
        inset: auto auto auto auto;
        top: 16px;
        left: 16px;
        bottom: 16px;
        width: 230px;
        min-width: 230px;
        max-width: 230px;
        height: calc(100dvh - 32px);
        border-radius: 22px;
        transform: none !important;
        z-index: 50;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sg-sidebar-open,
    .sg-sidebar-close,
    .sg-sidebar-backdrop {
        display: none !important;
    }

    .sg-sidebar-head {
        padding: 14px 16px;
    }

    .sg-sidebar-nav {
        padding: 14px 12px;
    }

    .sg-sidebar-nav a,
    .sg-sidebar-logout button {
        min-height: 46px;
        padding: 0 12px;
        gap: 10px;
        font-size: 0.9rem;
    }

    .sg-sidebar-promo {
        margin: auto 12px 14px;
        padding: 18px 14px;
    }

    .sg-dashboard-main {
        display: block;
        visibility: visible;
        opacity: 1;
        width: calc(100% - 270px);
        max-width: calc(100% - 270px);
        min-height: 100dvh;
        margin-left: 260px;
        padding: 16px;
        position: relative;
        z-index: 10;
    }

    body.sidebar-open {
        overflow: auto !important;
    }

    .sg-dashboard-header {
        display: grid;
        grid-template-columns: minmax(150px, auto) minmax(220px, 1fr) auto;
        align-items: center;
        gap: 12px;
        min-height: 68px;
        margin-bottom: 16px;
    }

    .sg-header-search {
        width: 100%;
        max-width: 420px;
        margin-left: 0;
    }

    .sg-header-actions {
        gap: 10px;
        justify-self: end;
    }

    .sg-profile-trigger strong,
    .sg-profile-trigger small {
        max-width: 116px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sg-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-dashboard-grid,
    .sg-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-chart-card,
    .sg-country-card {
        grid-column: 1 / -1;
    }

    .sg-quick-card {
        grid-column: auto;
    }

    .sg-country-card {
        display: block;
    }

    .sg-dashboard-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 0;
    }

    .sg-footer-quote {
        grid-column: 1 / -1;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .sg-auth,
    .sg-auth-signup {
        grid-template-columns: 1fr;
        align-items: start;
        min-height: 100dvh;
        padding: 22px;
        gap: 24px;
        overflow-y: auto;
    }

    .sg-auth-visual {
        min-height: auto;
        text-align: center;
        align-items: center;
        padding: 0;
    }

    .sg-auth-brand {
        position: relative;
        align-self: flex-start;
    }

    .sg-auth-copy {
        max-width: 680px;
        margin: 48px auto 0;
    }

    .sg-auth-copy h1,
    .sg-signup-copy h1 {
        font-size: clamp(2.4rem, 6vw, 3.6rem);
    }

    .sg-auth-copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .sg-auth-language {
        display: block;
        top: 0;
        right: 0;
    }

    .sg-auth-panel-wrap {
        align-items: flex-start;
        justify-content: center;
    }

    .sg-auth-card {
        margin: 0 auto;
        max-width: 560px;
    }

    .sg-register-card {
        max-width: 680px;
    }

    .sg-auth-stats {
        position: relative;
        left: auto;
        bottom: auto;
        width: min(100%, 680px);
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin: 28px auto 0;
    }

    .sg-auth-stats > div + div {
        border-left: 0;
    }

    .sg-auth-footer {
        position: relative;
        justify-content: center;
        flex-wrap: wrap;
        margin-top: 24px;
    }

    .sg-network-art {
        width: min(620px, 84vw);
    }

    .sg-feature-list {
        margin: 28px auto 0;
    }

    .sg-dashboard-shell {
        display: block;
        width: 100%;
        min-height: 100dvh;
    }

    .sg-sidebar {
        position: fixed;
        inset: auto auto auto auto;
        top: 0;
        left: 0;
        width: min(280px, 86vw);
        max-width: min(280px, 86vw);
        height: 100dvh;
        border-radius: 0 24px 24px 0;
        transform: translateX(-110%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        overflow-x: hidden;
    }

    body.sidebar-open .sg-sidebar,
    .sg-sidebar.is-open {
        transform: translateX(0);
    }

    .sg-sidebar-open,
    .sg-sidebar-close {
        display: inline-grid;
    }

    .sg-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 999;
        display: block;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: 0.3s ease;
    }

    body.sidebar-open .sg-sidebar-backdrop,
    .sg-sidebar-backdrop.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sg-dashboard-main {
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        margin-left: 0;
        padding: 14px;
    }

    .sg-dashboard-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 14px;
        padding: 12px;
        border: 1px solid rgba(160, 112, 255, 0.14);
        border-radius: 20px;
    }

    .sg-header-search {
        grid-column: 1 / -1;
        order: 10;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .sg-header-actions {
        margin-left: auto;
    }

    .sg-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-dashboard-grid,
    .sg-analytics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sg-rank-card,
    .sg-chart-card,
    .sg-country-card {
        grid-column: 1 / -1;
    }

    .sg-quick-card {
        grid-column: auto;
    }

    .sg-country-card {
        display: block;
    }

    .sg-dashboard-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 0;
    }
}

@media (min-width: 576px) and (max-width: 767px) {
    .sg-auth,
    .sg-auth-signup {
        grid-template-columns: 1fr;
        min-height: 100dvh;
        padding: 16px;
        gap: 20px;
        overflow-y: auto;
    }

    .sg-auth-visual,
    .sg-auth-panel-wrap {
        width: 100%;
        max-width: 100%;
    }

    .sg-auth-visual {
        min-height: auto;
        align-items: center;
        text-align: center;
        padding: 0;
    }

    .sg-auth-brand {
        position: relative;
        align-self: flex-start;
    }

    .sg-auth-language {
        display: block;
        top: 0;
        right: 0;
    }

    .sg-auth-copy {
        max-width: 520px;
        margin: 38px auto 0;
    }

    .sg-auth-copy h1,
    .sg-signup-copy h1 {
        font-size: clamp(2rem, 8vw, 3.1rem);
    }

    .sg-auth-copy p {
        margin-left: auto;
        margin-right: auto;
    }

    .sg-auth-stats {
        position: relative;
        left: auto;
        bottom: auto;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 24px;
        padding: 14px;
    }

    .sg-auth-stats > div {
        padding: 10px;
    }

    .sg-auth-stats > div + div {
        border-left: 0;
    }

    .sg-auth-footer {
        position: relative;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px 18px;
        margin-top: 22px;
        text-align: center;
    }

    .sg-signup-form-grid {
        grid-template-columns: 1fr;
    }

    .sg-signup-form-grid .full {
        grid-column: auto;
    }

    .sg-dashboard-main {
        padding: 14px;
    }
}

@media (max-width: 575px) {
    .sg-auth,
    .sg-auth-signup {
        grid-template-columns: 1fr;
        min-height: 100dvh;
        padding: 14px;
        gap: 18px;
        overflow-y: auto;
    }

    .sg-auth-visual,
    .sg-auth-panel-wrap {
        width: 100%;
        max-width: 100%;
    }

    .sg-auth-visual {
        min-height: auto;
        align-items: center;
        text-align: center;
        padding: 0;
    }

    .sg-auth-brand {
        position: relative;
        align-self: flex-start;
    }

    .sg-brand {
        gap: 9px;
        letter-spacing: 0.09em;
    }

    .sg-brand img {
        width: 46px;
        height: 46px;
    }

    .sg-brand strong {
        font-size: 0.9rem;
    }

    .sg-brand small {
        font-size: 0.68rem;
    }

    .sg-auth-language {
        display: block;
        top: 0;
        right: 0;
    }

    .sg-auth-language .sg-language {
        min-width: 76px;
        height: 40px;
        gap: 7px;
        padding: 0 10px;
    }

    .sg-auth-copy {
        width: min(100%, calc(100vw - 28px)) !important;
        max-width: min(440px, calc(100vw - 28px)) !important;
        margin: 32px auto 0;
    }

    .sg-auth-copy h1,
    .sg-signup-copy h1 {
        max-width: min(100%, 300px);
        margin-left: auto;
        margin-right: auto;
        font-size: clamp(24px, 7.8vw, 34px) !important;
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .sg-auth-copy p {
        max-width: 440px;
        margin: 16px auto 0;
        font-size: 15px;
        line-height: 1.6;
    }

    .sg-auth-card,
    .sg-register-card {
        width: 100%;
        max-width: 440px;
        padding: 22px 18px;
        border-radius: 22px;
    }

    .sg-auth-card-head {
        margin-bottom: 20px;
    }

    .sg-card-orb {
        width: 56px;
        height: 56px;
        margin-bottom: 12px;
    }

    .sg-auth-card h2 {
        font-size: clamp(1.55rem, 8vw, 2rem);
    }

    .sg-input-wrap {
        min-height: 50px;
    }

    .sg-input-wrap input,
    .sg-input-wrap select,
    .sg-phone-prefix {
        min-height: 46px;
        height: 50px;
    }

    .sg-input-wrap > i {
        width: 44px;
    }

    .sg-primary-btn {
        min-height: 52px;
    }

    .sg-social-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .sg-social-grid a {
        min-height: 58px;
        font-size: 1.45rem;
    }

    .sg-signup-form-grid {
        grid-template-columns: 1fr;
    }

    .sg-signup-form-grid .full {
        grid-column: auto;
    }

    .sg-phone-prefix {
        width: 102px;
        flex-basis: 102px;
        padding-left: 10px;
        padding-right: 30px;
    }

    .sg-auth-stats {
        position: relative;
        left: auto;
        bottom: auto;
        width: min(100%, calc(100vw - 28px)) !important;
        max-width: min(440px, calc(100vw - 28px)) !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px;
        margin-top: 22px;
        margin-left: auto;
        margin-right: auto;
        padding: 12px;
        overflow: hidden;
    }

    .sg-auth-stats > div {
        grid-template-columns: 1fr;
        place-items: center;
        gap: 6px;
        min-width: 0;
        padding: 10px 6px;
        text-align: center;
    }

    .sg-auth-stats > div + div {
        border-left: 0;
    }

    .sg-auth-stats i {
        grid-row: auto;
        width: 40px;
        height: 40px;
    }

    .sg-auth-footer {
        position: relative;
        width: 100%;
        max-width: 440px;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px 14px;
        margin-top: 18px;
        text-align: center;
        font-size: 0.82rem;
    }

    .sg-auth-footer span {
        flex-basis: 100%;
    }

    .sg-network-art,
    .sg-auth-planet-large,
    .sg-auth-planet-small,
    .sg-signup-planet {
        opacity: 0.45;
    }

    .sg-feature-list {
        width: 100%;
        max-width: 440px;
        margin-top: 22px;
    }

    .sg-dashboard-main {
        padding: 14px;
    }

    .sg-dashboard-header {
        gap: 10px;
        padding: 10px;
    }

    .sg-profile-trigger span:not(.sg-profile-avatar),
    .sg-profile-trigger > i,
    .sg-dashboard-header .sg-language span,
    .sg-dashboard-header .sg-language .fa-chevron-down {
        display: none;
    }

    .sg-icon-btn,
    .sg-sidebar-open {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .sg-dashboard-header .sg-language {
        width: 42px;
        min-width: 42px;
        height: 42px;
    }

    .sg-header-actions {
        gap: 8px;
    }

    .sg-header-actions .sg-dropdown:nth-child(2),
    .sg-header-actions .sg-dropdown:last-child {
        display: block !important;
    }

    .sg-dashboard-hero {
        min-height: 170px;
    }

    .sg-dashboard-hero > div,
    .sg-stat-card,
    .sg-rank-card,
    .sg-bonus-card,
    .sg-quick-card,
    .sg-chart-card,
    .sg-commission-card,
    .sg-country-card,
    .sg-dashboard-footer {
        padding: 16px;
        border-radius: 18px;
    }

    .sg-dashboard-hero h1 {
        gap: 8px;
        font-size: clamp(1.45rem, 7.2vw, 2rem);
    }

    .sg-dashboard-hero h1 span {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
    }

    .sg-dashboard-hero img {
        right: -18px;
        width: 120px;
        opacity: 0.56;
    }

    .sg-stat-content strong {
        font-size: clamp(24px, 8vw, 34px);
    }

    .sg-card-title-row h2,
    .sg-quick-card h2 {
        font-size: 16px;
    }

    .sg-stat-grid,
    .sg-dashboard-grid,
    .sg-analytics-grid,
    .sg-dashboard-footer {
        grid-template-columns: 1fr;
    }

    .sg-rank-card,
    .sg-chart-card,
    .sg-country-card,
    .sg-quick-card {
        grid-column: auto;
    }

    .sg-growth-chart {
        height: 220px;
    }

    .sg-commission-item,
    .sg-country-list div {
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
        align-items: start;
    }

    .sg-commission-icon,
    .sg-commission-amount,
    .sg-country-list strong,
    .sg-country-list em {
        grid-column: auto;
        justify-self: start;
        text-align: left;
    }
}

@media (max-width: 360px) {
    .sg-auth,
    .sg-auth-signup {
        padding: 10px;
    }

    .sg-auth-card,
    .sg-register-card {
        padding: 18px 14px;
    }

    .sg-auth-copy h1,
    .sg-signup-copy h1 {
        max-width: 260px;
        font-size: 22px !important;
    }

    .sg-auth-copy p,
    .sg-auth-card-head p {
        font-size: 0.9rem;
    }

    .sg-auth-stats,
    .sg-social-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .sg-auth-stats strong {
        font-size: 1rem;
    }

    .sg-auth-stats span {
        font-size: 0.76rem;
    }

    .sg-auth-footer a:nth-of-type(2) {
        display: none;
    }

    .sg-phone-prefix {
        width: 92px;
        flex-basis: 92px;
        font-size: 0.8rem;
    }

    .sg-input-wrap > i {
        width: 38px;
    }

    .sg-dashboard-main {
        padding: 10px;
    }

    .sg-header-actions {
        gap: 6px;
    }
}

@media (max-width: 991px) {
    .sg-dashboard-shell {
        display: block;
        width: 100%;
        min-height: 100dvh;
    }

    .sg-sidebar {
        position: fixed;
        inset: auto auto auto auto;
        top: 0;
        left: 0;
        width: min(280px, 86vw);
        max-width: min(280px, 86vw);
        height: 100dvh;
        border-radius: 0 24px 24px 0;
        transform: translateX(-110%);
        transition: transform 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        overflow-x: hidden;
    }

    body.sidebar-open .sg-sidebar,
    .sg-sidebar.is-open {
        transform: translateX(0);
    }

    .sg-sidebar-open,
    .sg-sidebar-close {
        display: inline-grid;
    }

    .sg-sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 999;
        display: block;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: 0.3s ease;
    }

    body.sidebar-open .sg-sidebar-backdrop,
    .sg-sidebar-backdrop.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.sidebar-open {
        overflow: hidden;
    }

    .sg-dashboard-main {
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        margin-left: 0;
    }

    .sg-dashboard-header {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        padding: 12px;
        border: 1px solid rgba(160, 112, 255, 0.14);
        border-radius: 20px;
    }

    .sg-header-search {
        grid-column: 1 / -1;
        order: 10;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .sg-header-actions {
        margin-left: auto;
    }
}

@media (max-width: 767px) {
    .sg-auth,
    .sg-dashboard-body {
        background-attachment: scroll !important;
        background-size: cover !important;
        background-position: center center !important;
    }

    .sg-dashboard-body {
        background:
            linear-gradient(rgba(5, 8, 22, 0.84), rgba(5, 8, 22, 0.88)),
            url("../images/bg-dashboard-galaxy.jpg") center top / cover scroll,
            var(--sg-bg);
    }

    .sg-stat-grid,
    .sg-dashboard-grid,
    .sg-analytics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-height: 520px) and (orientation: landscape) {
    .sg-auth {
        align-items: flex-start;
        height: auto;
        min-height: 100dvh;
        overflow-y: auto;
    }

    .sg-auth {
        padding-top: 18px;
        padding-bottom: 18px;
    }

    .sg-auth-planet,
    .sg-network-art {
        display: none;
    }
}

@media (hover: none) and (pointer: coarse) {
    button,
    .sg-primary-btn,
    .sg-secondary-btn,
    .sg-full-btn,
    .sg-mini-btn,
    .sg-icon-btn,
    .sg-sidebar-nav a,
    input,
    select {
        min-height: 44px;
    }

    .sg-sidebar-nav a:hover,
    .sg-stat-card:hover,
    .sg-rank-card:hover,
    .sg-bonus-card:hover,
    .sg-quick-card:hover,
    .sg-chart-card:hover,
    .sg-commission-card:hover,
    .sg-country-card:hover {
        transform: none;
    }
}

/* Signup phone code dropdown fix */
.sg-auth-signup .sg-phone-field {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    width: 100%;
    min-height: 56px;
    border: 1px solid rgba(155, 92, 255, 0.45);
    border-radius: 16px;
    background: rgba(8, 10, 30, 0.72);
    overflow: visible;
}

.sg-auth-signup .sg-phone-field:focus-within {
    border-color: rgba(155, 92, 255, 0.95);
    box-shadow: 0 0 0 3px rgba(155, 92, 255, 0.18), 0 0 22px rgba(39, 214, 255, 0.22);
}

.sg-auth-signup .sg-phone-code-select {
    width: 100%;
    height: 54px;
    border: 0;
    border-right: 1px solid rgba(155, 92, 255, 0.28);
    background-color: rgba(8, 10, 30, 0.95);
    color: #F8FAFC;
    padding: 0 14px;
    outline: none;
    appearance: auto;
    cursor: pointer;
}

.sg-auth-signup .sg-phone-code-select option {
    background: #080A1E;
    color: #F8FAFC;
}

.sg-auth-signup .sg-phone-input {
    width: 100%;
    min-width: 0;
    height: 54px;
    border: 0;
    outline: none;
    background: transparent;
    color: #F8FAFC;
    padding: 0 16px;
}

.sg-auth-signup .sg-phone-input::placeholder {
    color: rgba(248, 250, 252, 0.48);
}

.sg-auth-signup #country {
    width: 100%;
    min-height: 56px;
    border-radius: 16px;
    border: 1px solid rgba(155, 92, 255, 0.35);
    background-color: rgba(8, 10, 30, 0.72);
    color: #F8FAFC;
    padding: 0 46px 0 16px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.sg-auth-signup #country option {
    background: #080A1E;
    color: #F8FAFC;
}

.sg-auth-signup .sg-input-wrap:has(#country):focus-within {
    border-color: rgba(155, 92, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(155, 92, 255, 0.18);
}

@media (max-width: 575px) {
    .sg-auth-signup .sg-phone-field {
        grid-template-columns: 105px minmax(0, 1fr);
        min-height: 52px;
    }

    .sg-auth-signup .sg-phone-code-select,
    .sg-auth-signup .sg-phone-input {
        height: 50px;
    }
}

/* Mobile Dashboard Top Section Fix � Space Galaxy Theme */
@media (max-width: 767px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    .sg-dashboard-page,
    .sg-dashboard-shell,
    .sg-dashboard-main,
    .sg-dashboard-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .sg-dashboard-main {
        margin-left: 0 !important;
        padding: 12px !important;
    }

    .sg-dashboard-header {
        position: relative !important;
        display: grid !important;
        grid-template-columns: 44px 1fr auto !important;
        gap: 10px !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 10px !important;
        border-radius: 18px !important;
        overflow: visible !important;
        z-index: 100 !important;
    }

    .sg-header-actions,
    .sg-dashboard-header-actions,
    .sg-top-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 8px !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .sg-header-search {
        grid-column: 1 / -1 !important;
        order: 10 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 8px !important;
    }

    .sg-profile-name,
    .sg-user-name-text,
    .sg-language-text {
        display: none !important;
    }

    .sg-icon-btn,
    .sg-theme-toggle,
    .sg-sidebar-toggle,
    .sg-language-btn,
    .sg-profile-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        max-width: 40px !important;
        padding: 0 !important;
        flex: 0 0 40px !important;
    }

    .sg-notification-dropdown,
    .sg-dropdown-menu,
    .sg-profile-dropdown,
    .sg-language-dropdown {
        position: absolute !important;
        top: calc(100% + 8px) !important;
        right: 0 !important;
        left: auto !important;
        width: min(300px, calc(100vw - 24px)) !important;
        max-width: calc(100vw - 24px) !important;
        transform: none !important;
        z-index: 9999 !important;
        overflow: hidden !important;
    }

    .sg-dashboard-hero,
    .sg-hero-grid,
    .sg-rank-bonus-grid,
    .sg-top-dashboard-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 14px !important;
        overflow: visible !important;
    }

    .sg-hero-card,
    .sg-rank-card,
    .sg-bonus-card,
    .sg-special-bonus-card,
    .sg-welcome-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        position: relative !important;
    }

    .sg-bonus-card img,
    .sg-special-bonus-card img,
    .sg-hero-card img {
        max-width: 100% !important;
        height: auto !important;
    }

    .sg-stats-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 12px !important;
    }

    .sg-stat-card,
    .sg-glass-card,
    .sg-chart-card,
    .sg-table-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
    }
}
