.registration-shell {
    --registration-accent: #a78bfa;
    --registration-accent-strong: #6b46c1;
    --registration-canvas: #06080b;
    --registration-surface: #0d1116;
    --registration-border: #334155;
    --registration-muted: #94a3b8;
    display: flex;
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    background: var(--registration-canvas);
    font-family: Inter, system-ui, sans-serif;
}

.registration-skip-link {
    position: fixed;
    z-index: 10001;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    border-radius: 6px;
    color: #fff;
    background: var(--registration-accent-strong);
    font-weight: 700;
    transform: translateY(-200%);
}

.registration-skip-link:focus {
    transform: translateY(0);
}

.split-left {
    position: sticky;
    top: 0;
    display: flex;
    height: 100vh;
    flex: 1;
    padding: 40px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, rgb(107 70 193 / 10%), rgb(6 8 11 / 90%));
}

.split-left::before {
    position: absolute;
    z-index: 1;
    inset: 0;
    content: "";
    background: rgb(0 0 0 / 60%);
}

.brand-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.registration-logo {
    width: auto;
    max-width: min(240px, 100%);
    height: 80px;
    margin-bottom: 20px;
    object-fit: contain;
}

.brand-content h1 {
    margin: 10px 0;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    letter-spacing: -1px;
    overflow-wrap: anywhere;
}

.brand-content h1 span,
.section-title i,
.athlete-number,
.invitation-notice > i {
    color: var(--registration-accent);
}

.brand-content p {
    max-width: 400px;
    margin: 0 auto;
    color: rgb(255 255 255 / 80%);
    font-size: 1.1rem;
    line-height: 1.6;
}

.registration-copyright {
    position: absolute;
    z-index: 2;
    bottom: 30px;
    color: rgb(255 255 255 / 55%);
    font-size: 12px;
}

.split-right {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex: 1.2;
    padding: 40px;
    align-items: flex-start;
    justify-content: center;
    background: var(--registration-canvas);
}

.register-card {
    width: 100%;
    max-width: 500px;
    padding: 20px 0;
}

.registration-heading {
    margin-bottom: 30px;
    text-align: center;
}

.registration-heading h2 {
    margin-bottom: 5px;
    color: #fff;
    font-size: 24px;
}

.registration-heading p,
.registration-login-link {
    margin: 0;
    color: var(--registration-muted);
    font-size: 14px;
}

.role-selector {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.role-option {
    padding: 25px 20px;
    border: 2px solid var(--registration-border);
    border-radius: 12px;
    background: var(--registration-surface);
    text-align: center;
    cursor: pointer;
    transition: border-color 200ms ease, background 200ms ease, transform 200ms ease;
}

.role-option:hover {
    border-color: var(--registration-accent-strong);
    transform: translateY(-2px);
}

.role-option.selected {
    border-color: var(--registration-accent);
    background: rgb(107 70 193 / 10%);
}

.role-option input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.role-option:has(input:focus-visible) {
    outline: 3px solid #c4b5fd;
    outline-offset: 3px;
}

.role-icon {
    margin-bottom: 12px;
    color: #94a3b8;
    font-size: 36px;
    transition: color 200ms ease;
}

.role-option.selected .role-icon {
    color: var(--registration-accent);
}

.role-title {
    margin-bottom: 5px;
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.role-desc {
    color: var(--registration-muted);
    font-size: 12px;
    line-height: 1.4;
}

.form-section {
    animation: registration-fade-in 300ms ease;
}

.form-section[hidden],
.validation-message[hidden],
.agreement-modal[hidden],
.input-box[hidden] {
    display: none;
}

@keyframes registration-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    align-items: center;
    border-bottom: 1px solid var(--registration-border);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.section-title--spaced {
    margin-top: 20px;
}

.input-box {
    margin-bottom: 15px;
    padding: 12px 15px;
    border: 1px solid var(--registration-border);
    border-radius: 6px;
    background: var(--registration-surface);
    transition: border-color 200ms ease, box-shadow 200ms ease;
}

.input-box:focus-within {
    border-color: var(--registration-accent);
    box-shadow: 0 0 0 2px rgb(139 92 246 / 25%);
}

.input-box label {
    display: block;
    margin-bottom: 5px;
    color: var(--registration-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.input-box input,
.input-box select {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #fff;
    background: transparent;
    font: inherit;
    font-size: max(16px, 0.875rem);
}

.input-box select {
    cursor: pointer;
}

.input-box select option {
    color: #fff;
    background: var(--registration-surface);
}

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

.athletes-container {
    margin-bottom: 20px;
}

.athlete-card {
    position: relative;
    margin-bottom: 15px;
    padding: 20px;
    border: 1px solid var(--registration-border);
    border-radius: 8px;
    background: var(--registration-surface);
}

.athlete-card-header {
    display: flex;
    margin-bottom: 15px;
    align-items: center;
    justify-content: space-between;
}

.athlete-number {
    font-size: 14px;
    font-weight: 700;
}

.remove-athlete-btn,
.password-toggle-btn,
.agreement-close {
    border: 0;
    color: #f87171;
    background: transparent;
    cursor: pointer;
}

.remove-athlete-btn {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

.remove-athlete-btn:hover {
    background: rgb(239 68 68 / 10%);
}

.add-athlete-btn {
    display: flex;
    width: 100%;
    gap: 8px;
    margin-bottom: 20px;
    padding: 15px;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--registration-border);
    border-radius: 8px;
    color: var(--registration-muted);
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.add-athlete-btn:hover {
    border-color: var(--registration-accent);
    color: #c4b5fd;
    background: rgb(107 70 193 / 5%);
}

.checkbox-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    align-items: flex-start;
    border: 1px solid var(--registration-border);
    border-radius: 6px;
    background: rgb(107 70 193 / 5%);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    flex: 0 0 auto;
    accent-color: var(--registration-accent-strong);
}

.checkbox-label {
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.5;
}

.checkbox-label strong,
.invitation-notice strong {
    color: #fff;
}

.error-message,
.validation-message {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    padding: 12px;
    align-items: flex-start;
    border: 1px solid #f87171;
    border-radius: 6px;
    color: #fecaca;
    background: rgb(127 29 29 / 35%);
    font-size: 13px;
}

.invitation-notice {
    margin-bottom: 20px;
    padding: 16px;
    border: 1px solid var(--registration-accent-strong);
    border-radius: 8px;
    color: #e2e8f0;
    background: rgb(107 70 193 / 10%);
}

.invitation-notice p {
    margin: 8px 0 0;
    color: #cbd5e1;
    font-size: 13px;
}

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

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

.password-toggle-btn {
    position: absolute;
    right: 5px;
    padding: 8px;
    color: var(--registration-muted);
}

.agreement-link {
    padding: 0;
    border: 0;
    color: #c4b5fd;
    background: transparent;
    font: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.registration-submit {
    width: 100%;
    margin-top: 10px;
    padding: 14px;
    border: 0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.agreement-modal {
    position: fixed;
    z-index: 9999;
    inset: 0;
    display: flex;
    padding: 20px;
    align-items: center;
    justify-content: center;
    background: rgb(0 0 0 / 85%);
}

.agreement-dialog {
    position: relative;
    width: 100%;
    max-width: 700px;
    max-height: 80vh;
    padding: 30px;
    overflow-y: auto;
    border: 1px solid var(--registration-border);
    border-radius: 12px;
    color: #d1d5db;
    background: var(--registration-surface);
    line-height: 1.8;
}

.agreement-dialog h3 {
    margin: 0 32px 15px 0;
    color: #fff;
}

.agreement-dialog h3 i {
    color: var(--registration-accent);
}

.agreement-dialog h4 {
    margin: 15px 0 8px;
    color: #fff;
}

.agreement-dialog ol,
.agreement-dialog ul {
    padding-left: 20px;
}

.agreement-dialog strong {
    color: #fff;
}

.agreement-close {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    color: var(--registration-muted);
    font-size: 24px;
}

.agreement-confirm {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: 0;
    border-radius: 6px;
    color: #fff;
    background: var(--registration-accent-strong);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.registration-login-link {
    margin-top: 30px;
    text-align: center;
}

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

.registration-shell :is(a, button, input, select):focus-visible {
    outline: 3px solid #c4b5fd;
    outline-offset: 3px;
}

@media (width <= 900px) {
    .registration-shell {
        flex-direction: column;
    }

    .split-left {
        display: none;
    }

    .split-right {
        min-height: auto;
        flex: 1;
        padding: 20px;
    }

    .form-row,
    .role-selector {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (width <= 360px) {
    .split-right {
        padding: 16px 12px;
    }

    .athlete-card,
    .agreement-dialog {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .registration-shell *,
    .registration-shell *::before,
    .registration-shell *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
