/* ============================================================
   The Science Lab - التنسيق العام للموقع
   الخطوط: Cairo للعربية + Inter للاتينية + JetBrains Mono للتقني
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg2: #f8f9fa;
  --bg3: #f0f2f5;
  --surface: #ffffff;
  --surface2: #f8f9fa;
  --border: #e5e7eb;
  --border2: #d1d5db;
  --red: #cc1212;
  --red2: #a80e0e;
  --red3: #e53535;
  --red-light: rgba(204, 18, 18, 0.07);
  --red-light2: rgba(204, 18, 18, 0.14);
  --gold: #d97706;
  --green: #059669;
  --blue: #2563eb;
  --purple: #7c3aed;
  --pink: #db2777;
  --text: #111827;
  --text2: #4b5563;
  --text3: #9ca3af;
  --sidebar-w: 280px;
  --radius: 14px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 2px 10px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.10);
  --transition: .25s cubic-bezier(.4,0,.2,1);
  --font: 'Cairo', 'Inter', 'Segoe UI', Tahoma, sans-serif;
  --font-latin: 'Inter', 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Space Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.7;
  font-size: 1rem;
}

/* أرقام وإنجليزية: خط لاتيني أنيق */
.en, .latin, code, .mono {
  font-family: var(--font-latin);
}
.mono, code {
  font-family: var(--font-mono);
  direction: ltr;
  unicode-bidi: isolate;
}

h1,h2,h3,h4,h5 { line-height: 1.4; font-weight: 800; }
p { color: var(--text2); }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red2); }
img { max-width: 100%; display: block; }

::selection { background: var(--red-light2); color: var(--red); }

/* ============ شاشة التحميل ============ */
#page-splash {
  position: fixed; inset: 0; background: #fff; z-index: 999999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  transition: opacity .5s ease, visibility .5s ease;
}
#page-splash.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo { width: 100px; height: 100px; margin-bottom: 20px; animation: pop .6s cubic-bezier(.34,1.56,.64,1) both; }
.splash-name { font-family: var(--font); font-size: 1.5rem; font-weight: 900; color: #111827; letter-spacing: .5px; animation: splashFadeUp .5s .15s ease both; }
.splash-accent { font-family: var(--font-mono); font-size: .72rem; color: #CC1212; letter-spacing: 2px; margin-top: 10px; text-transform: lowercase; animation: splashFadeUp .5s .25s ease both; }
.splash-bar-track { width: 220px; height: 3px; background: var(--red-light); border-radius: 3px; margin-top: 24px; overflow: hidden; }
.splash-bar-fill { height: 100%; width: 100%; background: linear-gradient(90deg, var(--red2), var(--red), var(--red3)); transform: translateX(100%); animation: load 1.4s .2s cubic-bezier(.1,.6,.4,1) forwards; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes splashFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes load { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ============ الهيكل ============ */
.app-shell { display: flex; min-height: 100vh; }
.main { flex: 1; padding: 28px 32px 60px; margin-right: var(--sidebar-w); max-width: 1280px; }

/* ============ الشريط الجانبي ============ */
.sidebar {
  width: var(--sidebar-w); height: 100vh; max-height: 100vh; background: var(--surface);
  border-left: 1px solid var(--border); position: fixed; top: 0; right: 0; z-index: 100;
  display: flex; flex-direction: column; transition: transform var(--transition);
  overflow-y: auto; overflow-x: hidden; box-shadow: -2px 0 16px rgba(0,0,0,.04);
}
.sidebar-logo { padding: 24px 20px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--border); }
.logo-icon { width: 48px; height: 48px; flex-shrink: 0; }
.logo-text { display: flex; flex-direction: column; }
.logo-name { font-size: 1.05rem; font-weight: 800; color: var(--text); letter-spacing: .3px; line-height: 1; }
.logo-tagline { font-size: .64rem; color: var(--red); font-family: var(--font-mono); margin-top: 4px; letter-spacing: .8px; }
.nav-section-label { font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--text3); padding: 18px 20px 7px; font-family: var(--font-mono); }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 18px 10px 20px; margin: 2px 10px;
  border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition);
  color: var(--text2); font-size: .92rem; font-weight: 500; position: relative; border: 1px solid transparent;
}
.nav-item:hover { background: var(--red-light); color: var(--red); border-color: var(--red-light2); }
.nav-item.active { background: var(--red-light); color: var(--red); border-color: rgba(204,18,18,.18); font-weight: 700; }
.nav-item .icon { width: 20px; height: 20px; flex-shrink: 0; opacity: .55; }
.nav-item.active .icon, .nav-item:hover .icon { opacity: 1; }
.nav-item .icon path { stroke: currentColor; }
.nav-badge { margin-right: auto; background: var(--red); color: #fff; font-size: .62rem; font-weight: 800; padding: 2px 7px; border-radius: 20px; font-family: var(--font-mono); }
.sidebar-foot { margin-top: auto; padding: 14px 10px 20px; border-top: 1px solid var(--border); }
.mini-avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; object-fit: cover; }
.mini-avatar-txt { background: var(--red-light); color: var(--red); font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: .8rem; }
.sidebar-overlay { display: none; }

/* شريط الجوال */
.mobile-bar {
  display: none; align-items: center; gap: 12px; padding: 12px 16px; background: #fff;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 90;
}
.mobile-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--text); }
.logo-icon-sm { width: 30px; height: 30px; }
.icon-btn { background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--text); line-height: 1; }

/* ============ المكونات العامة ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--red); color: #fff; border: none; border-radius: 10px; padding: 10px 20px;
  font-family: inherit; font-size: .92rem; font-weight: 700; cursor: pointer; transition: all var(--transition);
}
.btn:hover { background: var(--red2); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--red); border: 1.5px solid var(--red); }
.btn-outline:hover { background: var(--red); color: #fff; }
.btn-dark { background: var(--text); }
.btn-dark:hover { background: #000; }
.btn-blue { background: var(--blue); }
.btn-blue:hover { background: #1d4ed8; }
.btn-green { background: var(--green); }
.btn-green:hover { background: #047857; }
.btn-sm { padding: 6px 14px; font-size: .82rem; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border2); }
.btn-ghost:hover { background: var(--bg2); color: var(--text); }

.badge { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: .72rem; font-weight: 700; }
.badge-ok { background: #ecfdf5; color: var(--green); }
.badge-no { background: #fef2f2; color: #b91c1c; }
.badge-wait { background: #fffbeb; color: var(--gold); }
.badge-info { background: #eff6ff; color: var(--blue); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: all var(--transition);
}
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border2); }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 20px; flex-wrap: wrap; }
.section-head h2 { font-size: 1.45rem; display: flex; align-items: center; gap: 10px; }
.section-head h2 .icon { width: 26px; height: 26px; }
.section-head .icon path { stroke: currentColor; }
.section-head a.more { font-size: .85rem; font-weight: 700; }

/* ============ الأيقونات ============ */
.icon { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.icon-img { object-fit: contain; }

/* ============ Hero ============ */
.hero {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, #1f1b1b 0%, #3a1212 55%, var(--red2) 100%);
  color: #fff; padding: 54px 48px; margin-bottom: 30px;
  box-shadow: var(--shadow-lg);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 15%, rgba(204,18,18,.55), transparent 45%),
              radial-gradient(circle at 10% 90%, rgba(217,119,6,.35), transparent 40%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 640px; }
.hero h1 { font-size: 2.3rem; font-weight: 900; margin-bottom: 12px; }
.hero h1 .en { color: var(--red3); }
.hero p { color: rgba(255,255,255,.85); font-size: 1.05rem; margin-bottom: 24px; max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn { background: #fff; color: var(--red2); }
.hero .btn:hover { background: #f3f4f6; color: var(--red2); }
.hero .btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ============ الإحصائيات ============ */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 34px; }
.stat-card { text-align: center; padding: 22px 14px; }
.stat-card .stat-value { font-size: 2rem; font-weight: 900; font-family: var(--font-latin); direction: ltr; }
.stat-card .stat-label { color: var(--text2); font-size: .85rem; margin-top: 4px; }

/* ============ الشبكات ============ */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* بطاقات الأقسام */
.section-card { padding: 26px 20px; text-align: center; cursor: pointer; }
.section-card .section-ico {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center; background: var(--bg3);
}
.section-card .section-ico .icon { width: 32px; height: 32px; }
.section-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.section-card p { font-size: .82rem; color: var(--text3); }
.section-card .sec-en { font-family: var(--font-latin); font-size: .68rem; color: var(--text3); direction: ltr; display: block; margin-bottom: 8px; }

/* بطاقات المحتوى */
.item-card { overflow: hidden; display: flex; flex-direction: column; }
.item-card .item-cover { position: relative; height: 180px; overflow: hidden; }
.item-card .item-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.item-card:hover .item-cover img { transform: scale(1.06); }
.item-card .item-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.item-card .item-title { font-weight: 800; font-size: 1rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3em; }
.item-card .item-summary { color: var(--text2); font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.item-card .item-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; color: var(--text3); font-size: .78rem; }
.cover-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.cover-ph .icon { width: 46px; height: 46px; }
.item-tag { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; backdrop-filter: blur(4px); }
.item-type-tag { position: absolute; bottom: 10px; right: 10px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.item-views { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-latin); direction: ltr; }
.item-views .icon { width: 14px; height: 14px; }

/* بطاقات الكتب */
.book-card { overflow: hidden; }
.book-card .book-top { display: flex; gap: 14px; padding: 16px; align-items: center; }
.book-cover { width: 74px; height: 100px; border-radius: 8px; object-fit: cover; box-shadow: var(--shadow-md); flex-shrink: 0; background: var(--bg3); }
.book-cover-placeholder {
  width: 74px; height: 100px; border-radius: 8px; background: linear-gradient(160deg, var(--red2), var(--red));
  display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: var(--shadow-md); flex-shrink: 0;
}
.book-cover-placeholder .icon { width: 30px; height: 30px; }
.book-info { flex: 1; min-width: 0; }
.book-info h3 { font-size: .95rem; margin-bottom: 4px; line-height: 1.5; }
.book-info .book-author { font-size: .78rem; color: var(--text3); }
.book-info .book-meta { font-size: .75rem; color: var(--text3); margin-top: 4px; font-family: var(--font-latin); direction: ltr; text-align: left; }
.book-actions { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.book-actions .btn { flex: 1; }

/* ============ صفحة التفاصيل ============ */
.article { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px 44px; box-shadow: var(--shadow); }
.article-header { margin-bottom: 26px; }
.article-header h1 { font-size: 1.9rem; font-weight: 900; margin: 14px 0 10px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 16px; color: var(--text3); font-size: .85rem; align-items: center; }
.article-meta .author-chip { display: flex; align-items: center; gap: 8px; }
.article-meta img.author-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.article-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: 26px; max-height: 460px; }
.article-cover img { width: 100%; object-fit: cover; }
.article-content { font-size: 1.03rem; line-height: 2; color: var(--text); }
.article-content p { margin-bottom: 18px; color: var(--text2); font-size: 1.02rem; }
.article-content h2, .article-content h3, .article-content h4 { margin: 26px 0 12px; }
.article-content blockquote { border-right: 4px solid var(--red); background: var(--red-light); padding: 14px 18px; border-radius: 10px; margin: 18px 0; color: var(--text2); }
.article-content ul, .article-content ol { margin: 0 22px 18px; }
.article-content li { margin-bottom: 6px; color: var(--text2); }
.article-content img { border-radius: 10px; margin: 10px 0; }
.article-content a { color: var(--red); text-decoration: underline; }
.article-content table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.article-content th, .article-content td { border: 1px solid var(--border); padding: 8px 12px; text-align: right; }
.article-content th { background: var(--bg2); }

.article-tools { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--border); }

/* التعليقات */
.comments { margin-top: 26px; }
.comment { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; background: #fff; }
.comment-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comment-head .c-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--red-light); color: var(--red); display: flex; align-items: center; justify-content: center; font-weight: 800; }
.comment-head .c-name { font-weight: 700; font-size: .9rem; }
.comment-head .c-time { color: var(--text3); font-size: .75rem; margin-right: auto; }
.comment-body p { font-size: .92rem; }

/* ============ النماذج ============ */
.auth-wrap { max-width: 460px; margin: 40px auto; }
.auth-card { padding: 36px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 6px; text-align: center; }
.auth-sub { text-align: center; color: var(--text3); font-size: .88rem; margin-bottom: 26px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-weight: 700; font-size: .85rem; margin-bottom: 6px; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border2); border-radius: 10px;
  font-family: inherit; font-size: .95rem; background: #fff; color: var(--text); transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-light);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-hint { font-size: .78rem; color: var(--text3); margin-top: 4px; }
.form-error { color: #b91c1c; font-size: .82rem; margin-top: 4px; }
.field-error { border-color: #f87171 !important; }

.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-size: .9rem; font-weight: 600; }
.alert-success { background: #ecfdf5; color: var(--green); border: 1px solid #a7f3d0; }
.alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: var(--blue); border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: var(--gold); border: 1px solid #fde68a; }

/* زر جوجل */
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 11px; border: 1.5px solid var(--border2); border-radius: 10px; background: #fff;
  font-family: inherit; font-size: .95rem; font-weight: 700; color: var(--text); cursor: pointer; transition: all var(--transition);
}
.google-btn:hover { background: var(--bg2); border-color: var(--text3); }
.google-btn svg { width: 20px; height: 20px; }
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text3); font-size: .8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ============ جداول البيانات ============ */
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { padding: 12px 16px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { background: var(--bg2); font-weight: 700; color: var(--text2); font-size: .8rem; }
table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--bg2); }
table.data td.actions { display: flex; gap: 6px; }
table.data .table-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
table.data .table-avatar-txt { width: 34px; height: 34px; border-radius: 50%; background: var(--red-light); color: var(--red); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }

/* ============ ترقيم الصفحات ============ */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: .85rem; color: var(--text2); background: #fff; }
.pagination a:hover { border-color: var(--red); color: var(--red); }
.pagination a.active { background: var(--red); color: #fff; border-color: var(--red); font-weight: 700; }
.pagination .dots { border: none; background: none; }

/* ============ البحث ============ */
.search-hero { margin-bottom: 26px; }
.search-box { display: flex; gap: 10px; background: #fff; border: 1.5px solid var(--border2); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.search-box input { flex: 1; border: none; outline: none; font-family: inherit; font-size: 1rem; padding: 10px 14px; background: transparent; }
.search-box button { border: none; background: var(--red); color: #fff; border-radius: 10px; padding: 0 26px; font-family: inherit; font-weight: 700; cursor: pointer; font-size: 1rem; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.filter-chip { padding: 6px 16px; border: 1px solid var(--border2); border-radius: 30px; font-size: .82rem; color: var(--text2); background: #fff; }
.filter-chip.active, .filter-chip:hover { background: var(--red); color: #fff; border-color: var(--red); }

/* ============ الفوتر ============ */
.site-footer { background: #16161a; color: #c9c9d1; margin-right: var(--sidebar-w); padding: 44px 40px 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 30px; max-width: 1280px; margin: 0 auto; }
.footer-col h4 { color: #fff; margin-bottom: 14px; font-size: .95rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #c9c9d1; font-size: .88rem; }
.footer-col a:hover { color: var(--red3); }
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-name { color: #fff; font-weight: 800; font-size: 1.1rem; }
.footer-muted { color: #8a8a95; font-size: .82rem; margin-top: 8px; }
.newsletter-row { display: flex; gap: 8px; }
.newsletter-row input { flex: 1; padding: 10px 14px; border-radius: 10px; border: 1px solid #2d2d33; background: #202027; color: #fff; font-family: inherit; font-size: .88rem; }
.newsletter-row input::placeholder { color: #8a8a95; }
.newsletter-row .btn { background: var(--red); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; border-top: 1px solid #2d2d33; margin-top: 34px; padding-top: 18px; max-width: 1280px; margin-left: auto; margin-right: auto; font-size: .82rem; color: #8a8a95; }

/* ============ التنبيهات (توست) ============ */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; box-shadow: var(--shadow-lg); padding: 13px 16px; min-width: 260px; border-right: 4px solid var(--text3); animation: fadeUp .3s ease; }
.toast-success { border-right-color: var(--green); }
.toast-error { border-right-color: var(--red); }
.toast-info { border-right-color: var(--blue); }
.toast span { font-size: .9rem; font-weight: 600; color: var(--text); }
.toast-close { margin-right: auto; background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--text3); line-height: 1; }

/* ============ صفحة فارغة / حالة ============ */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text3); margin-bottom: 18px; }

/* ============ استجابة ============ */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-overlay.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 99; }
  .mobile-bar { display: flex; }
  .main { margin-right: 0; padding: 20px 18px 50px; }
  .site-footer { margin-right: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .article { padding: 24px 20px; }
  .hero { padding: 34px 24px; }
  .hero h1 { font-size: 1.7rem; }
}
@media (max-width: 520px) {
  .grid-4 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============ تحسينات القراءة ============ */
.detail-page { max-width: 860px; margin: 0 auto; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 200px; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 34px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text3); }
.text-red { color: var(--red); }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* إعلان / شريط معلومات */
.info-bar { display: flex; gap: 10px; align-items: center; background: var(--red-light); border: 1px solid var(--red-light2); color: var(--red2); border-radius: 10px; padding: 12px 16px; font-size: .88rem; margin-bottom: 20px; }

/* شريط كتابة تعليق */
.comment-form textarea { min-height: 90px; }
