/* HR-system themed login. Scoped to body.nesma-auth so other auth pages are unaffected.
   Visual only: no form, id, or name changes. */

body.nesma-auth {
    --na-navy: #0b1f3a;
    --na-navy-2: #12305a;
    --na-teal: #14b8a6;
    --na-teal-dark: #0d9488;
    --na-blue: #2563eb;
    --na-ink: #0f172a;
    --na-muted: #64748b;
    --na-line: #e2e8f0;
    background: #f1f5f9;
}

/* ---------- Left: HR branding panel ---------- */
.nesma-auth .saas-auth-left {
    flex: 1.15;
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(20, 184, 166, 0.35), transparent 60%),
        radial-gradient(700px 500px at -10% 110%, rgba(37, 99, 235, 0.45), transparent 60%),
        linear-gradient(160deg, var(--na-navy) 0%, var(--na-navy-2) 100%);
    justify-content: space-between;
    padding: 3rem 4rem;
}

/* replace the pulsing glow with a subtle dotted grid */
.nesma-auth .saas-auth-left::before {
    inset: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: 26px 26px;
    animation: none;
    mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.na-brand-top {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.02em;
}

.na-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--na-teal), var(--na-blue));
    box-shadow: 0 8px 20px rgba(20, 184, 166, 0.35);
    font-size: 1.2rem;
}

.nesma-auth .saas-branding h1 {
    font-size: 3rem;
    line-height: 1.12;
    margin-bottom: 1.1rem;
}

.nesma-auth .saas-branding h1 .na-accent {
    background: linear-gradient(90deg, #5eead4, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nesma-auth .saas-branding p {
    font-size: 1.1rem;
    opacity: 0.78;
    max-width: 90%;
}

/* feature list */
.na-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    max-width: 560px;
}

.na-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.2s ease, transform 0.2s ease;
}

.na-features { gap: 0.6rem; margin-top: 1.5rem; }
.na-features li { padding: 0.55rem 0.8rem; font-size: 0.88rem; }
.na-features .bi { width: 30px; height: 30px; font-size: 0.95rem; }

.na-features li.na-more {
    grid-column: 1 / -1;
    justify-content: center;
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.22), rgba(37, 99, 235, 0.22));
    border-style: dashed;
}

.na-features li:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.na-features .bi {
    width: 34px;
    height: 34px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(20, 184, 166, 0.2);
    color: #5eead4;
    font-size: 1.05rem;
}

/* bottom stat strip */
.na-brand-bottom {
    position: relative;
    z-index: 10;
    display: flex;
    gap: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.na-stat strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    line-height: 1.1;
}

.na-stat span {
    font-size: 0.8rem;
    opacity: 0.65;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.na-version-badge {
    margin-inline-start: auto;
    align-self: center;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 999px;
}

/* ---------- Right: form card ---------- */
.nesma-auth .saas-auth-right {
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(20, 184, 166, 0.10), transparent 70%),
        #f1f5f9;
}

.nesma-auth .saas-form-wrapper {
    position: relative;
    border-radius: 22px;
    padding: 2.5rem 2.5rem 2rem;
    border: 1px solid var(--na-line);
    box-shadow: 0 20px 45px -18px rgba(11, 31, 58, 0.25);
    overflow: hidden;
}

/* accent bar on top of card */
.nesma-auth .saas-form-wrapper::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 5px;
    background: linear-gradient(90deg, var(--na-teal), var(--na-blue));
}

.nesma-auth .saas-form-wrapper:hover {
    box-shadow: 0 24px 55px -18px rgba(11, 31, 58, 0.32);
}

.nesma-auth .saas-logo {
    max-height: 52px;
    margin-bottom: 1.25rem;
}

.nesma-auth .saas-logo {
    display: block;
    margin-inline: auto;
}

.na-secure-pill {
    display: flex;
    width: fit-content;
    margin-inline: auto;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-bottom: 1rem;
    padding: 4px 12px;
    border-radius: 999px;
    background: #ecfdf5;
    color: #047857;
    font-size: 0.75rem;
    font-weight: 600;
}

.nesma-auth .saas-form-header h2 {
    font-size: 1.75rem;
}

.nesma-auth .saas-form-header p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

.nesma-auth .saas-input {
    background: #f8fafc;
    border-color: var(--na-line);
    padding-block: 0.8rem;
}

.nesma-auth .saas-input:focus {
    border-color: var(--na-teal);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.18);
}

.nesma-auth .saas-input:focus ~ .icon {
    color: var(--na-teal-dark);
}

.nesma-auth .saas-btn-primary {
    background: linear-gradient(135deg, var(--na-navy-2), var(--na-navy));
    box-shadow: 0 8px 18px -8px rgba(11, 31, 58, 0.6);
}

.nesma-auth .saas-btn-primary:hover {
    background: linear-gradient(135deg, var(--na-teal-dark), var(--na-blue));
    box-shadow: 0 10px 22px -8px rgba(13, 148, 136, 0.6);
}

.nesma-auth .saas-link {
    color: var(--na-blue);
}

.nesma-auth .saas-checkbox input {
    accent-color: var(--na-teal-dark);
}

.nesma-auth .saas-footer-text {
    margin-top: 1.5rem;
}

/* help block as soft tiles */
.na-help {
    display: flex;
    gap: 0.6rem;
    justify-content: center;
    flex-wrap: wrap;
}

.na-help a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid var(--na-line);
    color: #334155;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.na-help a:hover {
    background: #e6fffb;
    border-color: var(--na-teal);
    color: var(--na-teal-dark);
}

/* ---------- RTL ---------- */
[dir="rtl"] .nesma-auth .saas-input-wrapper .icon { left: auto; right: 1rem; }
[dir="rtl"] .nesma-auth .saas-input { padding: 0.8rem 2.75rem 0.8rem 2.75rem; }
[dir="rtl"] .nesma-auth .saas-toggle-password { right: auto; left: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .nesma-auth .saas-form-wrapper { padding: 2rem 1.5rem 1.5rem; }
}

@media (max-width: 576px) {
    .na-features { grid-template-columns: 1fr; }
}

/* ---------- Shared extras for register / password-reset pages ---------- */
.nesma-auth .na-page-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 18px;
    font-size: 1.9rem;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(37, 99, 235, 0.15));
    color: var(--na-teal-dark);
}

.nesma-auth .na-page-icon.is-success { background: #ecfdf5; color: #059669; }

.nesma-auth .na-note {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    padding: 0.75rem 0.9rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e40af;
    font-size: 0.85rem;
    text-align: start;
}

.nesma-auth .na-note .bi { margin-top: 2px; }

.nesma-auth .na-tips {
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid var(--na-line);
    color: #475569;
    font-size: 0.85rem;
    text-align: start;
}

.nesma-auth .na-tips ul { padding-inline-start: 1.1rem; margin: 0.4rem 0 0; }
.nesma-auth .na-tips li { margin-bottom: 0.25rem; }

.nesma-auth .na-btn-outline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--na-line);
    background: #fff;
    color: #334155;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nesma-auth .na-btn-outline:hover { border-color: var(--na-teal); color: var(--na-teal-dark); background: #f0fdfa; }

.nesma-auth .na-back {
    display: block;
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
}

.nesma-auth .saas-form-header p { margin-top: 0.4rem; }
.nesma-auth .na-error { color: #dc2626; font-size: 0.82rem; margin-top: 0.3rem; }
