:root {
    font-family: Inter, sans-serif;
    color: var(--ai-heading-text);
    background: var(--ai-field-bg);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid var(--ai-accent);
    outline-offset: 4px;
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100svh;
}

.auth-visual {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100svh;
    overflow: hidden;
    padding: clamp(32px, 5vw, 80px);
    color: #fff;
    background: #171a2b;
}

.auth-video, .auth-visual::after {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}
.auth-video { object-fit: cover; }
.auth-visual::after {
    content: "";
    background: linear-gradient(180deg, rgba(12, 15, 27, .32), rgba(12, 15, 27, .2) 35%, rgba(12, 15, 27, .78));
}
.auth-brand { align-self: flex-start; }
.auth-brand img { display: block; width: 112px; height: auto; filter: brightness(0) invert(1); }
.auth-intro { margin-top: auto; padding-top: 120px; padding-bottom: 32px; }
.auth-intro h2 { margin: 0 0 24px; font-size: clamp(36px, 4.2vw, 64px); font-weight: 500; line-height: 1.08; letter-spacing: -.055em; }
.auth-intro p { margin: 0; font-size: 16px; line-height: 1.7; color: rgba(255, 255, 255, .8); }
.auth-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 40px clamp(24px, 5vw, 80px);
    padding-left: calc(clamp(24px, 5vw, 80px) + 48px);
}
.auth-back { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; color: var(--ai-muted-text); font-size: 13px; text-decoration: none; }
.auth-back:hover { color: var(--ai-accent-strong); }
.auth-content { width: 100%; max-width: 520px; margin: auto 0; padding: 64px 0; }
.auth-form h1 { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -.04em; }
.auth-form h1 img { flex-shrink: 0; }
.auth-form p { margin: 0 0 32px; color: var(--ai-muted-text); font-size: 14px; line-height: 1.7; text-wrap: balance; }
.auth-form > ul { list-style: none; margin: 0; padding: 0; }
.auth-form li + li { margin-top: 12px; }
.auth-provider, .auth-form button[type="submit"] {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid var(--ai-neutral-border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: var(--ai-medium-weight);
    line-height: 1.5;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}
.auth-provider { background: var(--ai-field-bg); color: inherit; }
.auth-provider:hover:not(:disabled) { border-color: var(--ai-accent-border); background: var(--ai-secondary-surface); }
.auth-form button[type="submit"]:not(.auth-provider) { border-color: var(--ai-accent); background: var(--ai-accent); color: var(--ai-on-accent); }
.auth-form button[type="submit"]:not(.auth-provider):hover { border-color: var(--ai-accent-strong); background: var(--ai-accent-strong); }
.auth-form button:disabled { cursor: not-allowed; opacity: .6; }
.auth-form .cf-turnstile { margin-bottom: 24px; }
.auth-form .errorlist { padding: 0; list-style: none; color: #b42318; font-size: 13px; line-height: 1.6; }
html.dark .auth-form .errorlist { color: #f87171; }
.auth-legal { margin: 24px 0 0; color: var(--ai-muted-text); font-size: 12px; line-height: 1.8; text-wrap: balance; }
.auth-legal a { color: var(--ai-control-text); text-underline-offset: 3px; white-space: nowrap; }
.auth-support { margin: 0; text-align: left; color: var(--ai-muted-text); font-size: 12px; }
.auth-support a { color: var(--ai-control-text); text-decoration: none; }
.auth-legal a:hover, .auth-support a:hover { color: var(--ai-accent-strong); }
.auth-content .site-messages { margin-bottom: 24px; }

@media (max-width: 767px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-visual { min-height: 250px; padding: 24px; }
    .auth-brand img { width: 90px; }
    .auth-intro { padding-top: 36px; padding-bottom: 0; }
    .auth-intro h2 { margin-bottom: 0; font-size: 32px; }
    .auth-intro p { display: none; }
    .auth-panel { min-height: calc(100svh - 250px); padding: 24px; }
    .auth-content { padding: 40px 0; }
    .auth-form h1 { font-size: 28px; }
}
