/* TopLink unified logo from /reseller-client */
.tlUnifiedLogoBrand,
.brand.tlUnifiedLogoBrand{
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  direction:ltr !important;
  text-align:center !important;
  min-height:42px !important;
  padding:6px 8px !important;
  font-size:0 !important;
}

.tlUnifiedLogoBrand:before,
.tlUnifiedLogoBrand:after,
.brand.tlUnifiedLogoBrand:before,
.brand.tlUnifiedLogoBrand:after{
  display:none !important;
  content:none !important;
}

.tlUnifiedLogoBrand .dot,
.brand.tlUnifiedLogoBrand .dot,
.tlUnifiedLogoBrand .brand-mark,
.brand.tlUnifiedLogoBrand .brand-mark{
  display:none !important;
}

.tlUnifiedLogo{
  display:block !important;
  width:auto !important;
  height:auto !important;
  max-height:58px !important;
  max-width:170px !important;
  object-fit:contain !important;
  filter:drop-shadow(0 0 10px rgba(25,230,255,.20)) !important;
}

.sidebar .tlUnifiedLogo{
  max-height:48px !important;
  max-width:155px !important;
}

.loginBox .tlUnifiedLogo,
.auth-card .tlUnifiedLogo{
  max-height:64px !important;
  max-width:185px !important;
}

.tlUnifiedLogoTextFallback{
  display:none !important;
  color:#eaf6ff !important;
  font-weight:950 !important;
  font-size:20px !important;
}

/* TopLink logo final size/position tune 2026-06-10 */

/* المقاس العام */
.tlUnifiedLogo{
  max-height:70px !important;
  max-width:205px !important;
}

/* لوجو السايدبار: في النص وفوق كارت الحساب */
.sidebar .tlUnifiedLogoBrand,
.sidebar .brand.tlUnifiedLogoBrand{
  width:100% !important;
  justify-content:center !important;
  align-items:center !important;
  margin:4px auto 18px auto !important;
  padding:8px 4px 10px !important;
  min-height:76px !important;
}

.sidebar .tlUnifiedLogo{
  max-height:68px !important;
  max-width:190px !important;
}

/* صفحات الموزع تحديدًا: يكبر سنة ويثبت فوق الدايرة/كارت الحساب */
body .sidebar > .tlUnifiedLogoBrand:first-child,
body .sidebar > .brand.tlUnifiedLogoBrand:first-child{
  margin-top:6px !important;
  margin-bottom:20px !important;
}

/* اللوجين: يكبر ويبقى واضح في نص الكارت */
body:has(.authCard) .tlUnifiedLogoBrand,
body:has(.loginBox) .tlUnifiedLogoBrand,
.authCard .tlUnifiedLogoBrand,
.loginBox .tlUnifiedLogoBrand{
  min-height:86px !important;
  margin:2px auto 18px auto !important;
  padding:8px 0 !important;
}

body:has(.authCard) .tlUnifiedLogo,
body:has(.loginBox) .tlUnifiedLogo,
.authCard .tlUnifiedLogo,
.loginBox .tlUnifiedLogo{
  max-height:82px !important;
  max-width:230px !important;
}

/* fallback للوجين الحالي لو الكارت ملوش class واضح */
body .card .tlUnifiedLogoBrand:first-child,
body .panel .tlUnifiedLogoBrand:first-child{
  margin-bottom:16px !important;
}

body .card .tlUnifiedLogo,
body .panel .tlUnifiedLogo{
  max-height:78px !important;
  max-width:220px !important;
}

/* موبايل */
@media(max-width:700px){
  .sidebar .tlUnifiedLogo{
    max-height:56px !important;
    max-width:165px !important;
  }

  body:has(.authCard) .tlUnifiedLogo,
  body:has(.loginBox) .tlUnifiedLogo,
  .authCard .tlUnifiedLogo,
  .loginBox .tlUnifiedLogo{
    max-height:70px !important;
    max-width:200px !important;
  }
}

/* TopLink reseller/sidebar logo align final 2026-06-11 */

/* السايدبار: اللوجو في النص فوق كارت اليوزر مباشرة بدون ما ينزل الصفحة */
.sidebar .tlUnifiedLogoBrand,
.sidebar .brand.tlUnifiedLogoBrand{
  width:100% !important;
  display:flex !important;
  justify-content:center !important;
  align-items:center !important;
  min-height:58px !important;
  height:58px !important;
  margin:0 auto 8px auto !important;
  padding:4px 0 2px 0 !important;
}

/* حجم اللوجو في صفحات الموزع/الأونر */
.sidebar .tlUnifiedLogoBrand .tlUnifiedLogo,
.sidebar .brand.tlUnifiedLogoBrand .tlUnifiedLogo,
.sidebar .tlUnifiedLogo{
  max-height:56px !important;
  max-width:150px !important;
  margin:0 auto !important;
  object-fit:contain !important;
}

/* أول عنصر في السايدبار تحديدًا */
.sidebar > .tlUnifiedLogoBrand:first-child,
.sidebar > .brand.tlUnifiedLogoBrand:first-child{
  margin-top:0 !important;
  margin-bottom:8px !important;
}

/* كارت اليوزر يرجع يطلع قريب من اللوجو */
.sidebar .userCard,
.sidebar .profile,
.sidebar .account,
.sidebar .accountBox,
.sidebar .user-box,
.sidebar .meCard,
.sidebar .sideUser{
  margin-top:0 !important;
}

/* صفحات الموزع القديمة: تقليل أي gap عام داخل السايدبار */
.sidebar{
  gap:10px !important;
}

@media(max-width:700px){
  .sidebar .tlUnifiedLogoBrand,
  .sidebar .brand.tlUnifiedLogoBrand{
    min-height:52px !important;
    height:52px !important;
    margin-bottom:6px !important;
  }

  .sidebar .tlUnifiedLogo{
    max-height:50px !important;
    max-width:140px !important;
  }
}

/* TopLink dashboard/reseller/network table + status + logout final polish */

/* السايدبار ثابتة طول الشاشة واللوج آوت تحت */
.sidebar{
  position:sticky !important;
  top:0 !important;
  height:100vh !important;
  min-height:100vh !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:hidden !important;
}

.sidebar .logout,
.sidebar .footer,
.sidebar button[id="logoutBtn"],
.sidebar .btn[id="logoutBtn"]{
  margin-top:auto !important;
}

/* زر تسجيل الخروج يفضل تحت ومنسق */
.sidebar .logout .btn,
.sidebar .footer .btn,
.sidebar button[id="logoutBtn"],
.sidebar .btn[id="logoutBtn"]{
  width:100% !important;
  min-height:44px !important;
  border-radius:14px !important;
  background:rgba(255,255,255,.07) !important;
  border:1px solid rgba(110,168,255,.28) !important;
  color:#fff !important;
  font-weight:900 !important;
}

/* الجداول في الداشبورد/الشبكات/الموزع */
table,
.table,
.tableLike{
  border-color:rgba(25,230,255,.18) !important;
}

table th,
table td,
.table th,
.table td{
  background:rgba(13,31,66,.72) !important;
  border-color:rgba(122,251,255,.10) !important;
  color:#f3f8ff !important;
  box-shadow:none !important;
}

table tr:nth-child(even) td,
.table tr:nth-child(even) td{
  background:rgba(16,40,82,.60) !important;
}

table tr:hover td,
.table tr:hover td{
  background:rgba(25,120,255,.12) !important;
}

/* النص داخل الخانات يبقى طبيعي بدون مربعات داخلية زيادة */
table td b,
table td span,
table th b,
table th span,
.table td b,
.table td span,
.table th b,
.table th span{
  background:transparent !important;
  box-shadow:none !important;
}

/* Online / Offline badges */
.badge,
.status,
.online,
.offline,
.statusOnline,
.statusOffline,
.pill,
.chip{
  box-shadow:none !important;
}

.online,
.statusOnline,
.badge.online,
.pill.online,
.chip.online{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:78px !important;
  max-width:max-content !important;
  padding:7px 14px !important;
  border-radius:999px !important;
  background:linear-gradient(135deg, rgba(0,155,255,.34), rgba(25,230,255,.18)) !important;
  border:1px solid rgba(122,251,255,.42) !important;
  color:#eafcff !important;
  font-weight:900 !important;
}

.offline,
.statusOffline,
.badge.offline,
.pill.offline,
.chip.offline{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:78px !important;
  max-width:max-content !important;
  padding:7px 14px !important;
  border-radius:999px !important;
  background:linear-gradient(135deg, rgba(255,70,90,.28), rgba(255,120,120,.13)) !important;
  border:1px solid rgba(255,120,140,.42) !important;
  color:#fff1f3 !important;
  font-weight:900 !important;
}

/* لو الحالة معمولة بزرار/سبان جوا td */
td .online,
td .offline,
td .status,
td .badge,
td .pill,
td .chip{
  margin:auto !important;
}

/* الكروت الكبيرة فوق */
.stat,
.card,
.panel,
.topbar{
  border-color:rgba(25,230,255,.18) !important;
}

/* تحديد النص بالماوس مايبقاش أزرق فاقع مزعج */
::selection{
  background:rgba(25,230,255,.26) !important;
  color:#fff !important;
}

/* TopLink shared tables + logout final fix 2026-06-11 */

/* مهم: إلغاء sticky/height 100vh القديم عشان تسجيل الخروج ينزل مع طول الجدول */
body.tlSharedLayoutFix .app{
  align-items:stretch !important;
  min-height:100vh !important;
}

body.tlSharedLayoutFix .sidebar{
  position:relative !important;
  top:auto !important;
  height:auto !important;
  min-height:100vh !important;
  align-self:stretch !important;
  display:flex !important;
  flex-direction:column !important;
  overflow:visible !important;
}

/* تسجيل الخروج يبقى آخر السايدبار حسب طول الصفحة */
body.tlSharedLayoutFix .sidebar .logout,
body.tlSharedLayoutFix .sidebar .footer{
  margin-top:auto !important;
  padding-top:18px !important;
}

body.tlSharedLayoutFix .sidebar button[id="logoutBtn"],
body.tlSharedLayoutFix .sidebar .btn[id="logoutBtn"],
body.tlSharedLayoutFix .sidebar .logout .btn,
body.tlSharedLayoutFix .sidebar .footer .btn{
  width:100% !important;
  min-height:44px !important;
  border-radius:14px !important;
  background:rgba(255,255,255,.07) !important;
  border:1px solid rgba(122,251,255,.22) !important;
  color:#fff !important;
  font-weight:900 !important;
}

/* الجداول المشتركة */
body.tlSharedLayoutFix table{
  width:100% !important;
  border-collapse:separate !important;
  border-spacing:0 !important;
  table-layout:auto !important;
  background:transparent !important;
}

/* بعد حذف الأعمدة الفاضية */
body.tlSharedLayoutFix table.tlCleanedEmptyCols{
  width:100% !important;
}

/* لون خلايا الجداول */
body.tlSharedLayoutFix table th,
body.tlSharedLayoutFix table td{
  background:rgba(11,30,64,.74) !important;
  border-color:rgba(122,251,255,.10) !important;
  color:#f3f8ff !important;
  box-shadow:none !important;
  outline:none !important;
}

/* الصفوف المتبادلة */
body.tlSharedLayoutFix table tr:nth-child(even) td{
  background:rgba(16,42,86,.56) !important;
}

/* الهوفر */
body.tlSharedLayoutFix table tr:hover td{
  background:rgba(25,120,255,.11) !important;
}

/* منع المربعات الداخلية حوالين النصوص */
body.tlSharedLayoutFix table td > b,
body.tlSharedLayoutFix table td > span:not(.tlCleanOnline):not(.tlCleanOffline),
body.tlSharedLayoutFix table td > div:not(.tlCleanOnline):not(.tlCleanOffline),
body.tlSharedLayoutFix table th > b,
body.tlSharedLayoutFix table th > span,
body.tlSharedLayoutFix table th > div{
  background:transparent !important;
  box-shadow:none !important;
  outline:none !important;
  border:0 !important;
}

/* بادج Online */
body.tlSharedLayoutFix .tlCleanOnline{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:74px !important;
  max-width:max-content !important;
  padding:7px 13px !important;
  border-radius:999px !important;
  background:linear-gradient(135deg, rgba(0,128,255,.46), rgba(25,230,255,.20)) !important;
  border:1px solid rgba(122,251,255,.48) !important;
  color:#eefcff !important;
  font-weight:950 !important;
  box-shadow:0 0 14px rgba(25,230,255,.14) !important;
}

/* بادج Offline */
body.tlSharedLayoutFix .tlCleanOffline{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:74px !important;
  max-width:max-content !important;
  padding:7px 13px !important;
  border-radius:999px !important;
  background:linear-gradient(135deg, rgba(210,45,65,.46), rgba(255,110,110,.16)) !important;
  border:1px solid rgba(255,130,145,.50) !important;
  color:#fff3f4 !important;
  font-weight:950 !important;
  box-shadow:0 0 14px rgba(255,90,110,.10) !important;
}

body.tlSharedLayoutFix td .tlCleanOnline,
body.tlSharedLayoutFix td .tlCleanOffline{
  margin:auto !important;
}

/* لون حدود البانلز مع الستايل الجديد */
body.tlSharedLayoutFix .panel,
body.tlSharedLayoutFix .topbar,
body.tlSharedLayoutFix .stat,
body.tlSharedLayoutFix .card{
  border-color:rgba(25,230,255,.18) !important;
}

/* تحديد النص بالماوس */
body.tlSharedLayoutFix ::selection{
  background:rgba(25,230,255,.24) !important;
  color:#fff !important;
}

/* TopLink source-level final table/status colors 2026-06-11 */

/* الجداول/الصفوف المولدة في صفحات الداشبورد */
.dashboard-page .panel,
.dashboard-page .table,
.dashboard-page .tableRow,
.dashboard-page .row,
.dashboard-page .tr,
.dashboard-page [class*="table"],
.dashboard-page [class*="Table"]{
  border-color:rgba(25,230,255,.18) !important;
}

/* لون الخلايا والصفوف في الداشبوردات */
.dashboard-page .panel > div:not(.grid):not(.stats),
.dashboard-page .tableRow,
.dashboard-page .row,
.dashboard-page .tr,
.dashboard-page table th,
.dashboard-page table td{
  box-shadow:none !important;
}

/* منع أي خلفية داخلية على النصوص */
.dashboard-page .panel b,
.dashboard-page .panel span:not(.dot):not(.tlStatusPill):not(.tlStatusBlue):not(.tlStatusRed),
.dashboard-page table b,
.dashboard-page table span:not(.dot):not(.tlStatusPill):not(.tlStatusBlue):not(.tlStatusRed){
  background:transparent !important;
  box-shadow:none !important;
  outline:none !important;
  border:0 !important;
}

/* إلغاء ألوان pill القديمة في الداشبورد نهائيًا */
.dashboard-page .pill,
.dashboard-page .pill.ok,
.dashboard-page .pill.bad{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  color:inherit !important;
}

/* بادج الحالة الجديد من المصدر */
.dashboard-page .tlStatusPill,
.tlStatusPill{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;
  width:auto !important;
  min-width:76px !important;
  max-width:max-content !important;
  padding:7px 13px !important;
  border-radius:999px !important;
  font-weight:950 !important;
  line-height:1 !important;
  margin:auto !important;
  box-shadow:none !important;
}

.dashboard-page .tlStatusPill .dot,
.tlStatusPill .dot{
  width:8px !important;
  height:8px !important;
  border-radius:999px !important;
  background:currentColor !important;
  opacity:.85 !important;
  box-shadow:0 0 0 4px rgba(255,255,255,.08) !important;
}

.dashboard-page .tlStatusBlue,
.tlStatusBlue{
  background:linear-gradient(135deg, rgba(0,132,255,.48), rgba(25,230,255,.18)) !important;
  border:1px solid rgba(122,251,255,.52) !important;
  color:#effcff !important;
}

.dashboard-page .tlStatusRed,
.tlStatusRed{
  background:linear-gradient(135deg, rgba(210,45,65,.48), rgba(255,110,110,.16)) !important;
  border:1px solid rgba(255,130,145,.52) !important;
  color:#fff3f4 !important;
}

/* badges في صفحات إدارة الكافيهات/الموزع/الشبكات */
.badge.ok,
.badge.bad,
.statusLine .badge.ok,
.statusLine .badge.bad{
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:auto !important;
  min-width:76px !important;
  max-width:max-content !important;
  padding:7px 13px !important;
  border-radius:999px !important;
  font-weight:950 !important;
  box-shadow:none !important;
}

.badge.ok,
.statusLine .badge.ok{
  background:linear-gradient(135deg, rgba(0,132,255,.48), rgba(25,230,255,.18)) !important;
  border:1px solid rgba(122,251,255,.52) !important;
  color:#effcff !important;
}

.badge.bad,
.statusLine .badge.bad{
  background:linear-gradient(135deg, rgba(210,45,65,.48), rgba(255,110,110,.16)) !important;
  border:1px solid rgba(255,130,145,.52) !important;
  color:#fff3f4 !important;
}

/* لون جدول الداشبورد نفسه يبقى قريب من لون الصفحة */
.dashboard-page table,
.dashboard-page .panel table{
  background:rgba(7,18,42,.38) !important;
}

.dashboard-page table th,
.dashboard-page table td{
  background:rgba(10,29,63,.72) !important;
  border-color:rgba(122,251,255,.10) !important;
}

.dashboard-page table tr:nth-child(even) td{
  background:rgba(14,39,82,.58) !important;
}

/* إلغاء تأثير JS القديم لو اتحمل */
.tlCleanOnline,
.tlCleanOffline{
  box-shadow:none !important;
}

/* TopLink final unified surfaces 2026-06-11 */
.btn,
button:not(.toggle),
.nav a,
.nav button,
.chip,
.account-card,
.userCard,
.profile,
.account,
.accountBox,
.card,
.panel .btn,
.panel button:not(.toggle){
  border-color:rgba(122,251,255,.24) !important;
  box-shadow:none !important;
}

.btn,
button:not(.toggle),
.panel .btn,
.panel button:not(.toggle){
  background:linear-gradient(135deg, rgba(8,39,88,.82), rgba(7,28,68,.86)) !important;
  color:#f4fcff !important;
}

.btn:hover,
button:not(.toggle):hover,
.panel .btn:hover,
.panel button:not(.toggle):hover{
  background:linear-gradient(135deg, rgba(0,132,255,.40), rgba(25,230,255,.16)) !important;
  border-color:rgba(122,251,255,.48) !important;
}

.btn.primary,
button.primary,
.nav a.active{
  background:linear-gradient(135deg, rgba(0,116,255,.48), rgba(25,230,255,.18)) !important;
  border-color:rgba(122,251,255,.48) !important;
  color:#fff !important;
}

.chip,
.account-card,
.userCard,
.profile,
.account,
.accountBox{
  background:rgba(8,35,78,.70) !important;
  border:1px solid rgba(122,251,255,.22) !important;
  color:#f4fcff !important;
}
