/* Gaya bersama halaman Bahan, Galeri, dan Tentang Kami di admin. */

.ce-intro { color: var(--muted); font-size: 0.88rem; margin: -10px 0 20px; line-height: 1.55; }

.ce-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 20px;
}
.ce-card > h2 { margin: 0 0 4px; font-size: 1.05rem; }
.ce-card > .ce-sub { margin: 0 0 14px; color: var(--muted); font-size: 0.82rem; }
.ce-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ce-card-head h2 { margin: 0; font-size: 1.05rem; }

.ce-card .field { margin-bottom: 14px; }
.ce-card .field:last-child { margin-bottom: 0; }
.ce-card .field textarea { min-height: 84px; resize: vertical; font-family: inherit; }
.ce-card .field .ce-count { font-size: 0.75rem; color: var(--muted); text-align: right; margin-top: 2px; }
.ce-card .hint-text { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }
.ce-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .ce-grid-2 { grid-template-columns: 1fr; } }

/* ---------- Baris item (bahan / foto galeri / misi) ---------- */
.ce-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.ce-row:first-child { border-top: none; padding-top: 4px; }
.ce-reorder { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.ce-reorder button {
  width: 26px;
  height: 22px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.7rem;
  line-height: 1;
}
.ce-reorder button:disabled { opacity: 0.35; cursor: not-allowed; }
.ce-thumb {
  width: 132px;
  flex-shrink: 0;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--accent-light);
  cursor: pointer;
  overflow: hidden;
  position: relative;
  padding: 0;
  display: block;
}
.ce-thumb--4x3 { aspect-ratio: 4 / 3; }
.ce-thumb--1x1 { aspect-ratio: 1 / 1; width: 112px; }
.ce-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ce-thumb span {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(31, 27, 22, 0.62);
  color: var(--white);
  font-size: 0.72rem;
  padding: 3px 0;
  text-align: center;
}
.ce-thumb.is-empty { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 0.78rem; }
.ce-thumb.is-empty span { position: static; background: none; color: var(--muted); padding: 0; }
.ce-fields { flex: 1; min-width: 0; }
.ce-fields .field { margin-bottom: 10px; }
.ce-fields .field:last-child { margin-bottom: 0; }
.ce-fields .field textarea { min-height: 64px; resize: vertical; font-family: inherit; }
.ce-row-actions { flex-shrink: 0; }
.ce-empty { padding: 22px 8px; text-align: center; color: var(--muted); font-size: 0.9rem; }
.ce-note {
  background: var(--accent-light);
  color: var(--accent-dark);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.84rem;
  line-height: 1.5;
  margin-bottom: 14px;
}
.ce-mission-row { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; }
.ce-mission-row textarea { flex: 1; min-height: 52px; }

@media (max-width: 640px) {
  .ce-row { flex-wrap: wrap; }
  .ce-fields { flex-basis: 100%; order: 3; }
}

/* ---------- Bar simpan (nempel di bawah layar) ---------- */
.ce-savebar {
  position: sticky;
  bottom: 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 5;
}
.ce-savebar .ce-status { font-size: 0.82rem; color: var(--muted); flex: 1; min-width: 140px; }
.ce-savebar .ce-status.is-dirty { color: var(--accent-dark); font-weight: 600; }

/* ---------- Modal crop gambar ---------- */
.crop-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(31, 27, 22, 0.62);
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}
.crop-modal-overlay.is-open { display: flex; }
.crop-modal {
  background: var(--white);
  border-radius: 12px;
  width: 100%;
  max-width: 760px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.crop-modal-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 18px 20px 0; }
.crop-modal-head h3 { margin: 0; font-size: 1.15rem; }
.crop-modal-close { background: none; border: none; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 0 0 12px; }
.crop-modal-hint { padding: 4px 20px 14px; font-size: 0.82rem; color: var(--muted); margin: 0; }
.crop-modal-body { flex: 1; overflow: hidden; background: #1f1b16; min-height: 260px; max-height: 60vh; }
.crop-modal-body img { display: block; max-width: 100%; }
.crop-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.crop-modal-size { font-size: 0.82rem; color: var(--muted); }
.crop-modal-actions { display: flex; gap: 10px; }
