@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@100;200;300;400;500;600;700&display=swap');
/* ========= Global Scrollbar (Chrome/Edge/Safari) ========= */
:root{
  --sb-size: 10px;
  --sb-track: #f3f6fb;                 /* مسار فاتح قريب من خلفية الموقع */
  --sb-thumb: linear-gradient(180deg, #5aa7ff, #2F62E7); /* أزرق أزرار الموقع */
  --sb-thumb-hover: linear-gradient(180deg, #3f8fff, #244fba);
  --sb-thumb-active: linear-gradient(180deg, #2b7be6, #1f45a8);
  --sb-track-border: #ffffff;
}

.ibm-plex-sans-arabic-thin {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 100;
  font-style: normal;
}

.ibm-plex-sans-arabic-extralight {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 200;
  font-style: normal;
}

.ibm-plex-sans-arabic-light {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.ibm-plex-sans-arabic-regular {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.ibm-plex-sans-arabic-medium {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.ibm-plex-sans-arabic-semibold {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.WebFont {
  font-family: "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  font-style: normal;
}


html, body, .scrollable {
  /* فايرفوكس */
  scrollbar-width: thin;
  scrollbar-color: #3f8fff var(--sb-track);
    font-family: "IBM Plex Sans Arabic", sans-serif !important;
  /* font-weight: 700 !important; */
  font-style: normal !important;
}

/* WebKit */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.scrollable::-webkit-scrollbar{
  width: var(--sb-size);
  height: var(--sb-size);
}

html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
.scrollable::-webkit-scrollbar-track{
  background: var(--sb-track);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.04);
}

html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
.scrollable::-webkit-scrollbar-thumb{
  background: var(--sb-thumb);
  border-radius: 999px;
  border: 2px solid var(--sb-track-border); /* يفصل الـthumb عن الخلفية */
}

html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
.scrollable::-webkit-scrollbar-thumb:hover{
  background: var(--sb-thumb-hover);
}

html::-webkit-scrollbar-thumb:active,
body::-webkit-scrollbar-thumb:active,
.scrollable::-webkit-scrollbar-thumb:active{
  background: var(--sb-thumb-active);
}

html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
.scrollable::-webkit-scrollbar-corner{
  background: var(--sb-track);
}

* {
  max-width: 100%; /* يمنع العناصر من كسر عرض الصفحة */
  box-sizing: border-box;
}


/* ========= مثال: تخصيص سكرول داخل جدول التقارير فقط ========= */
/* لفّ الجدول داخل عنصر بهذه الكلاسات */
.table-scroll{
  overflow: auto;
  max-height: 70vh; /* حسب حاجتك */
  scrollbar-width: thin;
  scrollbar-color: #3f8fff var(--sb-track);
}
.table-scroll::-webkit-scrollbar{ width: 8px; height: 8px; }
.table-scroll::-webkit-scrollbar-thumb{ border-radius: 999px; }


body { background: #f7fafc; margin:0; }
/* NavBar styles مأخوذة من كود الهيدر السابق */
.main-navbar {
    width: 100vw;
    background: #fff;
    border-bottom: 1.5px solid #e6eaf4;
    box-shadow: 0 2px 14px #0b4daa08;
    position: sticky; top: 0; z-index: 30;
}
.main-navbar .Hecontainer {
    display: flex; align-items: center; gap: 20px;
    height: 85px;
     /* max-width: 1650px; */
    margin: 0 auto; padding: 0 3vw;
}
.main-navbar .logo {
    height: 60px;
    /* margin-right: -4px; */
    border-radius: 11px;
    object-fit: contain;
}
.main-navbar .company-title {
    font-size: 2rem; font-weight: 700 !important; color: #0b4daa;
    letter-spacing: 0.5px; font-style: normal !important; font-family: "IBM Plex Sans Arabic", sans-serif !important;
    margin-right: 18px;
}
.main-navbar .nav-links { display: flex; gap: 12px; flex: 1;}
.main-navbar .nav-link {
    display: inline-block; color: #3555a0; font-weight: 600;
    font-size: 1.07rem; padding: 6px 19px; border-radius: 8px;
    text-decoration: none; background: none;
    transition: background 0.14s, color 0.16s;
}
.main-navbar .nav-link.active, .main-navbar .nav-link:hover {
    background: #e9f1ff; color: #0b4daa;
}
.main-navbar .nav-admin { color: #d97706 !important; background: #fff6e7;}
.main-navbar .user-menu {
    position: relative; display: flex; align-items: center; gap: 9px;
    cursor: pointer; user-select: none;
}
.main-navbar .user-avatar {
    width: 38px; height: 38px; border-radius: 50%;
    background: #dbeafe; object-fit: cover; border: 1.2px solid #e0e7ef;
}
.main-navbar .user-name {
    font-weight: 700; color: #222; font-size: 1.06rem;
    max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.main-navbar .user-dropdown {
    display: none; position: absolute; right: 0; top: 120%; background: #fff;
    min-width: 175px; box-shadow: 0 8px 26px #2221; border-radius: 11px; padding: 8px 0; z-index: 99;
}
.main-navbar .user-menu.open .user-dropdown { display: block;}
.main-navbar .user-dropdown a {
    display: block; color: #222; padding: 9px 20px; font-size: 1.06rem; text-decoration: none; transition: background .12s;
}
.main-navbar .user-dropdown a:hover {
    background: #f0f5ff; color: #0b4daa;
}
@media (max-width: 900px){
    .main-navbar .container { padding:0 8px;}
    .main-navbar .company-title { font-size:1.23rem;}
}
.dashboard-container {
    max-width: 1700px; margin: 35px auto 0 auto; padding: 0 2vw;
}
.cards-row {
    display: flex; gap: 2vw; margin-bottom: 40px;
}
.stat-card {
    flex: 1; background: #fff; border-radius: 1.3rem; box-shadow: 0 2px 24px #1e3a8a13;
    display: flex; flex-direction: row; align-items: center; padding: 2.3rem 2.1rem;
    min-width: 0; transition: box-shadow .2s; border:1px solid #f1f5fb;
}
.stat-card:hover { box-shadow:0 4px 38px #0b4daa22;}
.stat-icon {
    font-size: 2.45rem; background: linear-gradient(135deg,#e7eefd 0,#e2edff 100%);
    border-radius: 15px; width: 62px; height: 62px; display: flex; align-items: center; justify-content: center;
    color: #0b4daa; margin-right: 24px; box-shadow:0 2px 8px #0b4daa1a;
}
.stat-title { color: #94a3b8; font-weight: 600; font-size: 1.17rem; margin-bottom: 4px;}
.stat-value { font-size: 2.2rem; font-weight: 800; color: #22223b;}
.section-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 12px; margin-top: 14px;}
.ps-table { border-radius: 1rem; overflow: hidden;}
.ps-table th, .ps-table td { text-align: center; }
.latest-table-loader {
    padding:42px 0; text-align:center; opacity:0.65;
    background: linear-gradient(92deg,#e6eafd 50%,#f6f7fc 100%);
}
.loader-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0b4daa;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    animation: spin 0.9s linear infinite;
    margin:auto;
}
@keyframes spin { 0% { transform: rotate(0deg);} 100% { transform: rotate(360deg);} }
@media (max-width:900px){
    .cards-row { flex-direction: column; gap: 24px;}
}

.user-menu {
    display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; position: relative;
    min-width: 160px;
    padding: 2px 0;
}
.user-avatar {
    width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid #e6eaf4; background: #eef4fa;
    box-shadow: 0 1px 8px #0b4daa0d;
}
.user-info {
    display: flex; flex-direction: column; align-items: flex-start;
    font-family: 'Segoe UI', 'Inter', Arial, sans-serif;
    line-height: 1.13; min-width: 90px; max-width: 170px;
    overflow: hidden;
}
.user-info .user-name {
    font-weight: 700; font-size: 1.10rem; color: #22272c;
    max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .14px;
}
.user-info .user-role {
    font-size: .97rem; color: #999fb2; font-weight: 500; margin-top: 2px; letter-spacing: .09em;
}

/* جدول حديث مرتب */
.ps-table {
    width: 100%;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 16px #0b4daa0b;
}
.ps-table th, .ps-table td {
    text-align: center;
    padding: 12px 18px;
    font-size: 1.07rem;
    vertical-align: middle;
}
.ps-table th {
    background: #f6f8fc;
    color: #234080;
    font-weight: 800;
    border-bottom: 2px solid #eaeaea;
}
.ps-table tbody tr {
    border-bottom: 1px solid #f1f5fb;
    transition: background .13s;
}
.ps-table tbody tr:hover {
    background: #f5f8ff;
}

/* زر عرض */
.btn-table {
    background: linear-gradient(91deg, #2764e2 70%, #5999f4 100%);
    color: #fff;
    border: none;
    padding: 6px 22px;
    font-size: 1.03rem;
    font-weight: 700;
    border-radius: 8px;
    transition: background .13s;
    box-shadow: 0 2px 10px #2764e215;
    margin-left: 7px;
}
.btn-table:hover {
    background: linear-gradient(91deg, #1850c9 80%, #3881e1 100%);
    color: #fff;
}

.status-badge {
    border-radius: 8px;
    padding: 4px 20px;
    font-size: 1.04rem;
    font-weight: 700;
    letter-spacing: .02em;
    display: inline-block;
    min-width: 75px;
}
.status-read {
    background: #e6ffea;
    color: #13b053;
    border: 1.4px solid #13b05342;
}
.status-unread {
    background: #fffbe6;
    color: #ecad07;
    border: 1.4px solid #ecad0738;
}

.table>tbody>tr>td, .table>tbody>tr>th, .table>tfoot>tr>td, .table>tfoot>tr>th, .table>thead>tr>td, .table>thead>tr>th {
    padding: 8px;
    line-height: 1.42857143;
    vertical-align: middle !important;
    border-top: 1px solid #ddd;
}