/* Styling admin sederhana - bukan tiruan gaya retro situs utama, cukup rapi & jelas. */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, 'Segoe UI', Arial, sans-serif; background: #f4f5f7; color: #1a1a1a; }

.admin-nav {
  background: #1e3a5f;
  color: white;
  display: flex;
  align-items: center;
  padding: 0 24px;
  height: 56px;
  gap: 24px;
}
.admin-nav a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 14px; font-weight: 600; }
.admin-nav a.active, .admin-nav a:hover { color: white; }
.admin-nav .brand { font-weight: 800; font-size: 16px; margin-right: 8px; }
.admin-nav .spacer { flex: 1; }
.admin-nav button { background: none; border: none; color: rgba(255,255,255,0.75); cursor: pointer; font-size: 14px; }
.admin-nav button:hover { color: white; }

.admin-wrap { max-width: 1000px; margin: 0 auto; padding: 24px; }

.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-header h1 { font-size: 22px; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 6px; border: none; font-size: 13px; font-weight: 700; cursor: pointer; text-decoration: none; }
.btn-primary { background: #1e3a5f; color: white; }
.btn-primary:hover { background: #16283f; }
.btn-danger { background: #fdeceb; color: #c0392b; }
.btn-danger:hover { background: #fadbd8; }
.btn-secondary { background: #e8e8e8; color: #333; }
.btn-secondary:hover { background: #ddd; }
.btn-small { padding: 5px 10px; font-size: 12px; }

/* Spinner di tombol Simpan saat proses upload - biar kelihatan lagi
   proses, bukan diam kayak belum kepencet. Teks tombol disembunyikan
   (color: transparent) supaya spinner-nya kelihatan di tengah. */
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: '';
  position: absolute; left: 50%; top: 50%;
  width: 14px; height: 14px;
  margin: -7px 0 0 -7px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin { to { transform: rotate(360deg); } }

table { width: 100%; border-collapse: collapse; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
th { text-align: left; font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; color: #888; padding: 12px 16px; border-bottom: 2px solid #eee; background: #fafafa; }
td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 13px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; background: #eee; display: block; }
.action-group { display: flex; gap: 6px; }

.empty-state { text-align: center; padding: 60px 20px; color: #999; background: white; border-radius: 8px; }

.variant-summary { font-size: 12px; font-weight: 600; }
.btn-link-detail { background: none; border: none; color: #1e3a5f; font-size: 11px; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.variant-detail { font-size: 11px; color: #666; margin-top: 4px; line-height: 1.5; }

.form-card { background: white; border-radius: 8px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); max-width: 640px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; font-weight: 700; color: #555; margin-bottom: 6px; }
.form-group input[type="text"], .form-group input[type="number"], .form-group input[type="date"],
.form-group select, .form-group textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid #ddd; border-radius: 6px; font-size: 13px; font-family: inherit;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 11px; color: #999; margin-top: 4px; }
.current-photo { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.current-photo img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: #eee; }

.variant-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.variant-row input { flex: 1; }
.variant-row .btn-remove-variant { flex: 0 0 auto; background: #fdeceb; color: #c0392b; border: none; border-radius: 6px; width: 32px; height: 32px; cursor: pointer; font-size: 16px; }

.alert { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: #fdeceb; color: #c0392b; }
.alert-success { background: #e8f8ee; color: #1e7e42; }

.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: white; padding: 32px; border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); width: 320px; }
.login-card h1 { font-size: 18px; margin-bottom: 20px; text-align: center; }

.option-chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.option-chip { background: #eef1f5; border-radius: 14px; padding: 4px 6px 4px 10px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; cursor: grab; }
.option-chip button { background: none; border: none; cursor: pointer; color: #c0392b; font-size: 14px; line-height: 1; padding: 0 2px; }
.option-chip .chip-move { color: #888; font-size: 9px; padding: 0; cursor: pointer; }
.option-chip .chip-move:disabled { opacity: 0.25; cursor: default; }
.option-chip.dragging { opacity: 0.35; }
.option-add-row { display: flex; gap: 8px; }
.option-add-row input { flex: 1; }

.photo-preview-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.photo-thumb { position: relative; width: 72px; height: 72px; cursor: grab; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; background: #eee; display: block; }
.photo-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; background: #c0392b; color: white; border: none; cursor: pointer; font-size: 12px; line-height: 1; }
.photo-thumb .photo-move { position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); display: flex; gap: 3px; background: white; border-radius: 4px; padding: 1px 4px; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.photo-thumb .photo-move button { position: static; width: auto; height: auto; border-radius: 0; background: none; color: #888; font-size: 9px; padding: 0; cursor: pointer; }
.photo-thumb .photo-move button:disabled { opacity: 0.25; cursor: default; }
.photo-thumb.dragging { opacity: 0.35; }

#combosWrap table td input { width: 100%; }
#combosWrap .combo-check-col { width: 32px; text-align: center; }
#combosWrap table tr.combo-group-start td { border-top: 2px solid #ccc; }

/* Hapus panah naik/turun di kolom Harga & Harga Coret - gampang kepencet gak sengaja. */
#combosWrap input[type="number"]::-webkit-outer-spin-button,
#combosWrap input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#combosWrap input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.bulk-edit-bar { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; background: #eef1f5; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.bulk-edit-bar .bulk-edit-label { font-size: 12px; font-weight: 700; color: #555; align-self: center; }
.bulk-edit-field { display: flex; flex-direction: column; gap: 3px; }
.bulk-edit-field label { font-size: 10px; color: #888; font-weight: 700; }
.bulk-edit-bar input[type="text"], .bulk-edit-bar input[type="number"] { padding: 7px 10px; border: 1.5px solid #ddd; border-radius: 6px; font-size: 13px; font-family: inherit; width: 120px; }
.bulk-edit-actions { display: flex; gap: 8px; }

.decor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.decor-card { background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.decor-card img { width: 100%; height: 100px; object-fit: cover; display: block; background: #eee; }
.decor-card .decor-body { padding: 10px; }
.decor-card .decor-actions { display: flex; gap: 4px; margin-top: 8px; }
.upload-card { border: 2px dashed #ccc; border-radius: 8px; padding: 20px; text-align: center; background: white; margin-bottom: 20px; }

/* ===== Dashboard ===== */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: white; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.stat-card .stat-num { font-size: 32px; font-weight: 800; color: #1e3a5f; line-height: 1; margin-bottom: 6px; }
.stat-card .stat-label { font-size: 12px; color: #888; font-weight: 600; }
.stat-card .stat-sub { font-size: 11px; color: #bbb; margin-top: 4px; }

.shortcut-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }

.dash-section { background: white; border-radius: 8px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 20px; }
.dash-section h3 { font-size: 14px; margin-bottom: 14px; }

.attention-list, .activity-list, .notes-list { list-style: none; }
.attention-list li, .activity-list li, .notes-list li { padding: 9px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.attention-list li:last-child, .activity-list li:last-child, .notes-list li:last-child { border-bottom: none; }
.attention-list .tag { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #fdf3e0; color: #b8860b; white-space: nowrap; }
.attention-empty { color: #999; justify-content: flex-start !important; }

.activity-list .activity-type { font-size: 10px; font-weight: 700; text-transform: uppercase; color: #1e3a5f; margin-right: 4px; }
.activity-list a { color: #1a1a1a; text-decoration: none; }
.activity-list a:hover { text-decoration: underline; }
.activity-list .activity-time { font-size: 11px; color: #aaa; white-space: nowrap; }

.notes-form { display: flex; gap: 10px; margin-bottom: 14px; align-items: flex-start; }
.notes-form textarea { flex: 1; min-height: 44px; padding: 9px 12px; border: 1.5px solid #ddd; border-radius: 6px; font-size: 13px; font-family: inherit; resize: vertical; }
.notes-list .note-body { white-space: pre-wrap; flex: 1; }
.notes-list .note-meta { font-size: 11px; color: #aaa; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
