@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&display=swap');
:root{--primary:#2563eb;--dark:#0f172a;--soft:#f8fafc;--line:#e5e7eb}*{font-family:Tajawal,system-ui;box-sizing:border-box}body{background:linear-gradient(180deg,#f8fafc,#eef4ff);color:#111827}.fw-black{font-weight:900}.topbar{position:sticky;top:0;z-index:99;background:rgba(255,255,255,.9);backdrop-filter:blur(16px);box-shadow:0 8px 30px #0f172a12}.nav-wrap{display:flex;align-items:center;justify-content:space-between;gap:14px}.brand{font-weight:900;font-size:24px;color:#111827;text-decoration:none;display:flex;gap:10px;align-items:center}.brand-icon,.section-icon{width:52px;height:52px;border-radius:18px;display:grid;place-items:center;background:linear-gradient(135deg,#3b82f6,#4f46e5);color:white;font-size:23px}.nav-links{gap:8px;align-items:center}.nav-links a,.mobile-links a{color:#1f2937;text-decoration:none;font-weight:800;padding:10px 16px;border-radius:999px}.nav-links a:hover,.nav-links .telegram{background:#eff6ff;color:#2563eb}.nav-toggle{border:0;background:#eff6ff;width:46px;height:46px;border-radius:16px;font-size:25px}.mobile-links{display:grid;gap:8px}.hero{background:radial-gradient(circle at top right,#dbeafe,transparent 36%),linear-gradient(135deg,#fff,#f8fbff);border:1px solid #e7efff;border-radius:34px;padding:42px;box-shadow:0 18px 60px #0f172a12}.pill,.mini-label{display:inline-flex;background:#eef2ff;color:#4338ca;border-radius:999px;padding:7px 13px;font-weight:800;font-size:13px}.search-box{display:flex;background:white;border:1px solid #e5e7eb;border-radius:22px;overflow:hidden;box-shadow:0 12px 30px #0f172a10}.search-box input{flex:1;border:0;outline:0;padding:16px 18px;background:transparent}.search-box button{border:0;background:var(--primary);color:white;width:64px;font-size:20px}.slide-media{height:330px;object-fit:cover;border-radius:28px;box-shadow:0 14px 34px #0f172a20}.empty-ad{padding:60px 20px;background:white;border-radius:28px;text-align:center;font-weight:900}.section-card{background:#fff;border:1px solid var(--line);border-radius:28px;padding:28px;box-shadow:0 14px 36px #0f172a14;height:100%}.section-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:25px;gap:15px}.section-title{font-size:28px;font-weight:900;color:#111827}.list-tile{display:flex;align-items:center;gap:14px;background:#f8fafc;border:1px solid #edf2f7;border-radius:20px;padding:16px 18px;margin-bottom:14px;color:#1f2937;text-decoration:none;font-weight:800;transition:.2s}.list-tile:hover{transform:translateY(-2px);box-shadow:0 12px 25px #0f172a12;background:white}.arrow{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;background:#eef2f7;color:#8aa0ba}.small-icon{margin-inline-start:auto;width:45px;height:45px;border-radius:14px;display:grid;place-items:center;background:#fff;box-shadow:0 4px 12px #0001;color:#8aa0ba}.book{border:0;border-radius:24px;overflow:hidden;box-shadow:0 12px 34px #0f172a12;transition:.25s}.book:hover{transform:translateY(-4px)}.book img{width:100%;height:230px;object-fit:cover;background:#f1f5f9}.book h4{font-weight:900}.badge-soft{background:#eff6ff;color:#2563eb}.footer{background:#0f172a;color:#cbd5e1}.footer a{color:#fff;text-decoration:none;display:block;margin:8px 0}.social{width:42px;height:42px;border-radius:14px;background:#1e293b;display:grid!important;place-items:center}.admin-layout{background:#f1f5f9;min-height:100vh}.admin-card{background:#fff;border-radius:22px;box-shadow:0 10px 30px #0f172a10;border:1px solid #e5e7eb;overflow:hidden}.sidebar{background:#111827;min-height:100vh;position:sticky;top:0}.sidebar a{color:#d1d5db;text-decoration:none;display:block;padding:12px 15px;border-radius:14px;margin-bottom:5px;font-weight:800}.sidebar a:hover,.sidebar .active{background:#2563eb;color:white}.admin-top{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px;gap:15px}.stat span{color:#64748b;font-weight:800}.stat b{display:block;font-size:38px;font-weight:900}.icon-picker{display:grid;grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:8px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:18px;padding:12px}.icon-choice{height:48px;border:1px solid #e5e7eb;background:white;border-radius:14px;font-size:22px}.icon-choice.active{background:#2563eb;color:#fff;border-color:#2563eb;box-shadow:0 8px 20px #2563eb40}.table{vertical-align:middle}.form-control,.form-select{border-radius:14px;padding:12px;border-color:#dbe3ef}.btn{font-weight:800}
@media(max-width:991px){.sidebar{position:relative;min-height:auto;border-radius:0 0 24px 24px}.sidebar a{display:inline-block}.admin-top{align-items:flex-start}.hero{padding:26px;border-radius:24px}.slide-media{height:240px}.section-card{padding:20px;border-radius:22px}.brand{font-size:19px}.brand-icon{width:44px;height:44px}.section-title{font-size:23px}.book img{height:190px}.nav-wrap{padding-inline:12px}.display-5{font-size:30px}.search-box{border-radius:18px}.footer{text-align:center}.footer .d-flex{justify-content:center!important}}
@media(max-width:575px){.container{padding-inline:14px}.hero{padding:20px}.section-head{align-items:flex-start}.list-tile{padding:13px;border-radius:17px}.small-icon,.arrow{width:36px;height:36px}.slide-media{height:185px}.book img{height:165px}.admin-card{border-radius:16px}.table{font-size:13px}.table .btn{padding:5px 8px}}


/* ===== Premium final polish ===== */
:root{
  --primary:#2563eb; --primary2:#7c3aed; --ink:#0f172a; --muted:#64748b;
  --card:#ffffff; --glass:rgba(255,255,255,.78); --line:#e8eef8;
  --shadow:0 22px 55px rgba(15,23,42,.12);
}
body{background:
  radial-gradient(circle at 85% 5%,rgba(37,99,235,.14),transparent 28%),
  radial-gradient(circle at 10% 20%,rgba(124,58,237,.10),transparent 22%),
  linear-gradient(180deg,#f8fbff 0%,#eef4ff 100%);
  min-height:100vh;
}
.topbar{border-bottom:1px solid rgba(226,232,240,.9)}
.nav-wrap{min-height:76px;padding-top:10px!important;padding-bottom:10px!important}
.brand-icon,.section-icon,.small-icon,.arrow,.social,.notfound-illustration,.icon-choice,.icon-live-preview i{
  display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;line-height:1!important;
}
.brand-icon i,.section-icon i,.small-icon i,.arrow i,.social i,.notfound-illustration i,.icon-choice i{line-height:1!important;display:block!important}
.brand-icon{box-shadow:0 14px 26px rgba(37,99,235,.28)}
.brand-icon.sm{width:42px;height:42px;border-radius:15px;font-size:19px}
.nav-links{background:rgba(255,255,255,.72);border:1px solid var(--line);padding:7px;border-radius:999px;box-shadow:0 8px 28px rgba(15,23,42,.06)}
.nav-links a{display:flex;align-items:center;gap:7px}
.nav-links a.active{background:#2563eb;color:#fff!important;box-shadow:0 10px 22px rgba(37,99,235,.25)}
.premium-mobile-menu .offcanvas-header{background:linear-gradient(135deg,#eff6ff,#ffffff);border-bottom:1px solid var(--line)}
.mobile-links a{display:flex;align-items:center;gap:12px;border:1px solid var(--line);background:#fff;padding:14px 16px;box-shadow:0 8px 22px rgba(15,23,42,.06)}
.mobile-links a.active{background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff}
.hero{position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.82);box-shadow:var(--shadow)}
.hero:before{content:"";position:absolute;inset:auto -80px -120px auto;width:300px;height:300px;border-radius:50%;background:rgba(37,99,235,.10);filter:blur(8px)}
.search-box{min-height:58px;align-items:center}
.search-box button{align-self:stretch;display:flex;align-items:center;justify-content:center}
.section-card{position:relative;overflow:hidden;border:1px solid rgba(226,232,240,.95);box-shadow:var(--shadow);background:linear-gradient(180deg,#fff,#fbfdff)}
.section-card:after{content:"";position:absolute;inset:0 0 auto;height:4px;background:linear-gradient(90deg,#2563eb,#7c3aed,#06b6d4)}
.section-head{position:relative;z-index:1}
.section-icon{min-width:58px;width:58px;height:58px;border-radius:22px;font-size:25px;box-shadow:0 16px 28px rgba(37,99,235,.22)}
.list-tile{position:relative;overflow:hidden;background:linear-gradient(135deg,#f8fafc,#fff)}
.list-tile span:nth-child(2){flex:1}
.list-tile:hover .small-icon{background:#eff6ff;color:#2563eb}
.book{background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
.book img{border-bottom:1px solid var(--line)}
.book .card-body{padding:22px}
.footer{background:linear-gradient(135deg,#0f172a,#111827 55%,#172554);border-top:1px solid rgba(255,255,255,.06)}
.notfound-card{max-width:820px;margin:auto;text-align:center;background:rgba(255,255,255,.86);backdrop-filter:blur(18px);border:1px solid #e8eef8;border-radius:38px;padding:55px 34px;box-shadow:var(--shadow)}
.notfound-illustration{width:110px;height:110px;margin:0 auto 20px;border-radius:32px;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-size:52px;box-shadow:0 22px 45px rgba(37,99,235,.30)}
.notfound-search{max-width:620px;margin:24px auto 0}

/* Admin premium layout */
.admin-shell{display:flex;min-height:100vh}
.sidebar{width:285px;min-width:285px;background:linear-gradient(180deg,#0f172a,#111827);min-height:100vh;position:sticky;top:0;padding:20px;box-shadow:-12px 0 40px rgba(15,23,42,.22);flex-direction:column}
.admin-logo{display:flex;align-items:center;gap:12px;color:#fff;margin-bottom:24px;padding:12px;border:1px solid rgba(255,255,255,.08);border-radius:20px;background:rgba(255,255,255,.04)}
.admin-logo span{width:45px;height:45px;border-radius:16px;background:linear-gradient(135deg,#2563eb,#7c3aed);display:flex;align-items:center;justify-content:center}
.sidebar nav{display:grid;gap:7px}
.sidebar a{display:flex;align-items:center;gap:12px;color:#cbd5e1;text-decoration:none;padding:13px 14px;border-radius:16px;font-weight:900;transition:.2s;border:1px solid transparent}
.sidebar a i{font-size:18px;width:22px;text-align:center}
.sidebar a:hover,.sidebar a.active{background:rgba(37,99,235,.16);color:#fff;border-color:rgba(96,165,250,.24);transform:translateX(-2px)}
.sidebar a.active{background:linear-gradient(135deg,#2563eb,#4f46e5);box-shadow:0 14px 25px rgba(37,99,235,.25)}
.admin-main{flex:1;padding:28px}
.admin-menu-btn{position:fixed;top:14px;left:14px;z-index:1000;width:48px;height:48px;border:0;border-radius:16px;background:#2563eb;color:#fff;font-size:24px;box-shadow:0 14px 26px rgba(37,99,235,.28)}
.admin-card{border:1px solid var(--line);box-shadow:var(--shadow)}
.icon-picker-wrap{background:#fff;border:1px solid var(--line);border-radius:22px;padding:14px}
.icon-live-preview{display:flex;align-items:center;gap:12px;font-weight:900;color:#334155;margin-bottom:12px}
.icon-live-preview i{width:48px;height:48px;border-radius:16px;background:linear-gradient(135deg,#2563eb,#7c3aed);color:#fff;font-size:23px;box-shadow:0 12px 22px rgba(37,99,235,.24)}
.icon-picker{grid-template-columns:repeat(auto-fill,minmax(52px,1fr));gap:10px;background:#f8fafc;border:1px dashed #dbeafe}
.icon-choice{height:52px;border-radius:16px;transition:.18s}
.icon-choice:hover{transform:translateY(-2px);box-shadow:0 10px 20px rgba(15,23,42,.10)}
.icon-choice.active{background:linear-gradient(135deg,#2563eb,#7c3aed);border-color:transparent}
.table{border-radius:18px;overflow:hidden}
.table thead th{background:#f8fafc;color:#334155;font-weight:900;border-bottom:1px solid var(--line)}

@media(max-width:991px){
  .admin-shell{display:block}
  .admin-main{padding:76px 14px 20px}
  .sidebar{width:auto;min-width:0;position:relative;min-height:auto;box-shadow:none}
  .mobile-admin-sidebar{background:linear-gradient(180deg,#0f172a,#111827);min-height:100%}
  .nav-wrap{min-height:68px}
  .brand-text{font-size:18px}
  .section-head{gap:12px}
  .section-icon{width:52px;height:52px;min-width:52px;border-radius:18px}
}
@media(max-width:575px){
  body{background:linear-gradient(180deg,#f8fbff,#eef4ff)}
  .hero{border-radius:26px;padding:22px}
  .hero .display-5{font-size:28px;line-height:1.25}
  .section-card{border-radius:24px;padding:20px}
  .section-head{margin-bottom:16px}
  .section-title{font-size:22px}
  .list-tile{gap:10px;padding:12px 13px}
  .small-icon,.arrow{width:38px;height:38px;min-width:38px}
  .book .card-body{padding:17px}
  .notfound-card{border-radius:28px;padding:38px 18px}
  .notfound-illustration{width:86px;height:86px;border-radius:26px;font-size:42px}
  .icon-picker{grid-template-columns:repeat(5,1fr)}
}


/* ===== Ultra premium mobile/menu/centering patch ===== */
.nav-toggle{
  display:flex!important;align-items:center!important;justify-content:center!important;
  box-shadow:0 12px 24px rgba(37,99,235,.16);color:#2563eb;
}
.nav-toggle i{line-height:1!important}

.premium-mobile-menu{
  width:min(92vw,390px)!important;
  border:0!important;
  border-radius:28px 0 0 28px;
  overflow:hidden;
  background:
    radial-gradient(circle at 90% 0%,rgba(37,99,235,.16),transparent 34%),
    linear-gradient(180deg,#ffffff,#f8fbff);
  box-shadow:-22px 0 70px rgba(15,23,42,.24);
}
.premium-mobile-menu .offcanvas-header{
  padding:20px 18px;
  background:linear-gradient(135deg,#0f172a,#1e3a8a);
  color:#fff;
}
.premium-mobile-menu .btn-close{filter:invert(1);opacity:.92}
.mobile-links{
  padding:16px!important;
  gap:10px!important;
}
.mobile-links a{
  min-height:62px;
  border-radius:20px!important;
  padding:13px 14px!important;
  background:rgba(255,255,255,.92)!important;
  border:1px solid rgba(226,232,240,.95)!important;
  box-shadow:0 12px 28px rgba(15,23,42,.07)!important;
}
.mobile-links a > i:first-child{
  width:42px!important;height:42px!important;min-width:42px!important;
  border-radius:15px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  background:#eff6ff;color:#2563eb;font-size:19px;line-height:1!important;
}
.mobile-links a.active{
  background:linear-gradient(135deg,#2563eb,#7c3aed)!important;color:#fff!important;
}
.mobile-links a.active > i:first-child{
  background:rgba(255,255,255,.18)!important;color:#fff!important;
}
.mobile-links a span{font-weight:900;flex:1}
.mobile-links .bi-chevron-left{margin-inline-start:0!important;color:#94a3b8}
.mobile-links a.active .bi-chevron-left{color:#fff}

/* Perfect icon centering everywhere */
.brand-icon,.section-icon,.small-icon,.arrow,.social,.notfound-illustration,.icon-choice,.icon-live-preview i{
  display:flex!important;align-items:center!important;justify-content:center!important;
  vertical-align:middle!important;text-align:center!important;overflow:hidden;
}
.brand-icon i,.section-icon i,.small-icon i,.arrow i,.social i,.notfound-illustration i,.icon-choice i,.icon-live-preview i{
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:1em!important;height:1em!important;line-height:1!important;margin:0!important;
  font-size:inherit!important;
}
.section-icon{
  flex:0 0 60px!important;
}
.small-icon,.arrow{
  flex:0 0 42px!important;
  margin:0!important;
}
.list-tile{
  display:grid!important;
  grid-template-columns:42px minmax(0,1fr) 42px!important;
  align-items:center!important;
  column-gap:12px!important;
}
.list-tile .arrow{grid-column:1}
.list-tile span:nth-child(2){
  grid-column:2;min-width:0;white-space:normal;overflow-wrap:anywhere;
}
.list-tile .small-icon{grid-column:3}

.notfound-card{
  background:
    radial-gradient(circle at top right,rgba(37,99,235,.13),transparent 32%),
    linear-gradient(180deg,rgba(255,255,255,.94),rgba(248,251,255,.94))!important;
}
.notfound-card h1{font-size:clamp(30px,6vw,54px)}
.notfound-card .btn{min-height:46px;display:inline-flex;align-items:center;justify-content:center;gap:7px}

@media(max-width:575px){
  .premium-mobile-menu{width:94vw!important;border-radius:24px 0 0 24px}
  .mobile-links a{min-height:58px;border-radius:18px!important}
  .mobile-links a > i:first-child{width:39px!important;height:39px!important;min-width:39px!important}
  .section-head{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 56px!important;
    align-items:center!important;
  }
  .section-icon{width:56px!important;height:56px!important;min-width:56px!important;flex-basis:56px!important;border-radius:19px!important}
  .list-tile{
    grid-template-columns:38px minmax(0,1fr) 38px!important;
    padding:13px!important;
  }
  .small-icon,.arrow{width:38px!important;height:38px!important;min-width:38px!important;flex-basis:38px!important}
}

/* ===== Book details + full admin analytics upgrade ===== */
.grade-hero{display:flex;align-items:center;justify-content:space-between;gap:18px}
.book-view{display:grid;grid-template-columns:420px minmax(0,1fr);gap:28px;align-items:stretch}
.book-cover-wrap{position:relative;background:linear-gradient(135deg,#fff,#eef6ff);border:1px solid var(--line);border-radius:34px;padding:16px;box-shadow:var(--shadow);overflow:hidden}
.book-cover-xl{width:100%;height:100%;min-height:520px;object-fit:cover;border-radius:26px;background:#f1f5f9;display:block}
.cover-ribbon{position:absolute;top:28px;right:28px;background:rgba(15,23,42,.86);color:#fff;border-radius:999px;padding:10px 15px;font-weight:900;backdrop-filter:blur(10px)}
.book-info-panel{background:rgba(255,255,255,.92);border:1px solid var(--line);border-radius:34px;padding:34px;box-shadow:var(--shadow)}
.detail-badge{background:#eff6ff!important;color:#1d4ed8!important;border:1px solid #dbeafe;padding:10px 12px;border-radius:999px;font-size:14px}.price-badge{background:#fef3c7!important;color:#92400e!important;padding:10px 12px;border-radius:999px;font-size:14px}
.book-stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.book-stats-grid div{background:linear-gradient(180deg,#f8fafc,#fff);border:1px solid #e8eef8;border-radius:22px;padding:16px;text-align:center}.book-stats-grid i{font-size:23px;color:#2563eb}.book-stats-grid b{display:block;font-size:22px;font-weight:900;margin-top:6px}.book-stats-grid span{color:#64748b;font-weight:800;font-size:13px}.book-desc{background:#f8fafc;border:1px solid #e8eef8;border-radius:22px;padding:20px;line-height:1.9;color:#334155}.teacher-strip{display:flex;gap:16px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:28px;padding:20px;box-shadow:var(--shadow)}.teacher-strip img{width:82px;height:82px;border-radius:24px;object-fit:cover;background:#f1f5f9}.related-book{display:flex;gap:14px;align-items:center;background:#fff;border:1px solid var(--line);border-radius:24px;padding:12px;text-decoration:none;color:#0f172a;box-shadow:0 10px 28px rgba(15,23,42,.08);height:100%}.related-book:hover{transform:translateY(-2px)}.related-book img{width:92px;height:92px;border-radius:18px;object-fit:cover}.related-book h5{font-weight:900;margin:0 0 6px}.related-book span{color:#64748b;font-weight:800}.line-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.dash-hero{display:flex;justify-content:space-between;align-items:center;gap:16px;background:radial-gradient(circle at top left,rgba(37,99,235,.13),transparent 30%),#fff}.stat-pro{position:relative;overflow:hidden}.stat-pro>i{position:absolute;left:18px;top:18px;font-size:34px;color:#2563eb22}.admin-list-link{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px;border:1px solid #e8eef8;background:#f8fafc;border-radius:18px;margin-bottom:10px;text-decoration:none;color:#0f172a}.admin-list-link b{display:block}.admin-list-link small{display:block;color:#64748b;margin-top:3px}.feature-mini{height:100%;background:#f8fafc;border:1px solid #e8eef8;border-radius:20px;padding:18px}.feature-mini i{font-size:28px;color:#2563eb}.feature-mini b{display:block;margin:8px 0 3px;font-weight:900}.feature-mini span{color:#64748b;font-weight:700}
@media(max-width:991px){.grade-hero{display:block}.book-view{grid-template-columns:1fr}.book-cover-xl{min-height:360px}.book-info-panel{padding:24px}.book-stats-grid{grid-template-columns:1fr 1fr}.dash-hero{display:block}.dash-hero .btn{margin-top:15px}}
@media(max-width:575px){.book-cover-wrap,.book-info-panel{border-radius:24px}.book-cover-xl{min-height:270px;border-radius:18px}.book-stats-grid{grid-template-columns:1fr}.teacher-strip{align-items:flex-start}.teacher-strip img{width:66px;height:66px;border-radius:18px}.related-book img{width:74px;height:74px}.cover-ribbon{top:22px;right:22px}}
