body {
    background: radial-gradient(circle at top left, #d6e9ff, #eff3ff 45%, #e1eaf9 80%);
}

.auth-page,
.register-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-page::before,
.auth-page::after,
.register-page::before,
.register-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(0px);
}

.auth-page::before,
.register-page::before {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(10, 94, 209, 0.75), rgba(10, 94, 209, 0.08));
    top: -120px;
    right: 10%;
    opacity: 0.75;
}

.auth-page::after,
.register-page::after {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(0, 163, 255, 0.35), transparent 60%);
    bottom: -180px;
    left: 5%;
    opacity: 0.5;
}

.auth-card,
.register-card {
    width: min(900px, 100%);
    max-width: 900px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 34px;
    padding: 2.75rem;
    box-shadow: 0 40px 90px rgba(15, 40, 90, 0.15);
    text-align: center;
    position: relative;
    z-index: 1;
}

.register-card {
    padding: 2.5rem 3rem;
    border-radius: 36px;
    width: min(900px, 100%);
}
.auth-card.rtl-mode {
    direction: rtl;
    text-align: right;
}
.auth-card.ltr-mode {
    direction: ltr;
    text-align: left;
}
.register-card.rtl-mode {
    direction: rtl;
    text-align: right;
}
.register-card.ltr-mode {
    direction: ltr;
    text-align: left;
}

.register-header,
.auth-card > .auth-locales + h1 {
    margin-bottom: 1rem;
}

.register-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    direction: rtl;
}

.register-title {
    flex: 1;
    text-align: right;
}

.register-title h1 {
    margin-bottom: 0.15rem;
    font-size: 2rem;
    font-weight: 700;
}

.register-title p {
    color: #6e7a92;
    font-size: 1rem;
    margin: 0;
}

.lang-switch {
    display: flex;
    gap: 0.5rem;
}

.lang-switch a {
    border-radius: 999px;
    border: 1px solid #a9b4d7;
    padding: 0.35rem 1rem;
    font-weight: 600;
    color: #4d5c79;
    text-decoration: none;
    transition: all 0.2s ease;
}

.lang-switch a.active {
    background: #0a5ed1;
    color: #fff;
    border-color: #0a5ed1;
}

.route-link {
    text-align: center;
    margin-top: 0.5rem;
}

.route-link a {
    font-weight: 600;
    color: #0a5ed1;
    text-decoration: none;
}

.form-section {
    border: 1px solid #f1f5ff;
    border-radius: 16px;
    padding: 1.4rem;
    background: #fbfdff;
}

.form-section h3 {
    margin-bottom: 1rem;
    font-weight: 600;
    color: #2b3c68;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field-label {
    font-weight: 600;
    color: #4d5c79;
    font-size: 0.95rem;
}

.field-input,
.field-select {
    border: 1px solid #dae2f5;
    border-radius: 12px;
    padding: 0.75rem 0.95rem;
    font-size: 1rem;
    background: #fff;
    outline: none;
    direction: ltr;
}

.field-input:focus,
.field-select:focus {
    border-color: #0a5ed1;
    box-shadow: 0 0 0 3px rgba(10, 94, 209, 0.18);
}

.field-input[dir="rtl"],
.field-select[dir="rtl"] {
    direction: rtl;
}

.field-textarea {
    min-height: 120px;
    resize: vertical;
}

.field-input[type="file"] {
    padding: 0.65rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #4d5c79;
}

.checkbox-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    appearance: none;
    border: 1.4px solid #dae2f5;
    border-radius: 6px;
    position: relative;
}

.checkbox-row input[type="checkbox"]:checked {
    background: #0a5ed1;
    border-color: #0a5ed1;
}

.checkbox-row input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    top: 2px;
    left: 6px;
}

.legal-card {
    border-radius: 16px;
    border: 1px solid #cbd7ff;
    background: #eef2ff;
    padding: 1rem 1.2rem;
    color: #4253a5;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.legal-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1.4px solid #0a5ed1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.legal-checkbox input {
    width: 100%;
    height: 100%;
}

.register-actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.5rem;
}

.primary-btn {
    border-radius: 14px;
    border: none;
    padding: 1rem;
    background: #0a5ed1;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.primary-btn:hover {
    background: #0846a9;
}

.secondary-btn {
    border-radius: 14px;
    border: 1px solid #0a5ed1;
    padding: 0.95rem;
    background: #fff;
    color: #0a5ed1;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: block;
}

.side-note {
    font-size: 0.9rem;
    color: #6e7a92;
    text-align: center;
}

.lawyer-note {
    margin: 0;
    text-align: center;
    font-size: 0.95rem;
    color: #4253a5;
}

.auth-icon {
    width: 110px;
    height: 110px;
    border-radius: 20px;
    background: #0a5ed1;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.35);
    position: relative;
}

.auth-icon::after {
    content: '';
    position: absolute;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
}

.auth-icon img {
    width: 56px;
    height: 56px;
    position: relative;
}

.auth-locales {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.auth-locales a {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 0.35rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.15);
    transition: all 0.2s ease;
}

.auth-locales a.active {
    background: #fff;
    color: #0a5ed1;
    box-shadow: 0 10px 24px rgba(10, 94, 209, 0.2);
    transform: translateY(-1px);
}

.auth-form {
    text-align: right;
}

.auth-card.ltr-mode .auth-form {
    text-align: left;
}

.form-field {
    margin-bottom: 1rem;
    text-align: right;
}

.auth-card.ltr-mode .form-field {
    text-align: left;
}

.auth-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #4d5c79;
}

.auth-input {
    border-radius: 12px;
    border: 1px solid #dae2f5;
    padding: 0.85rem 1rem;
    height: auto;
    box-shadow: none;
    font-size: 1rem;
}

body:not(.dark-mode) .auth-input {
    background-color: #fff !important;
    color: #1f2a44 !important;
    border-color: #dae2f5 !important;
}

body:not(.dark-mode) .auth-input::placeholder {
    color: #7b879d !important;
}

.auth-input:focus {
    border-color: #0a5ed1;
    box-shadow: 0 0 0 3px rgba(10, 94, 209, 0.12);
}

body:not(.dark-mode) .auth-input:focus {
    background-color: #fff !important;
    color: #1f2a44 !important;
    border-color: #0a5ed1 !important;
    box-shadow: 0 0 0 3px rgba(10, 94, 209, 0.12) !important;
}

body:not(.dark-mode) .auth-input:-webkit-autofill,
body:not(.dark-mode) .auth-input:-webkit-autofill:hover,
body:not(.dark-mode) .auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1f2a44 !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
}

.forgot-link {
    display: block;
    text-align: left;
    margin-bottom: 1.25rem;
    color: #0a5ed1;
    font-weight: 600;
}

.auth-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 0.95rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    background: #0a5ed1;
    border: none;
    width: 100%;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(10, 94, 209, 0.22);
    transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.auth-primary-btn:hover {
    background: #0846a9;
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(10, 94, 209, 0.28);
}

.auth-primary-btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(10, 94, 209, 0.2), 0 10px 24px rgba(10, 94, 209, 0.22);
}

.auth-primary-btn:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(10, 94, 209, 0.24);
}

.auth-secondary-btn {
    margin-top: 0.9rem;
    display: block;
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid #0a5ed1;
    padding: 0.85rem;
    color: #0a5ed1;
    font-weight: 600;
    background: #fff;
    text-align: center;
}

.auth-secondary-btn:first-of-type {
    background: #f4f6fb;
    border-color: transparent;
}

.auth-footer {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #6e7a92;
}

@media (max-width: 640px) {
    .auth-page,
    .register-page {
        padding: 2rem 1rem;
    }
    .register-card {
        padding: 2rem 1.25rem;
    }
    .register-header {
        flex-direction: column;
    }
    .lang-switch {
        justify-content: center;
    }
    .legal-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .auth-card,
    .register-card {
        width: 100%;
    }
}
