/* إعداد الخلفية */
body {
    background: #000000;
    background: radial-gradient(circle at top left, #1b1b1f 0%, #050507 45%, #000000 100%);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    color: #ffffff;
    min-height: 100vh;
}

.card-dark table.table-dark-custom thead th {
    color: #ffdde0 !important;
    font-size: .9rem;
}

.table-dark-custom tbody tr {
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

canvas {
    background-color: #101014;
    border-radius: 12px;
    padding: 6px;
}

/* صورة QR الصغيرة داخل الجدول */
.qr-img {
    width: 70px;
    border-radius: 8px;
    background: #ffffff;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.qr-img:hover {
    transform: scale(1.05);
}

/* خلفية البوب-أب */
#qrPopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;      /* يغطي العرض بالكامل */
    height: 100vh;     /* يغطي الارتفاع بالكامل */
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;     /* مخفي افتراضياً */
}

/* صورة الـ QR الكبيرة في المنتصف */
#qrPopupImg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);  /* هذه هي السر في التوسيط الحقيقي */
    max-width: 80vw;
    max-height: 80vh;
    background: #ffffff;
    padding: 10px;
    border-radius: 14px;
    box-shadow: 0 0 25px rgba(255, 0, 0, 0.5);
}


/* توحيد شكل الكروت */
.card-dark {
    background: rgba(16, 16, 20, 0.92);
    border-radius: 18px;
    border: 1px solid rgba(229, 9, 20, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
    padding: 20px;
}


.link-text {
    display: inline-block;
    max-width: 210px; /* يمكنك تعديلها حسب العرض */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}


/* نصوص العناوين الأساسية */
h1, h2, h3, h4, h5, h6 {
    color: #ffffff !important;
    font-weight: 600;
}

/* النصوص العادية */
p, span, label, small, div, th, td, strong {
    color: #e8e8e8 !important;
}

/* Placeholder واضح */
::placeholder {
    color: rgba(255, 255, 255, 0.45) !important;
    opacity: 1;
}

/* مدخلات داكنة واضحة */
.form-control,
.form-select {
    background-color: #15151b;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #ffffff !important;
}

.form-control:focus,
.form-select:focus {
    background-color: #1c1c22;
    border-color: #e50914 !important;
    box-shadow: 0 0 0 0.2rem rgba(229, 9, 20, 0.3);
}

/* الأزرار الأساسية */
.btn-accent {
    background: linear-gradient(135deg, #e50914, #a90710);
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 10px;
    padding: 10px;
    transition: 0.2s;
}
.btn-accent:hover {
    background: linear-gradient(135deg, #ff1a23, #cf0c16);
    transform: translateY(-1px);
}

/* Navbar داكن وأنيق */
.navbar-dark-bg {
    background: linear-gradient(90deg, #000000 0%, #140002 45%, #2d0005 100%);
    box-shadow: 0 3px 20px rgba(229, 9, 20, 0.25);
}

.navbar-brand img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 6px rgba(255, 0, 0, 0.45)) brightness(1000%);
}

/* الشارة الرقمية */
.badge-count {
    background: #e50914;
    color: #ffffff !important;
    padding: 4px 10px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* نصوص التحذير */
.alert-danger {
    background-color: rgba(229, 9, 20, 0.12);
    border-color: rgba(229, 9, 20, 0.4);
    color: #ff8f97 !important;
}

/* التنسيق الداخلي للجداول */
.table-dark-custom {
    width: 100%;
    color: #ffffff !important;
}
.table-dark-custom thead tr {
    background-color: #1e1e25;
}
.table-dark-custom tbody tr {
    background-color: #131318;
}
.table-dark-custom tbody tr:nth-child(even) {
    background-color: #17171f;
}
.table-dark-custom tbody tr:hover {
    background-color: #202028;
}

/* الروابط */
a {
    color: #ff4b5c !important;
    text-decoration: none;
}
a:hover {
    color: #ff7a87 !important;
}

/* توسيط واجهة تسجيل الدخول */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* إجبار النصوص داخل بطاقات "لا توجد روابط" على الظهور */
.card-dark .no-data,
.card-dark p,
.card-dark small {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 500;
}

/* إجبار نصوص الجدول داخل البطاقات الداكنة على الظهور واضحة */
.card-dark table.table-dark-custom td,
.card-dark table.table-dark-custom th {
    color: #ffffff !important;
    font-weight: 500;
    opacity: 1 !important;
}

/* إلغاء الخلفية البيضاء للجدول نهائياً */
table,
.table,
.table-dark-custom,
.table-dark-custom thead,
.table-dark-custom tbody tr td,
.table-dark-custom tbody tr,
.table-dark-custom th {
    background-color: transparent !important;
    color: #ffffff !important;
}

/* تصميم جذاب أكثر للجدول */
.table-dark-custom thead th {
    color: #ffdde0 !important;
    fo

