/* Meawal auth pages — brand styling */

.section_sign {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow: hidden;
    background: #ffffff;
    box-sizing: border-box;
}

body.admin-bar .section_sign {
    height: calc(100vh - 32px);
    min-height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    body.admin-bar .section_sign {
        height: calc(100vh - 46px);
        min-height: calc(100vh - 46px);
        max-height: calc(100vh - 46px);
    }
}

.section_sign .container-sign {
    position: relative;
    display: flex;
    flex-direction: row;
    direction: ltr;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* ── Left visual panel (logo) ── */
.section_sign .thumb-sign {
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
    height: 100%;
    min-height: 100%;
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    direction: rtl;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(237, 170, 116, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse 70% 50% at 85% 90%, rgba(99, 112, 180, 0.22) 0%, transparent 50%),
        linear-gradient(155deg, #0d0f18 0%, #1a1f35 38%, #2b304d 72%, #151929 100%);
}

.section_sign .meawal-auth-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.section_sign .meawal-auth-grid {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 65% at 50% 45%, #000 20%, transparent 75%);
}

.section_sign .meawal-auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: meawal-auth-orb-drift 8s ease-in-out infinite;
}

.section_sign .meawal-auth-orb--1 {
    width: 280px;
    height: 280px;
    top: 8%;
    left: -8%;
    background: rgba(237, 170, 116, 0.28);
}

.section_sign .meawal-auth-orb--2 {
    width: 220px;
    height: 220px;
    bottom: 12%;
    right: -6%;
    background: rgba(120, 140, 220, 0.2);
    animation-delay: -3s;
}

.section_sign .meawal-auth-orb--3 {
    width: 140px;
    height: 140px;
    top: 42%;
    left: 55%;
    background: rgba(237, 170, 116, 0.15);
    animation-delay: -5s;
}

@keyframes meawal-auth-orb-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(12px, -16px) scale(1.06); }
}

.section_sign .meawal-auth-brand {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 380px;
}

.section_sign .thumb-sign figure {
    margin: 0;
}

.section_sign .thumb-sign figure.logo-sign {
    margin-bottom: 28px;
}

.section_sign .logo-sign img {
    max-width: 175px;
    width: 100%;
    height: auto;
    opacity: 1;
    filter: brightness(0) invert(1) drop-shadow(0 8px 24px rgba(0, 0, 0, 0.35));
}

.section_sign .meawal-auth-visual {
    position: relative;
    z-index: 2;
    width: min(300px, 72%);
    aspect-ratio: 1;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.section_sign .meawal-auth-ring {
    position: absolute;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.section_sign .meawal-auth-ring--outer {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(237, 170, 116, 0.22);
    animation: meawal-auth-ring-spin 24s linear infinite;
}

.section_sign .meawal-auth-ring--mid {
    width: 88%;
    height: 88%;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    animation: meawal-auth-ring-spin 18s linear infinite reverse;
}

.section_sign .meawal-auth-ring--inner {
    width: 76%;
    height: 76%;
    border: 2px solid rgba(237, 170, 116, 0.35);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 0 40px rgba(237, 170, 116, 0.12);
}

@keyframes meawal-auth-ring-spin {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.section_sign .meawal-auth-visual-glow {
    position: absolute;
    width: 65%;
    height: 65%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(237, 170, 116, 0.25) 0%, rgba(43, 48, 77, 0.08) 55%, transparent 72%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: meawal-auth-glow-pulse 4s ease-in-out infinite;
}

@keyframes meawal-auth-glow-pulse {
    0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
}

.section_sign .meawal-auth-visual img {
    position: relative;
    z-index: 3;
    width: 58%;
    height: auto;
    display: block;
    filter: brightness(0) invert(1) drop-shadow(0 20px 40px rgba(255, 255, 255, 0.15));
    animation: meawal-auth-float 5s ease-in-out infinite;
}

@keyframes meawal-auth-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.section_sign .meawal-auth-tagline-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: 8px;
}

.section_sign .meawal-auth-tagline-accent {
    display: block;
    width: 48px;
    height: 3px;
    margin: 0 auto 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, var(--sub-color), transparent);
}

.section_sign .meawal-auth-tagline {
    margin: 0;
    max-width: 100%;
    color: rgba(255, 255, 255, 0.78);
    font-size: 16px;
    line-height: 1.85;
    font-weight: 400;
}

.section_sign .meawal-auth-tagline strong {
    color: var(--sub-color);
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .section_sign .meawal-auth-orb,
    .section_sign .meawal-auth-ring,
    .section_sign .meawal-auth-visual-glow,
    .section_sign .meawal-auth-visual img {
        animation: none;
    }
}

/* ── Right form panel ── */
.section_sign .cont-sign {
    position: relative;
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
    height: 100%;
    min-height: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    direction: rtl;
    text-align: right;
    padding: 40px 48px;
    background: #f5f6fa;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

.section_sign .cont-sign::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    left: auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(43, 48, 77, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.section_sign .meawal-auth-mobile-logo {
    display: none;
    margin-bottom: 24px;
    text-align: center;
}

.section_sign .meawal-auth-mobile-logo img {
    width: 72px;
    height: auto;
}

.section_sign .head-sign {
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
    max-width: 440px;
    width: 100%;
}

.section_sign .head-sign h1 {
    margin: 0 0 10px;
    color: var(--main-color);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 700;
    line-height: 1.3;
}

.section_sign .head-sign p {
    margin: 0;
    color: #5c6378;
    font-size: 16px;
    line-height: 1.6;
}

.section_sign .form-sign {
    position: relative;
    z-index: 1;
    max-width: 440px;
    width: 100%;
    background: #ffffff;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(43, 48, 77, 0.08);
    border: 1px solid rgba(43, 48, 77, 0.06);
}

.section_sign .form-group {
    position: relative;
    margin-bottom: 18px;
}

.section_sign .form-group > label {
    color: var(--main-color);
    font-weight: 600;
    font-size: 14px;
    display: block;
    margin-bottom: 8px;
}

.section_sign .form-group .form-control {
    border: 1.5px solid #e2e5ef;
    height: 50px;
    border-radius: 12px;
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    color: #333;
    background: #fafbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.section_sign .form-group .form-control:focus {
    outline: none;
    border-color: var(--sub-color);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(237, 170, 116, 0.18);
}

.section_sign .forget-password {
    color: var(--sub-color);
    font-weight: 600;
    font-size: 13px;
    display: block;
    text-align: end;
    margin-top: 8px;
    text-decoration: none;
}

.section_sign .forget-password:hover {
    color: var(--main-color);
}

.section_sign .toggle-password {
    position: absolute;
    left: 14px;
    top: 44px;
    cursor: pointer;
    font-size: 17px;
    color: #8a90a5;
    transition: color 0.2s ease;
}

.section_sign .toggle-password:hover {
    color: var(--main-color);
}

.section_sign .form-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 4px;
}

.section_sign .form-check .form-check-input {
    margin-top: 4px;
    border-color: #c5cad8;
}

.section_sign .form-check .form-check-input:checked {
    background-color: var(--main-color);
    border-color: var(--main-color);
}

.section_sign .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(43, 48, 77, 0.12);
}

.section_sign .form-check label {
    margin-bottom: 0;
    font-size: 14px;
    color: #5c6378;
    line-height: 1.5;
}

.section_sign .form-group .btn-site {
    width: 100%;
    height: 48px;
    margin-top: 8px;
    border-radius: 24px;
    background: var(--sub-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.section_sign .form-group .btn-site::before {
    background: #ebebeb;
    position: absolute;
    content: "";
    top: 0;
    height: 100%;
    left: -10px;
    width: 0%;
    transform: skew(-10deg);
    transition-duration: 0.5s;
    z-index: 0;
}

.section_sign .form-group .btn-site:hover::before {
    width: 120%;
}

.section_sign .form-group .btn-site:hover {
    transform: translateY(-1px);
}

.section_sign .form-group .btn-site span {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    position: relative;
    z-index: 1;
    color: #fff;
    transition: color 0.3s ease;
}

.section_sign .form-group .btn-site:hover span {
    color: var(--main-color);
}

.section_sign .ph-create-sign {
    text-align: center;
    color: #5c6378;
    margin-top: 16px;
    font-size: 14px;
}

.section_sign .ph-create-sign a {
    color: var(--sub-color);
    font-weight: 600;
    text-decoration: none;
}

.section_sign .ph-create-sign a:hover {
    color: var(--main-color);
}

.meawal-field-error,
.meawal-field-success {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.meawal-field-error {
    color: #c0392b;
}

.meawal-field-success {
    color: #2b304d;
}

.section_sign .form-control.is-invalid {
    border-color: #e74c3c;
    background: #fff8f8;
}

.section_sign .form-control.is-valid {
    border-color: var(--sub-color);
    background: #fff;
}

.section_sign .form-message {
    margin-top: 4px;
}

/* ── wp-login.php ── */
body.login {
    margin: 0;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    overflow-x: hidden;
    background: #f5f6fa !important;
    font-family: "Inter", "Tajawal", Arial, sans-serif;
    color: #121212;
    direction: rtl;
    text-align: right;
}

body.login .section_sign,
body.login .container-sign {
    height: 100vh;
    min-height: 100vh;
}

body.login .thumb-sign {
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
    height: 100%;
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(237, 170, 116, 0.18) 0%, transparent 55%),
        linear-gradient(155deg, #0d0f18 0%, #1a1f35 38%, #2b304d 72%, #151929 100%);
}

body.login .cont-sign {
    width: 50%;
    flex: 0 0 50%;
    max-width: 50%;
    height: 100%;
    background: #f5f6fa;
}

body.login #login {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    margin: 0;
    padding: 32px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(43, 48, 77, 0.08);
    border: 1px solid rgba(43, 48, 77, 0.06);
}

body.login #login > h1 {
    display: none;
}

body.login #login form {
    margin: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border: 0;
}

body.login #login form label {
    display: block;
    margin-bottom: 8px;
    color: var(--main-color);
    font-weight: 600;
    font-size: 14px;
}

body.login #login form input[type="text"],
body.login #login form input[type="email"],
body.login #login form input[type="password"] {
    width: 100%;
    min-height: 50px;
    margin: 0 0 15px;
    padding: 12px 16px;
    border: 1.5px solid #e2e5ef;
    border-radius: 12px;
    background: #fafbfc;
    box-shadow: none;
}

body.login #login form input[type="submit"],
body.login #login form .button-primary,
body.login #login form #wp-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 24px;
    background: var(--sub-color);
    color: #ffffff;
    font-weight: 600;
    box-shadow: none;
    text-shadow: none;
    cursor: pointer;
}

body.login #login form input[type="submit"]:hover,
body.login #login form .button-primary:hover,
body.login #login form #wp-submit:hover {
    background: #e09a63;
}

body.login #login #nav a,
body.login #login #backtoblog a {
    color: var(--sub-color);
    font-weight: 600;
    text-decoration: none;
}

body.login #login #nav a:hover,
body.login #login #backtoblog a:hover {
    color: var(--main-color);
}

/* ── Responsive ── */
@media (max-width: 1100px) {
    .section_sign .cont-sign {
        padding: 32px 28px;
    }

    .section_sign .thumb-sign {
        padding: 32px 28px;
    }

    .section_sign .meawal-auth-visual {
        width: min(260px, 80%);
    }
}

@media (max-width: 992px) {
    .section_sign {
        height: auto;
        min-height: 100vh;
        max-height: none;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .section_sign .container-sign,
    body.login .container-sign {
        flex-direction: column;
        direction: ltr;
        height: auto;
        min-height: 100vh;
    }

    .section_sign .thumb-sign,
    body.login .thumb-sign {
        display: none;
    }

    .section_sign .cont-sign,
    body.login .cont-sign {
        width: 100%;
        flex: 0 0 auto;
        max-width: 100%;
        min-height: 100vh;
        height: auto;
        padding: 40px 24px 48px;
        align-items: center;
        direction: rtl;
    }

    .section_sign .meawal-auth-mobile-logo {
        display: block;
    }

    .section_sign .head-sign,
    .section_sign .form-sign {
        max-width: 480px;
    }
}

@media (max-width: 480px) {
    .section_sign .form-sign {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .section_sign .cont-sign,
    body.login .cont-sign {
        padding: 28px 16px 40px;
    }
}

/* Prevent horizontal scroll on auth pages */
body:has(.section_sign) {
    overflow-x: hidden;
    max-width: 100%;
}

.main-wrapper:has(.section_sign),
#content:has(.section_sign) {
    overflow-x: hidden;
    max-width: 100%;
}

/* ── Social login ── */
.meawal-social-auth {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 480px;
    margin: 0 auto 4px;
}

.meawal-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    min-height: 50px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1.5px solid #e2e5ef;
    background: #fff;
    color: var(--main-color, #2b304d);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    box-sizing: border-box;
}

.meawal-social-btn:hover {
    border-color: rgba(43, 48, 77, 0.22);
    box-shadow: 0 6px 20px rgba(43, 48, 77, 0.08);
    transform: translateY(-1px);
    color: var(--main-color, #2b304d);
}

.meawal-social-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.meawal-auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 480px;
    margin: 18px auto;
    color: #8b92a8;
    font-size: 13px;
    font-weight: 600;
}

.meawal-auth-divider::before,
.meawal-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e5ef;
}

.meawal-social-error {
    width: 100%;
    max-width: 480px;
    margin: 10px auto 0;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
