/* --- Header icons de-dup & alignment patch --- */

/* 1) Never auto-inject icons before the header */
#LoginHeader::before,
#LoginHeader .h4#header1::before {
    content: none !important;
    background: none !important;
    -webkit-mask: none !important;
    mask: none !important;
}

/* 2) Hide any stray <i class="fa..."> placed directly in header1 (keep only .hdrIcon system) */
#LoginHeader .h4#header1 > i,
#LoginHeader .h4#header1 > .fa,
#LoginHeader .h4#header1 > .fas,
#LoginHeader .h4#header1 > .far {
    display: none !important;
}

/* 3) Ensure our modular icons are visible */
#header1 .headerIcons {
    display: flex !important;
    align-items: center;
    gap: 6px;
}

#header1 .hdrIcon {
    display: inline-grid !important;
}

/* 4) Proper RTL positioning: icons on the right, text to the left of them */
#LoginHeader .h4#header1 {
    margin: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
    font-weight: 800;
    font-size: clamp(20px, 2.4vw, 24px);
    line-height: 1.25;
}

html[dir="rtl"] #LoginHeader .h4#header1 {
    flex-direction: row-reverse;
}

/* 5) Icon capsule base (if not already loaded) */
.hdrIcon {
    --size: 28px;
    --radius: 8px;
    width: var(--size);
    height: var(--size);
    display: inline-grid;
    place-items: center;
    color: var(--primary);
    background: #eef3ff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 3px 8px rgba(91,108,255,.12);
}

    .hdrIcon::before {
        content: "";
        display: block;
        width: 60%;
        height: 60%;
        background: currentColor;
        -webkit-mask: var(--icon) no-repeat center / contain;
        mask: var(--icon) no-repeat center / contain;
    }

/* Named icons (warehouse / HR / SADAD) */
.icon-warehouse {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 10L12 5l9 5v9H3z'/%3E%3Crect x='10' y='13' width='4' height='6'/%3E%3C/svg%3E");
}

.icon-hr {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20a8 8 0 0 1 16 0z'/%3E%3C/svg%3E");
}

.icon-sadad {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='6' width='18' height='12' rx='3'/%3E%3Crect x='6' y='13' width='5' height='2'/%3E%3Crect x='14' y='13' width='5' height='2'/%3E%3C/svg%3E");
}
