:root {
    --ts-login-orange: #ff9300;
    --ts-login-text: #101018;
    --ts-login-muted: rgba(16, 16, 24, 0.6);
    --ts-login-border: rgba(16, 16, 24, 0.18);
    --ts-login-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

html,
body {
    height: 100%;
}

body.ts-login {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
    color: var(--ts-login-text);
    overflow: hidden;
}

.ts-login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: #02060c;
    background-image: url("/home/img/login_back.png");
    background-size: cover;
    background-position: center;
}

.ts-login-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 40%, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.72) 72%, rgba(0, 0, 0, 0.88) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.75));
}

.ts-login-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 35% 55%, rgba(0, 170, 255, 0.14) 0%, rgba(0, 0, 0, 0) 55%),
        radial-gradient(circle at 70% 40%, rgba(70, 190, 255, 0.12) 0%, rgba(0, 0, 0, 0) 55%);
    mix-blend-mode: screen;
    opacity: 0.85;
    pointer-events: none;
}

.ts-login-arcs {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0.95;
}

.ts-arc {
    fill: none;
    stroke: rgba(160, 230, 255, 0.18);
    stroke-width: 1.2;
    filter: drop-shadow(0 0 8px rgba(80, 190, 255, 0.15));
}

.ts-arc-dot {
    fill: rgba(210, 247, 255, 0.98);
    filter: drop-shadow(0 0 6px rgba(120, 220, 255, 0.95))
            drop-shadow(0 0 14px rgba(80, 190, 255, 0.65))
            drop-shadow(0 0 36px rgba(60, 170, 255, 0.3));
}

@media (prefers-reduced-motion: reduce) {
    .ts-login-arcs { display: none; }
}

.ts-login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 40px clamp(28px, 6vw, 86px);
    position: relative;
    z-index: 1;
}

.ts-login-card {
    width: min(460px, 92vw);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--ts-login-shadow);
}

.ts-login-card__inner {
    padding: 56px 64px 44px;
    text-align: center;
}

.ts-login-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    color: #000;
}

.ts-login-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.ts-login-title {
    margin: 0 0 36px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.ts-login-form {
    display: grid;
    gap: 18px;
}

.ts-login-field {
    display: grid;
    gap: 8px;
    text-align: left;
}

.ts-login-field__label {
    font-size: 13px;
    color: var(--ts-login-muted);
}

.ts-login-field__input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--ts-login-border);
    padding: 8px 2px 9px;
    font-size: 14px;
    background: transparent;
    color: var(--ts-login-text);
    outline: none;
}

.ts-login-field__input:focus {
    border-bottom-color: var(--ts-login-orange);
}

.ts-login-hint {
    margin: 10px 0 6px;
    font-size: 11px;
    color: var(--ts-login-muted);
    text-align: center;
}

.ts-login-submit {
    margin: 0 auto;
    width: min(260px, 100%);
    height: 44px;
    border-radius: 999px;
    border: 2px solid var(--ts-login-orange);
    background: transparent;
    color: rgba(16, 16, 24, 0.72);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.ts-login-submit:hover {
    background: rgba(255, 147, 0, 0.08);
}

.ts-login-submit:active {
    transform: translateY(1px);
}

.ts-login-submit:disabled {
    cursor: not-allowed;
    opacity: 0.65;
    background: rgba(255, 147, 0, 0.08);
    transform: none;
}

.ts-login-submit:disabled:hover {
    background: rgba(255, 147, 0, 0.08);
}

.ts-login-dots {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: -6px;
}

.ts-login-dots span {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 147, 0, 0.32);
}

.ts-login-dots span:nth-child(2) {
    background: rgba(255, 147, 0, 0.55);
}

.ts-login-dots span:nth-child(3) {
    background: rgba(255, 147, 0, 0.8);
}

.ts-login-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 11px;
}

.ts-login-link {
    color: var(--ts-login-orange);
    text-decoration: none;
}

.ts-login-link:hover {
    text-decoration: underline;
}

.ts-login-links__sep {
    color: rgba(16, 16, 24, 0.35);
}

.ts-login-brand {
    position: fixed;
    right: 26px;
    bottom: 22px;
    width: min(150px, 36vw);
    height: auto;
    z-index: 2;
    opacity: 0.98;
}

@media (max-width: 520px) {
    body.ts-login {
        overflow: auto;
    }

    .ts-login-shell {
        justify-content: center;
        padding: 28px 18px;
    }

    .ts-login-card__inner {
        padding: 44px 28px 34px;
    }

    .ts-login-brand {
        position: static;
        display: block;
        margin: 18px auto 0;
    }
}
