/* Global Text Enhancement (Darker & Clearer) */
.oxd-text, .oxd-label, .oxd-input, .oxd-select-text, .oxd-table-cell,
.oxd-topbar-body-nav-tab-item, .oxd-topbar-body-nav-tab-link,
.oxd-dropdown-menu li, .oxd-dropdown-menu a,
.oxd-select-dropdown, .oxd-select-dropdown *, .oxd-select-option,
h1, h2, h3, h4, h5, h6 {
    color: #000000 !important; /* Pure Black */
    font-weight: 600 !important;
    font-family: 'Cairo', sans-serif !important;
}

/* Hide profile sections that do not have a persistent data source yet. */
[data-action="profile-assets"],
[data-action="profile-incidents"] {
    display: none !important;
}

/* WHITE TEXT: Sidebar & Top Profile Name */
.oxd-sidepanel .oxd-main-menu-item .oxd-main-menu-item--name,
.oxd-sidepanel .oxd-main-menu-item .oxd-icon,
.oxd-sidepanel .oxd-main-menu-search input,
.oxd-userdropdown-name,
.oxd-userdropdown-tab .oxd-icon,
.oxd-userdropdown-tab i {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Sidebar Spacing */
.oxd-main-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

/* Dashboard & Fingerprint Spacing */
.orangehrm-attendance-card-state i,
.orangehrm-attendance-card-bar i,
.orangehrm-dashboard-widget-header i,
.orangehrm-quick-launch-card i {
    margin-left: 10px !important;
}

/* Center Dashboard Attendance Button Icon */
.orangehrm-attendance-card-action button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    background-color: #001529 !important;
    border-color: #001529 !important;
}
.orangehrm-attendance-card-action button:hover {
    background-color: #002347 !important;
    border-color: #002347 !important;
}
.orangehrm-attendance-card-action button i {
    margin: 0 !important;
    font-size: 1.5rem !important;
}

/* Desktop attendance avatar and punch button alignment */
.orangehrm-attendance-card-profile {
    align-items: center !important;
    gap: 10px !important;
    min-height: 52px !important;
}
.orangehrm-attendance-card-profile-image {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    flex: 0 0 48px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #eef2f7 !important;
}
.orangehrm-attendance-card-profile-image img,
.orangehrm-attendance-card-profile-image .employee-image {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: 50% !important;
    border: 2px solid #001529 !important;
    box-sizing: border-box !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
}
.employee-image-placeholder {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    border-radius: 50% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}
.orangehrm-attendance-card-action {
    width: 52px !important;
    height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
}
.orangehrm-attendance-card-action button,
.orangehrm-attendance-card-action .oxd-icon-button {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    line-height: 1 !important;
}
.orangehrm-attendance-card-action button .oxd-icon,
.orangehrm-attendance-card-action button svg,
.orangehrm-attendance-card-action button i {
    width: 22px !important;
    height: 22px !important;
    font-size: 22px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: static !important;
    transform: none !important;
    display: block !important;
}

/* Directory Card Fix (Arabic Text Clipping - Aggressive) */
.orangehrm-directory-card {
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}
.orangehrm-directory-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15) !important;
    border-color: var(--blh-accent) !important;
}
.orangehrm-directory-card-description,
.orangehrm-directory-card-description *,
.orangehrm-directory-card-body {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    line-height: 2.2 !important;
    padding-bottom: 12px !important;
    display: block !important;
}

.oxd-main-menu-item.active .oxd-icon,
.oxd-main-menu-item.active .oxd-main-menu-item--name {
    color: #ffffff !important;
}

.oxd-table-header-cell, .oxd-label, .oxd-text--h6 {
    color: #000000 !important;
    font-weight: 800 !important;
}

::placeholder { color: #555 !important; opacity: 1; }
.oxd-main-menu-search input::placeholder { color: #fff !important; }

/* AI Widget Styles */
#blh-ai-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #29b6f6 0%, #0288d1 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 30px rgba(2, 136, 209, 0.5), 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999 !important;
    transition: all 0.3s ease;
    animation: blhPulse 2.5s infinite;
}
#blh-ai-widget:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 40px rgba(2, 136, 209, 0.7), 0 4px 15px rgba(0,0,0,0.3);
}
#blh-ai-widget svg {
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}
#blh-ai-widget-label {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: rgba(0, 21, 41, 0.85);
    color: white !important;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 999998;
    white-space: nowrap;
    pointer-events: none;
    font-family: 'Cairo', sans-serif !important;
    letter-spacing: 0.5px;
}

@media (max-width: 760px) {
    #blh-ai-widget {
        left: 14px !important;
        right: auto !important;
        bottom: calc(92px + env(safe-area-inset-bottom, 0px)) !important;
        width: 56px !important;
        height: 56px !important;
    }
    #blh-ai-widget-label {
        left: 14px !important;
        right: auto !important;
        bottom: calc(154px + env(safe-area-inset-bottom, 0px)) !important;
    }
}
@keyframes blhPulse {
    0%   { box-shadow: 0 6px 30px rgba(2, 136, 209, 0.5), 0 0 0 0 rgba(2, 136, 209, 0.6); }
    50%  { box-shadow: 0 6px 30px rgba(2, 136, 209, 0.5), 0 0 0 14px rgba(2, 136, 209, 0); }
    100% { box-shadow: 0 6px 30px rgba(2, 136, 209, 0.5), 0 0 0 0 rgba(2, 136, 209, 0); }
}

#blh-ai-container { position: fixed; bottom: 95px; right: 25px; width: 380px; height: 550px; background: #f7f9fa; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); display: none; flex-direction: column; overflow: hidden; z-index: 10000; transform: translateY(20px); opacity: 0; transition: all 0.3s ease; font-family: 'Cairo', sans-serif; }
.blh-ai-header { background: #001529; padding: 15px; color: white; display: flex; justify-content: space-between; align-items: center; }
.blh-ai-messages { flex: 1; padding: 15px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.blh-msg { max-width: 80%; padding: 10px 15px; border-radius: 15px; font-size: 14px; line-height: 1.4; color: #333 !important; }
.blh-msg.bot { align-self: flex-start; background: white; border-bottom-left-radius: 2px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.blh-msg.user { align-self: flex-end; background: #00509e; color: white !important; border-bottom-right-radius: 2px; }
.blh-msg.bot .blh-chat-link { display: inline-flex; align-items: center; justify-content: center; margin-top: 8px; padding: 8px 12px; border-radius: 12px; background: #00509e; color: #ffffff !important; font-weight: 800; text-decoration: none; box-shadow: 0 6px 14px rgba(0,80,158,.18); }
.blh-msg.bot .blh-chat-link:hover { background: #003f7d; color: #ffffff !important; }
.blh-msg.bot .blh-chat-text { white-space: pre-wrap; }
.blh-ai-input-area { padding: 15px; background: white; border-top: 1px solid #eee; display: flex; gap: 10px; }
.blh-ai-input { flex: 1; border: 1px solid #ddd; padding: 8px 12px; border-radius: 20px; outline: none; font-family: inherit; color: #333 !important; }
.blh-ai-send { background: #00509e; color: white; border: none; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.blh-ai-voice { background: #eef4fb; color: #00509e; border: 1px solid #d7e5f3; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 35px; }
.blh-ai-voice svg { width: 17px; height: 17px; stroke: currentColor; }
.blh-ai-voice.is-listening { background: #d93025; border-color: #d93025; color: #ffffff; animation: blhVoicePulse 1s infinite; }
.blh-ai-voice.is-processing { background: #00509e; border-color: #00509e; color: #ffffff; }
.blh-ai-voice:disabled { opacity: 0.45; cursor: not-allowed; animation: none; }
.blh-ai-header-actions { display: inline-flex; align-items: center; gap: 6px; }
.blh-ai-tool-btn { width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.24); border-radius: 50%; background: rgba(255,255,255,0.12); color: #ffffff; display: none; align-items: center; justify-content: center; cursor: pointer; font-size: 17px; line-height: 1; }
.blh-ai-history-panel { display: none; background: #ffffff; border-bottom: 1px solid #e5edf5; padding: 10px; gap: 8px; flex-direction: column; }
.blh-ai-history-panel.active { display: flex; }
.blh-ai-history-item { width: 100%; border: 1px solid #e5edf5; background: #f8fafc; border-radius: 10px; padding: 9px 10px; text-align: right; font-family: inherit; cursor: pointer; }
.blh-ai-history-item strong { display: block; color: #0f172a; font-size: 12px; margin-bottom: 3px; }
.blh-ai-history-item span { display: block; color: #64748b; font-size: 11px; }
.blh-ai-history-empty { color: #64748b; font-size: 12px; text-align: center; padding: 8px; }
.blh-ai-voice-status { display: none; padding: 8px 12px; background: #eef6ff; border-bottom: 1px solid #dbeafe; color: #0f3f6e; font-size: 12px; text-align: center; }
.blh-ai-voice-status.active { display: block; }
.blh-ai-voice-status.error { background: #fff1f2; border-bottom-color: #fecdd3; color: #9f1239; }
@media (max-width: 760px) { .blh-ai-tool-btn { display: inline-flex; } }
@keyframes blhVoicePulse { 0% { box-shadow: 0 0 0 0 rgba(217,48,37,0.35); } 70% { box-shadow: 0 0 0 8px rgba(217,48,37,0); } 100% { box-shadow: 0 0 0 0 rgba(217,48,37,0); } }
.blh-typing { font-size: 12px; color: #888; margin-left: 5px; display: none; }

/* ⚠️•⚠️•⚠️• Dashboard Widgets v12 ⚠️•⚠️•⚠️• */
.blh-dashboard-widgets { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 1rem !important; max-width: calc(350px * 3) !important; width: 100% !important; margin: 0 auto 1rem !important; direction: rtl !important; box-sizing: border-box !important; align-items: stretch !important; }
.blh-widget-card { background: white; border-radius: 1.2rem; padding: 0.75rem; box-shadow: 0 10px 26px rgba(24, 49, 83, 0.08); border: 1px solid #e8eef5; width: 100%; height: 100%; min-height: 210px; margin: 0; box-sizing: border-box; overflow: hidden; transition: all 0.2s ease; display: flex; flex-direction: column; }
.blh-widget-card:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(24, 49, 83, 0.1); }
.blh-widget-title { font-size: 14px; font-weight: 700; color: #001529 !important; padding-bottom: 0.75rem; margin-bottom: 0.75rem; border-bottom: 1px solid #e8eef5; display: flex; align-items: center; justify-content: flex-start; gap: 0.5rem; font-family: 'Cairo', sans-serif !important; }
.blh-widget-title .oxd-icon { width: 15px !important; height: 15px !important; margin: 0 !important; color: #64748b !important; }
.blh-widget-body { min-height: 92px; font-size: 13px; color: #333 !important; font-family: 'Cairo', sans-serif !important; line-height: 1.8; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; overflow: auto; }
.blh-widget-row { display:flex; justify-content:space-between; align-items:center; gap: 0.75rem; padding: 0.3rem 0; border-bottom: 1px solid #f1f5f9; }
.blh-widget-row:last-child { border-bottom: 0; }
.blh-widget-badge { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.blh-badge-pending { background: #fff3cd; color: #856404 !important; }
.blh-badge-approved { background: #d4edda; color: #155724 !important; }
.blh-badge-rejected { background: #f8d7da; color: #721c24 !important; }
.blh-badge-active { background: #cce5ff; color: #004085 !important; }
.blh-stmt-btn { background: #00509e; color: white !important; border: none; padding: 9px 16px; border-radius: 0.75rem; cursor: pointer; font-family: 'Cairo', sans-serif !important; font-weight: 700; font-size: 13px; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; align-self: flex-start; }
.blh-stmt-btn .oxd-icon { width: 14px !important; height: 14px !important; margin: 0 !important; color: #ffffff !important; }
.blh-stmt-btn:hover { background: #003a70; box-shadow: 0 6px 16px rgba(0,80,158,0.25); }
.blh-desktop-quick-card { cursor: pointer !important; }
@media (max-width: 1050px) { .blh-dashboard-widgets { grid-template-columns: 1fr !important; max-width: 350px !important; } }

/* Statement Popup */
.blh-stmt-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 100000; display: none; align-items: center; justify-content: center; }
.blh-stmt-popup { background: white; border-radius: 16px; width: 90%; max-width: 850px; max-height: 85vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.3); direction: rtl; }
.blh-stmt-header { background: #001529; color: white !important; padding: 18px 24px; border-radius: 16px 16px 0 0; display: flex; justify-content: space-between; align-items: center; }
.blh-stmt-header h3 { margin: 0; font-family: 'Cairo', sans-serif !important; color: white !important; font-size: 16px; }
.blh-stmt-close { background: none; border: none; color: white !important; font-size: 24px; cursor: pointer; }
.blh-stmt-content { padding: 20px 24px; }
.blh-stmt-table { width: 100%; border-collapse: collapse; font-family: 'Cairo', sans-serif !important; font-size: 12px; }
.blh-stmt-table th { background: #f0f4f8; padding: 10px 12px; text-align: right; font-weight: 700; color: #001529 !important; border-bottom: 2px solid #dee2e6; }
.blh-stmt-table td { padding: 8px 12px; border-bottom: 1px solid #f0f0f0; color: #333 !important; }
.blh-stmt-table tr:hover { background: #f8f9ff; }
.blh-stmt-table .credit { color: #28a745 !important; font-weight: 700; }
.blh-stmt-table .debit { color: #dc3545 !important; font-weight: 700; }
.blh-stmt-table .balance-pos { color: #28a745 !important; font-weight: 700; }
.blh-stmt-table .balance-neg { color: #dc3545 !important; font-weight: 700; }
.blh-stmt-summary { display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.blh-stmt-summary-card { flex: 1; min-width: 150px; background: #f8f9fa; border-radius: 10px; padding: 14px; text-align: center; }
.blh-stmt-summary-card .label { font-size: 11px; color: #666 !important; font-family: 'Cairo', sans-serif !important; }
.blh-stmt-summary-card .value { font-size: 20px; font-weight: 800; font-family: 'Cairo', sans-serif !important; }
.blh-stmt-period { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.blh-stmt-period input { border: 1px solid #ddd; padding: 6px 12px; border-radius: 8px; font-family: 'Cairo', sans-serif !important; color: #333 !important; }
.blh-stmt-period label { font-weight: 600; color: #333 !important; font-family: 'Cairo', sans-serif !important; font-size: 13px; }

/* Broken Profile Avatar Fix */
.orangehrm-attendance-card-profile-image img,
.employee-image {
    font-size: 0 !important;
    color: transparent !important;
    text-indent: -10000px !important;
    overflow: hidden !important;
}
.orangehrm-attendance-card-profile-image {
    overflow: hidden !important;
    background: linear-gradient(135deg, #00509e, #002347) !important;
}
.orangehrm-attendance-card-profile-image img[src=""],
.orangehrm-attendance-card-profile-image img:not([src]),
.orangehrm-attendance-card-profile-image img[src*="undefined"] {
    display: none !important;
}
.employee-image-placeholder {
    width: 100% !important;
    height: 100% !important;
    min-width: 48px !important;
    min-height: 48px !important;
}
    
