/* إدارة كتالوج محرك البحث + تحسينات نتائج الوسائط */

.hus-foot {
  padding: 10px 16px 14px;
  border-top: 1px solid #f1f5f9;
  background: #fafafa;
}

.hus-foot a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
  color: #b91c1c;
  text-decoration: none;
}

.hus-foot a:hover {
  text-decoration: underline;
}

.hus-item-thumb {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
  background: #f1f5f9;
  border: 1px solid #e5e7eb;
}

.hus-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hus-badge-content,
.hus-badge-image,
.hus-badge-file,
.hus-badge-video {
  background: #fff1f2;
  color: #9f1239;
}

.hus-filters {
  flex-wrap: wrap;
}

/* ===== صفحة الأدمن ===== */
.sca-page {
  padding-bottom: 48px;
}

.sca-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
  gap: 18px;
  align-items: start;
}

.sca-card {
  background: #fff;
  border: 1px solid #ececf1;
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.sca-card h2 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 900;
}

.sca-card > p.lead {
  margin: 0 0 16px;
  color: #4b5563;
  font-weight: 600;
  line-height: 1.7;
}

.sca-form {
  display: grid;
  gap: 10px;
}

.sca-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  color: #1f2937;
}

.sca-form input,
.sca-form select,
.sca-form textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 700;
  box-sizing: border-box;
}

.sca-form textarea {
  min-height: 90px;
  resize: vertical;
}

.sca-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sca-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.sca-feedback {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #065f46;
  font-weight: 800;
  font-size: 13px;
}

.sca-feedback.is-error {
  background: #fef2f2;
  color: #991b1b;
}

.sca-list {
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
}

.sca-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #ececf1;
  border-radius: 14px;
  background: #fff;
}

.sca-item img,
.sca-item .sca-ico {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff1f2;
  color: #b91c1c;
  display: grid;
  place-items: center;
  font-size: 20px;
}

.sca-item strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  color: #111827;
}

.sca-item small {
  color: #6b7280;
  font-weight: 700;
  font-size: 12px;
  line-height: 1.5;
}

.sca-item-actions {
  display: grid;
  gap: 6px;
}

.sca-item-actions button,
.sca-toolbar button,
.sca-toolbar a,
.sca-toolbar label.btn {
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  border-radius: 999px;
  padding: 7px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.sca-item-actions button.is-danger {
  color: #b91c1c;
  border-color: #fecaca;
}

.sca-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.sca-hint {
  margin: 10px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  line-height: 1.6;
}

.sca-preview {
  margin-top: 8px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  max-height: 180px;
  background: #0f172a;
}

.sca-preview img,
.sca-preview video {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .sca-layout,
  .sca-grid-2 {
    grid-template-columns: 1fr;
  }
}
