/* BACAGRATIS ICON POLISH V2 */
.ui-icon,
.nav-icon,
.btn-icon,
.action-icon,
.badge-icon,
.cat-svg,
.activity-icon{
  width:20px;
  height:20px;
  display:inline-block;
  vertical-align:middle;
  flex:0 0 auto;
  color:currentColor;
}

.btn-icon{width:18px;height:18px}
.badge-icon{width:14px;height:14px}
.action-icon{width:18px;height:18px}
.activity-icon{width:22px;height:22px;color:#2563eb}

.brand-mark{
  width:38px!important;
  height:38px!important;
}

.admin-menu a{
  gap:12px!important;
}

.admin-menu a span{
  line-height:1;
}

.nav-icon{
  color:currentColor;
}

.cat-card{
  text-align:center;
  min-height:138px;
  display:flex!important;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
}

.cat-card .cat-icon{
  width:56px;
  height:56px;
  border-radius:18px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 8px;
  background:linear-gradient(135deg,#eff6ff,#fff);
  border:1px solid #dbeafe;
  color:#2563eb;
  box-shadow:0 10px 24px rgba(37,99,235,.08);
}

.cat-card .cat-svg{
  width:28px;
  height:28px;
}

.badge{
  gap:5px;
}

.badge.format-pdf{
  background:#fef2f2;
  color:#dc2626;
  border-color:#fecaca;
}

.badge.format-epub{
  background:#ecfdf5;
  color:#059669;
  border-color:#bbf7d0;
}

.action-btn{
  width:42px!important;
  min-width:42px!important;
  height:42px!important;
  padding:0!important;
  border-radius:14px!important;
  color:#0f172a!important;
  background:#fff!important;
  border:1px solid #e2e8f0!important;
  box-shadow:none!important;
}

.action-btn:hover{
  color:#2563eb!important;
  border-color:#bfdbfe!important;
  background:#eff6ff!important;
}

.action-btn.danger{
  color:#ef4444!important;
}

.action-btn.danger:hover{
  background:#fef2f2!important;
  border-color:#fecaca!important;
  color:#dc2626!important;
}

.activity-line{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 0;
  border-bottom:1px solid #edf2f7;
  color:#334155;
}

.activity-line:last-child{border-bottom:0}

.searchbar span:first-child{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:22px;
  color:#64748b;
}

/* Hide leftover unsupported glyphs if they appear alone */
.cat-icon:empty::before{
  content:"";
}

/* Reader cleanup: keep topbar readable and prevent cramped duplicate controls */
.reader-top .btn,
.reader-topbar .btn{
  white-space:nowrap;
}

.reader-top iframe,
.reader-main iframe{
  background:#fff;
}

/* Improve admin table action cell */
.admin-table td:last-child{
  white-space:nowrap;
}

@media(max-width:760px){
  .cat-card .cat-icon{
    width:48px;
    height:48px;
    border-radius:16px;
  }
  .cat-card .cat-svg{
    width:24px;
    height:24px;
  }
  .action-btn{
    width:38px!important;
    min-width:38px!important;
    height:38px!important;
  }
}
