@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@600;700;800&display=swap');

:root{
  --card:#ffffff;
  --ink:#333333;
  --muted:#777777;
  --blue:#2f6fa3;
  --blue-dark:#1f4f78;
  --border:#cfd6df;
  --shadow:0 8px 22px rgba(40,60,80,.10);
}

*{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
  direction:rtl;
  font-family:"IBM Plex Sans Arabic", Arial, sans-serif;
  color:var(--ink);
  min-height:100vh;
  background:linear-gradient(#f8f9fb,#eef1f5 260px,#e7ebf0 100%);
}

a{text-decoration:none;color:inherit}

.container{
  width:min(1120px,94%);
  margin:auto;
  padding:28px 0;
}

.hero{
  display:grid;
  grid-template-columns:1fr 220px;
  gap:22px;
  align-items:center;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:10px;
  padding:24px;
  box-shadow:var(--shadow);
  position:relative;
}

.hero:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:7px;
  background:linear-gradient(90deg,var(--blue-dark),var(--blue),#9fb6ca);
  border-radius:10px 10px 0 0;
}

.hero h1{
  font-family:"Cairo", Arial, sans-serif;
  font-size:36px;
  margin:0 0 8px;
  font-weight:800;
  color:var(--blue-dark);
  line-height:1.35;
}

.hero p{font-size:17px;color:var(--muted);margin:0 0 20px}

.profile{
  width:210px;height:210px;border-radius:8px;object-fit:contain;object-position:center;
  border:1px solid var(--border);padding:5px;background:#fff;
  box-shadow:0 8px 18px rgba(40,60,80,.12);justify-self:start;
}

.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:18px}
.stat{background:linear-gradient(#fff,#f4f6f8);border:1px solid var(--border);border-radius:8px;padding:14px}
.stat b{display:block;font-size:30px;color:var(--blue);line-height:1}
.stat span{color:#555;font-weight:700}

.quick-links{margin-top:14px;display:flex;gap:16px;flex-wrap:wrap}
.admin-link,.blog-link{display:inline-block;color:var(--blue);font-size:14px;font-weight:800}

.tabs{
  display:flex;gap:8px;flex-wrap:wrap;margin:22px 0 14px;
  background:#fff;border:1px solid var(--border);border-radius:8px;padding:8px;box-shadow:var(--shadow);
}

.tab{
  display:inline-block;border:1px solid var(--border);border-radius:6px;padding:11px 22px;
  background:linear-gradient(#fff,#eef2f6);color:var(--blue-dark);font-weight:800;
}

.tab.active,.tab:hover{background:linear-gradient(#337bad,#255f8d);color:#fff;border-color:#255f8d}

.list{display:grid;gap:12px}

.item{
  display:grid;grid-template-columns:64px 1fr auto;gap:14px;align-items:center;
  background:#fff;border:1px solid var(--border);border-right:5px solid var(--blue);
  border-radius:8px;padding:16px;box-shadow:0 6px 18px rgba(40,60,80,.08);
}

.num{
  width:48px;height:48px;border-radius:6px;background:linear-gradient(#f7f8fa,#dfe5ec);
  border:1px solid var(--border);color:var(--blue-dark);display:grid;place-items:center;font-size:20px;font-weight:800;
}

.item h3{
  font-family:"Cairo", Arial, sans-serif;
  margin:0 0 6px;
  font-size:20px;
  color:var(--blue-dark);
  font-weight:700;
}

.meta{color:var(--muted);font-size:14px;display:flex;gap:14px;flex-wrap:wrap}
.desc{margin:8px 0 0;color:#555;font-size:15px}

.btn{
  display:inline-block;border:1px solid #1f5f8a;border-radius:6px;background:linear-gradient(#3685ba,#286895);
  color:#fff;padding:9px 16px;font-weight:800;font-family:"IBM Plex Sans Arabic", Arial, sans-serif;cursor:pointer;white-space:nowrap;
}

.btn.gray{background:linear-gradient(#7b8c9a,#596b78);border-color:#596b78}
.btn.red{background:linear-gradient(#c95b50,#a74239);border-color:#a74239}

.form-card,.table-card,.article-card,.reader-header{
  background:#fff;border:1px solid var(--border);border-radius:8px;padding:20px;box-shadow:var(--shadow);margin-bottom:20px;
}

.grid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}

input,select,textarea{
  width:100%;padding:12px 13px;border:1px solid var(--border);border-radius:6px;
  font-family:"IBM Plex Sans Arabic", Arial, sans-serif;font-size:15px;background:#fff;color:var(--ink);
}

textarea{min-height:220px;resize:vertical;line-height:1.9}

.actions{display:flex;gap:8px;flex-wrap:wrap}

table{width:100%;border-collapse:collapse;background:#fff;border-radius:8px;overflow:hidden;border:1px solid var(--border)}
th,td{padding:11px;border-bottom:1px solid var(--border);text-align:right;font-size:14px}
th{background:linear-gradient(#f7f8fa,#e1e7ee);color:var(--blue-dark)}

.notice{background:#eef7ff;color:#1f4f78;border:1px solid #bdd5e8;padding:12px 16px;border-radius:8px;margin-bottom:16px;font-weight:700}

/* صفحة المقال */
.reader-header h1{
  font-family:"Cairo", Arial, sans-serif;
  font-family:"IBM Plex Sans Arabic", Arial, sans-serif;
  margin:0 0 8px;
  color:var(--blue-dark);
  font-size:38px;
  line-height:1.45;
  font-weight:800;
  letter-spacing:-.4px;
}

.reader-tools{
  position:sticky;top:0;z-index:20;display:flex;gap:8px;flex-wrap:wrap;
  background:#fff;border:1px solid var(--border);border-radius:8px;padding:10px;margin-bottom:14px;box-shadow:var(--shadow);
}

.article-content{
  font-family:"IBM Plex Sans Arabic", Arial, sans-serif;
  font-size:20px;
  line-height:1.85;
  color:#202020;
  font-weight:400;
  white-space:normal;
  text-align:justify;
  text-align-last:auto;
  text-justify:inter-word;
  word-spacing:1.5px;
  letter-spacing:0;
  overflow-wrap:break-word;
}

.article-content p{
  margin:0 0 .15em;
  text-align:justify;
  text-align-last:auto;
}

.nav-next-prev{display:flex;justify-content:space-between;gap:12px;margin-top:18px}

@media(max-width:760px){
  .container{width:94%;padding:18px 0}
  .hero{display:flex;flex-direction:column;text-align:center;gap:16px;padding:22px 16px}
  .hero h1{font-size:32px;line-height:1.35;margin-top:12px}
  .hero p{font-size:16px;margin-bottom:8px}
  .profile{order:2;width:min(250px,82vw);height:260px;justify-self:center}
  .stats{grid-template-columns:1fr;gap:10px;margin-top:14px}
  .quick-links{justify-content:center;gap:20px;margin-top:14px}
  .tabs{display:grid;grid-template-columns:1fr;gap:8px}
  .tab{text-align:center;padding:12px;font-size:17px}
  .item{grid-template-columns:1fr;text-align:center;border-right:1px solid var(--border);border-top:5px solid var(--blue);padding:15px}
  .num{margin:auto}
  .item h3{font-size:21px}
  .meta{justify-content:center;gap:8px;font-size:13px}
  .btn{width:100%;text-align:center;padding:10px 12px;font-size:16px}
  .grid{grid-template-columns:1fr}
  table{display:block;overflow-x:auto;white-space:nowrap}
  .reader-tools{position:static;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:10px}
  .reader-tools .btn{font-size:15px;padding:10px 8px}
  .reader-header h1{font-size:28px;text-align:right;line-height:1.55}
  .reader-header .meta{justify-content:flex-start;font-size:13px}
  .article-content{font-size:18px;line-height:1.8;text-align:justify;word-spacing:1px}
  .nav-next-prev{display:grid;grid-template-columns:1fr 1fr}
}

@media(max-width:420px){
  .hero h1{font-size:28px}
  .reader-header h1{font-size:25px}
  .article-content{font-size:17px;line-height:1.75}
  .reader-tools{grid-template-columns:1fr}
  .profile{height:240px}
}

@media print{
  body{background:#fff}
  .reader-tools,.nav-next-prev{display:none !important}
  .container{width:100%;padding:0}
  .reader-header,.article-card{box-shadow:none;border:0}
  .article-content{font-size:17px;line-height:1.75;text-align:justify}
}


/* أزرار صفحة المقال - مثبتة ومضمونة */
.reader-main-nav{
  justify-content:flex-start;
}

.reader-action-tools{
  display:flex;
  justify-content:flex-start;
  gap:8px;
  flex-wrap:wrap;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--border);
}

.reader-action-tools .btn,
.reader-tools .btn{
  width:auto;
}

@media(max-width:760px){
  .reader-action-tools{
    display:grid;
    grid-template-columns:1fr 1fr;
  }

  .reader-action-tools .btn,
  .reader-tools .btn{
    width:100%;
  }
}

@media(max-width:420px){
  .reader-action-tools{
    grid-template-columns:1fr;
  }
}

/* المقال الأحدث */
.latest-item{
    border-right:5px solid #2f6fa3 !important;
    animation: latestGlow 2s infinite;
}

@keyframes latestGlow{
    0%{
        box-shadow:0 0 0 rgba(47,111,163,0);
        background:#ffffff;
    }
    50%{
        box-shadow:0 0 20px rgba(47,111,163,.35);
        background:rgba(47,111,163,.06);
    }
    100%{
        box-shadow:0 0 0 rgba(47,111,163,0);
        background:#ffffff;
    }
}


/* صور المحاضرات ومشاركات الصحف */
.news-style-item{
  grid-template-columns:64px 176px 1fr auto;
  align-items:stretch;
}

.item-thumb{
  display:block;
  width:176px;
  height:116px;
  border-radius:8px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#f4f6f8;
  box-shadow:0 5px 14px rgba(40,60,80,.10);
}

.item-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .25s ease;
}

.item-thumb:hover img{
  transform:scale(1.04);
}

.reader-featured-image{
  margin:0 0 18px;
  border-radius:10px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#f4f6f8;
  box-shadow:0 8px 20px rgba(40,60,80,.10);
  max-height:420px;
}

.reader-featured-image img{
  width:100%;
  height:100%;
  max-height:420px;
  object-fit:cover;
  display:block;
}

.newspaper-card{
  border-top:4px solid var(--blue);
}

.current-image-preview{
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:10px;
  color:#555;
  font-size:14px;
  background:#f7f8fa;
  border:1px solid var(--border);
  border-radius:8px;
  padding:10px;
}

.current-image-preview img{
  width:120px;
  height:80px;
  object-fit:cover;
  border-radius:6px;
  border:1px solid var(--border);
}

@media(max-width:760px){
  .news-style-item{
    grid-template-columns:1fr;
  }

  .item-thumb{
    width:100%;
    height:210px;
  }

  .reader-featured-image,
  .reader-featured-image img{
    max-height:300px;
  }

  .current-image-preview{
    align-items:flex-start;
    flex-direction:column;
  }

  .current-image-preview img{
    width:100%;
    height:170px;
  }
}

@media print{
  .reader-featured-image{
    max-height:260px;
    box-shadow:none;
  }
}

/* إصلاح 20260619: زر القراءة لا يتمدد مع طول الوصف */
.item{
  align-items:center;
}
.news-style-item{
  align-items:center;
}
.item > .btn{
  align-self:center;
  justify-self:start;
  width:auto;
  height:auto;
  min-height:auto;
  line-height:1.4;
  padding:9px 16px;
}

/* تصغير صورة الخبر داخل صفحة القراءة فقط */
.reader-featured-image{
  width:min(430px, 100%);
  max-height:240px;
  margin:0 auto 18px;
  border-radius:10px;
}
.reader-featured-image img{
  width:100%;
  height:240px;
  max-height:240px;
  object-fit:contain;
  background:#fff;
}

@media(max-width:760px){
  .item > .btn{
    width:100%;
    justify-self:stretch;
  }
  .reader-featured-image{
    width:100%;
    max-height:220px;
  }
  .reader-featured-image img{
    height:220px;
    max-height:220px;
  }
}


/* Article 3.0 - Likes / Dislikes */
.read-side{
  display:flex;
  flex-direction:column;
  gap:8px;
  align-items:stretch;
  justify-self:start;
}
.vote-box{
  display:flex;
  gap:6px;
  justify-content:center;
  align-items:center;
  flex-wrap:nowrap;
}
.vote-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  min-width:58px;
  padding:7px 9px;
  border-radius:6px;
  border:1px solid var(--border);
  background:linear-gradient(#ffffff,#eef2f6);
  color:var(--blue-dark);
  font-weight:800;
  font-size:14px;
  line-height:1;
}
.vote-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 10px rgba(40,60,80,.12);
}
.vote-btn.like{border-color:#b7d8c4;color:#23643d;background:linear-gradient(#ffffff,#eef9f2)}
.vote-btn.dislike{border-color:#efc2bd;color:#984037;background:linear-gradient(#ffffff,#fff0ee)}
.reader-vote-box{
  justify-content:flex-start;
  margin-top:14px;
  padding-top:12px;
  border-top:1px solid var(--border);
}
.admin-version{
  margin:22px auto 0;
  text-align:center;
  color:#667788;
  font-weight:800;
  font-size:14px;
  padding:12px;
}

@media(max-width:760px){
  .read-side{width:100%;justify-self:stretch}
  .read-side .btn{width:100%}
  .vote-box{width:100%}
  .vote-btn{flex:1;padding:10px 8px}
  .reader-vote-box{justify-content:center}
}


/* Article 3.1 admin filter + login footer */
.table-header-with-filter{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:18px;
}
.table-header-with-filter h2{margin:0}
.admin-filter-tabs{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.admin-filter-tabs a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 15px;
  border-radius:14px;
  background:#eef3f7;
  border:1px solid #d4dee8;
  color:#1d4f7a;
  font-weight:800;
  transition:.2s ease;
}
.admin-filter-tabs a:hover,
.admin-filter-tabs a.active{
  background:#347aaa;
  color:#fff;
  transform:translateY(-1px);
}
.admin-filter-tabs span{
  min-width:24px;
  height:24px;
  padding:0 7px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  background:rgba(255,255,255,.75);
  color:#1d4f7a;
  font-size:13px;
}
.admin-filter-tabs a.active span,
.admin-filter-tabs a:hover span{
  background:#fff;
  color:#347aaa;
}
.admin-version{
  text-align:center;
  margin:24px auto 8px;
  color:#6c7a86;
  font-weight:800;
  letter-spacing:.3px;
}
.login-version{
  max-width:460px;
  margin-top:18px;
}
@media(max-width:760px){
  .table-header-with-filter{align-items:flex-start}
  .admin-filter-tabs a{width:100%;justify-content:space-between}
}





/* Article 3.1.1 final fix */
.admin-version{
  clear: both;
  width: 100%;
  display: block;
  text-align: center;
  margin: 25px auto;
  color:#6c7a86;
  font-weight:800;
  letter-spacing:.3px;
}

.login-version{
  display:block;
  width:100%;
  text-align:center;
  margin:22px auto 0 !important;
  color:#6c7a86;
  font-size:14px;
  font-weight:700;
}


/* Article 3.2 */
.vote-alert{
  width:100%;
  margin:14px 0;
  padding:12px 16px;
  border-radius:14px;
  background:#fff4d8;
  border:1px solid #ead39a;
  color:#6a4a00;
  font-weight:800;
  text-align:center;
}
.vote-alert.success{
  background:#eaf6ef;
  border-color:#cce8d7;
  color:#245243;
}
.vote-btn.disabled{
  opacity:.55;
  cursor:not-allowed;
  pointer-events:none;
  filter:grayscale(.15);
}
.vote-btn.selected{
  opacity:1;
  box-shadow:0 0 0 2px rgba(52,122,170,.25);
}
.admin-version{
  clear: both;
  width: 100%;
  display: block;
  text-align: center;
  margin: 25px auto;
  color:#6c7a86;
  font-weight:800;
  letter-spacing:.3px;
}
.login-version{
  display:block;
  width:100%;
  text-align:center;
  margin:22px auto 0 !important;
  color:#6c7a86;
  font-size:14px;
  font-weight:700;
}


/* Article 4.0 Beta 1 additions - built on 3.2 identity */
.stats{grid-template-columns:repeat(4,1fr)}
.stat{text-decoration:none}
.stat.active{border-color:#9cc1dc;background:#eef7ff}
.tabs a.tab{display:inline-block}
.news-card-with-image{
  grid-template-columns:70px 170px 1fr !important;
}
.news-thumb-wrap{display:block}
.news-thumb{
  width:170px;
  height:115px;
  object-fit:cover;
  object-position:center center;
  border-radius:18px;
  border:1px solid var(--border);
  box-shadow:0 8px 18px rgba(59,42,30,.10);
  background:#eef4f8;
  display:block;
}
.book-list-item.news-card-with-image{
  grid-template-columns:70px 140px 1fr !important;
}
.book-thumb{
  width:118px;
  height:170px;
  object-fit:cover;
  object-position:center center;
  border-radius:14px;
  border:1px solid var(--border);
  box-shadow:0 8px 18px rgba(59,42,30,.10);
  background:#eef4f8;
  display:block;
  margin:auto;
}
.item-actions-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:12px;
}
.book-inline-actions{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.btn.gold{background:var(--gold)}
.reader-container{
  width:min(1000px,92%);
  margin:auto;
  padding:34px 0;
}
.reader-card,.comments-card{
  background: #eef5fc;
  border:1px solid var(--border);
  border-radius:28px;
  padding:24px;
  box-shadow:var(--shadow);
  margin-bottom:20px;
}
.back-link{
  display:inline-block;
  margin-bottom:14px;
  color:var(--muted);
  font-weight:800;
}
.reader-type{
  display:inline-block;
  background:#f0dfc5;
  color:var(--brown);
  border-radius:999px;
  padding:7px 13px;
  font-weight:800;
  margin-bottom:10px;
}
.reader-card h1{
  margin:0 0 10px;
  font-size:36px;
  color:var(--brown);
  line-height:1.5;
}
.reader-meta{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:14px;
  font-weight:700;
}
.reader-image{
  display:block;
  width:min(560px,100%);
  max-height:330px;
  object-fit:cover;
  object-position:center center;
  margin:22px auto;
  border-radius:22px;
  border:1px solid var(--border);
  box-shadow:0 12px 28px rgba(59,42,30,.15);
  background:#eef4f8;
}
.reader-vote-box{justify-content:center;margin:16px 0}
.reader-content{
  background:#fff;
  border:1px solid var(--border);
  border-radius:22px;
  padding:22px;
  line-height:2.15;
  font-size:18px;
  color:#3d3328;
  margin-top:18px;
}
.reader-tools,.reader-nav,.book-buttons{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:18px;
}
.reader-tools a,.reader-tools button,.reader-nav a{
  border:1px solid var(--border);
  background:#fff;
  color:var(--brown);
  padding:10px 16px;
  border-radius:14px;
  font-weight:800;
  cursor:pointer;
}
.comment-item{
  padding:15px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  margin-bottom:12px;
}
.comment-item strong{display:block;color:var(--brown)}
.comment-item small{display:block;color:var(--muted);font-size:12px;margin:4px 0}
.comment-item p{margin:0;color:#4c4236;line-height:1.8}
.comment-form{
  display:grid;
  gap:10px;
  margin-top:18px;
}
.comment-form input,.comment-form textarea{
  width:100%;
  padding:13px 14px;
  border:1px solid var(--border);
  border-radius:15px;
  font-family:inherit;
  font-size:15px;
  background:#fff;
  color:var(--ink);
}
.comment-form textarea{min-height:110px;resize:vertical}
.book-detail-layout{
  display:grid;
  grid-template-columns:250px 1fr;
  gap:24px;
  align-items:start;
}
.book-cover-box img{
  width:220px;
  max-width:100%;
  border-radius:20px;
  border:1px solid var(--border);
  box-shadow:0 16px 34px rgba(59,42,30,.18);
}
.book-description{
  color:#5d5242;
  line-height:1.9;
  font-size:17px;
}
.disabled-download{
  background:#888 !important;
  cursor:not-allowed;
}
.dashboard-mini{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:12px;
  margin-bottom:20px;
}
.dashboard-mini div{
  background:#fff;
  border:1px solid var(--border);
  border-radius:20px;
  padding:14px;
  box-shadow:var(--shadow-soft);
}
.dashboard-mini b{display:block;font-size:26px;color:var(--gold)}
.dashboard-mini span{color:var(--muted);font-weight:800;font-size:13px}
.admin-comment{
  padding:15px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#fff;
  margin-bottom:12px;
}
.admin-comment strong{display:block;color:var(--brown)}
.admin-comment small{color:var(--muted)}
.admin-comment p{line-height:1.8;color:#4c4236}
.login-version{
  display:block;
  width:100%;
  text-align:center;
  margin:22px auto 0 !important;
  color:#6c7a86;
  font-size:14px;
  font-weight:700;
}
@media(max-width:760px){
  .stats{grid-template-columns:1fr}
  .news-card-with-image,
  .book-list-item.news-card-with-image,
  .book-detail-layout{
    grid-template-columns:1fr !important;
    text-align:center;
  }
  .news-thumb,.book-thumb{margin:auto}
  .item-actions-row{justify-content:center}
  .dashboard-mini{grid-template-columns:repeat(2,1fr)}
}


/* Article 4.0 Beta 1 Blue Fix
   تثبيت الأزرق داخل بطاقات المقالات والمحاضرات بدون تغيير التصميم */
:root{
  --main-blue:#347aaa;
}

/* أزرار قراءة المقال / عرض المحاضرة / قراءة الخبر */
.btn,
.read-pro,
button.btn{
  background:#347aaa !important;
  color:#fff !important;
}

/* أزرار ذهبية مثل شراء الكتاب تبقى ذهبية */
.btn.gold,
.buy-btn{
  background:#b88746 !important;
  color:#fff !important;
}

/* أرقام العناصر داخل البطاقات بدل البني */
.num{
  background:#e8f2fa !important;
  color:#347aaa !important;
}

/* التبويبات */
.tab.active,
.tab:hover,
.admin-filter-tabs a.active,
.admin-filter-tabs a:hover{
  background:#347aaa !important;
  color:#fff !important;
}

/* الإحصائيات */
.stat b{
  color:#347aaa !important;
}
.stat.active,
.stat:hover{
  border-color:#b8d5e9 !important;
  background:#eef7ff !important;
}

/* أزرار اللايك والدس لايك داخل المقالات والمحاضرات */
.vote-btn{
  background:#eef7ff !important;
  border-color:#c9dfef !important;
  color:#347aaa !important;
}
.vote-btn span{
  color:#347aaa !important;
}
.vote-btn.selected,
.vote-btn:hover{
  background:#dfeffc !important;
  border-color:#9cc1dc !important;
  box-shadow:0 0 0 2px rgba(52,122,170,.14) !important;
}

/* عنوان القسم الصغير / نوع المحتوى إن وجد */
.reader-type{
  background:#e8f2fa !important;
  color:#347aaa !important;
}

/* روابط الأدوات داخل صفحة القراءة */
.reader-tools a,
.reader-tools button,
.reader-nav a{
  color:#347aaa !important;
  border-color:#c9dfef !important;
}

/* رابط العودة */
.back-link{
  color:#347aaa !important;
}

/* لوحة التحكم: أزرار الفرز */
.admin-sidebar a.active,
.admin-sidebar a:hover{
  background:#347aaa !important;
  color:#fff !important;
}

/* لا تغيّر زر الحذف */
.btn.red,
.danger-btn{
  background:#b8493d !important;
  color:#fff !important;
}

/* زر رمادي يبقى رمادي */
.btn.gray{
  background:#6c7a86 !important;
  color:#fff !important;
}

/* blueforce-20260626 */


:root{
  --brown:#347aaa !important;
  --green:#347aaa !important;
  --gold:#347aaa !important;
}
.item h3,
.item h3 a,
.reader-card h1,
.form-card h1,
.form-card h2,
.table-card h2,
.hero h1{
  color:#347aaa !important;
}
.num{
  background:#e8f2fa !important;
  color:#347aaa !important;
}
.btn,
.read-pro,
button.btn,
a.btn{
  background:#347aaa !important;
  color:#fff !important;
}
.btn.gold,
.buy-btn{
  background:#b88746 !important;
  color:#fff !important;
}
.btn.red,
.danger-btn{
  background:#b8493d !important;
  color:#fff !important;
}
.btn.gray{
  background:#6c7a86 !important;
  color:#fff !important;
}
.tab.active,
.tab:hover,
.admin-filter-tabs a.active,
.admin-filter-tabs a:hover{
  background:#347aaa !important;
  color:#fff !important;
}
.stat b{
  color:#347aaa !important;
}
.stat.active,
.stat:hover{
  border-color:#b8d5e9 !important;
  background:#eef7ff !important;
}
.vote-btn{
  background:#eef7ff !important;
  border-color:#c9dfef !important;
  color:#347aaa !important;
}
.vote-btn span{
  color:#347aaa !important;
}
.vote-btn.selected,
.vote-btn:hover{
  background:#dfeffc !important;
  border-color:#9cc1dc !important;
}
.reader-type,
.version-badge{
  background:#e8f2fa !important;
  color:#347aaa !important;
}
.back-link,
.reader-tools a,
.reader-tools button,
.reader-nav a{
  color:#347aaa !important;
  border-color:#c9dfef !important;
}



/* Article 4.0 color override */
.reader-card,
.comments-card,
.book-detail,
.book-detail-card{
 background:#eef5fc !important;
 border-color:#c9dced !important;
}


/* Article 4.0.1 - Comments + print button + hover fix */
.reader-tools{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.reader-tools .tool-btn,
.reader-tools a.tool-btn,
.reader-tools button.tool-btn{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 16px !important;
  border-radius:8px !important;
  border:1px solid #1f5f8a !important;
  background:linear-gradient(#3685ba,#286895) !important;
  color:#fff !important;
  font-weight:800 !important;
  font-family:"IBM Plex Sans Arabic", Arial, sans-serif !important;
  cursor:pointer;
  line-height:1.3;
  width:auto !important;
  text-align:center;
}

.btn,
.tab,
.vote-btn,
.reader-tools .tool-btn,
.admin-filter-tabs a,
.item > .btn,
.book-inline-actions .btn{
  transition:all .22s ease !important;
}

.btn:hover,
.tab:hover,
.vote-btn:hover,
.reader-tools .tool-btn:hover,
.admin-filter-tabs a:hover,
.item > .btn:hover,
.book-inline-actions .btn:hover{
  transform:translateY(-2px) !important;
  filter:brightness(1.05) !important;
  box-shadow:0 8px 18px rgba(47,111,163,.22) !important;
}

.comments-card{
  display:block !important;
  visibility:visible !important;
}

.comment-item{
  display:block !important;
}



/* ===== Article 4.0 Text Justify (safe) ===== */
.article-content,
.reader-content,
.book-description{
    text-align: justify !important;
    text-align-last: right !important;
    direction: rtl;
    line-height: 2.05;
    word-spacing: 1.2px;
    overflow-wrap: break-word;
}
.article-content p,
.reader-content p,
.book-description p{
    margin:0 0 .6em;
    text-align: justify !important;
    text-align-last: right !important;
}
@media (max-width:760px){
  .article-content,
  .reader-content,
  .book-description{
      line-height:1.95;
      word-spacing:.8px;
  }
}
/* ===== End Text Justify ===== */
