/* ========== Theme: Luxe Compact ========== */
:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --ink:#182030;
  --muted:#6b7385;
  --brand-1:#5d6af0; /* primary */
  --brand-2:#7b53c6; /* accent */
  --ok:#22c55e;
  --warn:#f59e0b;
  --soft-shadow: 0 6px 18px rgba(24,32,48,.08);
  --soft-shadow-lg: 0 14px 36px rgba(24,32,48,.12);
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

/* Base */
body{ background: var(--bg); color: var(--ink); }
.text-muted{ color: var(--muted) !important; }

/* Hero */
.hero-modern{
  background: linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 100%);
  color:#fff;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  padding-block: 32px !important;
  box-shadow: var(--soft-shadow-lg);
}
.search-box-modern{
  background: rgba(28, 125, 243, 0.9);
  border-radius: 40px;
  box-shadow: var(--soft-shadow);
  transition: .25s ease;
}
.search-box-modern:focus-within{ transform: translateY(-2px); box-shadow: var(--soft-shadow-lg); }
.search-box-modern input{ border:0; background:transparent; padding:.7rem 1rem; }

/* Stats */
.stat-chip{
  background:#fff;border:1px solid rgba(24,32,48,.06);border-radius:14px;
  padding:.6rem .8rem;font-weight:600;box-shadow:0 6px 18px rgba(24,32,48,.06);
  display:flex;gap:.5rem;align-items:center;justify-content:center;
}
.stat-chip i{color:var(--brand-1);}

/* Domain Card */
.domain-card-modern{
  border:0; border-radius: var(--radius-lg);
  overflow:hidden; box-shadow: var(--soft-shadow);
  transition:.25s ease; margin-bottom: 22px; background:var(--card);
}
.domain-card-modern:hover{ transform: translateY(-3px); box-shadow: var(--soft-shadow-lg); }
.domain-header-modern{
  background: linear-gradient(180deg,#f7f9ff 0%,#eef2ff 100%);
  padding: 14px 18px; border-bottom:1px solid rgba(93,106,240,.08);
}
.stats-badge{
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color:#fff; border-radius: 999px; padding:.25rem .65rem; font-size:.8rem;
}

/* Entries Grid */
.entries-grid{ display:grid; grid-template-columns: repeat(1,minmax(0,1fr)); gap: 14px; }
@media (min-width: 576px){ .entries-grid{ grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (min-width: 1200px){ .entries-grid{ grid-template-columns: repeat(3,minmax(0,1fr)); } }

/* Entry Card */
.entry-card-modern{
  background: var(--card);
  border:1px solid rgba(24,32,48,.06);
  border-radius: var(--radius-md);
  box-shadow: var(--soft-shadow);
  transition:.25s ease;
  padding: 14px;
}
.entry-card-modern:hover{ transform: translateY(-3px); border-color: rgba(93,106,240,.35); }
.entry-card-modern h3{ font-size: .98rem; margin:0; }
.badge.rounded-pill{ font-weight:600; letter-spacing:.2px; }

.entry-meta{ display:flex; flex-wrap:wrap; gap:.4rem .9rem; }

/* Files line */
.file-item-modern{
  background: linear-gradient(180deg,#fafbff 0%,#f1f3f9 100%);
  border:1px solid rgba(24,32,48,.06);
  border-radius: 12px;
  padding: .55rem .7rem;
  gap:.6rem; display:flex; align-items:center;
}
.file-item-modern:hover{ background:#fff; box-shadow: var(--soft-shadow); transform: translateX(-2px); }
.file-icon-circle{
  width:34px; height:34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color:#fff; font-size:.9rem; display:flex; align-items:center; justify-content:center;
}
.file-thumb{ width:34px; height:34px; object-fit:cover; }

/* Actions */
.btn-action-modern{
  --bs-btn-padding-y: .35rem; --bs-btn-padding-x: .55rem;
  border-radius: 10px !important;
}

/* View switch: List mode */
.view-list .entries-grid{ display:block; }
.view-list .entry-card-modern{ margin-bottom:12px; }
.view-list .entry-card-modern .file-item-modern{ border-radius:10px; }

/* QR Modal */
.modal-content{ border-radius: var(--radius-lg) !important; }
/* مصغّرات أنعم */
.file-thumb{
  width:34px;height:34px;object-fit:cover;border-radius:8px;
  box-shadow: 0 4px 10px rgba(24,32,48,.08);
}

/* Popover حواف ناعمة */
.popover { border-radius: 14px; box-shadow: 0 12px 28px rgba(24,32,48,.18); }

/* عند فشل مصغّر الـ pdf */
.file-item-modern.noface .file-icon-circle{ margin-inline-start: 2px; }

/* زر الإغلاق في المودال */
#viewModal .btn-close{ filter: invert(1) grayscale(1); }
