/* register.css */

body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
    background: linear-gradient(135deg, #29000b 0%, #8a0022 38%, #c8102e 72%, #540025 100%);
    color: #f9fafb;
    position: relative;
    overflow: hidden;
}

body::before,
body::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    z-index: 0;
}

body::before {
    width: 360px;
    height: 360px;
    top: -160px;
    left: -100px;
}

body::after {
    width: 460px;
    height: 460px;
    bottom: -200px;
    right: -80px;
}

.is-hidden {
    display: none !important;
}

.register-shell {
    width: 100%;
    max-width: 640px;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.register-card {
    width: 100%;
    max-width: 520px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 24px;
    padding: 2.6rem 2.4rem;
    box-shadow: 0 32px 60px rgba(0, 0, 0, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    color: #121826;
}

.logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.4rem;
}

.logo div {
    width: 56px;
    height: 56px;
    background: #c8102e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

h2 {
    margin: 0 0 0.4rem;
    font-size: 1.9rem;
    font-weight: 800;
    text-align: center;
}

.subtitle {
    margin: 0 0 1.8rem;
    font-size: 0.98rem;
    text-align: center;
    color: #5f6368;
}

.error {
    background: rgba(200, 16, 46, 0.12);
    color: #8a0022;
    border: 1px solid rgba(200, 16, 46, 0.3);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.step-indicator {
    display: flex;
    margin: 0 0 2.1rem;
    padding: 0;
    list-style: none;
    gap: 12px;
    position: relative;
    z-index: 1;
}

.step-indicator__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(17, 24, 39, 0.5);
    position: relative;
}

.step-indicator__item::before {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: -50%;
    width: 100%;
    height: 2px;
    background: rgba(17, 24, 39, 0.12);
    z-index: -1;
}

.step-indicator__item:first-child::before {
    display: none;
}

.step-indicator__item.is-active {
    color: #8a0022;
}

.step-indicator__item.is-complete {
    color: #111827;
}

.step-indicator__item.is-active::before,
.step-indicator__item.is-complete::before {
    background: rgba(138, 0, 34, 0.5);
}

.step-indicator__bubble {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: #f1f3f8;
    color: inherit;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
    position: relative;
    z-index: 2;
}

.step-indicator__item.is-active .step-indicator__bubble {
    background: #ffffff;
    color: #8a0022;
    transform: scale(1.05);
}

.step-indicator__item.is-complete .step-indicator__bubble {
    background: linear-gradient(135deg, #ffffff 0%, #ffe1e9 100%);
    color: #8a0022;
}

.step-indicator__label {
    font-weight: 600;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.register-form .step {
    display: none;
    flex-direction: column;
    gap: 1.1rem;
}

.register-form .step.is-active {
    display: flex;
}

.register-form.no-js .step {
    display: flex;
}

.step__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

.step__hint {
    margin: -0.3rem 0 0.6rem;
    font-size: 0.88rem;
    color: rgba(17, 24, 39, 0.6);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group--split {
    flex-direction: row;
    gap: 1rem;
}

.form-group--split > div {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select {
    width: 100%;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(17, 24, 39, 0.15);
    border-radius: 12px;
    font-size: 1rem;
    background: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
    color: #111827;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: #c8102e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.18);
}

input:required:invalid,
select:required:invalid {
    box-shadow: none;
    border-color: rgba(17, 24, 39, 0.15);
}

input:required:invalid:focus,
select:required:invalid:focus {
    border-color: #c8102e;
    box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.18);
}

.password-field {
    position: relative;
    display: flex;
}

.password-field input {
    padding-right: 120px;
    flex: 1;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: calc(100% - 10px);
    background: rgba(200, 16, 46, 0.12);
    border: 1px solid rgba(200, 16, 46, 0.35);
    color: #8a0022;
    font-weight: 600;
    cursor: pointer;
    padding: 0 1.05rem;
    border-radius: 999px;
    transition: background 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
    line-height: 1;
    min-width: 92px;
}

.password-toggle:hover {
    background: rgba(200, 16, 46, 0.2);
    border-color: rgba(200, 16, 46, 0.6);
}

.password-toggle:focus-visible {
    outline: 2px solid rgba(200, 16, 46, 0.4);
    outline-offset: 2px;
}

.role-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.1rem;
}

.role-btn {
    flex: 1;
    padding: 0.85rem;
    border-radius: 16px;
    border: 1px solid rgba(17, 24, 39, 0.12);
    background: rgba(17, 24, 39, 0.04);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.role-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(138, 0, 34, 0.4);
}

.role-btn.active {
    background: linear-gradient(135deg, #ffffff 0%, #ffe1e9 100%);
    border-color: rgba(138, 0, 34, 0.7);
    color: #8a0022;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
}

.step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.4rem;
}

.btn {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.85rem 1.6rem;
    border: none;
    cursor: pointer;
    font-size: 0.98rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn--primary {
    background: linear-gradient(135deg, #ffffff 0%, #ffe1e9 100%);
    color: #8a0022;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 40px rgba(0, 0, 0, 0.24);
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.85);
    color: #111827;
    border: 1px solid rgba(17, 24, 39, 0.12);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.95);
}

.terms {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: rgba(17, 24, 39, 0.8);
}

.terms input {
    margin-top: 0.1rem;
}

.terms a {
    color: #8a0022;
    text-decoration: none;
    font-weight: 600;
}

.terms a:hover {
    text-decoration: underline;
}

.login-link {
    margin-top: 1.8rem;
    text-align: center;
    font-size: 0.95rem;
    color: rgba(17, 24, 39, 0.75);
}

.login-link a {
    color: #8a0022;
    font-weight: 700;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

@media (max-width: 560px) {
    .register-card {
        padding: 2.2rem 1.6rem;
    }

    .form-group--split {
        flex-direction: column;
    }

    .step-actions {
        flex-direction: column;
    }

    .step-actions .btn {
        width: 100%;
    }
}
