
* {
    box-sizing: border-box;
}


/* =========================
   الصفحة
========================= */

.register-page {
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 45px 20px;

    background:
        radial-gradient(
            circle at top right,
            rgba(99, 102, 241, .10),
            transparent 30%
        ),
        radial-gradient(
            circle at bottom left,
            rgba(59, 130, 246, .08),
            transparent 30%
        ),
        #f8fafc;
}


.register-wrapper {
    width: 100%;
    max-width: 1080px;
    min-height: 700px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    background: #ffffff;
    border-radius: 28px;
    overflow: hidden;

    border: 1px solid #eef2f7;

    box-shadow:
        0 25px 70px rgba(15, 23, 42, .10);
}


/* =========================
   الجانب التعريفي
========================= */

.register-intro {
    position: relative;

    padding: 55px;

    display: flex;
    align-items: center;

    color: white;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 85% 15%,
            rgba(255,255,255,.16),
            transparent 25%
        ),
        radial-gradient(
            circle at 10% 90%,
            rgba(255,255,255,.10),
            transparent 30%
        ),
        linear-gradient(
            145deg,
            #111827,
            #1e293b 55%,
            #312e81
        );
}


.register-intro::before {
    content: "";

    position: absolute;

    width: 270px;
    height: 270px;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,.10);

    right: -100px;
    top: -90px;
}


.register-intro::after {
    content: "";

    position: absolute;

    width: 190px;
    height: 190px;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,.08);

    left: -85px;
    bottom: -75px;
}


.intro-content {
    position: relative;
    z-index: 2;

    max-width: 430px;
}


.intro-logo {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 38px;

    font-size: 21px;
}


.intro-logo span {
    width: 43px;
    height: 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: rgba(255,255,255,.12);

    backdrop-filter: blur(10px);

    font-size: 22px;
}


.intro-logo strong {
    font-size: 22px;
}


.intro-badge {
    width: fit-content;

    padding: 7px 12px;
    margin-bottom: 17px;

    border-radius: 30px;

    background: rgba(255,255,255,.10);

    border: 1px solid rgba(255,255,255,.10);

    color: rgba(255,255,255,.85);

    font-size: 12px;
}


.register-intro h1 {
    margin: 0 0 18px;

    font-size: 40px;
    line-height: 1.3;

    font-weight: 800;
}


.register-intro h1 span {
    font-size: 30px;
}


.register-intro > .intro-content > p {
    margin: 0;

    color: rgba(255,255,255,.72);

    font-size: 15px;
    line-height: 2;
}


.intro-features {
    margin-top: 42px;

    display: flex;
    flex-direction: column;

    gap: 20px;
}


.intro-feature {
    display: flex;
    align-items: center;

    gap: 14px;
}


.feature-icon {
    width: 46px;
    height: 46px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: rgba(255,255,255,.10);

    border: 1px solid rgba(255,255,255,.08);

    font-size: 20px;
}


.intro-feature div:last-child {
    display: flex;
    flex-direction: column;

    gap: 3px;
}


.intro-feature strong {
    font-size: 14px;
}


.intro-feature span {
    font-size: 12px;

    color: rgba(255,255,255,.58);
}


/* =========================
   بطاقة التسجيل
========================= */

.register-card {
    padding: 48px 55px;

    display: flex;
    flex-direction: column;

    justify-content: center;
}


.register-header {
    margin-bottom: 25px;
}


.mobile-logo {
    display: none;
}


.register-header h2 {
    margin: 0 0 8px;

    color: #111827;

    font-size: 29px;
    font-weight: 800;
}


.register-header p {
    margin: 0;

    color: #64748b;

    font-size: 13px;
}


/* =========================
   رسائل Laravel
========================= */

.server-message {
    margin-bottom: 18px;

    padding: 12px 14px;

    border-radius: 11px;

    background: #fff7ed;

    color: #9a3412;

    border: 1px solid #fed7aa;

    font-size: 11px;
    line-height: 1.7;
}


.server-message strong {
    display: block;

    margin-bottom: 4px;

    font-size: 12px;
}


.server-message ul {
    margin: 0;

    padding-right: 17px;
}


/* =========================
   Form
========================= */

.form-group {
    margin-bottom: 12px;
}


.form-group label {
    display: block;

    margin-bottom: 7px;

    color: #334155;

    font-size: 12px;
    font-weight: 700;
}


.input-wrapper {
    position: relative;
}


.input-icon {
    position: absolute;

    right: 15px;
    top: 50%;

    transform: translateY(-50%);

    font-size: 16px;

    pointer-events: none;

    opacity: .7;

    z-index: 2;
}


.input-wrapper input {
    width: 100%;
    height: 47px;

    border: 1px solid #e2e8f0;

    border-radius: 12px;

    outline: none;

    padding: 0 45px 0 45px;

    background: #f8fafc;

    color: #0f172a;

    font-size: 13px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.input-wrapper input::placeholder {
    color: #94a3b8;
}


.input-wrapper input:focus {
    background: white;

    border-color: #6366f1;

    box-shadow:
        0 0 0 4px rgba(99,102,241,.08);
}


.input-wrapper input.input-error {
    border-color: #ef4444;

    background: #fffafa;
}


.password-toggle {
    position: absolute;

    left: 12px;
    top: 50%;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    cursor: pointer;

    padding: 5px;

    opacity: .7;

    font-size: 15px;

    z-index: 3;
}


.password-toggle:hover {
    opacity: 1;
}


.password-toggle:focus-visible {
    outline: 2px solid #6366f1;

    outline-offset: 2px;

    border-radius: 6px;
}


/* =========================
   قوة كلمة المرور
========================= */

.password-strength {
    display: none;

    margin-top: 7px;
}


.password-strength.visible {
    display: block;
}


.strength-bar {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 4px;

    height: 4px;
}


.strength-bar span {
    border-radius: 10px;

    background: #e2e8f0;

    transition:
        background .2s ease;
}


.password-strength.weak .strength-bar span:nth-child(1) {
    background: #ef4444;
}


.password-strength.medium .strength-bar span:nth-child(-n+2) {
    background: #f59e0b;
}


.password-strength.good .strength-bar span:nth-child(-n+3) {
    background: #3b82f6;
}


.password-strength.strong .strength-bar span {
    background: #10b981;
}


.strength-text {
    display: block;

    margin-top: 5px;

    color: #64748b;

    font-size: 10px;
}


/* =========================
   الأخطاء
========================= */

.error-message {
    display: block;

    min-height: 14px;

    margin-top: 3px;

    color: #dc2626;

    font-size: 10px;

    line-height: 1.5;
}


/* =========================
   الشروط
========================= */

.terms-row {
    margin: 4px 0 18px;
}


.terms-label {
    display: flex;
    align-items: flex-start;

    gap: 9px;

    color: #64748b;

    font-size: 11px;
    line-height: 1.8;

    cursor: pointer;
}


.terms-label input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


.custom-checkbox {
    width: 18px;
    height: 18px;

    flex-shrink: 0;

    margin-top: 1px;

    border: 1px solid #cbd5e1;

    border-radius: 5px;

    background: white;

    position: relative;

    transition: .2s;
}


.terms-label input:checked + .custom-checkbox {
    background: #6366f1;

    border-color: #6366f1;
}


.terms-label input:checked + .custom-checkbox::after {
    content: "✓";

    position: absolute;

    color: white;

    font-size: 12px;

    font-weight: bold;

    left: 3px;
    top: -1px;
}


.terms-label a {
    color: #4f46e5;

    text-decoration: none;

    font-weight: 700;
}


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


/* =========================
   زر التسجيل
========================= */

.register-button {
    width: 100%;
    height: 50px;

    border: none;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #6366f1,
            #4f46e5
        );

    color: white;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    position: relative;

    transition: .2s ease;

    box-shadow:
        0 8px 20px rgba(79,70,229,.20);
}


.register-button:hover {
    transform: translateY(-1px);

    box-shadow:
        0 12px 25px rgba(79,70,229,.28);
}


.register-button:active {
    transform: translateY(0);
}


.register-button:focus-visible {
    outline: 3px solid rgba(99,102,241,.25);

    outline-offset: 3px;
}


.register-button.loading {
    pointer-events: none;

    opacity: .8;
}


.button-loader {
    display: none;

    width: 18px;
    height: 18px;

    border: 2px solid rgba(255,255,255,.4);

    border-top-color: white;

    border-radius: 50%;

    animation: spin .7s linear infinite;

    position: absolute;

    left: 50%;
    top: 50%;

    transform:
        translate(-50%, -50%);
}


.register-button.loading .button-text {
    visibility: hidden;
}


.register-button.loading .button-loader {
    display: block;
}


@keyframes spin {

    to {
        transform:
            translate(-50%, -50%)
            rotate(360deg);
    }

}


/* =========================
   رسالة النموذج
========================= */

.form-message {
    display: none;

    margin-top: 12px;

    padding: 10px 13px;

    border-radius: 10px;

    font-size: 11px;

    line-height: 1.7;
}


.form-message.success {
    display: block;

    background: #ecfdf5;

    color: #047857;

    border: 1px solid #a7f3d0;
}


.form-message.error {
    display: block;

    background: #fef2f2;

    color: #b91c1c;

    border: 1px solid #fecaca;
}


/* =========================
   Google
========================= */

.google-divider {
    display: flex;
    align-items: center;

    gap: 12px;

    margin: 18px 0 14px;

    color: #94a3b8;

    font-size: 11px;
}


.google-divider::before,
.google-divider::after {
    content: "";

    flex: 1;

    height: 1px;

    background: #e2e8f0;
}


.google-divider span {
    flex-shrink: 0;
}


.google-button {
    width: 100%;
    min-height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    border: 1px solid #dbe2ea;

    border-radius: 12px;

    background: #ffffff;

    color: #1f2937;

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;

    transition:
        background .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}


.google-button:hover {
    background: #f8fafc;

    border-color: #cbd5e1;

    box-shadow:
        0 6px 18px rgba(15,23,42,.07);

    transform: translateY(-1px);
}


.google-button:active {
    transform: translateY(0);
}


.google-button:focus-visible {
    outline: 3px solid rgba(66,133,244,.18);

    outline-offset: 3px;
}


.google-icon {
    display: flex;

    align-items: center;
    justify-content: center;
}


/* =========================
   تسجيل الدخول
========================= */

.login-link {
    margin-top: 21px;

    padding-top: 19px;

    border-top: 1px solid #eef2f7;

    display: flex;
    justify-content: center;

    gap: 5px;

    color: #64748b;

    font-size: 12px;
}


.login-link a {
    color: #4f46e5;

    text-decoration: none;

    font-weight: 700;
}


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


/* =========================
   Responsive
========================= */

@media (max-width: 850px) {

    .register-wrapper {
        max-width: 560px;

        grid-template-columns: 1fr;
    }


    .register-intro {
        display: none;
    }


    .register-card {
        padding: 45px;
    }


    .mobile-logo {
        width: 48px;
        height: 48px;

        display: flex;
        align-items: center;
        justify-content: center;

        margin-bottom: 18px;

        border-radius: 14px;

        background: #eef2ff;

        font-size: 22px;
    }

}


@media (max-width: 500px) {

    .register-page {
        min-height: calc(100vh - 65px);

        padding: 15px 10px;
    }


    .register-wrapper {
        border-radius: 20px;

        min-height: auto;
    }


    .register-card {
        padding: 28px 18px;
    }


    .register-header h2 {
        font-size: 25px;
    }


    .login-link {
        flex-direction: column;

        align-items: center;
    }

}