@font-face {
    font-family: 'SF Pro Regular';
    src: url('/fonts/sf-pro-regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Regular';
    src: url('/fonts/sf-pro-regular.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Bold';
    src: url('/fonts/sf-pro-bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Bold';
    src: url('/fonts/sf-pro-bold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/fonts/sf-pro-regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/fonts/sf-pro-regular.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/fonts/sf-pro-bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('/fonts/sf-pro-bold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    --font-pixel: 'SF Pro Bold', sans-serif;
    --font-body: 'SF Pro Regular', sans-serif;
    --accent-color: var(--accent-1, #655190);
    --accent-rgb: var(--accent-1-rgb, 101, 81, 144);
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background: #111216 !important;
    color: #e4e4eb !important;
    font-family: var(--font-body);
    line-height: 1.5;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

input, textarea {
    user-select: text;
    -webkit-user-select: text;
}

.auth-screen {
    position: fixed;
    inset: 0;
    z-index: 600;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: clamp(24px, 6vw, 72px);
    opacity: 1;
    visibility: visible;
}

.auth-bg,
.auth-bg * {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -webkit-user-drag: none !important;
}

.auth-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    background: #111216;
}

.auth-bg-sharp {
    position: absolute;
    inset: 0;
}

.auth-bg-sharp img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    filter: brightness(1.06) saturate(1.1) contrast(1.03);
}

.auth-bg-blur {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #111216;
    -webkit-mask-image: linear-gradient(
        to right,
        #000 0%,
        #000 44%,
        rgba(0, 0, 0, 0.96) 48%,
        rgba(0, 0, 0, 0.88) 52%,
        rgba(0, 0, 0, 0.74) 56%,
        rgba(0, 0, 0, 0.56) 60%,
        rgba(0, 0, 0, 0.36) 64%,
        rgba(0, 0, 0, 0.18) 68%,
        rgba(0, 0, 0, 0.06) 72%,
        transparent 78%
    );
    mask-image: linear-gradient(
        to right,
        #000 0%,
        #000 44%,
        rgba(0, 0, 0, 0.96) 48%,
        rgba(0, 0, 0, 0.88) 52%,
        rgba(0, 0, 0, 0.74) 56%,
        rgba(0, 0, 0, 0.56) 60%,
        rgba(0, 0, 0, 0.36) 64%,
        rgba(0, 0, 0, 0.18) 68%,
        rgba(0, 0, 0, 0.06) 72%,
        transparent 78%
    );
}

.auth-bg-blur img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    filter: blur(20px);
}

.auth-bg-gradient {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        90deg,
        rgba(17, 18, 22, 0.92) 0%,
        rgba(17, 18, 22, 0.78) 32%,
        rgba(17, 18, 22, 0.45) 54%,
        rgba(17, 18, 22, 0.18) 72%,
        rgba(17, 18, 22, 0.06) 100%
    );
    pointer-events: none;
}

.auth-bg-tint {
    position: absolute;
    inset: 0;
    z-index: 3;
    background: linear-gradient(
        90deg,
        rgba(0, 0, 0, 0.22) 0%,
        rgba(0, 0, 0, 0.1) 45%,
        rgba(0, 0, 0, 0.02) 100%
    );
    pointer-events: none;
}

.auth-back {
    position: absolute;
    top: clamp(22px, 4vw, 36px);
    left: clamp(22px, 4vw, 36px);
    z-index: 20;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.auth-back:hover {
    color: #ffffff;
    transform: translateX(-2px);
}

.auth-back-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.auth-shell {
    position: relative;
    z-index: 10;
    width: min(100%, 390px);
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
}

.auth-brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-logo {
    display: block;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 16px rgba(var(--accent-rgb, 101, 81, 144), 0.65));
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.auth-title {
    margin: 0;
    font-family: var(--font-pixel);
    font-size: clamp(26px, 4.2vw, 36px);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #ffffff;
    line-height: 1.15;
    text-shadow: 0 0 24px rgba(var(--accent-rgb, 101, 81, 144), 0.5);
}

.auth-tagline {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.48);
    margin: 0;
}

.auth-tagline-emoji {
    display: inline-block;
    vertical-align: -0.05em;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 11px;
    width: 100%;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.auth-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

.auth-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    transition: color 0.2s ease;
}

.auth-input {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 14px 13px 44px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 400;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.auth-input:focus {
    border-color: rgba(var(--accent-rgb, 101, 81, 144), 0.7);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 16px rgba(var(--accent-rgb, 101, 81, 144), 0.25);
}

.auth-input:focus ~ .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
    color: #ffffff;
}

.auth-field--password .auth-input {
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    padding: 0;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-password-toggle:hover {
    color: #ffffff;
}

.auth-password-toggle svg {
    width: 18px;
    height: 18px;
}

.auth-error {
    margin: 2px 0 2px 2px;
    font-size: 12.5px;
    font-weight: 400;
    color: #fca5a5;
    line-height: 1.35;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
    width: 100%;
    padding: 13px 24px;
    border: none;
    border-radius: 999px;
    background: #0077ff !important;
    color: #ffffff !important;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 119, 255, 0.3);
}

.auth-submit:hover {
    background: #006ce6 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0, 119, 255, 0.45);
}

.auth-submit:active {
    transform: scale(0.96);
}

.auth-register-link {
    color: #38bdf8 !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-register-link:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

.auth-foot {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.auth-register {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.42);
}

.auth-register-link {
    color: rgba(var(--accent-rgb, 101, 81, 144), 0.95);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.auth-register-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

@media (max-width: 640px) {
    .auth-screen {
        padding: 24px 18px;
        align-items: center;
        justify-content: center;
    }
    .auth-shell {
        width: 100%;
        margin-top: 40px;
    }
    .auth-back {
        top: 20px;
        left: 20px;
    }
}

input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
textarea:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #181a24 inset !important;
    box-shadow: 0 0 0 1000px #181a24 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    transition: background-color 500000s ease-in-out 0s;
}

input:-internal-autofill-selected {
    appearance: menulist-button;
    background-image: none !important;
    background-color: #181a24 !important;
    color: #ffffff !important;
}