/* ATAS Web — sign-in screen styled after the desktop authorization window */

:root {
    --bg: #0a0b0e;
    --card: #232529;
    --card-border: #33363c;
    --input-bg: #1a1c20;
    --input-border: #3a3d44;
    --input-focus: #2f7fe0;
    --text: #e8eaed;
    --text-dim: #9aa0aa;
    --accent: #1583d8;
    --accent-hover: #2b95e9;
    --error: #ff5d4f;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

#auth-stage {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(1200px 600px at 20% -10%, rgba(84, 54, 214, 0.12), transparent 60%),
        radial-gradient(1000px 500px at 90% 110%, rgba(21, 131, 216, 0.10), transparent 60%),
        var(--bg);
}

.auth-card {
    display: flex;
    width: 1060px;
    max-width: 100%;
    min-height: 620px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

/* ------------------------------------------------------------------ banner */

.banner {
    position: relative;
    flex: 1 1 50%;
    min-width: 0;
    background: #101117;
    display: none;
}

/* the call-to-action is drawn on the banner image itself — the whole area is a link */
.banner-area {
    position: absolute;
    inset: 0;
    display: block;
    cursor: pointer;
}

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

.banner-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 48px;
    background: linear-gradient(160deg, #1a1040 0%, #0e0c1c 55%, #120a23 100%);
    overflow: hidden;
}

.banner-fallback-glow {
    position: absolute;
    width: 480px;
    height: 480px;
    left: -120px;
    top: -160px;
    background: radial-gradient(circle, rgba(123, 92, 255, 0.35), transparent 65%);
    pointer-events: none;
}

.banner-fallback h2 {
    margin: 0 0 12px;
    font-size: 40px;
    line-height: 1.1;
    background: linear-gradient(90deg, #b9a4ff, #6fb3ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.banner-fallback p {
    margin: 0;
    color: var(--text-dim);
    font-size: 16px;
}

@media (min-width: 900px) {
    .banner { display: block; }
}

/* -------------------------------------------------------------- login pane */

.login-pane {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 56px 72px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    height: 46px;
}

.tagline {
    margin: 14px 0 40px;
    text-align: center;
    color: var(--text-dim);
    font-size: 15px;
}

.field {
    position: relative;
    margin-bottom: 18px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 10px;
    padding: 9px 14px 7px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field:focus-within {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 3px rgba(47, 127, 224, 0.18);
}

.field label {
    display: block;
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 2px;
}

.field input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-size: 16px;
    padding: 2px 0 3px;
}

.field input::placeholder { color: #5b606b; }

.field .eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}

.field .eye:hover { color: var(--text); }

.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 4px 2px 0;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
}

.forgot {
    color: var(--text-dim);
    font-size: 14px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.forgot:hover { color: var(--text); }

/* --------------------------------------------------------------- status */

.status {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 14px 0 4px;
}

.status-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-dim);
    font-size: 14px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(47, 127, 224, 0.25);
    border-top-color: var(--input-focus);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.status-error {
    color: var(--error);
    font-size: 14px;
    text-align: center;
}

/* --------------------------------------------------------------- connect */

.connect {
    width: 100%;
    padding: 13px 32px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.connect:hover:not(:disabled) { background: var(--accent-hover); }

.connect:active:not(:disabled) { transform: translateY(1px); }

.connect:disabled {
    opacity: 0.55;
    cursor: default;
}

.hidden { display: none !important; }
