body {
    background:
        radial-gradient(circle at top left, rgba(24, 86, 255, 0.28), transparent 28%),
        radial-gradient(circle at bottom right, rgba(7, 202, 107, 0.16), transparent 30%),
        linear-gradient(135deg, #f4f8ff 0%, #eef3ff 46%, #e9eef9 100%);
}

.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.56);
    border-radius: 34px;
    padding: 2.75rem;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 40px 90px rgba(15, 40, 90, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    text-align: center;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.auth-card::before,
.register-card::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.45);
    pointer-events: none;
}

.auth-card::after,
.register-card::after {
    content: '';
    position: absolute;
    inset: -35% auto auto -10%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.4), transparent 65%);
    pointer-events: none;
}

.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;
        margin-bottom: 10px;
}

.lang-switch a {
    border-radius: 999px;
    border: 1px solid rgba(58, 52, 78, 0.14);
    padding: 0.35rem 1rem;
    font-weight: 600;
    color: #4d5c79;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.48);
    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: linear-gradient(145deg, rgba(24, 86, 255, 0.95), rgba(58, 52, 78, 0.88));
    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 rgba(24, 86, 255, 0.18);
    padding: 0.85rem;
    color: #0a5ed1;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.62);
    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;
}

.auth-intro-card {
    max-width: 1180px;
    padding: 2rem;
}

.auth-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 1.5rem;
    align-items: stretch;
}

.auth-intro-copy,
.auth-intro-panel-inner {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(255, 255, 255, 0.48);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.auth-intro-copy {
    padding: 2rem;
}

.auth-intro-panel-inner {
    height: 100%;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: rgba(24, 86, 255, 0.1);
    border: 1px solid rgba(24, 86, 255, 0.14);
    color: #1856ff;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.auth-intro-subtext {
    max-width: 55ch;
    color: #52617d;
    line-height: 1.8;
}

.auth-feature-list {
    margin-top: 1.75rem;
    display: grid;
    gap: 1rem;
}

.auth-feature-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.42);
    border: 1px solid rgba(24, 86, 255, 0.08);
}

.auth-feature-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #141414;
    font-size: 1rem;
}

.auth-feature-item p {
    margin: 0;
    color: #5f6d86;
    line-height: 1.7;
}

.auth-feature-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(24, 86, 255, 0.18), rgba(255, 255, 255, 0.7));
    color: #1856ff;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.auth-intro-actions {
    margin-top: 1.75rem;
}

.auth-intro-primary {
    text-decoration: none;
}

.auth-intro-secondary-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.auth-status-badge {
    align-self: center;
    padding: 0.55rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.75);
    color: #3a344e;
    font-weight: 700;
}

.auth-mini-stats {
    display: grid;
    gap: 0.9rem;
    margin-top: 0.5rem;
}

.auth-mini-stat {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.auth-mini-stat span {
    display: block;
    font-size: 0.88rem;
    color: #6a7690;
    margin-bottom: 0.3rem;
}

.auth-mini-stat strong {
    color: #141414;
    font-size: 1.05rem;
}

.auth-intro-note {
    margin: 0;
    color: #5f6d86;
    line-height: 1.8;
}

.auth-intro-icon {
    margin-bottom: 0.35rem;
}

@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%;
    }
    .auth-intro-secondary-links {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .auth-intro-grid {
        grid-template-columns: 1fr;
    }

    .auth-intro-card {
        padding: 1.25rem;
    }
}
