/* ============================================================
   متجركم – تصميم صفحات المصادقة (تسجيل الدخول / إنشاء حساب)
   ============================================================ */

/* ── Page wrapper ── */
.auth-body {
    font-family: 'Tajawal', sans-serif;
    background: #f7f8fa;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    direction: rtl;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.auth-page {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* ── Back link ── */
.auth-home-link {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 100;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: rgba(255,255,255,.82);
    font-size: .82rem;
    font-weight: 600;
    background: rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.18);
    padding: .42rem .85rem;
    border-radius: 50px;
    transition: all .25s ease;
    text-decoration: none;
}
.auth-home-link:hover {
    color: #fff;
    background: rgba(255,255,255,.2);
    transform: translateY(-1px);
}

/* ════════════════════════════════════════
   SHOWCASE (dark/gradient panel)
   ════════════════════════════════════════ */
.auth-showcase {
    flex: 0 0 42%;
    background: linear-gradient(150deg, #1a1c20 0%, #111316 55%, #0d0f12 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 2.75rem 2.5rem;
    overflow: hidden;
}

.auth-showcase::before {
    content: '';
    position: absolute;
    top: -8rem;
    right: -8rem;
    width: 26rem;
    height: 26rem;
    background: radial-gradient(circle, rgba(255,91,46,.22) 0%, transparent 68%);
    pointer-events: none;
}
.auth-showcase::after {
    content: '';
    position: absolute;
    bottom: -6rem;
    left: -6rem;
    width: 22rem;
    height: 22rem;
    background: radial-gradient(circle, rgba(255,138,0,.14) 0%, transparent 65%);
    pointer-events: none;
}

/* Grid dots overlay */
.auth-showcase-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: 28px 28px;
    pointer-events: none;
}

/* Brand */
.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
    position: relative;
    z-index: 1;
}
.auth-brand img {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(255,255,255,.08);
    padding: 6px;
    border: 1px solid rgba(255,255,255,.1);
}
.auth-brand span { display: flex; flex-direction: column; gap: 1px; }
.auth-brand b { color: #fff; font-size: 1.2rem; font-weight: 800; }
.auth-brand small { color: rgba(255,255,255,.42); font-size: .72rem; }

/* Showcase content */
.auth-showcase-content {
    position: relative;
    z-index: 1;
    padding: 2.5rem 0 1rem;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: rgba(255,91,46,.16);
    border: 1px solid rgba(255,91,46,.28);
    color: #ff8a5a;
    font-size: .77rem;
    font-weight: 700;
    padding: .32rem .75rem;
    border-radius: 50px;
    margin-bottom: 1.2rem;
    letter-spacing: .02em;
}

.auth-showcase-content h2 {
    color: #fff;
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    font-weight: 900;
    line-height: 1.22;
    margin-bottom: 1rem;
    letter-spacing: -.025em;
}

.auth-showcase-content > p {
    color: rgba(255,255,255,.48);
    font-size: .92rem;
    line-height: 1.72;
    margin-bottom: 2rem;
    max-width: 340px;
}

/* Benefits */
.auth-benefits {
    display: flex;
    flex-direction: column;
    gap: .85rem;
}
.auth-benefits > div {
    display: flex;
    align-items: center;
    gap: .85rem;
    background: rgba(255,255,255,.042);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    padding: .82rem 1rem;
    transition: all .25s ease;
}
.auth-benefits > div:hover {
    background: rgba(255,255,255,.07);
    transform: translateX(-4px);
}
.auth-benefits i {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, rgba(255,91,46,.22), rgba(255,138,0,.13));
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff7a40;
    font-size: .95rem;
    flex-shrink: 0;
    border: 1px solid rgba(255,91,46,.18);
}
.auth-benefits span { display: flex; flex-direction: column; gap: 1px; }
.auth-benefits b { color: rgba(255,255,255,.88); font-size: .89rem; font-weight: 700; }
.auth-benefits small { color: rgba(255,255,255,.38); font-size: .75rem; }

/* Status card */
.auth-showcase-status {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: .85rem;
    background: rgba(255,255,255,.052);
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 18px;
    padding: 1rem 1.15rem;
    backdrop-filter: blur(8px);
}
.auth-showcase-status > span {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #ff5b2e, #ff8a00);
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 6px 18px rgba(255,91,46,.38);
}
.auth-showcase-status > div { display: flex; flex-direction: column; gap: 2px; }
.auth-showcase-status b { color: #fff; font-size: .9rem; }
.auth-showcase-status small { color: rgba(255,255,255,.4); font-size: .75rem; }

/* ════════════════════════════════════════
   FORM SIDE (light panel)
   ════════════════════════════════════════ */
.auth-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background:
        radial-gradient(circle at 80% 10%, rgba(255,91,46,.04), transparent 28rem),
        radial-gradient(circle at 10% 90%, rgba(255,138,0,.03), transparent 22rem),
        #f7f8fa;
    overflow-y: auto;
}

.auth-card {
    width: 100%;
    max-width: 440px;
}

/* Logo */
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo-image {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    object-fit: contain;
    background: #fff;
    padding: 8px;
    border: 1.5px solid #e9eaed;
    box-shadow: 0 4px 16px rgba(255,91,46,.12), 0 1px 4px rgba(0,0,0,.04);
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.auth-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: #17191c;
    letter-spacing: -.025em;
    margin-bottom: .35rem;
}
.auth-subtitle {
    color: #747b84;
    font-size: .89rem;
    line-height: 1.6;
    margin: 0;
}

/* Tabs */
.auth-tabs {
    display: flex;
    background: #eff0f2;
    border-radius: 16px;
    padding: 4px;
    margin-bottom: 1.5rem;
}
.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .68rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    color: #747b84;
    border: none;
    background: transparent;
    transition: all .28s cubic-bezier(.4,0,.2,1);
    text-decoration: none;
    font-family: 'Tajawal', sans-serif;
}
.auth-tab.active {
    background: #fff;
    color: #ff5b2e;
    box-shadow: 0 2px 12px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
}
.auth-tab i { font-size: .82rem; }

/* Form box */
.auth-form-box {
    background: #fff;
    border: 1.5px solid #e9eaed;
    border-radius: 24px;
    padding: 1.85rem;
    box-shadow: 0 8px 32px rgba(23,25,28,.055), 0 2px 8px rgba(23,25,28,.03);
    transition: box-shadow .3s ease;
}
.auth-form-box:focus-within {
    box-shadow: 0 0 0 1px rgba(255,91,46,.07), 0 12px 40px rgba(23,25,28,.08);
}

/* Labels */
.form-label-custom {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .84rem;
    font-weight: 700;
    color: #2e3138;
    margin-bottom: .5rem;
}
.form-label-custom i { color: #ff5b2e; font-size: .78rem; width: 16px; text-align: center; }
.form-label-custom .req { color: #d63b4d; }

/* Inputs */
.form-control-custom {
    width: 100%;
    height: 48px;
    background: #f9fafb;
    border: 1.5px solid #e4e5e7;
    border-radius: 13px;
    padding: 0 1rem;
    font-size: .93rem;
    font-family: 'Tajawal', sans-serif;
    color: #17191c;
    direction: rtl;
    outline: none;
    transition: all .22s ease;
    -webkit-appearance: none;
    appearance: none;
}
.form-control-custom::placeholder { color: #9da4ae; font-size: .87rem; }
.form-control-custom:focus {
    background: #fff;
    border-color: #ff5b2e;
    box-shadow: 0 0 0 3.5px rgba(255,91,46,.1);
}
.form-control-custom:hover:not(:focus) {
    border-color: #c8cacd;
    background: #fefefe;
}

/* Password wrapper */
.pw-wrapper { position: relative; }
.pw-wrapper .form-control-custom { padding-left: 3rem; }
.pw-toggle {
    position: absolute;
    left: .85rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9da4ae;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color .2s ease;
    font-size: 1rem;
    line-height: 1;
}
.pw-toggle:hover { color: #ff5b2e; }

/* Strength bar */
.strength-bar-wrap { display: none; margin-top: .55rem; }
.strength-bar-wrap.show { display: block; }
.strength-track {
    height: 5px;
    background: #eee;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: .3rem;
}
.strength-fill {
    height: 100%;
    border-radius: 99px;
    width: 0;
    transition: width .35s ease, background .35s ease;
}
.strength-label {
    font-size: .74rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* Match message */
.match-msg {
    font-size: .76rem;
    font-weight: 600;
    margin-top: .38rem;
    min-height: 1.2em;
    display: flex;
    align-items: center;
    gap: .3rem;
}

/* Submit button */
.btn-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #ff5b2e 0%, #ff732e 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: .97rem;
    font-weight: 800;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all .28s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 6px 20px rgba(255,91,46,.3);
    position: relative;
    overflow: hidden;
    letter-spacing: .01em;
    margin-top: .35rem;
}
.btn-auth-submit::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,.12));
    opacity: 0;
    transition: opacity .25s;
}
.btn-auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255,91,46,.4);
}
.btn-auth-submit:hover::after { opacity: 1; }
.btn-auth-submit:active { transform: translateY(0); }
.btn-auth-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Alert */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .85rem 1rem;
    border-radius: 13px;
    font-size: .875rem;
    font-weight: 600;
    margin-bottom: 1.15rem;
    border: 1.5px solid transparent;
    line-height: 1.5;
}
.auth-alert-danger {
    background: #fff5f6;
    border-color: rgba(214,59,77,.2);
    color: #b02535;
}
.auth-alert-danger i { color: #d63b4d; font-size: .95rem; flex-shrink: 0; margin-top: 1px; }
.auth-alert-success {
    background: #f0fdf7;
    border-color: rgba(22,139,87,.2);
    color: #0d6e43;
}
.auth-alert-success i { color: #168b57; font-size: .95rem; flex-shrink: 0; margin-top: 1px; }

/* Form group */
.form-group { margin-bottom: 1.1rem; }

/* Bottom switch */
.auth-switch {
    text-align: center;
    margin-top: 1.2rem;
    padding-top: 1.1rem;
    border-top: 1px solid #f0f1f3;
    font-size: .87rem;
    color: #747b84;
}
.auth-switch a {
    color: #ff5b2e;
    font-weight: 700;
    text-decoration: none;
}
.auth-switch a:hover { color: #d94418; }

/* Security note */
.auth-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    margin-top: 1.1rem;
    font-size: .78rem;
    color: #9da4ae;
}
.auth-security i { color: #168b57; font-size: .8rem; }

/* Animate */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp { animation: fadeInUp .5s cubic-bezier(.22,1,.36,1) both; }

/* Progress bars bootstrap compat */
.progress-custom { height: 5px; background: #eee; border-radius: 99px; overflow: hidden; }
.progress-bar-custom { height: 100%; border-radius: 99px; transition: width .35s ease, background .35s ease; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .auth-showcase { display: none; }
    .auth-form-side { padding: 2rem 1.25rem; }
    .auth-home-link {
        right: 1rem;
        top: .85rem;
        color: #ff5b2e;
        background: rgba(255,91,46,.07);
        border-color: rgba(255,91,46,.15);
    }
}
@media (max-width: 480px) {
    .auth-form-side { padding: 1.25rem .85rem; }
    .auth-form-box { padding: 1.35rem 1.1rem; border-radius: 20px; }
    .auth-title { font-size: 1.35rem; }
    .auth-tabs { border-radius: 14px; }
}
