/* Sign-up and email-confirmation pages (register.php, verify_email.php).
 * Same tokens and split layout as the login page (index.php).
 */

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

:root {
    --urgo-teal: #00A9C1;
    --urgo-teal-ink: #00778a;
    --urgo-navy: #003359;
    --urgo-light-teal: #e4f5f7;
    --muted: #5c6f80;
    --line: #dfe5ea;
    --red: #c62f3e;
}

body { font-family: 'Roboto', sans-serif; min-height: 100vh; background: #fff; color: var(--urgo-navy); }

.page { display: flex; min-height: 100vh; }

.page-left { flex: 0 0 55%; display: flex; flex-direction: column; padding: 30px 40px 40px; }
.page-right {
    flex: 0 0 45%;
    position: sticky; top: 0; height: 100vh;
    background: url('login-image.png') center center / cover no-repeat;
}
.page-right::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0, 169, 193, 0.1) 0%, rgba(0, 51, 89, 0.2) 100%);
}

.inner { width: 100%; max-width: 560px; margin: 0 auto; flex: 1; display: flex; flex-direction: column; }
.inner.narrow { max-width: 440px; }
.logo { align-self: flex-start; }
.logo img { height: 55px; width: auto; display: block; }

.intro { margin: 36px 0 26px; }
.intro h1 { font-size: 30px; font-weight: 700; margin-bottom: 8px; text-wrap: balance; }
.intro p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }

.alert { background: #fdecee; color: var(--red); padding: 11px 15px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 7px; }
.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    color: var(--urgo-navy);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235c6f80' stroke-width='2'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.form-group input::placeholder { color: #9aa8b4; opacity: 1; }
/* The empty "Select your ..." option reads as a placeholder too. */
.form-group select:invalid { color: #9aa8b4; }
.form-group select option { color: var(--urgo-navy); }
.form-group input:focus,
.form-group select:focus { outline: none; border-color: var(--urgo-teal); box-shadow: 0 0 0 3px rgba(0, 169, 193, 0.12); }
.form-group [aria-invalid="true"] { border-color: var(--red); }
.form-group .is-valid { border-color: #7cc9a3; }
.form-group .is-valid:focus { border-color: var(--urgo-teal); }

/* Required marker on every label. */
.req { color: var(--red); font-weight: 500; }
.required-note { font-size: 12.5px; margin-top: 8px; }
.form-group .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.field-error { font-size: 12.5px; color: var(--red); margin-top: 6px; }
.other-field { margin-top: 8px; }
.other-field[hidden] { display: none; }

.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 44px; }
.password-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    border: 0; background: none; padding: 8px; cursor: pointer; color: #999; font-size: 16px;
}
.password-toggle:hover, .password-toggle:focus-visible { color: var(--urgo-teal); }

.consent {
    display: flex; gap: 12px; align-items: flex-start;
    background: var(--urgo-light-teal); border: 1px solid #c9e9ee; border-radius: 10px;
    padding: 14px 16px; margin: 6px 0 4px;
}
/* Custom checkbox: a teal box whose white tick draws in when checked. */
.consent input {
    appearance: none; -webkit-appearance: none;
    flex: 0 0 auto;
    width: 22px; height: 22px; margin: 0;
    border: 2px solid #9fb6c4; border-radius: 6px;
    background: #fff;
    display: grid; place-content: center;
    cursor: pointer;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.consent input::before {
    content: '';
    width: 6px; height: 11px;
    margin-top: -2px;
    border: solid #fff; border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .16s cubic-bezier(.3, 1.6, .5, 1);
}
.consent input:checked { background: var(--urgo-teal); border-color: var(--urgo-teal); }
.consent input:checked::before { transform: rotate(45deg) scale(1); }
.consent input:hover { border-color: var(--urgo-teal); }
.consent input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0, 169, 193, .3); }
.consent label { font-size: 13px; line-height: 1.55; color: #24465f; cursor: pointer; }
.consent:has(input:checked) { background: #dcf2f5; border-color: #9fd9e3; }
.consent.invalid { border-color: var(--red); background: #fdf3f4; }
.consent.invalid input { border-color: var(--red); }

.turnstile { margin: 18px 0 4px; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 14px; margin-top: 20px;
    background: var(--urgo-teal); color: #fff; border: none; border-radius: 8px;
    font-size: 16px; font-weight: 500; font-family: 'Roboto', sans-serif;
    cursor: pointer; text-decoration: none; transition: background .2s, box-shadow .2s;
}
.btn:hover { background: var(--urgo-navy); box-shadow: 0 4px 15px rgba(0, 169, 193, 0.3); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn:focus-visible { outline: 3px solid rgba(0, 169, 193, .4); outline-offset: 2px; }

.switch { text-align: center; font-size: 14px; color: var(--muted); margin-top: 18px; }
.switch a { color: var(--urgo-teal-ink); font-weight: 500; text-decoration: none; }
.switch a:hover { text-decoration: underline; }

/* Confirmation states (check your email, confirmed, closed, expired link).
   Left-aligned on the same edge as the logo, and centred vertically in the
   column so the message does not float at the top of an empty page. */
.done { max-width: 460px; margin: auto 0; padding: 40px 0; }
/* Short forms (forgot password, choose a new password) sit in the middle of
   the column too, instead of right under the logo. */
.panel { margin: auto 0; padding: 40px 0; }
.panel .intro { margin-top: 0; }
.done .icon {
    width: 60px; height: 60px; border-radius: 16px; margin-bottom: 24px;
    display: flex; align-items: center; justify-content: center;
    background: var(--urgo-light-teal); color: var(--urgo-teal); font-size: 26px;
}
.done h1 { font-size: 28px; margin-bottom: 12px; text-wrap: balance; }
.done p { font-size: 15px; color: var(--muted); line-height: 1.6; margin-bottom: 10px; }
.done strong { color: var(--urgo-navy); overflow-wrap: anywhere; }
.done a:not(.btn) { color: var(--urgo-teal-ink); font-weight: 500; text-underline-offset: 2px; }
.done a:not(.btn):hover { color: var(--urgo-navy); }
.done .btn { margin-top: 22px; }
.done .note {
    margin-top: 18px; padding: 12px 14px;
    background: #f5f8fa; border: 1px solid var(--line); border-radius: 8px;
    font-size: 13.5px; line-height: 1.55; color: var(--muted);
}
.done .note i { color: var(--urgo-teal); margin-right: 6px; }
.done form { margin-top: 22px; }
.done .switch { text-align: left; }

.foot { margin-top: 28px; text-align: center; font-size: 13px; color: #888; }

@media (max-width: 992px) {
    .page-left { flex: 1; }
    .page-right { display: none; }
}
@media (max-width: 576px) {
    .page-left { padding: 24px 16px 32px; }
    .logo img { height: 45px; }
    .intro { margin: 28px 0 22px; }
    .intro h1 { font-size: 25px; }
    .row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
