﻿/* Sign-in page. Colours come from rh-tokens.css: the page is data-theme="system", so it follows
   the device's light or dark setting (the user's own theme isn't known before sign-in). */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--rh-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
    height: 100vh;
    overflow: hidden;
    background: var(--rh-surface, #ffffff);
    color: var(--rh-ink, #0f1b2d);
}

.login-container {
    display: flex;
    height: 100vh;
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: var(--rh-surface, #ffffff);
}

.login-form-container {
    width: 100%;
    max-width: 400px;
}

.logo-container {
    margin-bottom: 40px;
    text-align: center;
}

.logo-container img {
    height: 50px;
}

/* Page heading for screen readers; the logo is the visible title */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--rh-ink-2, #334155);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--rh-line-2, #cbd5e1);
    border-radius: 8px;
    transition: border-color .2s, box-shadow .2s;
    background: var(--rh-surface, #ffffff);
    color: var(--rh-ink, #0f1b2d);
}

.form-input::placeholder {
    color: var(--rh-muted, #64748b);
}

.form-input:focus {
    outline: none;
    border-color: var(--rh-brand, #04488F);
    box-shadow: 0 0 0 3px var(--rh-brand-ring, rgba(4, 72, 143, .22));
}

.signin-button {
    width: 100%;
    height: 48px;
    background: var(--rh-brand, #04488F);
    color: var(--rh-on-brand, #ffffff);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s;
    margin-top: 8px;
}

.signin-button:hover {
    background: var(--rh-brand-hover, #033a75);
}

.signin-button:focus-visible {
    outline: 2px solid var(--rh-brand-ring, rgba(4, 72, 143, .22));
    outline-offset: 2px;
}

.divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
    color: var(--rh-muted, #64748b);
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--rh-line, #e2e8f0);
}

.divider span {
    padding: 0 16px;
}

.google-signin-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    background: var(--rh-surface, #ffffff);
    border: 1px solid var(--rh-line-2, #cbd5e1);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    color: var(--rh-ink, #0f1b2d);
    cursor: pointer;
    transition: background-color .2s, border-color .2s;
    text-decoration: none;
}

.google-signin-button:hover {
    background: var(--rh-sunken, #f1f5f9);
    border-color: var(--rh-muted, #64748b);
    text-decoration: none;
    color: var(--rh-ink, #0f1b2d);
}

/* Google's own colours on a white disc, so the G stays right on a dark background */
.google-icon {
    box-sizing: content-box;
    width: 20px;
    height: 20px;
    padding: 2px;
    margin-right: 10px;
    border-radius: 50%;
    background: #ffffff;
}

/* Label with "Forgot password?" on the same line */
.form-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.password-field {
    position: relative;
}

.password-field .form-input {
    padding-right: 72px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    padding: 6px 10px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--rh-brand, #04488F);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: var(--rh-sunken, #f1f5f9);
    outline: none;
}

.register {
    margin-top: 28px;
    text-align: center;
    color: var(--rh-muted, #64748b);
    font-size: 14px;
}

.legal {
    margin-top: 16px;
    text-align: center;
    color: var(--rh-muted, #64748b);
    font-size: 12px;
    line-height: 1.5;
}

.legal .link {
    font-size: inherit;
}

.link {
    color: var(--rh-brand, #04488F);
    text-decoration: none;
    font-size: 14px;
    transition: color .2s;
}

.link:hover {
    color: var(--rh-brand-hover, #033a75);
    text-decoration: underline;
}

.error-message {
    background: var(--rh-bad-bg, #fee2e2);
    color: var(--rh-bad, #b91c1c);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border: 1px solid var(--rh-bad, #b91c1c);
}

/* Narrow screens: the form takes the whole width. login-right-new-animation.css, loaded after this
   file, gives the panel its display, so this rule needs the extra specificity. */
@media (max-width: 968px) {
    .login-container .login-right {
        display: none;
    }

    .login-left {
        padding: 32px 20px;
    }

    body {
        overflow: auto;
    }
}
