:root {
    --bg: #f6f8fc;
    --surface: rgba(255, 255, 255, 0.84);
    --surface-solid: #ffffff;
    --text: #101828;
    --muted: #667085;
    --line: #e4eaf2;
    --blue: #f18b46;
    --blue-dark: #cf6b29;
    --danger: #b42318;
    --success: #15803d;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 16% 12%, rgba(241, 139, 70, 0.14), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, var(--bg) 52%, #eef4ff 100%);
    color: var(--text);
    font-family: "Manrope", Arial, Helvetica, sans-serif;
    font-weight: 400;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

.register-page {
    display: grid;
    place-items: center;
    width: min(620px, calc(100% - 40px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 42px 0;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.register-card h2,
.success-state h2 {
    margin: 0;
    letter-spacing: 0;
}

.register-panel {
    width: 100%;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 160ms ease, transform 160ms ease;
}

.back-link:hover {
    color: var(--blue);
    transform: translateX(-2px);
}

.register-card,
.success-state {
    width: 100%;
    padding: 30px;
    background: var(--surface);
    border: 1px solid rgba(228, 234, 242, 0.9);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.card-heading {
    margin-bottom: 24px;
}

.register-card h2,
.success-state h2 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    line-height: 1.05;
    font-weight: 500;
}

.card-heading p:last-child,
.success-state p {
    margin: 12px 0 0;
    color: var(--muted);
}

.form-alert {
    margin-bottom: 18px;
    padding: 13px 14px;
    background: #fff4f2;
    border: 1px solid #ffd5cf;
    border-radius: 14px;
    color: var(--danger);
    font-size: 0.92rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.login-grid {
    grid-template-columns: 1fr;
}

.login-options {
    margin-top: 8px;
}

.field {
    position: relative;
    display: grid;
    gap: 7px;
}

.field--wide {
    grid-column: 1 / -1;
}

.field span,
.checks span {
    color: #344054;
    font-size: 0.9rem;
}

.field em {
    color: var(--muted);
    font-style: normal;
}

.field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--text);
    outline: 0;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:focus {
    background: #ffffff;
    border-color: rgba(241, 139, 70, 0.72);
    box-shadow: 0 0 0 4px rgba(241, 139, 70, 0.12);
}

.field small,
.checks small {
    min-height: 18px;
    color: var(--danger);
    font-size: 0.78rem;
}

.field.is-valid input {
    border-color: rgba(21, 128, 61, 0.4);
}

.field.is-invalid input {
    border-color: rgba(180, 35, 24, 0.56);
}

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

.password-toggle {
    position: absolute;
    right: 9px;
    top: 34px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--blue);
}

.password-meter {
    margin: 8px 0 16px;
}

.password-meter span {
    display: block;
    width: 100%;
    height: 7px;
    background: #e7edf6;
    border-radius: 999px;
    overflow: hidden;
}

.password-meter span::before {
    display: block;
    width: var(--strength, 0%);
    height: 100%;
    background: var(--strength-color, #cbd5e1);
    border-radius: inherit;
    transition: width 180ms ease, background 180ms ease;
    content: "";
}

.password-meter p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.password-meter strong {
    color: var(--text);
    font-weight: 500;
}

.checks {
    display: grid;
    gap: 6px;
}

.checks label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checks input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--blue);
}

.checks a,
.login-note a {
    color: var(--blue);
    text-decoration: none;
}

.submit-button,
.primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 52px;
    margin-top: 20px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: #ffffff;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 16px 32px rgba(241, 139, 70, 0.24);
    transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.submit-button:hover,
.primary-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(241, 139, 70, 0.28);
}

.submit-button:disabled {
    cursor: not-allowed;
    opacity: 0.46;
    transform: none;
    box-shadow: none;
}

.submit-button.is-loading {
    pointer-events: none;
}

.submit-button.is-loading i {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.44);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

.submit-button.is-loading i::before {
    content: "";
}

.login-note {
    margin: 18px 0 0;
    color: var(--muted);
    text-align: center;
}

.success-state {
    text-align: center;
}

.success-icon {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    background: rgba(241, 139, 70, 0.1);
    border-radius: 22px;
    color: var(--blue);
    font-size: 2rem;
}

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

@media (max-width: 940px) {
    .register-page {
        width: min(100% - 28px, 640px);
        padding: 24px 0;
    }
}

@media (max-width: 620px) {
    .register-card,
    .success-state {
        padding: 22px;
        border-radius: 22px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field--wide {
        grid-column: auto;
    }

}
